ASIStreamHandler Class Reference

#include <asistreamhandler.h>

Inheritance diagram for ASIStreamHandler:
StreamHandler MThread DeviceReaderCB

List of all members.

Public Member Functions

virtual void AddListener (MPEGStreamData *data, bool allow_section_reader=false, bool needs_drb=false, QString output_file=QString())
void SetClockSource (ASIClockSource cs)
void SetRXMode (ASIRXMode m)

Static Public Member Functions

static ASIStreamHandlerGet (const QString &devicename)
static void Return (ASIStreamHandler *&ref)

Private Member Functions

 ASIStreamHandler (const QString &)
bool Open (void)
void Close (void)
virtual void run (void)
 Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
virtual void PriorityEvent (int fd)
virtual void AddNamedOutputFile (const QString &file)
 Called with _listener_lock locked just after adding new output file.
virtual void RemoveNamedOutputFile (const QString &file)
 Called with _listener_lock locked just before removing old output file.
virtual void SetRunningDesired (bool desired)
 At minimum this sets _running_desired, this may also send signals to anything that might be blocking the run() loop.

Private Attributes

int _device_num
int _buf_size
int _fd
uint _packet_size
ASIClockSource _clock_source
ASIRXMode _rx_mode
DeviceReadBuffer_drb
ThreadedFileWriter_mpts
QMap< QString, int > _mpts_files

Static Private Attributes

static QMutex _handlers_lock
static QMap< QString,
ASIStreamHandler * > 
_handlers
static QMap< QString, uint_handlers_refcnt

Detailed Description

Definition at line 45 of file asistreamhandler.h.


Constructor & Destructor Documentation

ASIStreamHandler::ASIStreamHandler ( const QString &  device  )  [private]

Definition at line 103 of file asistreamhandler.cpp.

Referenced by Get().


Member Function Documentation

ASIStreamHandler * ASIStreamHandler::Get ( const QString &  devicename  )  [static]

Definition at line 34 of file asistreamhandler.cpp.

Referenced by ASISignalMonitor::ASISignalMonitor(), and ASIRecorder::Open().

void ASIStreamHandler::Return ( ASIStreamHandler *&  ref  )  [static]

Definition at line 66 of file asistreamhandler.cpp.

Referenced by ASIRecorder::Close(), and ASISignalMonitor::~ASISignalMonitor().

virtual void ASIStreamHandler::AddListener ( MPEGStreamData data,
bool  allow_section_reader = false,
bool  needs_drb = false,
QString  output_file = QString() 
) [inline, virtual]

Reimplemented from StreamHandler.

Definition at line 51 of file asistreamhandler.h.

Referenced by ASIRecorder::run(), and ASISignalMonitor::UpdateValues().

void ASIStreamHandler::SetClockSource ( ASIClockSource  cs  ) 

Definition at line 112 of file asistreamhandler.cpp.

void ASIStreamHandler::SetRXMode ( ASIRXMode  m  ) 

Definition at line 119 of file asistreamhandler.cpp.

bool ASIStreamHandler::Open ( void   )  [private]

Definition at line 269 of file asistreamhandler.cpp.

Referenced by Get(), and run().

void ASIStreamHandler::Close ( void   )  [private]

Definition at line 337 of file asistreamhandler.cpp.

Referenced by Open(), Return(), and run().

void ASIStreamHandler::run ( void   )  [private, virtual]

Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.

Note:
If you override this method you must call RunProlog before you do any work and RunEpilog before you exit the run method.

Reimplemented from MThread.

Definition at line 133 of file asistreamhandler.cpp.

void ASIStreamHandler::PriorityEvent ( int  fd  )  [private, virtual]

Reimplemented from StreamHandler.

Definition at line 407 of file asistreamhandler.cpp.

void ASIStreamHandler::AddNamedOutputFile ( const QString &  filename  )  [private, virtual]

Called with _listener_lock locked just after adding new output file.

Reimplemented from StreamHandler.

Definition at line 391 of file asistreamhandler.cpp.

void ASIStreamHandler::RemoveNamedOutputFile ( const QString &  filename  )  [private, virtual]

Called with _listener_lock locked just before removing old output file.

Reimplemented from StreamHandler.

Definition at line 397 of file asistreamhandler.cpp.

void ASIStreamHandler::SetRunningDesired ( bool  desired  )  [private, virtual]

At minimum this sets _running_desired, this may also send signals to anything that might be blocking the run() loop.

Note:
: The _start_stop_lock must be held when this is called.

Reimplemented from StreamHandler.

Definition at line 126 of file asistreamhandler.cpp.


Member Data Documentation

Definition at line 78 of file asistreamhandler.h.

Referenced by Open().

Definition at line 79 of file asistreamhandler.h.

Referenced by Open(), and run().

int ASIStreamHandler::_fd [private]

Definition at line 80 of file asistreamhandler.h.

Referenced by Close(), Open(), and run().

Definition at line 81 of file asistreamhandler.h.

Referenced by Open(), and run().

Definition at line 82 of file asistreamhandler.h.

Referenced by SetClockSource().

Definition at line 83 of file asistreamhandler.h.

Referenced by Open(), and SetRXMode().

Definition at line 84 of file asistreamhandler.h.

Referenced by run(), and SetRunningDesired().

Definition at line 86 of file asistreamhandler.h.

Referenced by AddNamedOutputFile(), RemoveNamedOutputFile(), and run().

QMap<QString,int> ASIStreamHandler::_mpts_files [private]

Definition at line 87 of file asistreamhandler.h.

Referenced by AddNamedOutputFile(), and RemoveNamedOutputFile().

QMutex ASIStreamHandler::_handlers_lock [static, private]

Definition at line 90 of file asistreamhandler.h.

Referenced by Get(), and Return().

QMap< QString, ASIStreamHandler * > ASIStreamHandler::_handlers [static, private]

Definition at line 91 of file asistreamhandler.h.

Referenced by Get(), and Return().

QMap< QString, uint > ASIStreamHandler::_handlers_refcnt [static, private]

Definition at line 92 of file asistreamhandler.h.

Referenced by Get(), and Return().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:41:51 2012 for MythTV by  doxygen 1.6.3