MythTV  master
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
BDRingBuffer Class Reference

#include <bdringbuffer.h>

Inheritance diagram for BDRingBuffer:
Inheritance graph
[legend]
Collaboration diagram for BDRingBuffer:
Collaboration graph
[legend]

Public Member Functions

 BDRingBuffer (const QString &lfilename)
 
 ~BDRingBuffer () override
 
bool IsStreamed (void) override
 
void ProgressUpdate (void)
 
bool BDWaitingForPlayer (void)
 
void SkipBDWaitingForPlayer (void)
 
void IgnoreWaitStates (bool ignore) override
 
bool StartFromBeginning (void) override
 
bool GetNameAndSerialNum (QString &_name, QString &_serialnum)
 
bool GetBDStateSnapshot (QString &state)
 Get a snapshot of the current BD state. More...
 
bool RestoreBDStateSnapshot (const QString &state)
 Restore a BD snapshot. More...
 
void ClearOverlays (void)
 
BDOverlayGetOverlay (void)
 
void SubmitOverlay (const bd_overlay_s *overlay)
 
void SubmitARGBOverlay (const bd_argb_overlay_s *overlay)
 
uint32_t GetNumTitles (void) const
 
int GetCurrentTitle (void)
 
uint64_t GetCurrentAngle (void) const
 
int GetTitleDuration (int title)
 
uint64_t GetTitleSize (void) const
 
uint64_t GetTotalTimeOfTitle (void) const
 
uint64_t GetCurrentTime (void)
 
long long GetReadPosition (void) const override
 Returns how far into the file we have read. More...
 
uint64_t GetTotalReadPosition (void)
 
uint32_t GetNumChapters (void)
 
uint32_t GetCurrentChapter (void)
 
uint64_t GetNumAngles (void)
 
uint64_t GetChapterStartTime (uint32_t chapter)
 
uint64_t GetChapterStartFrame (uint32_t chapter)
 
bool IsOpen (void) const override
 Returns true if open for either reading or writing. More...
 
bool IsHDMVNavigation (void) const
 
bool IsInMenu (void) const override
 
bool IsInStillFrame (void) const override
 
bool TitleChanged (void)
 
bool IsValidStream (int streamid)
 
void UnblockReading (void)
 
bool IsReadingBlocked (void)
 
int64_t AdjustTimestamp (int64_t timestamp)
 
void GetDescForPos (QString &desc)
 
double GetFrameRate (void)
 
int GetAudioLanguage (uint streamID)
 
int GetSubtitleLanguage (uint streamID)
 
bool HandleAction (const QStringList &actions, int64_t pts) override
 
bool OpenFile (const QString &lfilename, uint retry_ms=kDefaultOpenTimeout) override
 Opens a bluray device for reading. More...
 
void close (void)
 
bool GoToMenu (const QString &str, int64_t pts)
 jump to a Blu-ray root or popup menu More...
 
bool SwitchTitle (uint32_t index)
 
bool SwitchPlaylist (uint32_t index)
 
bool SwitchAngle (uint angle)
 
- Public Member Functions inherited from RingBuffer
virtual ~RingBuffer ()=0
 Deletes. More...
 
void SetWriteBufferSize (int newSize)
 
void SetWriteBufferMinWriteSize (int newMinSize)
 Calls ThreadedFileWriter::SetWriteBufferMinWriteSize(int) More...
 
void SetOldFile (bool is_old)
 Tell RingBuffer if this is an old file or not. More...
 
void UpdateRawBitrate (uint raw_bitrate)
 Set the raw bit rate, to allow RingBuffer adjust effective bitrate. More...
 
void UpdatePlaySpeed (float play_speed)
 Set the play speed, to allow RingBuffer adjust effective bitrate. More...
 
void EnableBitrateMonitor (bool enable)
 
void SetBufferSizeFactors (bool estbitrate, bool matroska)
 Tells RingBuffer that the raw bitrate may be innacurate and the underlying container is matroska, both of which may require a larger buffer size. More...
 
void SetWaitForWrite (void)
 
QString GetSafeFilename (void)
 
QString GetFilename (void) const
 Returns name of file used by this RingBuffer. More...
 
QString GetSubtitleFilename (void) const
 
QString GetLastError (void) const
 
bool GetCommsError (void) const
 
void ResetCommsError (void)
 
bool GetStopReads (void) const
 Returns value of stopreads. More...
 
bool isPaused (void) const
 Returns false iff read-ahead is not running and read-ahead is not paused. More...
 
QString GetDecoderRate (void)
 
QString GetStorageRate (void)
 
QString GetAvailableBuffer (void)
 
uint GetBufferSize (void)
 
long long GetWritePosition (void) const
 Returns how far into a ThreadedFileWriter file we have written. More...
 
long long GetRealFileSize (void) const
 Returns the size of the file we are reading/writing, or -1 if the query fails. More...
 
bool IsNearEnd (double fps, uint vvf) const
 
virtual bool IsSeekingAllowed (void)
 
virtual bool IsBookmarkAllowed (void)
 
virtual int BestBufferSize (void)
 
RingBufferType GetType () const
 
int GetReadBufAvail () const
 Returns number of bytes available for reading from buffer. More...
 
bool SetReadInternalMode (bool mode)
 
bool IsReadInternalMode (void)
 
bool IsDisc (void) const
 
bool IsDVD (void) const
 
bool IsBD (void) const
 
const DVDRingBufferDVD (void) const
 
const BDRingBufferBD (void) const
 
DVDRingBufferDVD (void)
 
BDRingBufferBD (void)
 
virtual bool IsInDiscMenuOrStillFrame (void) const
 
virtual bool ReOpen (QString="")
 
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 BD/DVD. More...
 
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. More...
 
long long Seek (long long pos, int whence, bool has_lock=false)
 Seeks to a particular position in the file. More...
 
void Pause (void)
 Pauses the read-ahead thread. More...
 
void Unpause (void)
 Unpauses the read-ahead thread. More...
 
void WaitForPause (void)
 Waits for Pause(void) to take effect. More...
 
void Start (void)
 Starts the read-ahead thread. More...
 
void StopReads (void)
 ???? More...
 
void StartReads (void)
 ???? More...
 
bool LiveMode (void) const
 Returns true if this RingBuffer has been assigned a LiveTVChain. More...
 
void SetLiveMode (LiveTVChain *chain)
 Assigns a LiveTVChain to this RingBuffer. More...
 
void IgnoreLiveEOF (bool ignore)
 Tells RingBuffer whether to ignore the end-of-file. More...
 
int Write (const void *buf, uint count)
 Writes buffer to ThreadedFileWriter::Write(const void*,uint) More...
 
bool IsIOBound (void) const
 
void WriterFlush (void)
 Calls ThreadedFileWriter::Flush(void) More...
 
void Sync (void)
 Calls ThreadedFileWriter::Sync(void) More...
 
long long WriterSeek (long long pos, int whence, bool has_lock=false)
 Calls ThreadedFileWriter::Seek(long long,int). More...
 
bool WriterSetBlocking (bool lock=true)
 Calls ThreadedFileWriter::SetBlocking(bool) More...
 
long long SetAdjustFilesize (void)
 

Protected Member Functions

int safe_read (void *data, uint sz) override
 
long long SeekInternal (long long pos, int whence) override
 
uint64_t SeekInternal (uint64_t pos)
 
- Protected Member Functions inherited from RingBuffer
 RingBuffer (RingBufferType rbtype)
 
void run (void) override
 Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead. More...
 
void CreateReadAheadBuffer (void)
 
void CalcReadAheadThresh (void)
 Calculates m_fillMin, m_fillThreshold, and m_readBlockSize from the estimated effective bitrate of the stream. More...
 
bool PauseAndWait (void)
 
int ReadPriv (void *buf, int count, bool peek)
 When possible reads from the read-ahead buffer, otherwise reads directly from the device. More...
 
int ReadDirect (void *buf, int count, bool peek)
 
bool WaitForReadsAllowed (void)
 
int WaitForAvail (int count, int timeout)
 
virtual long long GetRealFileSizeInternal (void) const
 
int ReadBufFree (void) const
 Returns number of bytes available for reading into buffer. More...
 
int ReadBufAvail (void) const
 Returns number of bytes available for reading from buffer. More...
 
void ResetReadAhead (long long newinternal)
 Restart the read-ahead thread at the 'newinternal' position. More...
 
void KillReadAheadThread (void)
 Stops the read-ahead thread, and waits for it to stop. More...
 
uint64_t UpdateDecoderRate (uint64_t latest=0)
 
uint64_t UpdateStorageRate (uint64_t latest=0)
 
- Protected Member Functions inherited from MThread
int exec (void)
 Enters the qt event loop. call exit or quit to exit thread. More...
 
 MThread (const QString &objectName)
 Standard constructor. More...
 
 MThread (const QString &objectName, QRunnable *runnable)
 Use this constructor if you want the default run() method to run the QRunnable's run() method instead of entering the Qt event loop. More...
 
virtual ~MThread ()
 
void RunProlog (void)
 Sets up a thread, call this if you reimplement run(). More...
 
void RunEpilog (void)
 Cleans up a thread's resources, call this if you reimplement run(). More...
 
QThread * qthread (void)
 Returns the thread, this will always return the same pointer no matter how often you restart the thread. More...
 
void setObjectName (const QString &name)
 
QString objectName (void) const
 
void setPriority (QThread::Priority priority)
 
QThread::Priority priority (void) const
 
bool isFinished (void) const
 
bool isRunning (void) const
 
void setStackSize (uint stackSize)
 
uint stackSize (void) const
 
void exit (int retcode=0)
 Use this to exit from the thread if you are using a Qt event loop. More...
 
void start (QThread::Priority=QThread::InheritPriority)
 Tell MThread to start running the thread in the near future. More...
 
void terminate (void)
 Kill a thread unsafely. More...
 
void quit (void)
 calls exit(0) More...
 
bool wait (unsigned long time=ULONG_MAX)
 Wait for the MThread to exit, with a maximum timeout. More...
 

Private Types

enum  processState_t { PROCESS_NORMAL, PROCESS_REPROCESS, PROCESS_WAIT }
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (BDRingBuffer)
 
void WaitForPlayer (void)
 
bool UpdateTitleInfo (void)
 
BLURAY_TITLE_INFO * GetTitleInfo (uint32_t index)
 
BLURAY_TITLE_INFO * GetPlaylistInfo (uint32_t index)
 
void PressButton (int32_t key, int64_t pts)
 
void ClickButton (int64_t pts, uint16_t x, uint16_t y)
 
bool HandleBDEvents (void)
 
void HandleBDEvent (BD_EVENT &event)
 
const BLURAY_STREAM_INFO * FindStream (int streamid, BLURAY_STREAM_INFO *streams, int streamCount) const
 Find the stream with the given ID from an array of streams. More...
 

Private Attributes

BLURAY * m_bdnav {nullptr}
 
bool m_isHDMVNavigation {false}
 
bool m_tryHDMVNavigation {false}
 
bool m_topMenuSupported {false}
 
bool m_firstPlaySupported {false}
 
uint32_t m_numTitles {0}
 
uint32_t m_mainTitle {0}
 
uint64_t m_currentTitleLength {0}
 
BLURAY_TITLE_INFO * m_currentTitleInfo {nullptr}
 
uint64_t m_titlesize {0}
 
uint64_t m_currentTitleAngleCount {0}
 
uint64_t m_currentTime {0}
 
int m_imgHandle {-1}
 
int m_currentAngle {0}
 
int m_currentTitle {-1}
 
int m_currentPlaylist {0}
 
int m_currentPlayitem {0}
 
int m_currentChapter {0}
 
int m_currentAudioStream {0}
 
int m_currentIGStream {0}
 
int m_currentPGTextSTStream {0}
 
int m_currentSecondaryAudioStream {0}
 
int m_currentSecondaryVideoStream {0}
 
bool m_PGTextSTEnabled {false}
 
bool m_secondaryAudioEnabled {false}
 
bool m_secondaryVideoEnabled {false}
 
bool m_secondaryVideoIsFullscreen {false}
 
bool m_titleChanged {false}
 
bool m_playerWait {false}
 
bool m_ignorePlayerWait {true}
 
QMutex m_overlayLock
 
QList< BDOverlay * > m_overlayImages
 
QVector< BDOverlay * > m_overlayPlanes
 
uint8_t m_stillTime {0}
 
uint8_t m_stillMode {BLURAY_STILL_NONE}
 
volatile bool m_inMenu {false}
 
BD_EVENT m_lastEvent {BD_EVENT_NONE, 0}
 
processState_t m_processState {PROCESS_NORMAL}
 
QByteArray m_pendingData
 
int64_t m_timeDiff {0}
 
QHash< uint32_t, BLURAY_TITLE_INFO * > m_cachedTitleInfo
 
QHash< uint32_t, BLURAY_TITLE_INFO * > m_cachedPlaylistInfo
 
QMutex m_infoLock {QMutex::Recursive}
 
QString m_name
 
QString m_serialNumber
 
QThread * m_mainThread {nullptr}
 

Additional Inherited Members

- Static Public Member Functions inherited from RingBuffer
static RingBufferCreate (const QString &xfilename, bool write, bool usereadahead=true, int timeout_ms=kDefaultOpenTimeout, bool stream_only=false)
 Creates a RingBuffer instance. More...
 
static QString BitrateToString (uint64_t rate, bool hz=false)
 
static void AVFormatInitNetwork (void)
 
- Static Public Attributes inherited from RingBuffer
static const int kDefaultOpenTimeout = 2000
 
static const int kLiveTVOpenTimeout = 10000
 
static QMutex s_subExtLock
 
static QStringList s_subExt
 
static QStringList s_subExtNoCheck
 
- Static Protected Member Functions inherited from MThread
static void setTerminationEnabled (bool enabled=true)
 
static void sleep (unsigned long time)
 
static void msleep (unsigned long time)
 
static void usleep (unsigned long time)
 
static void ThreadSetup (const QString &)
 This is to be called on startup in those few threads that haven't been ported to MThread. More...
 
static void ThreadCleanup (void)
 This is to be called on exit in those few threads that haven't been ported to MThread. More...
 
static void Cleanup (void)
 This will print out all the running threads, call exit(1) on each and then wait up to 5 seconds total for all the threads to exit. More...
 
static void GetAllThreadNames (QStringList &list)
 
static void GetAllRunningThreadNames (QStringList &list)
 
- Protected Attributes inherited from RingBuffer
RingBufferType m_type
 
QReadWriteLock m_posLock
 
long long m_readPos {0}
 
long long m_writePos {0}
 
long long m_internalReadPos {0}
 
long long m_ignoreReadPos {-1}
 
QReadWriteLock m_rbrLock
 
int m_rbrPos {0}
 
QReadWriteLock m_rbwLock
 
int m_rbwPos {0}
 
volatile bool m_stopReads {false}
 
QString m_safeFilename
 
QReadWriteLock m_rwLock
 
QString m_filename
 
QString m_subtitleFilename
 
QString m_lastError
 
ThreadedFileWriterm_tfw {nullptr}
 
int m_fd2 {-1}
 
bool m_writeMode {false}
 
RemoteFilem_remotefile {nullptr}
 
uint m_bufferSize {BUFFER_SIZE_MINIMUM}
 
bool m_lowBuffers {false}
 
bool m_fileIsMatroska {false}
 
bool m_unknownBitrate {false}
 
bool m_startReadAhead {false}
 
char * m_readAheadBuffer {nullptr}
 
bool m_readAheadRunning {false}
 
bool m_reallyRunning {false}
 
bool m_requestPause {false}
 
bool m_paused {false}
 
bool m_ateof {false}
 
bool m_waitForWrite {false}
 
bool m_beingWritten {false}
 
bool m_readsAllowed {false}
 
bool m_readsDesired {false}
 
volatile bool m_recentSeek {true}
 
bool m_setSwitchToNext {false}
 
uint m_rawBitrate {8000}
 
float m_playSpeed {1.0F}
 
int m_fillThreshold {65536}
 
int m_fillMin {-1}
 
int m_readBlockSize {CHUNK}
 
int m_wantToRead {0}
 
int m_numFailures {0}
 
bool m_commsError {false}
 
bool m_oldfile {false}
 
LiveTVChainm_liveTVChain {nullptr}
 
bool m_ignoreLiveEOF {false}
 
long long m_readAdjust {0}
 
int m_readOffset {0}
 
bool m_readInternalMode {false}
 
bool m_bitrateMonitorEnabled {false}
 
QMutex m_decoderReadLock
 
QMap< qint64, uint64_t > m_decoderReads
 
QMutex m_storageReadLock
 
QMap< qint64, uint64_t > m_storageReads
 
QWaitCondition m_generalWait
 Condition to signal that the read ahead thread is running. More...
 
- Protected Attributes inherited from MThread
MThreadInternalm_thread {nullptr}
 
QRunnable * m_runnable {nullptr}
 
bool m_prolog_executed {true}
 
bool m_epilog_executed {true}
 
- Static Protected Attributes inherited from MThread
static const int kDefaultStartTimeout
 

Detailed Description

Definition at line 73 of file bdringbuffer.h.

Member Enumeration Documentation

◆ processState_t

Enumerator
PROCESS_NORMAL 
PROCESS_REPROCESS 
PROCESS_WAIT 

Definition at line 167 of file bdringbuffer.h.

Constructor & Destructor Documentation

◆ BDRingBuffer()

BDRingBuffer::BDRingBuffer ( const QString &  lfilename)
explicit

Definition at line 286 of file bdringbuffer.cpp.

◆ ~BDRingBuffer()

BDRingBuffer::~BDRingBuffer ( )
override

Definition at line 295 of file bdringbuffer.cpp.

Member Function Documentation

◆ Q_DECLARE_TR_FUNCTIONS()

BDRingBuffer::Q_DECLARE_TR_FUNCTIONS ( BDRingBuffer  )
private

◆ IsStreamed()

bool BDRingBuffer::IsStreamed ( void  )
inlineoverridevirtual

Reimplemented from RingBuffer.

Definition at line 81 of file bdringbuffer.h.

◆ ProgressUpdate()

void BDRingBuffer::ProgressUpdate ( void  )

Definition at line 498 of file bdringbuffer.cpp.

Referenced by file_opened_callback().

◆ BDWaitingForPlayer()

bool BDRingBuffer::BDWaitingForPlayer ( void  )
inline

Definition at line 86 of file bdringbuffer.h.

Referenced by MythBDPlayer::VideoLoop().

◆ SkipBDWaitingForPlayer()

void BDRingBuffer::SkipBDWaitingForPlayer ( void  )
inline

Definition at line 87 of file bdringbuffer.h.

Referenced by MythBDPlayer::VideoLoop().

◆ IgnoreWaitStates()

void BDRingBuffer::IgnoreWaitStates ( bool  ignore)
inlineoverridevirtual

Reimplemented from RingBuffer.

Definition at line 88 of file bdringbuffer.h.

◆ StartFromBeginning()

bool BDRingBuffer::StartFromBeginning ( void  )
overridevirtual

Reimplemented from RingBuffer.

Definition at line 1536 of file bdringbuffer.cpp.

◆ GetNameAndSerialNum()

bool BDRingBuffer::GetNameAndSerialNum ( QString &  _name,
QString &  _serialnum 
)

◆ GetBDStateSnapshot()

bool BDRingBuffer::GetBDStateSnapshot ( QString &  state)

Get a snapshot of the current BD state.

Definition at line 1559 of file bdringbuffer.cpp.

Referenced by MythBDPlayer::SetBookmark().

◆ RestoreBDStateSnapshot()

bool BDRingBuffer::RestoreBDStateSnapshot ( const QString &  state)

Restore a BD snapshot.

Definition at line 1581 of file bdringbuffer.cpp.

Referenced by MythBDPlayer::VideoStart().

◆ ClearOverlays()

void BDRingBuffer::ClearOverlays ( void  )

Definition at line 1628 of file bdringbuffer.cpp.

Referenced by close().

◆ GetOverlay()

BDOverlay * BDRingBuffer::GetOverlay ( void  )

Definition at line 1651 of file bdringbuffer.cpp.

Referenced by MythBDPlayer::DisplayMenu().

◆ SubmitOverlay()

void BDRingBuffer::SubmitOverlay ( const bd_overlay_s *  overlay)

Definition at line 1659 of file bdringbuffer.cpp.

Referenced by HandleOverlayCallback().

◆ SubmitARGBOverlay()

void BDRingBuffer::SubmitARGBOverlay ( const bd_argb_overlay_s *  overlay)

Definition at line 1746 of file bdringbuffer.cpp.

Referenced by HandleARGBOverlayCallback().

◆ GetNumTitles()

uint32_t BDRingBuffer::GetNumTitles ( void  ) const
inline

Definition at line 99 of file bdringbuffer.h.

Referenced by MythBDPlayer::GetNumTitles(), and GetTitleDuration().

◆ GetCurrentTitle()

int BDRingBuffer::GetCurrentTitle ( void  )

Definition at line 835 of file bdringbuffer.cpp.

Referenced by GetBDStateSnapshot(), and MythBDPlayer::GetCurrentTitle().

◆ GetCurrentAngle()

uint64_t BDRingBuffer::GetCurrentAngle ( void  ) const
inline

Definition at line 101 of file bdringbuffer.h.

Referenced by GetBDStateSnapshot(), and MythBDPlayer::GetCurrentAngle().

◆ GetTitleDuration()

int BDRingBuffer::GetTitleDuration ( int  title)

Definition at line 841 of file bdringbuffer.cpp.

Referenced by MythBDPlayer::GetTitleDuration().

◆ GetTitleSize()

uint64_t BDRingBuffer::GetTitleSize ( void  ) const
inline

Definition at line 104 of file bdringbuffer.h.

◆ GetTotalTimeOfTitle()

uint64_t BDRingBuffer::GetTotalTimeOfTitle ( void  ) const
inline

Definition at line 106 of file bdringbuffer.h.

Referenced by DecoderBase::PosMapFromDb(), and DecoderBase::SyncPositionMap().

◆ GetCurrentTime()

uint64_t BDRingBuffer::GetCurrentTime ( void  )
inline

◆ GetReadPosition()

long long BDRingBuffer::GetReadPosition ( void  ) const
overridevirtual

Returns how far into the file we have read.

Implements RingBuffer.

Definition at line 795 of file bdringbuffer.cpp.

◆ GetTotalReadPosition()

uint64_t BDRingBuffer::GetTotalReadPosition ( void  )

Definition at line 1044 of file bdringbuffer.cpp.

Referenced by DecoderBase::PosMapFromDb().

◆ GetNumChapters()

uint32_t BDRingBuffer::GetNumChapters ( void  )

◆ GetCurrentChapter()

uint32_t BDRingBuffer::GetCurrentChapter ( void  )

Definition at line 810 of file bdringbuffer.cpp.

Referenced by MythBDPlayer::GetCurrentChapter().

◆ GetNumAngles()

uint64_t BDRingBuffer::GetNumAngles ( void  )
inline

Definition at line 112 of file bdringbuffer.h.

Referenced by MythBDPlayer::GetNumAngles().

◆ GetChapterStartTime()

uint64_t BDRingBuffer::GetChapterStartTime ( uint32_t  chapter)

Definition at line 817 of file bdringbuffer.cpp.

Referenced by MythBDPlayer::GetChapterTimes(), and UpdateTitleInfo().

◆ GetChapterStartFrame()

uint64_t BDRingBuffer::GetChapterStartFrame ( uint32_t  chapter)

Definition at line 826 of file bdringbuffer.cpp.

Referenced by MythBDPlayer::GetChapter(), and UpdateTitleInfo().

◆ IsOpen()

bool BDRingBuffer::IsOpen ( void  ) const
inlineoverridevirtual

◆ IsHDMVNavigation()

bool BDRingBuffer::IsHDMVNavigation ( void  ) const
inline

◆ IsInMenu()

bool BDRingBuffer::IsInMenu ( void  ) const
inlineoverridevirtual

Reimplemented from RingBuffer.

Definition at line 117 of file bdringbuffer.h.

Referenced by HandleAction().

◆ IsInStillFrame()

bool BDRingBuffer::IsInStillFrame ( void  ) const
overridevirtual

Reimplemented from RingBuffer.

Definition at line 1472 of file bdringbuffer.cpp.

Referenced by MythBDPlayer::DisplayPauseFrame(), and MythBDPlayer::VideoLoop().

◆ TitleChanged()

bool BDRingBuffer::TitleChanged ( void  )

Definition at line 1025 of file bdringbuffer.cpp.

Referenced by AvFormatDecoderBD::StreamChangeCheck().

◆ IsValidStream()

bool BDRingBuffer::IsValidStream ( int  streamid)

Definition at line 1497 of file bdringbuffer.cpp.

Referenced by AvFormatDecoderBD::IsValidStream().

◆ UnblockReading()

void BDRingBuffer::UnblockReading ( void  )
inline

Definition at line 121 of file bdringbuffer.h.

Referenced by AvFormatDecoderBD::ReadPacket().

◆ IsReadingBlocked()

bool BDRingBuffer::IsReadingBlocked ( void  )
inline

Definition at line 122 of file bdringbuffer.h.

Referenced by AvFormatDecoderBD::ReadPacket().

◆ AdjustTimestamp()

int64_t BDRingBuffer::AdjustTimestamp ( int64_t  timestamp)

Definition at line 1051 of file bdringbuffer.cpp.

Referenced by AvFormatDecoderBD::ReadPacket().

◆ GetDescForPos()

void BDRingBuffer::GetDescForPos ( QString &  desc)

Definition at line 403 of file bdringbuffer.cpp.

◆ GetFrameRate()

double BDRingBuffer::GetFrameRate ( void  )

◆ GetAudioLanguage()

int BDRingBuffer::GetAudioLanguage ( uint  streamID)

Definition at line 1153 of file bdringbuffer.cpp.

Referenced by AvFormatDecoderBD::GetAudioLanguage().

◆ GetSubtitleLanguage()

int BDRingBuffer::GetSubtitleLanguage ( uint  streamID)

Definition at line 1178 of file bdringbuffer.cpp.

Referenced by AvFormatDecoderBD::GetSubtitleLanguage().

◆ HandleAction()

bool BDRingBuffer::HandleAction ( const QStringList &  actions,
int64_t  pts 
)
overridevirtual

Reimplemented from RingBuffer.

Definition at line 413 of file bdringbuffer.cpp.

◆ OpenFile()

bool BDRingBuffer::OpenFile ( const QString &  lfilename,
uint  retry_ms = kDefaultOpenTimeout 
)
overridevirtual

Opens a bluray device for reading.

Parameters
lfilenamePath of the bluray device to read.
retry_msIgnored. This value is part of the API inherited from the parent class.
Returns
Returns true if the bluray was opened.

Implements RingBuffer.

Definition at line 518 of file bdringbuffer.cpp.

Referenced by BDRingBuffer().

◆ close()

void BDRingBuffer::close ( void  )

Definition at line 302 of file bdringbuffer.cpp.

Referenced by OpenFile(), and ~BDRingBuffer().

◆ GoToMenu()

bool BDRingBuffer::GoToMenu ( const QString &  str,
int64_t  pts 
)

jump to a Blu-ray root or popup menu

Definition at line 1229 of file bdringbuffer.cpp.

Referenced by MythBDPlayer::GoToMenu().

◆ SwitchTitle()

bool BDRingBuffer::SwitchTitle ( uint32_t  index)

Definition at line 857 of file bdringbuffer.cpp.

Referenced by OpenFile(), RestoreBDStateSnapshot(), and MythBDPlayer::SwitchTitle().

◆ SwitchPlaylist()

bool BDRingBuffer::SwitchPlaylist ( uint32_t  index)

Definition at line 870 of file bdringbuffer.cpp.

Referenced by HandleBDEvent().

◆ SwitchAngle()

bool BDRingBuffer::SwitchAngle ( uint  angle)

Definition at line 1032 of file bdringbuffer.cpp.

Referenced by RestoreBDStateSnapshot(), and MythBDPlayer::SwitchAngle().

◆ safe_read()

int BDRingBuffer::safe_read ( void *  data,
uint  sz 
)
overrideprotectedvirtual

Implements RingBuffer.

Definition at line 1063 of file bdringbuffer.cpp.

◆ SeekInternal() [1/2]

long long BDRingBuffer::SeekInternal ( long long  pos,
int  whence 
)
overrideprotectedvirtual

Implements RingBuffer.

Definition at line 331 of file bdringbuffer.cpp.

Referenced by RestoreBDStateSnapshot().

◆ SeekInternal() [2/2]

uint64_t BDRingBuffer::SeekInternal ( uint64_t  pos)
protected

Definition at line 394 of file bdringbuffer.cpp.

◆ WaitForPlayer()

void BDRingBuffer::WaitForPlayer ( void  )
private

Definition at line 1519 of file bdringbuffer.cpp.

Referenced by HandleBDEvent().

◆ UpdateTitleInfo()

bool BDRingBuffer::UpdateTitleInfo ( void  )
private

Definition at line 930 of file bdringbuffer.cpp.

Referenced by SwitchPlaylist(), and SwitchTitle().

◆ GetTitleInfo()

BLURAY_TITLE_INFO * BDRingBuffer::GetTitleInfo ( uint32_t  index)
private

Definition at line 887 of file bdringbuffer.cpp.

Referenced by GetTitleDuration(), OpenFile(), and SwitchTitle().

◆ GetPlaylistInfo()

BLURAY_TITLE_INFO * BDRingBuffer::GetPlaylistInfo ( uint32_t  index)
private

Definition at line 910 of file bdringbuffer.cpp.

Referenced by SwitchPlaylist().

◆ PressButton()

void BDRingBuffer::PressButton ( int32_t  key,
int64_t  pts 
)
private

Definition at line 1203 of file bdringbuffer.cpp.

Referenced by GoToMenu(), and HandleAction().

◆ ClickButton()

void BDRingBuffer::ClickButton ( int64_t  pts,
uint16_t  x,
uint16_t  y 
)
private

Definition at line 1216 of file bdringbuffer.cpp.

◆ HandleBDEvents()

bool BDRingBuffer::HandleBDEvents ( void  )
private

Definition at line 1262 of file bdringbuffer.cpp.

Referenced by safe_read().

◆ HandleBDEvent()

void BDRingBuffer::HandleBDEvent ( BD_EVENT &  event)
private

Definition at line 1286 of file bdringbuffer.cpp.

Referenced by HandleBDEvents(), and safe_read().

◆ FindStream()

const BLURAY_STREAM_INFO * BDRingBuffer::FindStream ( int  streamid,
BLURAY_STREAM_INFO *  streams,
int  streamCount 
) const
private

Find the stream with the given ID from an array of streams.

Parameters
streamidThe stream ID (pid) to look for
streamsPointer to an array of streams
streamCountNumber of streams in the array
Returns
Pointer to the matching stream if found, otherwise nullptr.

Definition at line 1484 of file bdringbuffer.cpp.

Referenced by GetAudioLanguage(), GetSubtitleLanguage(), and IsValidStream().

Member Data Documentation

◆ m_bdnav

BLURAY* BDRingBuffer::m_bdnav {nullptr}
private

◆ m_isHDMVNavigation

bool BDRingBuffer::m_isHDMVNavigation {false}
private

Definition at line 175 of file bdringbuffer.h.

Referenced by GoToMenu(), HandleAction(), OpenFile(), safe_read(), and StartFromBeginning().

◆ m_tryHDMVNavigation

bool BDRingBuffer::m_tryHDMVNavigation {false}
private

Definition at line 176 of file bdringbuffer.h.

Referenced by BDRingBuffer(), and OpenFile().

◆ m_topMenuSupported

bool BDRingBuffer::m_topMenuSupported {false}
private

Definition at line 177 of file bdringbuffer.h.

Referenced by GoToMenu(), and OpenFile().

◆ m_firstPlaySupported

bool BDRingBuffer::m_firstPlaySupported {false}
private

Definition at line 178 of file bdringbuffer.h.

Referenced by OpenFile().

◆ m_numTitles

uint32_t BDRingBuffer::m_numTitles {0}
private

Definition at line 180 of file bdringbuffer.h.

Referenced by GetTitleInfo(), and OpenFile().

◆ m_mainTitle

uint32_t BDRingBuffer::m_mainTitle {0}
private

Definition at line 182 of file bdringbuffer.h.

Referenced by OpenFile().

◆ m_currentTitleLength

uint64_t BDRingBuffer::m_currentTitleLength {0}
private

Definition at line 184 of file bdringbuffer.h.

Referenced by OpenFile(), and UpdateTitleInfo().

◆ m_currentTitleInfo

BLURAY_TITLE_INFO* BDRingBuffer::m_currentTitleInfo {nullptr}
private

◆ m_titlesize

uint64_t BDRingBuffer::m_titlesize {0}
private

Definition at line 187 of file bdringbuffer.h.

Referenced by OpenFile(), and UpdateTitleInfo().

◆ m_currentTitleAngleCount

uint64_t BDRingBuffer::m_currentTitleAngleCount {0}
private

Definition at line 188 of file bdringbuffer.h.

Referenced by OpenFile(), and UpdateTitleInfo().

◆ m_currentTime

uint64_t BDRingBuffer::m_currentTime {0}
private

Definition at line 189 of file bdringbuffer.h.

Referenced by GetBDStateSnapshot(), OpenFile(), safe_read(), and SeekInternal().

◆ m_imgHandle

int BDRingBuffer::m_imgHandle {-1}
private

Definition at line 191 of file bdringbuffer.h.

Referenced by close(), and OpenFile().

◆ m_currentAngle

int BDRingBuffer::m_currentAngle {0}
private

Definition at line 193 of file bdringbuffer.h.

Referenced by HandleBDEvent(), OpenFile(), SwitchAngle(), and UpdateTitleInfo().

◆ m_currentTitle

int BDRingBuffer::m_currentTitle {-1}
private

◆ m_currentPlaylist

int BDRingBuffer::m_currentPlaylist {0}
private

Definition at line 195 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_currentPlayitem

int BDRingBuffer::m_currentPlayitem {0}
private

Definition at line 196 of file bdringbuffer.h.

Referenced by HandleBDEvent(), OpenFile(), and UpdateTitleInfo().

◆ m_currentChapter

int BDRingBuffer::m_currentChapter {0}
private

Definition at line 197 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_currentAudioStream

int BDRingBuffer::m_currentAudioStream {0}
private

Definition at line 199 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_currentIGStream

int BDRingBuffer::m_currentIGStream {0}
private

Definition at line 200 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_currentPGTextSTStream

int BDRingBuffer::m_currentPGTextSTStream {0}
private

Definition at line 201 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_currentSecondaryAudioStream

int BDRingBuffer::m_currentSecondaryAudioStream {0}
private

Definition at line 202 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_currentSecondaryVideoStream

int BDRingBuffer::m_currentSecondaryVideoStream {0}
private

Definition at line 203 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_PGTextSTEnabled

bool BDRingBuffer::m_PGTextSTEnabled {false}
private

Definition at line 205 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_secondaryAudioEnabled

bool BDRingBuffer::m_secondaryAudioEnabled {false}
private

Definition at line 206 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_secondaryVideoEnabled

bool BDRingBuffer::m_secondaryVideoEnabled {false}
private

Definition at line 207 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_secondaryVideoIsFullscreen

bool BDRingBuffer::m_secondaryVideoIsFullscreen {false}
private

Definition at line 208 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_titleChanged

bool BDRingBuffer::m_titleChanged {false}
private

Definition at line 210 of file bdringbuffer.h.

Referenced by TitleChanged(), and UpdateTitleInfo().

◆ m_playerWait

bool BDRingBuffer::m_playerWait {false}
private

Definition at line 212 of file bdringbuffer.h.

Referenced by WaitForPlayer().

◆ m_ignorePlayerWait

bool BDRingBuffer::m_ignorePlayerWait {true}
private

Definition at line 213 of file bdringbuffer.h.

Referenced by WaitForPlayer().

◆ m_overlayLock

QMutex BDRingBuffer::m_overlayLock
private

Definition at line 215 of file bdringbuffer.h.

Referenced by ClearOverlays(), GetOverlay(), SubmitARGBOverlay(), and SubmitOverlay().

◆ m_overlayImages

QList<BDOverlay*> BDRingBuffer::m_overlayImages
private

Definition at line 216 of file bdringbuffer.h.

Referenced by ClearOverlays(), GetOverlay(), SubmitARGBOverlay(), and SubmitOverlay().

◆ m_overlayPlanes

QVector<BDOverlay*> BDRingBuffer::m_overlayPlanes
private

Definition at line 217 of file bdringbuffer.h.

Referenced by ClearOverlays(), SubmitARGBOverlay(), and SubmitOverlay().

◆ m_stillTime

uint8_t BDRingBuffer::m_stillTime {0}
private

Definition at line 219 of file bdringbuffer.h.

Referenced by IsInStillFrame(), OpenFile(), and UpdateTitleInfo().

◆ m_stillMode

uint8_t BDRingBuffer::m_stillMode {BLURAY_STILL_NONE}
private

Definition at line 220 of file bdringbuffer.h.

Referenced by IsInStillFrame(), OpenFile(), and UpdateTitleInfo().

◆ m_inMenu

volatile bool BDRingBuffer::m_inMenu {false}
private

Definition at line 221 of file bdringbuffer.h.

Referenced by HandleBDEvent(), and OpenFile().

◆ m_lastEvent

BD_EVENT BDRingBuffer::m_lastEvent {BD_EVENT_NONE, 0}
private

Definition at line 222 of file bdringbuffer.h.

Referenced by HandleBDEvents(), and OpenFile().

◆ m_processState

processState_t BDRingBuffer::m_processState {PROCESS_NORMAL}
private

Definition at line 223 of file bdringbuffer.h.

Referenced by HandleBDEvent(), HandleBDEvents(), OpenFile(), safe_read(), and SeekInternal().

◆ m_pendingData

QByteArray BDRingBuffer::m_pendingData
private

Definition at line 224 of file bdringbuffer.h.

Referenced by safe_read().

◆ m_timeDiff

int64_t BDRingBuffer::m_timeDiff {0}
private

Definition at line 225 of file bdringbuffer.h.

Referenced by AdjustTimestamp(), HandleBDEvent(), OpenFile(), and UpdateTitleInfo().

◆ m_cachedTitleInfo

QHash<uint32_t,BLURAY_TITLE_INFO*> BDRingBuffer::m_cachedTitleInfo
private

Definition at line 227 of file bdringbuffer.h.

Referenced by close(), and GetTitleInfo().

◆ m_cachedPlaylistInfo

QHash<uint32_t,BLURAY_TITLE_INFO*> BDRingBuffer::m_cachedPlaylistInfo
private

Definition at line 228 of file bdringbuffer.h.

Referenced by close(), and GetPlaylistInfo().

◆ m_infoLock

QMutex BDRingBuffer::m_infoLock {QMutex::Recursive}
private

◆ m_name

QString BDRingBuffer::m_name
private

Definition at line 230 of file bdringbuffer.h.

Referenced by GetNameAndSerialNum(), and OpenFile().

◆ m_serialNumber

QString BDRingBuffer::m_serialNumber
private

Definition at line 231 of file bdringbuffer.h.

Referenced by GetNameAndSerialNum(), and OpenFile().

◆ m_mainThread

QThread* BDRingBuffer::m_mainThread {nullptr}
private

Definition at line 233 of file bdringbuffer.h.

Referenced by BDRingBuffer(), and ProgressUpdate().


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