Add support for H265
Add option --codec=h265. PR #3713 <https://github.com/Genymobile/scrcpy/pull/3713> Fixes #3092 <https://github.com/Genymobile/scrcpy/issues/3092>
This commit is contained in:
@@ -26,10 +26,13 @@ sc_demuxer_recv_codec_id(struct sc_demuxer *demuxer) {
|
||||
}
|
||||
|
||||
#define SC_CODEC_ID_H264 UINT32_C(0x68323634) // "h264" in ASCII
|
||||
#define SC_CODEC_ID_H265 UINT32_C(0x68323635) // "h265" in ASCII
|
||||
uint32_t codec_id = sc_read32be(data);
|
||||
switch (codec_id) {
|
||||
case SC_CODEC_ID_H264:
|
||||
return AV_CODEC_ID_H264;
|
||||
case SC_CODEC_ID_H265:
|
||||
return AV_CODEC_ID_HEVC;
|
||||
default:
|
||||
LOGE("Unknown codec id 0x%08" PRIx32, codec_id);
|
||||
return AV_CODEC_ID_NONE;
|
||||
|
||||
Reference in New Issue
Block a user