@ -31,68 +31,116 @@ public class VaapiHardwareCapabilities : IHardwareCapabilities
@@ -31,68 +31,116 @@ public class VaapiHardwareCapabilities : IHardwareCapabilities
( VideoFormat . H264 , "baseline" or "66" ) = > false ,
( VideoFormat . H264 , "main" or "77" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . H264Main , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . H264Main ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . H264 , "high" or "100" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . H264High , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . H264High ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . H264 , "high 10" or "110" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . H264High , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . H264High ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . H264 , "baseline constrained" or "578" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . H264ConstrainedBaseline , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . H264ConstrainedBaseline ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Mpeg2Video , "main" or "4" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . Mpeg2Main , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . Mpeg2Main ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Mpeg2Video , "simple" or "5" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . Mpeg2Simple , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . Mpeg2Simple ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Vc1 , "simple" or "0" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . Vc1Simple , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . Vc1Simple ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Vc1 , "main" or "1" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . Vc1Main , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . Vc1Main ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Vc1 , "advanced" or "3" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . Vc1Advanced , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . Vc1Advanced ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Hevc , "main" or "1" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . HevcMain , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . HevcMain ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Hevc , "main 10" or "2" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . HevcMain10 , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . HevcMain10 ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Vp9 , "profile 0" or "0" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . Vp9Profile0 , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . Vp9Profile0 ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Vp9 , "profile 1" or "1" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . Vp9Profile1 , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . Vp9Profile1 ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Vp9 , "profile 2" or "2" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . Vp9Profile2 , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . Vp9Profile2 ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Vp9 , "profile 3" or "3" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . Vp9Profile3 , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . Vp9Profile3 ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
( VideoFormat . Av1 , "main" or "0" ) = >
_ profileEntrypoints . Contains (
new VaapiProfileEntrypoint ( VaapiProfile . Av1Profile0 , VaapiEntrypoint . Decode ) ) ,
_ profileEntrypoints . Any ( e = > e is
{
VaapiProfile : VaapiProfile . Av1Profile0 ,
VaapiEntrypoint : VaapiEntrypoint . Decode
} ) ,
// fall back to software decoder
_ = > false