RingBuffer Class Reference

#include <RingBuffer.h>

List of all members.


Detailed Description

Implements a file/stream reader/writer.

This class, despite its name, no-longer provides a ring buffer. It can buffer reads and provide support for streaming files. It also provides a wrapper for the ThreadedFileWriter which makes sure that the file reader does not read past where the wrapped TFW has written new data.

Definition at line 23 of file RingBuffer.h.


Public Member Functions

 RingBuffer (const QString &lfilename, bool write, bool usereadahead=true, uint read_retries=12)
 Creates a RingBuffer instance.
 ~RingBuffer ()
 Shuts down any threads and closes any files.
void SetWriteBufferSize (int newSize)
 Calls ThreadedFileWriter::SetWriteBufferSize(int).
void SetWriteBufferMinWriteSize (int newMinSize)
 Calls ThreadedFileWriter::SetWriteBufferMinWriteSize(int).
void UpdateRawBitrate (uint rawbitrate)
 Set the raw bit rate, to allow RingBuffer adjust effective bitrate.
void UpdatePlaySpeed (float playspeed)
 Set the play speed, to allow RingBuffer adjust effective bitrate.
QString GetFilename (void) const
 Returns name of file used by this RingBuffer.
int DataInReadAhead (void) const
 Returns ReadBufAvail(void).
bool GetStopReads (void) const
 Returns value of stopreads.
bool isPaused (void) const
 Returns false iff read-ahead is not running and read-ahead is not paused.
long long GetReadPosition (void) const
 Returns how far into the file we have read.
long long GetWritePosition (void) const
 Returns how far into a ThreadedFileWriter file we have written.
long long GetRealFileSize (void) const
 Returns the size of the file we are reading/writing, or -1 if the query fails.
uint GetBitrate (void) const
 Returns effective bits per second (in thousands).
uint GetReadBlockSize (void) const
 Returns size of each disk read made by read ahead thread (in bytes).
bool IsOpen (void) const
 Returns true if the file is open for either reading or writing.
void OpenFile (const QString &lfilename, uint retryCount=12)
 Opens a file for reading.
int Read (void *buf, int count)
 This is the public method for reading from a file, it calls the appropriate read method if the file is remote or buffered, or a DVD.
int Peek (void *buf, int count)
void Reset (bool full=false, bool toAdjust=false, bool resetInternal=false)
 Resets the read-ahead thread and our position in the file.
long long Seek (long long pos, int whence)
 Seeks to a particular position in the file.
void Pause (void)
 Pauses the read-ahead thread.
void Unpause (void)
 Unpauses the read-ahead thread.
void WaitForPause (void)
 Waits for Pause(void) to take effect.
void Start (void)
 Starts the read-ahead thread.
void StopReads (void)
 ????
void StartReads (void)
 ????
bool LiveMode (void) const
 Returns true if this RingBuffer has been assigned a LiveTVChain.
void SetLiveMode (LiveTVChain *chain)
 Assigns a LiveTVChain to this RingBuffer.
void IgnoreLiveEOF (bool ignore)
 Tells RingBuffer whether to igonre the end-of-file.
int Write (const void *buf, uint count)
 Writes buffer to ThreadedFileWriter::Write(const void*,uint).
bool IsIOBound (void) const
 Returns true if a RingBuffer::Read(void*,int) is likely to block.
void WriterFlush (void)
 Calls ThreadedFileWriter::Flush(void) and ThreadedFileWriter::Sync(void).
void Sync (void)
 Calls ThreadedFileWriter::Sync(void).
long long WriterSeek (long long pos, int whence)
 Calls ThreadedFileWriter::Seek(long long,int).
bool isDVD (void) const
 Returns true if this is a DVD backed RingBuffer.
DVDRingBufferPrivDVD ()
bool InDVDMenuOrStillFrame (void)
long long SetAdjustFilesize (void)
void SetTimeout (bool fast)

Protected Member Functions

void ReadAheadThread (void)
 Read-ahead run function.

Static Protected Member Functions

static void * StartReader (void *type)
 Thunk that calls ReadAheadThread(void).

Private Member Functions

void CalcReadAheadThresh (void)
 Calculates fill_min, fill_threshold, and readblocksize from the estimated effective bitrate of the stream.
int safe_read_dvd (void *data, uint sz)
int safe_read (int fd, void *data, uint sz)
 Reads data from the file-descriptor.
int safe_read (RemoteFile *rf, void *data, uint sz)
 Reads data from the RemoteFile.
int ReadFromBuf (void *buf, int count, bool peek=false)
 Reads from the read-ahead buffer, this is called by Read(void*, int) when the read-ahead thread is running.
int ReadBufFree (void) const
 Returns number of bytes available for reading into buffer.
int ReadBufAvail (void) const
 Returns number of bytes available for reading from buffer.
void StartupReadAheadThread (void)
 Creates the read-ahead thread, and waits for it to start.
void ResetReadAhead (long long newinternal)
 Restart the read-ahead threat at the 'newinternal' position.
void KillReadAheadThread (void)
 Stops the read-ahead thread, and waits for it to stop.

Private Attributes

QString filename
ThreadedFileWritertfw
int fd2
bool writemode
long long readpos
long long writepos
bool stopreads
pthread_rwlock_t rwlock
int recorder_num
RemoteEncoderremoteencoder
RemoteFileremotefile
QMutex readAheadLock
pthread_t reader
bool startreadahead
char * readAheadBuffer
bool readaheadrunning
bool readaheadpaused
bool pausereadthread
int rbrpos
int rbwpos
long long internalreadpos
bool ateof
bool readsallowed
volatile bool wantseek
bool setswitchtonext
QMutex bitratelock
uint rawbitrate
float playspeed
int fill_threshold
int fill_min
int readblocksize
QWaitCondition pauseWait
int wanttoread
QWaitCondition availWait
QMutex availWaitMutex
QWaitCondition readsAllowedWait
int numfailures
bool commserror
DVDRingBufferPrivdvdPriv
bool oldfile
LiveTVChainlivetvchain
bool ignoreliveeof
long long readAdjust
QWaitCondition readAheadRunningCond
 Condition to signal that the read ahead thread is running.
QMutex readAheadRunningCondLock

Static Private Attributes

static const uint kBufferSize = 3 * 1024 * 1024
static const uint kReadTestSize = PNG_MIN_SIZE

Constructor & Destructor Documentation

RingBuffer::RingBuffer ( const QString &  lfilename,
bool  write,
bool  usereadahead = true,
uint  read_retries = 12 
)

Creates a RingBuffer instance.

You can explicitly disable the readahead thread by setting readahead to false, or by just not calling Start(void).

Parameters:
lfilename Name of file to read or write.
write If true an encapsulated writer is created
readahead If false a call to Start(void) will not a pre-buffering thread, otherwise Start(void) will start a pre-buffering thread.
read_retries How often to retry reading the file before giving up.

Definition at line 86 of file RingBuffer.cpp.

RingBuffer::~RingBuffer ( void   ) 

Shuts down any threads and closes any files.

Definition at line 311 of file RingBuffer.cpp.


Member Function Documentation

void RingBuffer::SetWriteBufferSize ( int  newSize  ) 

Calls ThreadedFileWriter::SetWriteBufferSize(int).

Definition at line 1269 of file RingBuffer.cpp.

Referenced by TVRec::SetupRecorder().

void RingBuffer::SetWriteBufferMinWriteSize ( int  newMinSize  ) 

Calls ThreadedFileWriter::SetWriteBufferMinWriteSize(int).

Definition at line 1277 of file RingBuffer.cpp.

void RingBuffer::UpdateRawBitrate ( uint  rawbitrate  ) 

Set the raw bit rate, to allow RingBuffer adjust effective bitrate.

Parameters:
raw_bitrate Streams average number of kilobits per second when playspeed is 1.0

Definition at line 485 of file RingBuffer.cpp.

Referenced by NuppelDecoder::GetFrame(), NuppelVideoPlayer::JumpToProgram(), NuppelDecoder::OpenFile(), IvtvDecoder::OpenFile(), AvFormatDecoder::ScanStreams(), and NuppelVideoPlayer::SwitchToProgram().

void RingBuffer::UpdatePlaySpeed ( float  playspeed  ) 

Set the play speed, to allow RingBuffer adjust effective bitrate.

Parameters:
play_speed Speed to set. (1.0 for normal speed)

Definition at line 518 of file RingBuffer.cpp.

Referenced by NuppelVideoPlayer::StartPlaying().

QString RingBuffer::GetFilename ( void   )  const [inline]

int RingBuffer::DataInReadAhead ( void   )  const [inline]

Returns ReadBufAvail(void).

Definition at line 40 of file RingBuffer.h.

Referenced by NuppelVideoPlayer::IsReallyNearEnd().

bool RingBuffer::GetStopReads ( void   )  const [inline]

Returns value of stopreads.

See also:
StartReads(void), StopReads(void)

Definition at line 43 of file RingBuffer.h.

Referenced by FileTransfer::RequestBlock().

bool RingBuffer::isPaused ( void   )  const [inline]

Returns false iff read-ahead is not running and read-ahead is not paused.

Definition at line 46 of file RingBuffer.h.

Referenced by NuppelVideoPlayer::IsPaused(), and TV::TogglePIPView().

long long RingBuffer::GetReadPosition ( void   )  const

long long RingBuffer::GetWritePosition ( void   )  const

long long RingBuffer::GetRealFileSize ( void   )  const

uint RingBuffer::GetBitrate ( void   )  const

Returns effective bits per second (in thousands).

NOTE: This is reported in telecom kilobytes, to get the bits per second multiply by 1000, not 1024.

Definition at line 498 of file RingBuffer.cpp.

Referenced by NuppelVideoPlayer::IsReallyNearEnd().

uint RingBuffer::GetReadBlockSize ( void   )  const

Returns size of each disk read made by read ahead thread (in bytes).

Definition at line 508 of file RingBuffer.cpp.

Referenced by NuppelVideoPlayer::IsReallyNearEnd().

bool RingBuffer::IsOpen ( void   )  const

void RingBuffer::OpenFile ( const QString &  lfilename,
uint  retryCount = 12 
)

Opens a file for reading.

Parameters:
lfilename Name of file to read
retryCount How often to retry reading the file before giving up

Definition at line 151 of file RingBuffer.cpp.

Referenced by NuppelVideoPlayer::JumpToProgram(), RingBuffer(), and NuppelVideoPlayer::SwitchToProgram().

int RingBuffer::Read ( void *  buf,
int  count 
)

This is the public method for reading from a file, it calls the appropriate read method if the file is remote or buffered, or a DVD.

Parameters:
buf Pointer to where data will be written
count Number of bytes to read
Returns:
Returns number of bytes read

Definition at line 1077 of file RingBuffer.cpp.

Referenced by AVF_Read(), NuppelDecoder::GetFrame(), NuppelDecoder::OpenFile(), Peek(), NuppelDecoder::ReadFileheader(), NuppelDecoder::ReadFrameheader(), IvtvDecoder::ReadWrite(), and FileTransfer::RequestBlock().

int RingBuffer::Peek ( void *  buf,
int  count 
)

Definition at line 911 of file RingBuffer.cpp.

Referenced by NuppelVideoPlayer::OpenFile().

void RingBuffer::Reset ( bool  full = false,
bool  toAdjust = false,
bool  resetInternal = false 
)

Resets the read-ahead thread and our position in the file.

Definition at line 361 of file RingBuffer.cpp.

Referenced by NuppelVideoPlayer::FileChangedCallback(), NuppelVideoPlayer::JumpToProgram(), and NuppelVideoPlayer::SwitchToProgram().

long long RingBuffer::Seek ( long long  pos,
int  whence 
)

void RingBuffer::Pause ( void   ) 

void RingBuffer::Unpause ( void   ) 

void RingBuffer::WaitForPause ( void   ) 

void RingBuffer::Start ( void   ) 

Starts the read-ahead thread.

If this RingBuffer is not in write-mode, the RingBuffer constructor was called with a usereadahead of true, and the read-ahead thread is not already running.

Definition at line 352 of file RingBuffer.cpp.

Referenced by NuppelVideoPlayer::OpenFile().

void RingBuffer::StopReads ( void   ) 

void RingBuffer::StartReads ( void   ) 

????

See also:
StopReads(void), Unpause(void)

Definition at line 662 of file RingBuffer.cpp.

Referenced by TV::PauseLiveTV(), Unpause(), and FileTransfer::Unpause().

bool RingBuffer::LiveMode ( void   )  const

void RingBuffer::SetLiveMode ( LiveTVChain chain  ) 

Assigns a LiveTVChain to this RingBuffer.

See also:
LiveMode(void)

Definition at line 1331 of file RingBuffer.cpp.

Referenced by TV::HandleStateChange(), TV::SwitchCards(), and TV::TogglePIPView().

void RingBuffer::IgnoreLiveEOF ( bool  ignore  )  [inline]

Tells RingBuffer whether to igonre the end-of-file.

Definition at line 81 of file RingBuffer.h.

Referenced by NuppelVideoPlayer::JumpToProgram(), TV::PauseLiveTV(), TV::SwitchCards(), and TV::UnpauseLiveTV().

int RingBuffer::Write ( const void *  buf,
uint  count 
)

bool RingBuffer::IsIOBound ( void   )  const

Returns true if a RingBuffer::Read(void*,int) is likely to block.

Definition at line 1122 of file RingBuffer.cpp.

Referenced by NuppelVideoRecorder::WriteVideo().

void RingBuffer::WriterFlush ( void   ) 

void RingBuffer::Sync ( void   ) 

Calls ThreadedFileWriter::Sync(void).

Definition at line 1171 of file RingBuffer.cpp.

long long RingBuffer::WriterSeek ( long long  pos,
int  whence 
)

bool RingBuffer::isDVD ( void   )  const [inline]

Returns true if this is a DVD backed RingBuffer.

Definition at line 92 of file RingBuffer.h.

Referenced by NuppelVideoPlayer::ActivateDVDButton(), NuppelVideoPlayer::AddAudioData(), NuppelVideoPlayer::AutoDeint(), NuppelVideoPlayer::AVSync(), TV::BookmarkAllowed(), NuppelVideoPlayer::CalcMaxFFTime(), NuppelVideoPlayer::calcSliderPos(), NuppelVideoPlayer::ChangeDVDTrack(), DecoderBase::ChangeDVDTrack(), NuppelVideoPlayer::ClearBookmark(), TV::DeleteAllowed(), NuppelVideoPlayer::DisableCaptions(), NuppelVideoPlayer::DisplayAVSubtitles(), NuppelVideoPlayer::DisplayDVDButton(), NuppelVideoPlayer::DisplayNormalFrame(), DecoderBase::DoFastForward(), DecoderBase::DoFastForwardSeek(), NuppelVideoPlayer::DoPlay(), DecoderBase::DoRewind(), DecoderBase::DoRewindSeek(), DecoderBase::DVDFindPosition(), TV::DVDJumpBack(), TV::DVDJumpForward(), NuppelVideoPlayer::EnableCaptions(), NuppelVideoPlayer::FastForward(), TV::FillMenuPlaying(), NuppelVideoPlayer::GetBookmark(), NuppelVideoPlayer::GetDVDBookmark(), AvFormatDecoder::GetFrame(), NuppelVideoPlayer::GetFrameFFREW(), DecoderBase::GetKey(), AvFormatDecoder::GetTrackDesc(), NuppelVideoPlayer::GoToDVDMenu(), NuppelVideoPlayer::GoToDVDProgram(), TV::HandleStateChange(), AvFormatDecoder::InitByteContext(), NuppelVideoPlayer::InitVideo(), AvFormatDecoder::InitVideoCodec(), internal_play_media(), AvFormatDecoder::MpegPreProcessPkt(), NuppelVideoPlayer::OpenFile(), AvFormatDecoder::OpenFile(), NuppelVideoPlayer::OutputVideoLoop(), DecoderBase::PosMapFromDb(), TV::ProcessKeypress(), TV::ProcessNetworkControlCommand(), TV::PromptStopWatchingRecording(), AvFormatDecoder::Reset(), NuppelVideoPlayer::ResetPlaying(), NuppelVideoPlayer::Rewind(), TV::RunTV(), AvFormatDecoder::ScanStreams(), AvFormatDecoder::SeekReset(), NuppelVideoPlayer::SetBookmark(), NuppelVideoPlayer::SetDVDBookmark(), TV::ShowLCDDVDInfo(), NuppelVideoPlayer::StartPlaying(), TV::StopStuff(), DecoderBase::SyncPositionMap(), TV::ToggleOSD(), and DecoderBase::UpdateDVDFramesPlayed().

DVDRingBufferPriv* RingBuffer::DVD (  )  [inline]

bool RingBuffer::InDVDMenuOrStillFrame ( void   ) 

long long RingBuffer::SetAdjustFilesize ( void   ) 

Definition at line 905 of file RingBuffer.cpp.

Referenced by NuppelVideoPlayer::SwitchToProgram().

void RingBuffer::SetTimeout ( bool  fast  )  [inline]

Definition at line 97 of file RingBuffer.h.

Referenced by FileTransfer::SetTimeout().

void * RingBuffer::StartReader ( void *  type  )  [static, protected]

Thunk that calls ReadAheadThread(void).

Definition at line 706 of file RingBuffer.cpp.

Referenced by StartupReadAheadThread().

void RingBuffer::ReadAheadThread ( void   )  [protected]

Read-ahead run function.

Definition at line 716 of file RingBuffer.cpp.

Referenced by StartReader().

void RingBuffer::CalcReadAheadThresh ( void   )  [private]

Calculates fill_min, fill_threshold, and readblocksize from the estimated effective bitrate of the stream.

Definition at line 529 of file RingBuffer.cpp.

Referenced by OpenFile(), UpdatePlaySpeed(), and UpdateRawBitrate().

int RingBuffer::safe_read_dvd ( void *  data,
uint  sz 
) [private]

int RingBuffer::safe_read ( int  fd,
void *  data,
uint  sz 
) [private]

Reads data from the file-descriptor.

This will re-read the file forever until the end-of-file is reached or the buffer is full.

Parameters:
fd File descriptor to read from
data Pointer to where data will be written
sz Number of bytes to read
Returns:
Returns number of bytes read

Definition at line 394 of file RingBuffer.cpp.

Referenced by Read(), and ReadAheadThread().

int RingBuffer::safe_read ( RemoteFile rf,
void *  data,
uint  sz 
) [private]

Reads data from the RemoteFile.

Parameters:
rf RemoteFile to read from
data Pointer to where data will be written
sz Number of bytes to read
Returns:
Returns number of bytes read

Definition at line 462 of file RingBuffer.cpp.

int RingBuffer::ReadFromBuf ( void *  buf,
int  count,
bool  peek = false 
) [private]

Reads from the read-ahead buffer, this is called by Read(void*, int) when the read-ahead thread is running.

Parameters:
buf Pointer to where data will be written
count Number of bytes to read
peek If true, don't increment read count
Returns:
Returns number of bytes read

Definition at line 932 of file RingBuffer.cpp.

Referenced by Peek(), and Read().

int RingBuffer::ReadBufFree ( void   )  const [private]

Returns number of bytes available for reading into buffer.

Definition at line 581 of file RingBuffer.cpp.

Referenced by ReadAheadThread().

int RingBuffer::ReadBufAvail ( void   )  const [private]

Returns number of bytes available for reading from buffer.

Definition at line 590 of file RingBuffer.cpp.

Referenced by ReadFromBuf().

void RingBuffer::StartupReadAheadThread ( void   )  [private]

Creates the read-ahead thread, and waits for it to start.

See also:
Start(void).

Definition at line 626 of file RingBuffer.cpp.

Referenced by ReadFromBuf(), and Start().

void RingBuffer::ResetReadAhead ( long long  newinternal  )  [private]

Restart the read-ahead threat at the 'newinternal' position.

This is called after a Seek(long long, int) so that the read-ahead buffer doesn't contain any stale data, and so that it will read any new data from the new position in the file.

WARNING: Must be called with rwlock in write lock state.

Parameters:
newinternal Position in file to start reading data from

Definition at line 608 of file RingBuffer.cpp.

Referenced by ReadAheadThread(), Reset(), and Seek().

void RingBuffer::KillReadAheadThread ( void   )  [private]

Stops the read-ahead thread, and waits for it to stop.

Definition at line 639 of file RingBuffer.cpp.

Referenced by ReadFromBuf(), and ~RingBuffer().


Member Data Documentation

QString RingBuffer::filename [private]

Definition at line 119 of file RingBuffer.h.

Referenced by GetRealFileSize(), OpenFile(), and RingBuffer().

int RingBuffer::fd2 [private]

Definition at line 122 of file RingBuffer.h.

Referenced by IsOpen(), OpenFile(), Read(), ReadAheadThread(), Seek(), and ~RingBuffer().

Definition at line 124 of file RingBuffer.h.

Referenced by Read(), ReadAheadThread(), RingBuffer(), Start(), and Write().

long long RingBuffer::readpos [private]

Definition at line 126 of file RingBuffer.h.

Referenced by GetReadPosition(), Read(), Reset(), and Seek().

long long RingBuffer::writepos [private]

Definition at line 127 of file RingBuffer.h.

Referenced by GetWritePosition(), Reset(), Write(), and WriterSeek().

Definition at line 129 of file RingBuffer.h.

Referenced by ReadAheadThread(), ReadFromBuf(), safe_read(), StartReads(), and StopReads().

pthread_rwlock_t RingBuffer::rwlock [mutable, private]

int RingBuffer::recorder_num [private]

Definition at line 133 of file RingBuffer.h.

Definition at line 134 of file RingBuffer.h.

Definition at line 135 of file RingBuffer.h.

Referenced by GetRealFileSize(), IsOpen(), OpenFile(), Read(), ReadAheadThread(), Seek(), and ~RingBuffer().

QMutex RingBuffer::readAheadLock [mutable, private]

Definition at line 137 of file RingBuffer.h.

Referenced by ReadAheadThread(), ReadBufAvail(), ReadBufFree(), ReadFromBuf(), and ResetReadAhead().

Definition at line 138 of file RingBuffer.h.

Referenced by KillReadAheadThread(), and StartupReadAheadThread().

Definition at line 140 of file RingBuffer.h.

Referenced by OpenFile(), and Start().

char* RingBuffer::readAheadBuffer [private]

Definition at line 141 of file RingBuffer.h.

Referenced by ReadAheadThread(), and ReadFromBuf().

Definition at line 143 of file RingBuffer.h.

Referenced by ReadAheadThread(), ReadFromBuf(), and WaitForPause().

Definition at line 144 of file RingBuffer.h.

Referenced by Pause(), ReadAheadThread(), and Unpause().

int RingBuffer::rbrpos [private]

Definition at line 145 of file RingBuffer.h.

Referenced by ReadAheadThread(), ReadBufAvail(), ReadBufFree(), ReadFromBuf(), and ResetReadAhead().

int RingBuffer::rbwpos [private]

Definition at line 146 of file RingBuffer.h.

Referenced by ReadAheadThread(), ReadBufAvail(), ReadBufFree(), and ResetReadAhead().

long long RingBuffer::internalreadpos [private]

Definition at line 147 of file RingBuffer.h.

Referenced by ReadAheadThread(), Reset(), ResetReadAhead(), safe_read(), and SetAdjustFilesize().

Definition at line 148 of file RingBuffer.h.

Referenced by OpenFile(), ReadAheadThread(), ReadFromBuf(), and ResetReadAhead().

Definition at line 149 of file RingBuffer.h.

Referenced by CalcReadAheadThresh(), ReadAheadThread(), ReadFromBuf(), and ResetReadAhead().

volatile bool RingBuffer::wantseek [private]

Definition at line 150 of file RingBuffer.h.

Referenced by CalcReadAheadThresh(), ReadAheadThread(), Reset(), and Seek().

Definition at line 151 of file RingBuffer.h.

Referenced by OpenFile(), ReadAheadThread(), ReadFromBuf(), Reset(), and ResetReadAhead().

QMutex RingBuffer::bitratelock [mutable, private]

Definition at line 153 of file RingBuffer.h.

Referenced by GetBitrate(), GetReadBlockSize(), UpdatePlaySpeed(), and UpdateRawBitrate().

Definition at line 154 of file RingBuffer.h.

Referenced by CalcReadAheadThresh(), GetBitrate(), OpenFile(), and UpdateRawBitrate().

float RingBuffer::playspeed [private]

Definition at line 155 of file RingBuffer.h.

Referenced by CalcReadAheadThresh(), GetBitrate(), and UpdatePlaySpeed().

Definition at line 156 of file RingBuffer.h.

Referenced by CalcReadAheadThresh(), and ReadAheadThread().

int RingBuffer::fill_min [private]

Definition at line 157 of file RingBuffer.h.

Referenced by CalcReadAheadThresh(), and ReadAheadThread().

QWaitCondition RingBuffer::pauseWait [private]

Definition at line 160 of file RingBuffer.h.

Referenced by ReadAheadThread(), and WaitForPause().

int RingBuffer::wanttoread [private]

Definition at line 162 of file RingBuffer.h.

Referenced by ReadFromBuf().

QWaitCondition RingBuffer::availWait [private]

Definition at line 163 of file RingBuffer.h.

Referenced by ReadAheadThread(), ReadFromBuf(), and StopReads().

QMutex RingBuffer::availWaitMutex [private]

Definition at line 164 of file RingBuffer.h.

Referenced by ReadAheadThread(), and ReadFromBuf().

QWaitCondition RingBuffer::readsAllowedWait [private]

Definition at line 166 of file RingBuffer.h.

Referenced by ReadAheadThread(), and ReadFromBuf().

int RingBuffer::numfailures [private]

Definition at line 168 of file RingBuffer.h.

Referenced by OpenFile(), ReadAheadThread(), Reset(), and safe_read().

Definition at line 170 of file RingBuffer.h.

Referenced by OpenFile(), ReadAheadThread(), ReadFromBuf(), and Reset().

Definition at line 174 of file RingBuffer.h.

Referenced by OpenFile(), and safe_read().

Definition at line 176 of file RingBuffer.h.

Referenced by LiveMode(), ReadAheadThread(), ReadFromBuf(), safe_read(), and SetLiveMode().

Definition at line 177 of file RingBuffer.h.

Referenced by ReadAheadThread().

long long RingBuffer::readAdjust [private]

Definition at line 179 of file RingBuffer.h.

Referenced by Reset(), safe_read(), Seek(), and SetAdjustFilesize().

QWaitCondition RingBuffer::readAheadRunningCond [private]

Condition to signal that the read ahead thread is running.

Definition at line 182 of file RingBuffer.h.

Referenced by ReadAheadThread(), and StartupReadAheadThread().

Definition at line 183 of file RingBuffer.h.

Referenced by ReadAheadThread(), and StartupReadAheadThread().

const uint RingBuffer::kBufferSize = 3 * 1024 * 1024 [static, private]

Definition at line 186 of file RingBuffer.h.

Referenced by ReadAheadThread(), ReadBufAvail(), ReadBufFree(), and ReadFromBuf().

const uint RingBuffer::kReadTestSize = PNG_MIN_SIZE [static, private]

Definition at line 187 of file RingBuffer.h.

Referenced by OpenFile().


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

Generated on Sat Dec 18 05:16:10 2010 for MythTV by  doxygen 1.5.5