GNOME Bugzilla – Bug 692190
Encodebin should somehow let you know how many streams the container will accept
Last modified: 2013-09-13 09:54:43 UTC
Since some formats like FLV only accepts 1 audio and video stream it would be good if Encodebin could somehow let you know about this programatically. Like some kind of query API. (encodebin.max_audio_streams() ?) Because currently you need to dig out the muxer element from encodebin to discover this, which I feel reduces the point of Encodebin a lot (if you have to add a lot of code to dig out various elements to do further checking/testing.
Isn't this information available from the encoding profile via gst_encoding_profile_get_presence() or so?
Not 100% what that call does, but it more seems to be a way to count the number of times a given profile has been used, it let me know that the mp3 encoding profile has been used 3 times. I guess I could infer the information by assuming that if I have 2 incoming streams and the profile has only been used 1 time that the container doesn't support more than one stream, but this seems more complicated than it needs to be and also at a quite late point in the process. I think what I am looking for is that as soon as the muxer profile has been created/added to the encodebin then I should be able to query it for the maximum permissible audio and video streams. So that the application has a chance to let the user now that they for instance have to choose which audio stream to keep and which ones to drop.
ok, since I think FLV is actually the only container with this limitation I will just hardcode for that format. Closing this bug.