runMACS
 All Data Structures Files Functions Variables Enumerations Enumerator Macros
FFMpegExtractor.h
Go to the documentation of this file.
1 #ifndef FFMPEG_EXTRACTOR_H
2 #define FFMPEG_EXTRACTOR_H
3 
4 #include <Extractor.h>
5 
6 class FFMpegExtractor : public Extractor {
7 public:
8  FFMpegExtractor(zmq::context_t & _ctx,
9  const PubSubEndpoint & _source,
10  const std::string & _identifier,
11  const std::string & _destination);
13  std::string type();
14  std::string identifier();
15  std::list<std::string> parameters();
16 private:
17  //void extractSetup();
18  void extractImpl(unsigned int _width,
19  unsigned int _height,
20  unsigned int _bytesPerPixel,
21  uint64_t highResTime,
22  uint64_t wallTime,
23  zmq::message_t * sourceImage);
24  void extractTeardown();
25 
26  void openStream();
27  void closeStream();
28  void handleSize(unsigned int _width, unsigned int _height, unsigned int _bytesPerPixel);
29 
30  std::string s_identifier;
31  std::string destination;
32  std::string pix_fmt;
33  FILE* ffmpeg = nullptr;
34  unsigned char * buffer = nullptr;
35 
36  unsigned int width;
37  unsigned int height;
38  unsigned int bytesPerPixel;
39  unsigned int reduction = 1;
40  bool error;
41 };
42 
43 #endif /* FFMPEG_EXTRACTOR_H */
Base class for an image extractor.
Definition: Extractor.h:17
std::string identifier()
std::list< std::string > parameters()
FFMpegExtractor(zmq::context_t &_ctx, const PubSubEndpoint &_source, const std::string &_identifier, const std::string &_destination)
std::string type()