Expose decoder as packet sink
Make decoder implement the packet sink trait. This will allow the stream to push packets without depending on the concrete sink type.
This commit is contained in:
@@ -3,12 +3,16 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "trait/packet_sink.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <libavformat/avformat.h>
|
||||
|
||||
struct video_buffer;
|
||||
|
||||
struct decoder {
|
||||
struct sc_packet_sink packet_sink; // packet sink trait
|
||||
|
||||
struct video_buffer *video_buffer;
|
||||
|
||||
AVCodecContext *codec_ctx;
|
||||
|
||||
Reference in New Issue
Block a user