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:
@@ -19,7 +19,6 @@ struct sc_v4l2_sink {
|
||||
AVCodecContext *encoder_ctx;
|
||||
|
||||
char *device_name;
|
||||
struct sc_size frame_size;
|
||||
|
||||
sc_thread thread;
|
||||
sc_mutex mutex;
|
||||
@@ -33,8 +32,7 @@ struct sc_v4l2_sink {
|
||||
};
|
||||
|
||||
bool
|
||||
sc_v4l2_sink_init(struct sc_v4l2_sink *vs, const char *device_name,
|
||||
struct sc_size frame_size);
|
||||
sc_v4l2_sink_init(struct sc_v4l2_sink *vs, const char *device_name);
|
||||
|
||||
void
|
||||
sc_v4l2_sink_destroy(struct sc_v4l2_sink *vs);
|
||||
|
||||
Reference in New Issue
Block a user