Merge pull request #2058 from ferferga/master

Add full Raspberry Pi hardware accelerated decoding support
This commit is contained in:
Vasily 2019-11-29 13:06:06 +03:00 committed by GitHub
commit 32519a5471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -2529,13 +2529,25 @@ namespace MediaBrowser.Controller.MediaEncoding
case "h264":
if (_mediaEncoder.SupportsDecoder("h264_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("h264", StringComparer.OrdinalIgnoreCase))
{
return "-c:v h264_mmal";
return "-c:v h264_mmal ";
}
break;
case "mpeg2video":
if (_mediaEncoder.SupportsDecoder("mpeg2_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg2video", StringComparer.OrdinalIgnoreCase))
{
return "-c:v mpeg2_mmal";
return "-c:v mpeg2_mmal ";
}
break;
case "mpeg4":
if (_mediaEncoder.SupportsDecoder("mpeg4_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg4", StringComparer.OrdinalIgnoreCase))
{
return "-c:v mpeg4_mmal ";
}
break;
case "vc1":
if (_mediaEncoder.SupportsDecoder("vc1_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase))
{
return "-c:v vc1_mmal ";
}
break;
}

View File

@ -18,7 +18,10 @@ namespace MediaBrowser.MediaEncoding.Encoder
"h264_qsv",
"hevc_qsv",
"mpeg2_qsv",
"mpeg2_mmal",
"mpeg4_mmal",
"vc1_qsv",
"vc1_mmal",
"h264_cuvid",
"hevc_cuvid",
"dts",
@ -26,6 +29,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
"aac",
"mp3",
"h264",
"h264_mmal",
"hevc"
};