live
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
MatroskaFile Class Reference

#include <MatroskaFile.hh>

Inheritance diagram for MatroskaFile:
Inheritance graph
[legend]
Collaboration diagram for MatroskaFile:
Collaboration graph
[legend]

Public Types

typedef void() onCreationFunc(MatroskaFile *newFile, void *clientData)
 

Public Member Functions

MatroskaTracklookup (unsigned trackNumber) const
 
MatroskaDemuxnewDemux ()
 
unsigned timecodeScale ()
 
float segmentDuration ()
 
float fileDuration ()
 
char const * fileName () const
 
unsigned chosenVideoTrackNumber ()
 
unsigned chosenAudioTrackNumber ()
 
unsigned chosenSubtitleTrackNumber ()
 
FramedSourcecreateSourceForStreaming (FramedSource *baseSource, unsigned trackNumber, unsigned &estBitrate, unsigned &numFiltersInFrontOfTrack)
 
char const * trackMIMEType (unsigned trackNumber) const
 
RTPSinkcreateRTPSinkForTrackNumber (unsigned trackNumber, Groupsock *rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic)
 
FileSinkcreateFileSinkForTrackNumber (unsigned trackNumber, char const *fileName)
 
UsageEnvironmentenvir () const
 
char const * name () const
 
virtual Boolean isSource () const
 
virtual Boolean isSink () const
 
virtual Boolean isRTCPInstance () const
 
virtual Boolean isRTSPClient () const
 
virtual Boolean isRTSPServer () const
 
virtual Boolean isMediaSession () const
 
virtual Boolean isServerMediaSession () const
 

Static Public Member Functions

static void createNew (UsageEnvironment &env, char const *fileName, onCreationFunc *onCreation, void *onCreationClientData, char const *preferredLanguage="eng")
 
static Boolean lookupByName (UsageEnvironment &env, char const *mediumName, Medium *&resultMedium)
 
static void close (UsageEnvironment &env, char const *mediumName)
 
static void close (Medium *medium)
 

Protected Member Functions

TaskTokennextTask ()
 

Private Member Functions

 MatroskaFile (UsageEnvironment &env, char const *fileName, onCreationFunc *onCreation, void *onCreationClientData, char const *preferredLanguage)
 
virtual ~MatroskaFile ()
 
void handleEndOfTrackHeaderParsing ()
 
void addTrack (MatroskaTrack *newTrack, unsigned trackNumber)
 
void addCuePoint (double cueTime, u_int64_t clusterOffsetInFile, unsigned blockNumWithinCluster)
 
Boolean lookupCuePoint (double &cueTime, u_int64_t &resultClusterOffsetInFile, unsigned &resultBlockNumWithinCluster)
 
void printCuePoints (FILE *fid)
 
void removeDemux (MatroskaDemux *demux)
 
void getH264ConfigData (MatroskaTrack const *track, u_int8_t *&sps, unsigned &spsSize, u_int8_t *&pps, unsigned &ppsSize)
 
void getH265ConfigData (MatroskaTrack const *track, u_int8_t *&vps, unsigned &vpsSize, u_int8_t *&sps, unsigned &spsSize, u_int8_t *&pps, unsigned &ppsSize)
 
void getVorbisOrTheoraConfigData (MatroskaTrack const *track, u_int8_t *&identificationHeader, unsigned &identificationHeaderSize, u_int8_t *&commentHeader, unsigned &commentHeaderSize, u_int8_t *&setupHeader, unsigned &setupHeaderSize)
 

Static Private Member Functions

static void handleEndOfTrackHeaderParsing (void *clientData)
 

Private Attributes

char const * fFileName
 
onCreationFuncfOnCreation
 
void * fOnCreationClientData
 
char const * fPreferredLanguage
 
unsigned fTimecodeScale
 
float fSegmentDuration
 
u_int64_t fSegmentDataOffset
 
u_int64_t fClusterOffset
 
u_int64_t fCuesOffset
 
class MatroskaTrackTable * fTrackTable
 
HashTablefDemuxesTable
 
class CuePoint * fCuePoints
 
unsigned fChosenVideoTrackNumber
 
unsigned fChosenAudioTrackNumber
 
unsigned fChosenSubtitleTrackNumber
 
class MatroskaFileParserfParserForInitialization
 

Friends

class MatroskaFileParser
 
class MatroskaDemux
 

Detailed Description

Definition at line 37 of file MatroskaFile.hh.

Member Typedef Documentation

◆ onCreationFunc

typedef void() MatroskaFile::onCreationFunc(MatroskaFile *newFile, void *clientData)

Definition at line 39 of file MatroskaFile.hh.

Constructor & Destructor Documentation

◆ MatroskaFile()

MatroskaFile::MatroskaFile ( UsageEnvironment env,
char const *  fileName,
onCreationFunc onCreation,
void *  onCreationClientData,
char const *  preferredLanguage 
)
private

◆ ~MatroskaFile()

virtual MatroskaFile::~MatroskaFile ( )
privatevirtual

Member Function Documentation

◆ addCuePoint()

void MatroskaFile::addCuePoint ( double  cueTime,
u_int64_t  clusterOffsetInFile,
unsigned  blockNumWithinCluster 
)
private

◆ addTrack()

void MatroskaFile::addTrack ( MatroskaTrack newTrack,
unsigned  trackNumber 
)
private

◆ chosenAudioTrackNumber()

unsigned MatroskaFile::chosenAudioTrackNumber ( )
inline

Definition at line 59 of file MatroskaFile.hh.

59 { return fChosenAudioTrackNumber; }
unsigned fChosenAudioTrackNumber

References fChosenAudioTrackNumber.

◆ chosenSubtitleTrackNumber()

unsigned MatroskaFile::chosenSubtitleTrackNumber ( )
inline

Definition at line 60 of file MatroskaFile.hh.

unsigned fChosenSubtitleTrackNumber

References fChosenSubtitleTrackNumber.

◆ chosenVideoTrackNumber()

unsigned MatroskaFile::chosenVideoTrackNumber ( )
inline

Definition at line 58 of file MatroskaFile.hh.

58 { return fChosenVideoTrackNumber; }
unsigned fChosenVideoTrackNumber

References fChosenVideoTrackNumber.

◆ close() [1/2]

static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited

◆ close() [2/2]

static void Medium::close ( Medium medium)
staticinherited

◆ createFileSinkForTrackNumber()

FileSink* MatroskaFile::createFileSinkForTrackNumber ( unsigned  trackNumber,
char const *  fileName 
)

◆ createNew()

static void MatroskaFile::createNew ( UsageEnvironment env,
char const *  fileName,
onCreationFunc onCreation,
void *  onCreationClientData,
char const *  preferredLanguage = "eng" 
)
static

◆ createRTPSinkForTrackNumber()

RTPSink* MatroskaFile::createRTPSinkForTrackNumber ( unsigned  trackNumber,
Groupsock rtpGroupsock,
unsigned char  rtpPayloadTypeIfDynamic 
)

◆ createSourceForStreaming()

FramedSource* MatroskaFile::createSourceForStreaming ( FramedSource baseSource,
unsigned  trackNumber,
unsigned &  estBitrate,
unsigned &  numFiltersInFrontOfTrack 
)

◆ envir()

UsageEnvironment& Medium::envir ( ) const
inlineinherited

◆ fileDuration()

float MatroskaFile::fileDuration ( )

◆ fileName()

char const* MatroskaFile::fileName ( ) const
inline

Definition at line 56 of file MatroskaFile.hh.

56 { return fFileName; }
char const * fFileName

References fFileName.

◆ getH264ConfigData()

void MatroskaFile::getH264ConfigData ( MatroskaTrack const *  track,
u_int8_t *&  sps,
unsigned &  spsSize,
u_int8_t *&  pps,
unsigned &  ppsSize 
)
private

◆ getH265ConfigData()

void MatroskaFile::getH265ConfigData ( MatroskaTrack const *  track,
u_int8_t *&  vps,
unsigned &  vpsSize,
u_int8_t *&  sps,
unsigned &  spsSize,
u_int8_t *&  pps,
unsigned &  ppsSize 
)
private

◆ getVorbisOrTheoraConfigData()

void MatroskaFile::getVorbisOrTheoraConfigData ( MatroskaTrack const *  track,
u_int8_t *&  identificationHeader,
unsigned &  identificationHeaderSize,
u_int8_t *&  commentHeader,
unsigned &  commentHeaderSize,
u_int8_t *&  setupHeader,
unsigned &  setupHeaderSize 
)
private

◆ handleEndOfTrackHeaderParsing() [1/2]

static void MatroskaFile::handleEndOfTrackHeaderParsing ( void *  clientData)
staticprivate

◆ handleEndOfTrackHeaderParsing() [2/2]

void MatroskaFile::handleEndOfTrackHeaderParsing ( )
private

◆ isMediaSession()

virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

◆ isRTCPInstance()

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

◆ isRTSPClient()

virtual Boolean Medium::isRTSPClient ( ) const
virtualinherited

Reimplemented in RTSPClient.

◆ isRTSPServer()

virtual Boolean Medium::isRTSPServer ( ) const
virtualinherited

Reimplemented in RTSPServer.

◆ isServerMediaSession()

virtual Boolean Medium::isServerMediaSession ( ) const
virtualinherited

Reimplemented in ServerMediaSession.

◆ isSink()

virtual Boolean Medium::isSink ( ) const
virtualinherited

Reimplemented in MediaSink.

◆ isSource()

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

◆ lookup()

MatroskaTrack* MatroskaFile::lookup ( unsigned  trackNumber) const

◆ lookupByName()

static Boolean Medium::lookupByName ( UsageEnvironment env,
char const *  mediumName,
Medium *&  resultMedium 
)
staticinherited

◆ lookupCuePoint()

Boolean MatroskaFile::lookupCuePoint ( double &  cueTime,
u_int64_t &  resultClusterOffsetInFile,
unsigned &  resultBlockNumWithinCluster 
)
private

◆ name()

char const* Medium::name ( ) const
inlineinherited

Definition at line 61 of file Media.hh.

61 {return fMediumName;}
char fMediumName[mediumNameMaxLen]
Definition: Media.hh:83

References Medium::fMediumName.

◆ newDemux()

MatroskaDemux* MatroskaFile::newDemux ( )

◆ nextTask()

TaskToken& Medium::nextTask ( )
inlineprotectedinherited

Definition at line 77 of file Media.hh.

77  {
78  return fNextTask;
79  }
TaskToken fNextTask
Definition: Media.hh:84

References Medium::fNextTask.

◆ printCuePoints()

void MatroskaFile::printCuePoints ( FILE *  fid)
private

◆ removeDemux()

void MatroskaFile::removeDemux ( MatroskaDemux demux)
private

◆ segmentDuration()

float MatroskaFile::segmentDuration ( )
inline

Definition at line 53 of file MatroskaFile.hh.

53 { return fSegmentDuration; } // in units of "timecodeScale()"
float fSegmentDuration

References fSegmentDuration.

◆ timecodeScale()

unsigned MatroskaFile::timecodeScale ( )
inline

Definition at line 52 of file MatroskaFile.hh.

52 { return fTimecodeScale; } // in nanoseconds
unsigned fTimecodeScale

References fTimecodeScale.

◆ trackMIMEType()

char const* MatroskaFile::trackMIMEType ( unsigned  trackNumber) const

Friends And Related Function Documentation

◆ MatroskaDemux

friend class MatroskaDemux
friend

Definition at line 114 of file MatroskaFile.hh.

◆ MatroskaFileParser

friend class MatroskaFileParser
friend

Definition at line 113 of file MatroskaFile.hh.

Field Documentation

◆ fChosenAudioTrackNumber

unsigned MatroskaFile::fChosenAudioTrackNumber
private

Definition at line 127 of file MatroskaFile.hh.

Referenced by chosenAudioTrackNumber().

◆ fChosenSubtitleTrackNumber

unsigned MatroskaFile::fChosenSubtitleTrackNumber
private

Definition at line 127 of file MatroskaFile.hh.

Referenced by chosenSubtitleTrackNumber().

◆ fChosenVideoTrackNumber

unsigned MatroskaFile::fChosenVideoTrackNumber
private

Definition at line 127 of file MatroskaFile.hh.

Referenced by chosenVideoTrackNumber().

◆ fClusterOffset

u_int64_t MatroskaFile::fClusterOffset
private

Definition at line 122 of file MatroskaFile.hh.

◆ fCuePoints

class CuePoint* MatroskaFile::fCuePoints
private

Definition at line 126 of file MatroskaFile.hh.

◆ fCuesOffset

u_int64_t MatroskaFile::fCuesOffset
private

Definition at line 122 of file MatroskaFile.hh.

◆ fDemuxesTable

HashTable* MatroskaFile::fDemuxesTable
private

Definition at line 125 of file MatroskaFile.hh.

◆ fFileName

char const* MatroskaFile::fFileName
private

Definition at line 115 of file MatroskaFile.hh.

Referenced by fileName().

◆ fOnCreation

onCreationFunc* MatroskaFile::fOnCreation
private

Definition at line 116 of file MatroskaFile.hh.

◆ fOnCreationClientData

void* MatroskaFile::fOnCreationClientData
private

Definition at line 117 of file MatroskaFile.hh.

◆ fParserForInitialization

class MatroskaFileParser* MatroskaFile::fParserForInitialization
private

Definition at line 128 of file MatroskaFile.hh.

◆ fPreferredLanguage

char const* MatroskaFile::fPreferredLanguage
private

Definition at line 118 of file MatroskaFile.hh.

◆ fSegmentDataOffset

u_int64_t MatroskaFile::fSegmentDataOffset
private

Definition at line 122 of file MatroskaFile.hh.

◆ fSegmentDuration

float MatroskaFile::fSegmentDuration
private

Definition at line 121 of file MatroskaFile.hh.

Referenced by segmentDuration().

◆ fTimecodeScale

unsigned MatroskaFile::fTimecodeScale
private

Definition at line 120 of file MatroskaFile.hh.

Referenced by timecodeScale().

◆ fTrackTable

class MatroskaTrackTable* MatroskaFile::fTrackTable
private

Definition at line 124 of file MatroskaFile.hh.


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