| 1 | #ifndef LIBCVD_VIDEOFFMPEG_H |
| 2 | #define LIBCVD_VIDEOFFMPEG_H |
| 3 | |
| 4 | struct AVCodec; |
| 5 | struct AVCodecContext; |
| 6 | struct AVFormatContext; |
| 7 | struct AVFrame; |
| 8 | struct AVPacket; |
| 9 | struct SwsContext; |
| 10 | |
| 11 | namespace CVD |
| 12 | { |
| 13 | namespace internal |
| 14 | { |
| 15 | struct AVCodecContextCloser |
| 16 | { |
| 17 | void operator()(AVCodecContext* context) const; |
| 18 | }; |
| 19 | |
| 20 | struct AVFormatContextCloser |
| 21 | { |
| 22 | void operator()(AVFormatContext* context) const; |
| 23 | }; |
| 24 | |
| 25 | struct AVFrameDeleter |
| 26 | { |
| 27 | void operator()(AVFrame* p) const; |
| 28 | }; |
| 29 | |
| 30 | struct AVPacketDeleter |
| 31 | { |
| 32 | void operator()(AVPacket* p) const; |
| 33 | }; |
| 34 | |
| 35 | struct SwsContextCloser |
| 36 | { |
| 37 | void operator()(SwsContext* context) const; |
| 38 | }; |
| 39 | |
| 40 | void CheckAVError(int result); |
| 41 | void SendFrame(AVFormatContext* format, AVCodecContext* codec, const AVFrame* frame); |
| 42 | void SetColorSpace(SwsContext* scalerContext, int colorspace); |
| 43 | |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | #endif |