StreamImageProvider.h
Go to the documentation of this file.
1/**
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package TabletTeleoperation::ArmarXObjects::StreamImageProvider
19 * @author Mirko Waechter ( mirko dot waechter at kit dot edu )
20 * @date 2013
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25#pragma once
26
27
30
33
34namespace armarx
35{
36 /**
37 * @class StreamImageProvider
38 * @brief StreamImageProvider implements a ImageProvider interfaces
39 * and retrieves images of a StreamReceiver, which in turn decodes
40 * an image stream into raw images.
41 *
42 * This class is the interface to
43 * from a compressed video stream to the normal visionx image provider
44 * format.
45 *
46 *
47 */
49
50 {
51 public:
52 /**
53 * @see armarx::ManagedIceObject::getDefaultName()
54 */
55 virtual std::string
57 {
58 return "StreamImageProvider";
59 }
60
61 void setReceiver(StreamReceiverPtr receiver);
62
63 protected:
64 // ImageProvider interface
65 protected:
66 void onConnectComponent();
70
71 // ManagedIceObject interface
72 private:
73 void pullImages();
74 StreamReceiverPtr streamReceiver;
75 std::vector<CByteImage*> images;
77 };
78
80} // namespace armarx
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
StreamImageProvider implements a ImageProvider interfaces and retrieves images of a StreamReceiver,...
void onConnectImageProvider()
This is called when the Component::onConnectComponent() setup is called.
void setReceiver(StreamReceiverPtr receiver)
void onExitImageProvider()
This is called when the Component::onExitComponent() setup is called.
void onConnectComponent()
Pure virtual hook for the subclass.
void onInitImageProvider()
This is called when the Component::onInitComponent() is called.
virtual std::string getDefaultName() const
ImageProvider abstract class defines a component which provide images via ice or shared memory.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< StreamReceiver > StreamReceiverPtr
IceInternal::Handle< StreamImageProvider > StreamImageProviderPtr