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
bool newFrameIsAvailable()
int getLastFrameSize()
yarp::os::Semaphore semaphore
Definition: H264Decoder.h:45
std::mutex mutex
Definition: H264Decoder.h:44
H264Decoder(h264Decoder_cfgParamters &config)
yarp::sig::ImageOf< yarp::sig::PixelRgb > & getLastFrame()
A class for thread synchronization and mutual exclusion.
Definition: Semaphore.h:29
struct h264Decoder_cfgParamters::@92 crop