Allow the profile of a codec to be set as well as queried #1625
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
profile
can now be set as well as queried, so that applications can now encode using different profiles. I've also added aprofiles
property so that applications have a reasonable way to see what profiles exist, and to choose the correct profile name.There's also a small new encoder test which checks we can set the codec profile and see it change.
There's one point to note with this change:
As far as I can tell, the list of available profiles has moved from the
AVCodec
object to theAVCodecDescriptor
. I haven't been able to find anything written about this, but it seems to me that, in recent versions of FFmpeg, theAVCodec
profiles are often empty, and the use of this field may be deprecated.Again, as far as I can tell, fetching them from the
AVCodecDescriptor
seems to work in all cases, so that's how I've written the code. Hope that makes sense. If anyone else knows any more about this, I'd love to find out!