Pass video size as codec metadata

On initial connection, scrcpy sent some device metadata:
 - the device name (to be used as window title)
 - the initial video size (before any frame or even SPS/PPS)

But it is better to provide the initial video size as part as the video
stream, so that it can be demuxed and exposed via AVCodecContext to
sinks.

This avoids to pass an explicit "initial frame size" for the screen, the
recorder and the v4l2 sink.
This commit is contained in:
Romain Vimont
2023-03-11 09:21:49 +01:00
parent 3a72f3fb4d
commit 238ab872ba
17 changed files with 104 additions and 69 deletions

View File

@@ -31,7 +31,6 @@ struct sc_recorder {
char *filename;
enum sc_record_format format;
AVFormatContext *ctx;
struct sc_size declared_frame_size;
sc_thread thread;
sc_mutex mutex;
@@ -61,7 +60,6 @@ struct sc_recorder_callbacks {
bool
sc_recorder_init(struct sc_recorder *recorder, const char *filename,
enum sc_record_format format, bool audio,
struct sc_size declared_frame_size,
const struct sc_recorder_callbacks *cbs, void *cbs_userdata);
bool