I'm looking at implementing Video.width and Video.height. You can't tell what the dimensions of an FLV video frame are before decoding, which is why they are written (but not necessarily accurately) into the metadata.
Both properties start as 0 and get a proper value once the video has started being decoded (i.e. started playing). This part is easy to implement from a NetStream_as::videoWidth() function by returning 0 until _videoDecoder exists. The structure that holds information about the video is a VideoInfo. This is set at parsing time, and because we don't know any better, for FLV both width and height are 0. They are never updated. The two obvious options for fixing this both mean a small change to the VideoDecoder interface. Either add width() and height() functions that are initialized from the VideoInfo and updated as soon as possible, or fill in the VideoInfo values in the VideoDecoder once known. We pass VideoInfo by const reference to the VideoDecoders, so that would have to change. I think the former sounds better, rather than modifying the VideoInfo. bwy -- Free Flash, use Gnash http://www.gnu.org/software/gnash/ Benjamin Wolsey, Software Developer - http://benjaminwolsey.de
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ Gnash-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash-dev

