shaka-project / shaka-streamer

A simple config-file based approach to preparing streaming media, based on FFmpeg and Shaka Packager.
https://shaka-project.github.io/shaka-streamer/
Apache License 2.0
198 stars 62 forks source link

Using Enum._missing_ hook to generically handle the hw: variants #86

Closed mariocynicys closed 3 years ago

mariocynicys commented 3 years ago

This PR removes the hw: enum variants, making the enum only for the base codec variants.

If a codec is prefixed with hw:, it will be caught in the _missing_ hook, we will try to know if it can be one of the base variants or not, if it is a base variant we will set the _hw_acc to True for this codec variant, if not we will fall back the the super()._missing_ and print the appropriate error message.