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 namespace armarx
34 {
35  /**
36  * @class StreamImageProvider
37  * @brief StreamImageProvider implements a ImageProvider interfaces
38  * and retrieves images of a StreamReceiver, which in turn decodes
39  * an image stream into raw images.
40  *
41  * This class is the interface to
42  * from a compressed video stream to the normal visionx image provider
43  * format.
44  *
45  *
46  */
48  virtual public visionx::ImageProvider
49 
50  {
51  public:
52  /**
53  * @see armarx::ManagedIceObject::getDefaultName()
54  */
55  virtual std::string getDefaultName() const
56  {
57  return "StreamImageProvider";
58  }
59 
60  void setReceiver(StreamReceiverPtr receiver);
61  protected:
62 
63 
64  // ImageProvider interface
65  protected:
66  void onConnectComponent();
67  void onInitImageProvider();
69  void onExitImageProvider();
70 
71  // ManagedIceObject interface
72  private:
73 
74  void pullImages();
75  StreamReceiverPtr streamReceiver;
76  std::vector<CByteImage*> images;
78 
79 
80  };
82 }
83 
PeriodicTask.h
armarx::StreamImageProvider::onConnectImageProvider
void onConnectImageProvider()
This is called when the Component::onConnectComponent() setup is called.
Definition: StreamImageProvider.cpp:79
armarx::StreamImageProvider
StreamImageProvider implements a ImageProvider interfaces and retrieves images of a StreamReceiver,...
Definition: StreamImageProvider.h:47
IceInternal::Handle< StreamReceiver >
armarx::StreamImageProvider::onExitImageProvider
void onExitImageProvider()
This is called when the Component::onExitComponent() setup is called.
Definition: StreamImageProvider.cpp:84
armarx::StreamImageProvider::getDefaultName
virtual std::string getDefaultName() const
Definition: StreamImageProvider.h:55
armarx::StreamImageProvider::onInitImageProvider
void onInitImageProvider()
This is called when the Component::onInitComponent() is called.
Definition: StreamImageProvider.cpp:72
StreamReceiver.h
Component.h
visionx::ImageProvider
ImageProvider abstract class defines a component which provide images via ice or shared memory.
Definition: ImageProvider.h:66
armarx::StreamImageProvider::setReceiver
void setReceiver(StreamReceiverPtr receiver)
Definition: StreamImageProvider.cpp:36
IceUtil::Handle
Definition: forward_declarations.h:29
armarx::StreamImageProvider::onConnectComponent
void onConnectComponent()
Pure virtual hook for the subclass.
Definition: StreamImageProvider.cpp:41
ImageProvider.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28