neo::video::Video Class Reference

#include <video/video.h>

Inheritance diagram for neo::video::Video:

Inheritance graph
[legend]
Collaboration diagram for neo::video::Video:

Collaboration graph
[legend]
List of all members.

Detailed Description

Video object. A video is decodes both video and audio data and can be used directly for uploading dynamic content to a texture for use in rendering operations.
Author:
Mattias Jansson (mattias@realityrift.com)


Public Types

enum  Sync { NOSYNC = 0, AUDIOSYNC = 1 }
 Sync modes. More...

Public Member Functions

 Video ()
 Initialize data.
virtual ~Video ()
 Free resources.
float getCurrentTime () const
 Get current time.
virtual void play ()
 Play video.
virtual void stop ()
 Stop video.
virtual void rewind ()
 Rewind video.
virtual bool isFinished () const=0
 Query if finished.
virtual bool isAnimated () const
 Query if animated.
virtual bool update (uint64_t frame)
 Animate image.
virtual sound::SoundDatagetSoundData ()
 Get video sound data.
virtual void setSync (Sync sync)
 Set sync mode.

Protected Member Functions

bool decodeImage ()
 Decode the current video frame.
virtual bool decodeNextImage ()=0
 Decode next image frame.

Protected Attributes

Codec_p_codec
 Codec used.
file::IStream_p_stream
 Stream.
bool _play
 Play flag.
core::Timer _timer
 Timer.
float _time
 Current time.
float _timeVideo
 Last decoded image frame time.
float _timeAudio
 Last decoded sound frame time.
Sync _sync
 Sync mode.


Member Enumeration Documentation

enum neo::video::Video::Sync

Enumerator:
NOSYNC  No sync, video and audio play independently.
AUDIOSYNC  Image is synced to audio playback.


Member Function Documentation

float neo::video::Video::getCurrentTime (  )  const

Returns:
Current video time

virtual bool neo::video::Video::isAnimated (  )  const [virtual]

Returns:
true if animated, false if not

Reimplemented from neo::image::Image.

virtual bool neo::video::Video::update ( uint64_t  frame  )  [virtual]

Parameters:
frame Frame number
Returns:
true if image data was updated, false if not

Reimplemented from neo::image::Image.

virtual sound::SoundData* neo::video::Video::getSoundData (  )  [virtual]

Get the sound data for the video stream. The returned object should be deallocated by the caller or uploaded to a sound object.

Returns:
Sound data, null if no sound in video stream

Reimplemented in neo::video::theora::Video.

virtual void neo::video::Video::setSync ( Sync  sync  )  [virtual]

Parameters:
sync Sync mode

Reimplemented in neo::video::theora::Video.

virtual bool neo::video::Video::decodeNextImage (  )  [protected, pure virtual]

Returns:
true if a new frame was decoded, false if not

Implemented in neo::video::theora::Video.


The documentation for this class was generated from the following file:
Generated on Sat Feb 17 20:51:08 2007 for NeoEngine 2 - Evolution by  doxygen 1.5.1