DevNull Class Reference

<class description="" goes="" here=""> <short description=""> More...

#include <DevNull.hpp>

Inheritance diagram for DevNull:

IO VThread List of all members.

Public Member Functions

virtual FramegetFrame ()
 returns a frame if one complete frame is available, otherwise null is returned.
virtual int writeFrame (Frame *frm, ESInfo *out_es=NULL)
 returns the number of packets sent.
virtual bool open ()
 opens the IO connection.
virtual bool close (bool immediate=false)
 closes the IO class.
virtual bool destroy ()
 deletes the data source for this IO class.
virtual int getBufferFillLevel () const
 returns a value from 0..100 indicating buffer usage
void setESInfo (ESInfo *es)
 for compatibility to IO class *
ESInfogetESInfo ()
virtual const char * getURL () const
 returns a local file name or an URL
virtual bool setToFrameNumber (u32 frameNumber)
 repositions the IO class to the given frame.

Protected Attributes

char url [12]

Detailed Description

<class description="" goes="" here=""> <short description="">

Author:
Michael Kropfberger and Peter Schojer
Version:
Id
DevNull.hpp,v 1.13 2006/01/26 11:42:00 mkropfbe Exp

Definition at line 60 of file DevNull.hpp.


Member Function Documentation

virtual bool DevNull::close bool  immediate = false  )  [inline, 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.

Definition at line 94 of file DevNull.hpp.

00094 { 00095 state=CLOSED; 00096 immediate = immediate; 00097 return true; 00098 };

virtual bool DevNull::destroy  )  [inline, virtual]
 

deletes the data source for this IO class.

Will only work with local files, remote files can not be deleted and will always return true.

Implements IO.

Definition at line 103 of file DevNull.hpp.

00103 { 00104 return true; 00105 };

virtual Frame* DevNull::getFrame  )  [inline, 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.

Definition at line 71 of file DevNull.hpp.

00071 { 00072 #ifdef _POSIX_PRIORITY_SCHEDULING 00073 sched_yield(); //this is necessary to give parallel getFrames a chance 00074 #endif 00075 return NULL; 00076 };

virtual bool DevNull::open  )  [inline, virtual]
 

opens the IO connection.

State is set to OPENING. Depending on the underlying QIODevice, a network connection or a file connection is established. When the connection is ready for use, State is OPEN

Implements IO.

Definition at line 89 of file DevNull.hpp.

00089 { 00090 state=OPEN; 00091 return true; 00092 };

virtual bool DevNull::setToFrameNumber u32  frameNumber  )  [inline, 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: FIXME: implement

Reimplemented from IO.

Definition at line 129 of file DevNull.hpp.

00129 { 00130 frameNumber = frameNumber; 00131 return false; 00132 };

virtual int DevNull::writeFrame Frame frm,
ESInfo out_es = NULL
[inline, virtual]
 

returns the number of packets sent.

Returns 0 on error

Implements IO.

Definition at line 79 of file DevNull.hpp.

00079 { 00080 #ifdef _POSIX_PRIORITY_SCHEDULING 00081 sched_yield(); //this is necessary to give parallel getFrames a chance 00082 #endif 00083 return 1; 00084 };


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