Sirikata
|
Represents a media stream in FFmpeg. More...
#include <FFmpegStream.hpp>
Public Member Functions | |
FFmpegStream (FFmpegURLProtocol *raw) | |
Construct a stream using the given data. | |
~FFmpegStream () | |
uint32 | numAudioStreams () |
FFmpegAudioStreamPtr | getAudioStream (uint32 idx, uint8 nchannels) |
void | reload () |
Private Member Functions | |
void | initDecode () |
void | cleanupDecode () |
Private Attributes | |
FFmpegURLProtocol * | mData |
AVFormatContext * | mFormatCtx |
Friends | |
class | FFmpegAudioStream |
Represents a media stream in FFmpeg.
Mostly acts as a container for FFmpegAudioStreams, decoding the initial FFmpegURLProtocol to get at the streams within it.
Sirikata::SDL::FFmpegStream::FFmpegStream | ( | FFmpegURLProtocol * | raw | ) |
Construct a stream using the given data.
Ownership of the data is passed to this stream.
References initDecode().
Sirikata::SDL::FFmpegStream::~FFmpegStream | ( | ) |
References cleanupDecode(), and mData.
void Sirikata::SDL::FFmpegStream::cleanupDecode | ( | ) | [private] |
References Sirikata::AutoSingleton< FFmpegGlue >::getSingleton(), mData, mFormatCtx, and Sirikata::SDL::FFmpegGlue::removeProtocol().
Referenced by reload(), and ~FFmpegStream().
FFmpegAudioStreamPtr Sirikata::SDL::FFmpegStream::getAudioStream | ( | uint32 | idx, |
uint8 | nchannels | ||
) |
References FFmpegAudioStream, Sirikata::SelfWeakPtr< FFmpegStream >::getSharedPtr(), and mFormatCtx.
void Sirikata::SDL::FFmpegStream::initDecode | ( | ) | [private] |
References Sirikata::SDL::FFmpegGlue::addProtocol(), AUDIO_LOG, Sirikata::Logging::error, Sirikata::AutoSingleton< FFmpegGlue >::getSingleton(), mData, mFormatCtx, Sirikata::SDL::FFmpegURLProtocol::name(), and Sirikata::SDL::FFmpegURLProtocol::setPosition().
Referenced by FFmpegStream(), and reload().
uint32 Sirikata::SDL::FFmpegStream::numAudioStreams | ( | ) |
References mFormatCtx.
void Sirikata::SDL::FFmpegStream::reload | ( | ) |
References cleanupDecode(), and initDecode().
friend class FFmpegAudioStream [friend] |
Referenced by getAudioStream().
Referenced by cleanupDecode(), initDecode(), and ~FFmpegStream().
AVFormatContext* Sirikata::SDL::FFmpegStream::mFormatCtx [private] |
Referenced by cleanupDecode(), getAudioStream(), initDecode(), and numAudioStreams().