ark::image::AvcodecVideoCompressor

Defined in header “ark/image/avcodec_video_compressor.hh”.


An implementation of the abstract video interface, backed by libavcodec. This is essentially a compressor that allows you to compress to any number of codecs provided by libavcodec.

Note that at the moment, this assumes you are emitting H264-style images.

Methods

  • AvcodecVideoCompressor(const AvcodecVideoCompressorConfiguration & config)
    Default constructor, for implementation details.

  • ~AvcodecVideoCompressor()
    Default destructor, for virtual class.

  • bool write(const Image & image)
    Pushes a camera image into the compressor. This is the image that you want to compress. Returns true if the compressor accepted this frame, or false otherwise.

  • bool read(Image & image)
    Reads a camera image from the compressor. This will return false if there are no camera images left to read. Note that depending on the compressor, there is not a 1:1 relationship between frames written and frames read.

  • void flush()
    Flushes the compressor, getting back any outstanding frames. For example, this can be used to tell the compressor you are done compressing video.