video_streamer
VideoDecoder.hpp
Go to the documentation of this file.
1 /* Generated from orogen/lib/orogen/templates/tasks/Task.hpp */
2 
3 #ifndef VIDEO_STREAMER_VIDEODECODER_TASK_HPP
4 #define VIDEO_STREAMER_VIDEODECODER_TASK_HPP
5 
6 #include "video_streamer/VideoDecoderBase.hpp"
7 extern "C"
8 {
9 #include "libavcodec/avcodec.h"
10 #include "libswscale/swscale.h"
11 }
12 namespace video_streamer {
13 
28  class VideoDecoder : public VideoDecoderBase
29  {
30  friend class VideoDecoderBase;
31  protected:
32 
33  AVCodec *codec;
34  AVCodecContext *c;
35  AVFrame *rgb_picture;
36  AVFrame *yuv_picture;
37  AVPacket avpkt;
38  SwsContext *sws_context;
39  base::samples::frame::Frame *frame;
40  RTT::extras::ReadOnlyPointer<base::samples::frame::Frame> ro_ptr;
41 
42  void WriteFrame();
43  public:
48  VideoDecoder(std::string const& name = "video_streamer::VideoDecoder", TaskCore::TaskState initial_state = Stopped);
49 
55  VideoDecoder(std::string const& name, RTT::ExecutionEngine* engine, TaskCore::TaskState initial_state = Stopped);
56 
59  ~VideoDecoder();
60 
75  bool configureHook();
76 
82  // bool startHook();
83 
98  void updateHook();
99 
106  // void errorHook();
107 
111  void stopHook();
112 
117  void cleanupHook();
118  };
119 }
120 
121 #endif
122 
RTT::extras::ReadOnlyPointer< base::samples::frame::Frame > ro_ptr
Definition: VideoDecoder.hpp:40
AVFrame * yuv_picture
Definition: VideoDecoder.hpp:36
AVPacket avpkt
Definition: VideoDecoder.hpp:37
base::samples::frame::Frame * frame
Definition: VideoDecoder.hpp:39
Definition: VideoDecoder.hpp:12
friend class VideoDecoderBase
Definition: VideoDecoder.hpp:30
AVFrame * rgb_picture
Definition: VideoDecoder.hpp:35
void stopHook()
Definition: VideoDecoder.cpp:167
The task context provides and requires services. It uses an ExecutionEngine to perform its functions...
Definition: VideoDecoder.hpp:28
AVCodecContext * c
Definition: VideoDecoder.hpp:34
void WriteFrame()
Definition: VideoDecoder.cpp:93
AVCodec * codec
Definition: VideoDecoder.hpp:33
void cleanupHook()
Definition: VideoDecoder.cpp:188
~VideoDecoder()
Definition: VideoDecoder.cpp:30
bool configureHook()
The following lines are template definitions for the various state machine.
Definition: VideoDecoder.cpp:40
SwsContext * sws_context
Definition: VideoDecoder.hpp:38
VideoDecoder(std::string const &name="video_streamer::VideoDecoder", TaskCore::TaskState initial_state=Stopped)
Definition: VideoDecoder.cpp:16
void updateHook()
Definition: VideoDecoder.cpp:120