ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Decoder for MPEG Program Stream videos. More...

#include <mpegps_decoder.h>

Inheritance diagram for Video::MPEGPSDecoder:
Collaboration diagram for Video::MPEGPSDecoder:

List of all members.

Classes

class  MPEGAudioTrack
class  MPEGStream
class  MPEGVideoTrack
class  PS2AudioTrack

Public Member Functions

 MPEGPSDecoder ()
virtual ~MPEGPSDecoder ()
bool loadStream (Common::SeekableReadStream *stream)
 Load a video from a generic read stream.
void close ()
 Close the active video stream and free any associated resources.

Protected Member Functions

void readNextPacket ()
 Decode enough data for the next frame and enough audio to last that long.
bool useAudioSync () const
 Whether or not getTime() will sync with a playing audio track.

Private Types

enum  PrivateStreamType {
  kPrivateStreamUnknown, kPrivateStreamAC3, kPrivateStreamDTS, kPrivateStreamDVDPCM,
  kPrivateStreamPS2Audio
}
typedef Common::HashMap< int,
MPEGStream * > 
StreamMap

Private Member Functions

PrivateStreamType detectPrivateStreamType (Common::SeekableReadStream *packet)
bool addFirstVideoTrack ()
int readNextPacketHeader (int32 &startCode, uint32 &pts, uint32 &dts)
int findNextStartCode (uint32 &size)
uint32 readPTS (int c)
void parseProgramStreamMap (int length)

Private Attributes

byte _psmESType [256]
StreamMap _streamMap
Common::SeekableReadStream_stream

Detailed Description

Decoder for MPEG Program Stream videos.

Video decoder used in engines:

  • zvision

Definition at line 53 of file mpegps_decoder.h.


Member Typedef Documentation

Definition at line 182 of file mpegps_decoder.h.


Member Enumeration Documentation

Enumerator:
kPrivateStreamUnknown 
kPrivateStreamAC3 
kPrivateStreamDTS 
kPrivateStreamDVDPCM 
kPrivateStreamPS2Audio 

Definition at line 162 of file mpegps_decoder.h.


Constructor & Destructor Documentation

Video::MPEGPSDecoder::MPEGPSDecoder (  ) 

Definition at line 49 of file mpegps_decoder.cpp.

Video::MPEGPSDecoder::~MPEGPSDecoder (  )  [virtual]

Definition at line 54 of file mpegps_decoder.cpp.


Member Function Documentation

bool Video::MPEGPSDecoder::addFirstVideoTrack (  )  [private]

Definition at line 389 of file mpegps_decoder.cpp.

void Video::MPEGPSDecoder::close (  )  [virtual]

Close the active video stream and free any associated resources.

All subclasses that need to close their own resources should still call the base class' close() function at the start of their function.

Reimplemented from Video::VideoDecoder.

Definition at line 72 of file mpegps_decoder.cpp.

MPEGPSDecoder::PrivateStreamType Video::MPEGPSDecoder::detectPrivateStreamType ( Common::SeekableReadStream packet  )  [private]

Definition at line 417 of file mpegps_decoder.cpp.

int Video::MPEGPSDecoder::findNextStartCode ( uint32 size  )  [private]

Definition at line 187 of file mpegps_decoder.cpp.

bool Video::MPEGPSDecoder::loadStream ( Common::SeekableReadStream stream  )  [virtual]

Load a video from a generic read stream.

The ownership of the stream object transfers to this VideoDecoder instance, which is hence also responsible for eventually deleting it.

Implementations of this function are required to call addTrack() for each track in the video upon success.

Parameters:
stream the stream to load
Returns:
whether loading the stream succeeded

Implements Video::VideoDecoder.

Definition at line 58 of file mpegps_decoder.cpp.

void Video::MPEGPSDecoder::parseProgramStreamMap ( int  length  )  [private]

Definition at line 363 of file mpegps_decoder.cpp.

void Video::MPEGPSDecoder::readNextPacket (  )  [protected, virtual]

Decode enough data for the next frame and enough audio to last that long.

This function is used by this class' decodeNextFrame() function. A subclass of a Track may decide to just have its decodeNextFrame() function read and decode the frame, but only if it is the only track in the video.

Reimplemented from Video::VideoDecoder.

Definition at line 83 of file mpegps_decoder.cpp.

int Video::MPEGPSDecoder::readNextPacketHeader ( int32 startCode,
uint32 pts,
uint32 dts 
) [private]

Definition at line 208 of file mpegps_decoder.cpp.

uint32 Video::MPEGPSDecoder::readPTS ( int  c  )  [private]

Definition at line 354 of file mpegps_decoder.cpp.

bool Video::MPEGPSDecoder::useAudioSync (  )  const [inline, protected, virtual]

Whether or not getTime() will sync with a playing audio track.

A subclass can override this to disable this feature.

Reimplemented from Video::VideoDecoder.

Definition at line 63 of file mpegps_decoder.h.


Member Data Documentation

Definition at line 179 of file mpegps_decoder.h.

Definition at line 183 of file mpegps_decoder.h.


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


Generated on Sat Jan 19 2019 05:08:04 for ResidualVM by doxygen 1.7.1
curved edge   curved edge