5e8fa56e7a
PR #2948 <https://github.com/Genymobile/scrcpy/pull/2948> Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch> Signed-off-by: Romain Vimont <rom@rom1v.com>
30 lines
547 B
C
30 lines
547 B
C
#ifndef DECODER_H
|
|
#define DECODER_H
|
|
|
|
#include "common.h"
|
|
|
|
#include "trait/packet_sink.h"
|
|
|
|
#include <stdbool.h>
|
|
#include <libavcodec/avcodec.h>
|
|
#include <libavformat/avformat.h>
|
|
|
|
#define DECODER_MAX_SINKS 2
|
|
|
|
struct decoder {
|
|
struct sc_packet_sink packet_sink; // packet sink trait
|
|
|
|
struct sc_frame_sink *sinks[DECODER_MAX_SINKS];
|
|
unsigned sink_count;
|
|
|
|
AVCodecContext *codec_ctx;
|
|
AVFrame *frame;
|
|
};
|
|
|
|
void
|
|
decoder_init(struct decoder *decoder);
|
|
|
|
void
|
|
decoder_add_sink(struct decoder *decoder, struct sc_frame_sink *sink);
|
|
|
|
#endif
|