10 #ifndef FfmpegWriter_INC
11 #define FfmpegWriter_INC
16 #include <libavcodec/avcodec.h>
17 #include <libavformat/avformat.h>
51 video_outbuf(nullptr),
57 system_resource = NULL;
62 bool close()
override;
75 void *system_resource;
79 AVStream *audio_st, *video_st;
80 double audio_pts, video_pts;
83 AVFrame *picture, *tmp_picture;
84 uint8_t *video_outbuf;
85 int frame_count, video_outbuf_size;
94 ready = delayedOpen(savedConfig);
95 if (delayed) { ready =
false; }
100 void open_video(AVFormatContext *oc, AVStream *st);
102 void write_video_frame(AVFormatContext *oc, AVStream *st,
105 void close_video(AVFormatContext *oc, AVStream *st);
Uses ffmpeg to write images/sounds to movie files (AVI, MOV, ...).
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool putImage(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) override
Write an image to the device.
bool close() override
Close the DeviceDriver.
virtual bool putAudioVisual(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image, yarp::sig::Sound &sound) override
Write an image and sound.
Interface implemented by all device drivers.
Write a YARP-format image and sound to a device.
Read a YARP-format image to a device.
A class for storing options and configuration information.
A base class for nested structures that can be searched.
Class for storing sounds.