YARP
Yet Another Robot Platform
H264Decoder.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef H264DECODER_INC
10 #define H264DECODER_INC
11 
12 #include <mutex>
13 #include <yarp/sig/Image.h>
14 #include <yarp/os/Semaphore.h>
15 
17 {
19  crop{0,0,0,0},
20  fps_max(0),
21  remotePort(-1)
22  {}
23 
24  struct
25  {
26  int left; //number of pixel to crop from left
27  int right; //number of pixel to crop from right
28  int top; //number of pixel to crop from top
29  int bottom; //number of pixel to crop from bottom
30  } crop;
31 
32  int fps_max; //max value of fps. it is imposed by gstreamer
33  int remotePort; // the port on which the server send data
34  bool removeJitter; //If true, the carrier reorders and removes duplicate RTP packets as they are received from a network source.
35 };
36 
38 {
39 private:
40  void *sysResource;
42 
43 public:
44  std::mutex mutex ; //==>create functions to work with it
46 
48  ~H264Decoder();
49  bool init();
50  bool start();
51  bool stop();
53  int getLastFrameSize();
54  bool newFrameIsAvailable();
55  void setReq();
56 };
57 
58 #endif
h264Decoder_cfgParamters::remotePort
int remotePort
Definition: H264Decoder.h:33
H264Decoder::getLastFrameSize
int getLastFrameSize()
Definition: H264Decoder.cpp:525
yarp::os::Semaphore
A class for thread synchronization and mutual exclusion.
Definition: Semaphore.h:29
H264Decoder::start
bool start()
Definition: H264Decoder.cpp:483
h264Decoder_cfgParamters::h264Decoder_cfgParamters
h264Decoder_cfgParamters()
Definition: H264Decoder.h:18
H264Decoder::setReq
void setReq()
Definition: H264Decoder.cpp:531
h264Decoder_cfgParamters::top
int top
Definition: H264Decoder.h:28
yarp::sig::ImageOf< yarp::sig::PixelRgb >
H264Decoder::stop
bool stop()
Definition: H264Decoder.cpp:493
h264Decoder_cfgParamters::right
int right
Definition: H264Decoder.h:27
h264Decoder_cfgParamters
Definition: H264Decoder.h:17
h264Decoder_cfgParamters::crop
struct h264Decoder_cfgParamters::@0 crop
H264Decoder::mutex
std::mutex mutex
Definition: H264Decoder.h:44
Semaphore.h
h264Decoder_cfgParamters::fps_max
int fps_max
Definition: H264Decoder.h:32
Image.h
H264Decoder::init
bool init()
Definition: H264Decoder.cpp:456
h264Decoder_cfgParamters::bottom
int bottom
Definition: H264Decoder.h:29
H264Decoder
Definition: H264Decoder.h:38
H264Decoder::H264Decoder
H264Decoder(h264Decoder_cfgParamters &config)
Definition: H264Decoder.cpp:450
h264Decoder_cfgParamters::removeJitter
bool removeJitter
Definition: H264Decoder.h:34
H264Decoder::~H264Decoder
~H264Decoder()
Definition: H264Decoder.cpp:503
H264Decoder::newFrameIsAvailable
bool newFrameIsAvailable()
Definition: H264Decoder.cpp:519
h264Decoder_cfgParamters::left
int left
Definition: H264Decoder.h:26
H264Decoder::getLastFrame
yarp::sig::ImageOf< yarp::sig::PixelRgb > & getLastFrame()
Definition: H264Decoder.cpp:511
H264Decoder::semaphore
yarp::os::Semaphore semaphore
Definition: H264Decoder.h:45