[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Video.width, Video.height

From: Benjamin Wolsey
Subject: [Gnash-dev] Video.width, Video.height
Date: Wed, 12 Nov 2008 09:02:45 +0100

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

I think the former sounds better, rather than modifying the VideoInfo.

Free Flash, use Gnash

Benjamin Wolsey, Software Developer -

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

reply via email to

[Prev in Thread] Current Thread [Next in Thread]