MP4IO Class Reference

Base class for accessing mp4-containers <short description="">. More...

#include <MP4IO.hpp>

Inheritance diagram for MP4IO:

IO VThread List of all members.

Public Member Functions

 MP4IO ()
 reading from an MP4 file is only possible from a file.
 ~MP4IO ()
 frees everything except es
virtual FramegetFrame ()=0
 returns a frame if one complete frame is available, otherwise null is returned.
virtual int writeFrame (Frame *frm, ESInfo *out_es=NULL)=0
 returns the number of packets sent.
virtual bool open ()=0
 opens the IO connection.
virtual IO::State play (double prefetchTime)=0
virtual bool close (bool immediate=false)=0
 closes the IO class.
virtual bool destroy ()=0
 be vary careful, when destroying MP4IO files, because many MP4IO objects will refer to the same file.
virtual bool setToFrameNumber (u32 frameNumber)=0
 repositions the IO class to the given frame.
virtual int getBufferFillLevel () const =0
 returns -1, when at end of File, returns 0 when file is closed returns 50 otherwise
const char * getURL ()
 returns a local file name or an URL
void setESInfo (ESInfo *esi)
ESInfogetESInfo ()

Protected Attributes

ESInfoes
char * input

Detailed Description

Base class for accessing mp4-containers <short description="">.

Author:
Michael Kropfberger
Version:
Id
MP4IO.hpp,v 1.5 2006/01/26 11:42:00 mkropfbe Exp

Definition at line 65 of file MP4IO.hpp.


Constructor & Destructor Documentation

MP4IO::MP4IO  ) 
 

reading from an MP4 file is only possible from a file.

mp4File is deep-copied. If writeonly is true only write access is permitted, otherwise the file is read-onlyDefinition at line 48 of file MP4IO.cpp.

00048 { 00049 }


Member Function Documentation

virtual bool MP4IO::close bool  immediate = false  )  [pure virtual]
 

closes the IO class.

Parameters:
immediate specifies, if (optional) buffered data should be read/sent to the client (==false), or immediately dumped (==true)

Implements IO.

virtual bool MP4IO::destroy  )  [pure virtual]
 

be vary careful, when destroying MP4IO files, because many MP4IO objects will refer to the same file.

It is suggested that one deletes MP4 videos with the ContainerInfo::destroy method, which will take care of that

Implements IO.

virtual Frame* MP4IO::getFrame  )  [pure virtual]
 

returns a frame if one complete frame is available, otherwise null is returned.

This function is typically blocking. Don't use a NULL return value to conclude STREAMEOF, always check with getState()!

Implements IO.

virtual bool MP4IO::open  )  [pure virtual]
 

opens the IO connection.

State is set to OPENING. When the file is ready for use, State is OPEN

Implements IO.

virtual bool MP4IO::setToFrameNumber u32  frameNumber  )  [pure virtual]
 

repositions the IO class to the given frame.

Will return false in the following cases:

  • an illegal frame number (too large) was specified
  • the stream is not seekable, because the underlying device is a network device and the requested frame is already out of range.
  • Seeking doesn't work on IO classes opened for writing

Reimplemented from IO.

virtual int MP4IO::writeFrame Frame frm,
ESInfo out_es = NULL
[pure virtual]
 

returns the number of packets sent.

Returns 0 on error

Implements IO.


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