mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Warn if the size of a decoded video frame does not match the session metadata. PR #6159 <https://github.com/Genymobile/scrcpy/pull/6159>
29 lines
701 B
C
29 lines
701 B
C
#ifndef SC_DECODER_H
|
|
#define SC_DECODER_H
|
|
|
|
#include "common.h"
|
|
|
|
#include <libavcodec/avcodec.h>
|
|
|
|
#include "coords.h"
|
|
#include "trait/frame_source.h"
|
|
#include "trait/packet_sink.h"
|
|
|
|
struct sc_decoder {
|
|
struct sc_packet_sink packet_sink; // packet sink trait
|
|
struct sc_frame_source frame_source; // frame source trait
|
|
|
|
const char *name; // must be statically allocated (e.g. a string literal)
|
|
|
|
AVCodecContext *ctx;
|
|
AVFrame *frame;
|
|
|
|
struct sc_stream_session session; // only initialized for video stream
|
|
struct sc_size frame_size;
|
|
};
|
|
|
|
// The name must be statically allocated (e.g. a string literal)
|
|
void
|
|
sc_decoder_init(struct sc_decoder *decoder, const char *name);
|
|
|
|
#endif
|