MPEGRemuxProcessor Class Reference

gets a reader and writer fd, where input is assumed to be an an MPEG PS stream, strips out unwanted streams and writes the remuxed result to the output fd. Uses blocking read/write operations. More...

#include <mpegremux_processor.h>

Inheritance diagram for MPEGRemuxProcessor:
ThreadExecutor Executor zmm::Object

Public Member Functions

 MPEGRemuxProcessor (int in_fd, int out_fd, unsigned char keep_audio_id)
virtual int getStatus ()
 the exit status of the thread - needs to be overridden
virtual bool isAlive ()
 method to check if the executor is still running
virtual bool kill ()
 kill the thread (pthread_join)
void retain ()
void release ()
int getRefCount ()

Static Public Member Functions

static void * operator new (size_t size)
static void operator delete (void *ptr)

Protected Member Functions

virtual void threadProc ()
 abstract thread method, which needs to be overridden
void startThread ()
 start the thread
bool threadShutdownCheck ()
 check if the thread should shutdown should be called by the threadProc in short intervals

Protected Attributes

bool threadShutdown
bool threadRunning
 if the thread is currently running
zmm::Ref< Condcond
zmm::Ref< Mutexmutex
mt_atomic_t _ref_count

Private Attributes

int status
int in_fd
int out_fd
unsigned char keep_audio_id

Detailed Description

gets a reader and writer fd, where input is assumed to be an an MPEG PS stream, strips out unwanted streams and writes the remuxed result to the output fd. Uses blocking read/write operations.

Definition at line 48 of file mpegremux_processor.h.


Constructor & Destructor Documentation

MPEGRemuxProcessor::MPEGRemuxProcessor ( int  in_fd,
int  out_fd,
unsigned char  keep_audio_id 
)

Member Function Documentation

int Object::getRefCount (  )  [inherited]

Definition at line 78 of file object.cc.

References zmm::Object::_ref_count, and atomic_get().

virtual int MPEGRemuxProcessor::getStatus (  )  [inline, virtual]

the exit status of the thread - needs to be overridden

Implements ThreadExecutor.

Definition at line 52 of file mpegremux_processor.h.

References status.

virtual bool ThreadExecutor::isAlive (  )  [inline, virtual, inherited]

method to check if the executor is still running

Returns:
true if the executor is still running, false otherwise

Implements Executor.

Definition at line 49 of file thread_executor.h.

References ThreadExecutor::threadRunning.

bool ThreadExecutor::kill (  )  [virtual, inherited]

kill the thread (pthread_join)

Returns:
always true - this function only returns after the thread has died

Implements Executor.

Definition at line 64 of file thread_executor.cc.

References AUTOLOCK, AUTOUNLOCK, ThreadExecutor::cond, ThreadExecutor::mutex, NULL, ThreadExecutor::thread, ThreadExecutor::threadRunning, and ThreadExecutor::threadShutdown.

Referenced by ThreadExecutor::~ThreadExecutor().

void Object::operator delete ( void *  ptr  )  [static, inherited]

Definition at line 87 of file object.cc.

References FREE.

void * Object::operator new ( size_t  size  )  [static, inherited]

Definition at line 83 of file object.cc.

References MALLOC.

void Object::release (  )  [inherited]
void Object::retain (  )  [inherited]
void ThreadExecutor::startThread (  )  [protected, inherited]
virtual void MPEGRemuxProcessor::threadProc (  )  [protected, virtual]

abstract thread method, which needs to be overridden

Implements ThreadExecutor.

bool ThreadExecutor::threadShutdownCheck (  )  [inline, protected, inherited]

check if the thread should shutdown should be called by the threadProc in short intervals

Definition at line 73 of file thread_executor.h.

References ThreadExecutor::threadShutdown.

Referenced by IOHandlerChainer::threadProc().


Field Documentation

mt_atomic_t zmm::Object::_ref_count [protected, inherited]
zmm::Ref<Cond> ThreadExecutor::cond [protected, inherited]

Definition at line 62 of file thread_executor.h.

Referenced by ThreadExecutor::kill(), and ThreadExecutor::ThreadExecutor().

Definition at line 57 of file mpegremux_processor.h.

unsigned char MPEGRemuxProcessor::keep_audio_id [private]

Definition at line 59 of file mpegremux_processor.h.

zmm::Ref<Mutex> ThreadExecutor::mutex [protected, inherited]

Reimplemented from zmm::Object.

Definition at line 63 of file thread_executor.h.

Referenced by ThreadExecutor::kill(), and ThreadExecutor::ThreadExecutor().

Definition at line 58 of file mpegremux_processor.h.

Definition at line 56 of file mpegremux_processor.h.

Referenced by getStatus().

bool ThreadExecutor::threadRunning [protected, inherited]

if the thread is currently running

Definition at line 60 of file thread_executor.h.

Referenced by ThreadExecutor::isAlive(), ThreadExecutor::kill(), and ThreadExecutor::startThread().

bool ThreadExecutor::threadShutdown [protected, inherited]

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

Generated on Fri Mar 26 20:16:57 2010 for MediaTomb by  doxygen 1.6.1