struct AVDictionary;
struct AVFormatContext;
struct AVFrame;
+struct AVPacket;
struct AVInputFormat;
struct SwsContext;
typedef struct AVIOInterruptCB AVIOInterruptCB;
AVFormatContextWithCloser;
AVFormatContextWithCloser avformat_open_input_unique(
- const char *pathname, AVInputFormat *fmt,
+ const char *pathname, const AVInputFormat *fmt,
AVDictionary **options);
AVFormatContextWithCloser avformat_open_input_unique(
- const char *pathname, AVInputFormat *fmt,
+ const char *pathname, const AVInputFormat *fmt,
AVDictionary **options,
const AVIOInterruptCB &interrupt_cb);
AVFormatContextWithCloser avformat_open_input_unique(
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
- void *opaque, AVInputFormat *fmt, AVDictionary **options,
+ void *opaque, const AVInputFormat *fmt, AVDictionary **options,
const AVIOInterruptCB &interrupt_cb);
AVFrameWithDeleter av_frame_alloc_unique();
+// AVPacket (ick!)
+// Not really unique from FFmpeg's point of view, but it is from ours
+struct av_packet_free_unique {
+ void operator() (AVPacket *packet) const;
+};
+
+typedef std::unique_ptr<AVPacket, av_packet_free_unique>
+ AVPacketWithDeleter;
+
+AVPacketWithDeleter av_packet_alloc_unique();
+
// SwsContext
struct sws_free_context_unique {
void operator() (SwsContext *context) const;