virtual void swap (Image &);
float bytes_per_pixel (int) const;
+ friend class pixel_formats_test;
+
private:
void yuv_16_black (uint16_t);
static uint16_t swap_16 (uint16_t);
AVPixelFormat _pixel_format; ///< FFmpeg's way of describing the pixel format of this Image
};
-/** @class FilterBufferImage
- * @brief An Image that is held in an AVFilterBufferRef.
+/** @class FrameImage
+ * @brief An Image that is held in an AVFrame.
*/
-class FilterBufferImage : public Image
+class FrameImage : public Image
{
public:
- FilterBufferImage (AVPixelFormat, AVFilterBufferRef *);
- ~FilterBufferImage ();
+ FrameImage (AVFrame *, bool);
+ ~FrameImage ();
uint8_t ** data () const;
int * line_size () const;
private:
/* Not allowed */
- FilterBufferImage (FilterBufferImage const &);
- FilterBufferImage& operator= (FilterBufferImage const &);
+ FrameImage (FrameImage const &);
+ FrameImage& operator= (FrameImage const &);
- AVFilterBufferRef* _buffer;
+ AVFrame* _frame;
+ bool _own;
int* _line_size;
};