Public Types | Public Member Functions | Static Public Member Functions

gnash::SWF::DefineVideoStreamTag Class Reference

#include <DefineVideoStreamTag.h>

Inheritance diagram for gnash::SWF::DefineVideoStreamTag:
Inheritance graph
[legend]
Collaboration diagram for gnash::SWF::DefineVideoStreamTag:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector
< media::EncodedVideoFrame * > 
EmbeddedFrames

Public Member Functions

 ~DefineVideoStreamTag ()
DisplayObjectcreateDisplayObject (Global_as &gl, DisplayObject *parent) const
 Create a DisplayObject with the given parent.
void readDefineVideoFrame (SWFStream &in, SWF::TagType tag, movie_definition &m)
 Read tag SWF::VIDEOFRAME.
const SWFRectbounds () const
 Return local video bounds in twips.
media::VideoInfogetVideoInfo () const
 Get info about video embedded in this definition.
void getEncodedFrameSlice (boost::uint32_t from, boost::uint32_t to, std::vector< media::EncodedVideoFrame * > &ret) const
 Get a slice of encoded video frames.
void addVideoFrameTag (std::auto_ptr< media::EncodedVideoFrame > frame)

Static Public Member Functions

static void loader (SWFStream &in, SWF::TagType tag, movie_definition &m, const RunResources &r)
 Read tag SWF::DEFINEVIDEOSTREAM.

Member Typedef Documentation

The undecoded video frames and its size, using the swf-frame number as key Elements of this vector are owned by this instance, and will be deleted at instance destruction time.


Constructor & Destructor Documentation

gnash::SWF::DefineVideoStreamTag::~DefineVideoStreamTag (  ) 

Member Function Documentation

void gnash::SWF::DefineVideoStreamTag::addVideoFrameTag ( std::auto_ptr< media::EncodedVideoFrame frame  ) 
const SWFRect& gnash::SWF::DefineVideoStreamTag::bounds (  )  const [inline]

Return local video bounds in twips.

DisplayObject * gnash::SWF::DefineVideoStreamTag::createDisplayObject ( Global_as gl,
DisplayObject parent 
) const [virtual]

Create a DisplayObject with the given parent.

This function will determine the correct prototype and associated object using the passed global.

Parameters:
gl The global object used to set prototype and associated object. Calling this function creates a new DisplayObject from the DefinitionTag and adds it as a child of the specified parent DisplayObject.

Implements gnash::SWF::DefinitionTag.

References gnash::createVideoObject().

void gnash::SWF::DefineVideoStreamTag::getEncodedFrameSlice ( boost::uint32_t  from,
boost::uint32_t  to,
std::vector< media::EncodedVideoFrame * > &  ret 
) const

Get a slice of encoded video frames.

Parameters:
from Frame number of first frame to get
to Frame number of last frame to get
ret The vector to push defined elements onto. Ownership of elements is left to callee.

NOTE: video definition can have gaps, so you may get NO frames if you ask for frames from 1 to 2 when available frames are 0,3,6

media::VideoInfo* gnash::SWF::DefineVideoStreamTag::getVideoInfo (  )  const [inline]

Get info about video embedded in this definition.

May return NULL if there's no embedded video (ActionScript created definition - new Video)

void gnash::SWF::DefineVideoStreamTag::loader ( SWFStream in,
SWF::TagType  tag,
movie_definition m,
const RunResources r 
) [static]

Read tag SWF::DEFINEVIDEOSTREAM.

The DisplayObject_id is assumed to have been already read by caller.

This function is allowed to be called only *once* for each instance of this class.

References gnash::movie_definition::addDisplayObject(), gnash::SWF::DEFINEVIDEOSTREAM, gnash::SWFStream::ensureBytes(), and gnash::SWFStream::read_u16().

void gnash::SWF::DefineVideoStreamTag::readDefineVideoFrame ( SWFStream in,
SWF::TagType  tag,
movie_definition m 
)

Read tag SWF::VIDEOFRAME.

The DisplayObject_id (used to find this instance in the DisplayObject's dictionary) is assumed to have been already read. This function is allowed to be called zero or more times, as long as readDefineVideoStream was read before.


The documentation for this class was generated from the following files: