On Fri, Jul 22, 2011 at 11:12:04PM +0200, Jonas 'Sortie' Termansen wrote: > On 07/22/2011 11:05 PM, Sandro Santilli wrote: > >Now, how can you tell if there's audio in a stream using such > >an object ? I guess you should keep taking items off the buffers > >to let MediaParser go on with parsing until it's looked at the > >whole input, making sure not to seek away from audio (like jumping > >to the very end, when audio is finished). > > That sounds quite hacky. > > I suggest we make a bool headersParsed() function that signals > whether getVideoInfo() is ready. If getVideoInfo() returns NULL, > then there is no video. Until that point, there is no way to know > whether there is no video, or whether no video has been detected > yet. Same goes for audio.
It was like that in the beginning, but then we found real-world cases in which audio frames appeared much later than our probe size. We enlarged more and we found later frames... Truth is there's not always such thing as an header, and sometimes there's an header which does't reflect reality. The only way to know if there's video is to scan the whole thing until it's finished and you saw _no_ video. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html _______________________________________________ Gnash-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnash-dev

