|
MythTV master
|
#include <libmythtv/DVD/mythdvdbuffer.h>
Public Member Functions | |
| MythDVDBuffer (const QString &Filename) | |
| ~MythDVDBuffer () override | |
| bool | IsOpen (void) const override |
| bool | IsBookmarkAllowed (void) override |
| bool | IsSeekingAllowed (void) override |
| int | BestBufferSize (void) override |
| bool | IsInStillFrame (void) const override |
| bool | OpenFile (const QString &Filename, std::chrono::milliseconds Retry=kDefaultOpenTimeout) override |
| Opens a dvd device for reading. More... | |
| bool | HandleAction (const QStringList &Actions, mpeg::chrono::pts Pts) override |
| void | IgnoreWaitStates (bool Ignore) override |
| bool | StartFromBeginning (void) override |
| long long | GetReadPosition (void) const override |
| returns current position in the PGC. More... | |
| bool | GetNameAndSerialNum (QString &Name, QString &SerialNumber) override |
| Get the dvd title and serial num. More... | |
| int | GetTitle (void) const |
| bool | DVDWaitingForPlayer (void) const |
| int | GetPart (void) const |
| int | GetCurrentAngle (void) const |
| int | GetNumAngles (void) const |
| long long | GetTotalReadPosition (void) const |
| std::chrono::seconds | GetChapterLength (void) const |
| void | GetChapterTimes (QList< std::chrono::seconds > &Times) |
| std::chrono::seconds | GetChapterTimes (int Title) |
| void | GetDescForPos (QString &Description) const |
| void | GetPartAndTitle (int &Part, int &Title) const |
| std::chrono::seconds | GetTotalTimeOfTitle (void) const |
| get the total time of the title in seconds 90000 ticks = 1 sec More... | |
| float | GetAspectOverride (void) const |
| std::chrono::seconds | GetCellStart (void) const |
| get the start of the cell in seconds More... | |
| bool | PGCLengthChanged (void) |
| check if pgc length has changed More... | |
| bool | CellChanged (void) |
| check if dvd cell has changed More... | |
| bool | IsStillFramePending (void) const |
| bool | AudioStreamsChanged (void) const |
| bool | IsWaiting (void) const |
| int | NumPartsInTitle (void) const |
| void | GetMenuSPUPkt (uint8_t *Buffer, int Size, int StreamID, uint32_t StartTime) |
| Get SPU pkt from dvd menu subtitle stream. More... | |
| uint32_t | AdjustTimestamp (uint32_t Timestamp) const |
| int64_t | AdjustTimestamp (int64_t Timestamp) const |
| MythDVDContext * | GetDVDContext (void) |
| int32_t | GetLastEvent (void) const |
| AVSubtitle * | GetMenuSubtitle (uint &Version) |
| returns dvd menu button information if available. More... | |
| int | NumMenuButtons (void) const |
| QRect | GetButtonCoords (void) |
| get coordinates of highlighted button More... | |
| void | ReleaseMenuButton (void) |
| uint | GetSubtitleLanguage (int Id) |
| Get the subtitle language from the dvd. More... | |
| int8_t | GetSubtitleTrackNum (uint StreamId) |
| get the logical subtitle track/stream number from the dvd More... | |
| bool | DecodeSubtitles (AVSubtitle *Subtitle, int *GotSubtitles, const uint8_t *SpuPkt, int BufSize, uint32_t StartTime) |
| generate dvd subtitle bitmap or dvd menu bitmap. More... | |
| uint | GetAudioLanguage (int Index) |
| get the audio language from the dvd More... | |
| int | GetAudioTrackNum (uint StreamId) |
| get the logical track index (into PGC_AST_CTL) of the element that maps the given physical stream id. More... | |
| int | GetAudioTrackType (uint Index) |
| bool | GetDVDStateSnapshot (QString &State) |
| Get a snapshot of the current DVD VM state. More... | |
| bool | RestoreDVDStateSnapshot (const QString &State) |
| Restore a DVD VM from a snapshot. More... | |
| double | GetFrameRate (void) |
| used by DecoderBase for the total frame number calculation for position map support and ffw/rew. More... | |
| bool | StartOfTitle (void) const |
| bool | EndOfTitle (void) const |
| void | PlayTitleAndPart (int Title, int Part) |
| void | CloseDVD (void) |
| bool | PlayTrack (int Track) |
| bool | NextTrack (void) |
| void | PrevTrack (void) |
| long long | NormalSeek (long long Time) |
| bool | SectorSeek (uint64_t Sector) |
| void | SkipStillFrame (void) |
| void | WaitSkip (void) |
| void | SkipDVDWaitingForPlayer (void) |
| void | UnblockReading (void) |
| bool | IsReadingBlocked (void) |
| bool | GoToMenu (const QString &str) |
| jump to a dvd root or chapter menu More... | |
| void | GoToNextProgram (void) |
| void | GoToPreviousProgram (void) |
| bool | GoBack (void) |
| Attempts to back-up by trying to jump to the 'Go up' PGC, the root menu or the title menu in turn. More... | |
| void | AudioStreamsChanged (bool Change) |
| std::chrono::seconds | GetCurrentTime (void) const |
| std::chrono::seconds | TitleTimeLeft (void) const |
| returns seconds left in the title More... | |
| void | SetTrack (uint Type, int TrackNo) |
| set the dvd subtitle/audio track used More... | |
| int | GetTrack (uint Type) const |
| get the track the dvd should be playing. More... | |
| uint16_t | GetNumAudioChannels (int Index) |
| void | SetDVDSpeed (void) |
| set dvd speed. uses the constant DVD_DRIVE_SPEED table More... | |
| void | SetDVDSpeed (int Speed) |
| set dvd speed. More... | |
| bool | SwitchAngle (int Angle) |
| void | SetParent (MythDVDPlayer *Parent) |
Public Member Functions inherited from MythOpticalBuffer | |
| MythOpticalBuffer (MythBufferType Type) | |
| bool | IsInMenu (void) const override |
| bool | IsStreamed (void) override |
| virtual bool | GetNameAndSerialNum (QString &Name, QString &SerialNumber)=0 |
Public Member Functions inherited from MythMediaBuffer | |
| ~MythMediaBuffer () override=0 | |
| Deletes. More... | |
| MythBufferType | GetType () const |
| void | SetOldFile (bool Old) |
| Tell RingBuffer if this is an old file or not. More... | |
| void | UpdateRawBitrate (uint RawBitrate) |
| Set the raw bit rate, to allow RingBuffer adjust effective bitrate. More... | |
| void | UpdatePlaySpeed (float PlaySpeed) |
| 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 inaccurate 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 |
| QString | GetSubtitleFilename (void) const |
| QString | GetLastError (void) const |
| bool | GetCommsError (void) const |
| void | ResetCommsError (void) |
| bool | GetStopReads (void) const |
| QString | GetDecoderRate (void) |
| QString | GetStorageRate (void) |
| QString | GetAvailableBuffer (void) |
| uint | GetBufferSize (void) const |
| bool | IsNearEnd (double Framerate, uint Frames) const |
| long long | GetWritePosition (void) const |
| Returns how far into a ThreadedFileWriter file we have written. More... | |
| long long | GetRealFileSize (void) const |
| bool | IsDisc (void) const |
| bool | IsDVD (void) const |
| bool | IsBD (void) const |
| const MythDVDBuffer * | DVD (void) const |
| MythDVDBuffer * | DVD (void) |
| const MythBDBuffer * | BD (void) const |
| MythBDBuffer * | BD (void) |
| int | Read (void *Buffer, 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 *Buffer, int Count) |
| int | Peek (std::vector< char > &Buffer) |
| void | Reset (bool Full=false, bool ToAdjust=false, bool ResetInternal=false) |
| Resets the read-ahead thread and our 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) |
| void | StartReads (void) |
| long long | Seek (long long Position, int Whence, bool HasLock=false) |
| long long | SetAdjustFilesize (void) |
| int | GetReadBufAvail (void) const |
| Returns number of bytes available for reading from buffer. More... | |
| bool | SetReadInternalMode (bool Mode) |
| bool | IsReadInternalMode (void) const |
| 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 *Buffer, 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 Position, int Whence, bool HasLock=false) |
| Calls ThreadedFileWriter::Seek(long long,int). More... | |
| bool | WriterSetBlocking (bool Lock=true) |
| Calls ThreadedFileWriter::SetBlocking(bool) More... | |
| virtual long long | GetReadPosition (void) const =0 |
| virtual bool | IsOpen (void) const =0 |
| virtual bool | IsStreamed (void) |
| virtual bool | IsSeekingAllowed (void) |
| virtual bool | IsBookmarkAllowed (void) |
| virtual int | BestBufferSize (void) |
| virtual bool | StartFromBeginning (void) |
| virtual void | IgnoreWaitStates (bool) |
| virtual bool | IsInMenu (void) const |
| virtual bool | IsInStillFrame (void) const |
| virtual bool | IsInDiscMenuOrStillFrame (void) const |
| virtual bool | HandleAction (const QStringList &, mpeg::chrono::pts) |
| virtual bool | OpenFile (const QString &Filename, std::chrono::milliseconds Retry=kDefaultOpenTimeout)=0 |
| virtual bool | ReOpen (const QString &="") |
Protected Member Functions | |
| int | SafeRead (void *Buffer, uint Size) override |
| long long | SeekInternal (long long Position, int Whence) override |
| void | ActivateButton (void) |
| Action taken when a dvd menu button is selected. More... | |
| void | MoveButtonLeft (void) |
| void | MoveButtonRight (void) |
| void | MoveButtonUp (void) |
| void | MoveButtonDown (void) |
| bool | DVDButtonUpdate (bool ButtonMode) |
| update the dvd menu button parameters when a user changes the dvd menu button position More... | |
| void | ClearMenuSPUParameters (void) |
| clears the menu SPU pkt and parameters. More... | |
| void | ClearMenuButton (void) |
| clears the dvd menu button structures More... | |
| long long | Seek (long long Time) |
| void | ClearChapterCache (void) |
| void | SelectDefaultButton (void) |
| determines the default dvd menu button to show when you initially access the dvd menu. More... | |
| void | WaitForPlayer (void) |
| void | GuessPalette (uint32_t *RGBAPalette, PaletteArray Palette, AlphaArray Alpha) |
| converts palette values from YUV to RGB More... | |
Protected Member Functions inherited from MythMediaBuffer | |
| MythMediaBuffer (MythBufferType Type) | |
| 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 *Buffer, int Count, bool Peek) |
| When possible reads from the read-ahead buffer, otherwise reads directly from the device. More... | |
| int | ReadDirect (void *Buffer, int Count, bool Peek) |
| bool | WaitForReadsAllowed (void) |
| int | WaitForAvail (int Count, std::chrono::milliseconds Timeout) |
| 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) |
| virtual int | SafeRead (void *Buffer, uint Size)=0 |
| virtual long long | GetRealFileSizeInternal (void) const |
| virtual long long | SeekInternal (long long Position, int Whence)=0 |
Protected Member Functions inherited from MThread | |
| virtual void | run (void) |
| Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead. More... | |
| 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 () |
| MThread (const MThread &)=delete | |
| MThread & | operator= (const MThread &)=delete |
| 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 p=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 (std::chrono::milliseconds time=std::chrono::milliseconds::max()) |
| Wait for the MThread to exit, with a maximum timeout. More... | |
Static Protected Member Functions | |
| static uint | ConvertLangCode (uint16_t Code) |
| converts the subtitle/audio lang code to iso639. More... | |
| static uint | GetNibble (const uint8_t *Buffer, int NibbleOffset) |
| copied from ffmpeg's dvdsubdec.c More... | |
| static int | DecodeRLE (uint8_t *Bitmap, int Linesize, int Width, int Height, const uint8_t *Buffer, int NibbleOffset, int BufferSize) |
| decodes the bitmap from the subtitle packet. More... | |
| static int | IsTransparent (const uint8_t *Buffer, int Pitch, int Num, const ColorArray &Colors) |
| Obtained from ffmpeg dvdsubdec.c Used to find smallest bounded rectangle. More... | |
| static int | FindSmallestBoundingRectangle (AVSubtitle *Subtitle) |
| Obtained from ffmpeg dvdsubdec.c Used to find smallest bounded rect and helps prevent jerky picture during subtitle creation. More... | |
Static Protected Member Functions inherited from MThread | |
| static void | setTerminationEnabled (bool enabled=true) |
| static void | ThreadSetup (const QString &name) |
| 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) |
Static Protected Attributes | |
| static const QMap< int, int > | kSeekSpeedMap |
Additional Inherited Members | |
Static Public Member Functions inherited from MythMediaBuffer | |
| static MythMediaBuffer * | Create (const QString &Filename, bool Write, bool UseReadAhead=true, std::chrono::milliseconds Timeout=kDefaultOpenTimeout, bool StreamOnly=false) |
| Creates a RingBuffer instance. More... | |
| static QString | BitrateToString (uint64_t Rate, bool Hz=false) |
| static void | AVFormatInitNetwork (void) |
Static Public Attributes inherited from MythMediaBuffer | |
| static constexpr std::chrono::milliseconds | kDefaultOpenTimeout { 2s } |
| static constexpr std::chrono::milliseconds | kLiveTVOpenTimeout { 10s } |
Protected Types inherited from MythOpticalBuffer | |
| enum | MythOpticalState : std::uint8_t { PROCESS_NORMAL , PROCESS_REPROCESS , PROCESS_WAIT } |
Definition at line 37 of file mythdvdbuffer.h.
|
explicit |
Definition at line 48 of file mythdvdbuffer.cpp.
|
override |
Definition at line 54 of file mythdvdbuffer.cpp.
|
protected |
Action taken when a dvd menu button is selected.
Definition at line 1395 of file mythdvdbuffer.cpp.
Referenced by HandleAction().
| int64_t MythDVDBuffer::AdjustTimestamp | ( | int64_t | Timestamp | ) | const |
Definition at line 480 of file mythdvdbuffer.cpp.
| uint32_t MythDVDBuffer::AdjustTimestamp | ( | uint32_t | Timestamp | ) | const |
Definition at line 472 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::ReadPacket(), and SafeRead().
| void MythDVDBuffer::AudioStreamsChanged | ( | bool | Change | ) |
Definition at line 1920 of file mythdvdbuffer.cpp.
| bool MythDVDBuffer::AudioStreamsChanged | ( | void | ) | const |
Definition at line 1190 of file mythdvdbuffer.cpp.
Referenced by AvFormatDecoder::ScanStreams(), and MythDVDDecoder::StreamChangeCheck().
|
inlineoverridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 48 of file mythdvdbuffer.h.
| bool MythDVDBuffer::CellChanged | ( | void | ) |
check if dvd cell has changed
Definition at line 1178 of file mythdvdbuffer.cpp.
|
protected |
Definition at line 87 of file mythdvdbuffer.cpp.
Referenced by ~MythDVDBuffer().
|
protected |
clears the dvd menu button structures
Definition at line 1696 of file mythdvdbuffer.cpp.
Referenced by ClearMenuSPUParameters().
|
protected |
clears the menu SPU pkt and parameters.
necessary action during dvd menu changes
Definition at line 1717 of file mythdvdbuffer.cpp.
Referenced by GetMenuSPUPkt(), and ~MythDVDBuffer().
| void MythDVDBuffer::CloseDVD | ( | void | ) |
Definition at line 65 of file mythdvdbuffer.cpp.
Referenced by OpenFile(), StartFromBeginning(), and ~MythDVDBuffer().
converts the subtitle/audio lang code to iso639.
Definition at line 1842 of file mythdvdbuffer.cpp.
Referenced by GetAudioLanguage(), and GetSubtitleLanguage().
|
staticprotected |
decodes the bitmap from the subtitle packet.
copied from ffmpeg's dvdsubdec.c.
Definition at line 2032 of file mythdvdbuffer.cpp.
Referenced by DecodeSubtitles().
| bool MythDVDBuffer::DecodeSubtitles | ( | AVSubtitle * | Subtitle, |
| int * | GotSubtitles, | ||
| const uint8_t * | SpuPkt, | ||
| int | BufSize, | ||
| uint32_t | StartTime | ||
| ) |
generate dvd subtitle bitmap or dvd menu bitmap.
code obtained from ffmpeg project
Definition at line 1470 of file mythdvdbuffer.cpp.
Referenced by GetMenuSPUPkt(), and AvFormatDecoder::ProcessSubtitlePacket().
|
protected |
update the dvd menu button parameters when a user changes the dvd menu button position
Definition at line 1655 of file mythdvdbuffer.cpp.
Referenced by GetMenuSPUPkt(), and SafeRead().
| bool MythDVDBuffer::DVDWaitingForPlayer | ( | void | ) | const |
Definition at line 436 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::VideoLoop().
| bool MythDVDBuffer::EndOfTitle | ( | void | ) | const |
Definition at line 1976 of file mythdvdbuffer.cpp.
|
staticprotected |
Obtained from ffmpeg dvdsubdec.c Used to find smallest bounded rect and helps prevent jerky picture during subtitle creation.
Definition at line 2102 of file mythdvdbuffer.cpp.
Referenced by DecodeSubtitles().
| float MythDVDBuffer::GetAspectOverride | ( | void | ) | const |
Definition at line 1164 of file mythdvdbuffer.cpp.
Referenced by AvFormatDecoder::MpegPreProcessPkt().
| uint MythDVDBuffer::GetAudioLanguage | ( | int | Index | ) |
get the audio language from the dvd
Definition at line 1742 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::GetAudioLanguage().
| int MythDVDBuffer::GetAudioTrackNum | ( | uint | StreamId | ) |
get the logical track index (into PGC_AST_CTL) of the element that maps the given physical stream id.
| stream_id | The physical stream id. |
Definition at line 1766 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::GetAudioLanguage(), MythDVDDecoder::GetAudioTrackType(), SafeRead(), and AvFormatDecoder::ScanStreams().
| int MythDVDBuffer::GetAudioTrackType | ( | uint | Index | ) |
Definition at line 1798 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::GetAudioTrackType().
| QRect MythDVDBuffer::GetButtonCoords | ( | void | ) |
get coordinates of highlighted button
Definition at line 1458 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DisplayDVDButton().
| std::chrono::seconds MythDVDBuffer::GetCellStart | ( | void | ) | const |
get the start of the cell in seconds
Definition at line 1171 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DoJumpChapter().
| std::chrono::seconds MythDVDBuffer::GetChapterLength | ( | void | ) | const |
Definition at line 461 of file mythdvdbuffer.cpp.
| std::chrono::seconds MythDVDBuffer::GetChapterTimes | ( | int | Title | ) |
Definition at line 383 of file mythdvdbuffer.cpp.
| void MythDVDBuffer::GetChapterTimes | ( | QList< std::chrono::seconds > & | Times | ) |
Definition at line 372 of file mythdvdbuffer.cpp.
Referenced by GetChapterTimes(), MythDVDPlayer::GetChapterTimes(), and SafeRead().
| int MythDVDBuffer::GetCurrentAngle | ( | void | ) | const |
Definition at line 446 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GetCurrentAngle().
| std::chrono::seconds MythDVDBuffer::GetCurrentTime | ( | void | ) | const |
Definition at line 2006 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::DVDFindPosition(), MythDVDPlayer::GetMillisecondsPlayed(), TitleTimeLeft(), and MythDVDDecoder::UpdateFramesPlayed().
| void MythDVDBuffer::GetDescForPos | ( | QString & | Description | ) | const |
Definition at line 241 of file mythdvdbuffer.cpp.
| MythDVDContext * MythDVDBuffer::GetDVDContext | ( | void | ) |
Definition at line 488 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::ProcessDataPacket().
| bool MythDVDBuffer::GetDVDStateSnapshot | ( | QString & | State | ) |
Get a snapshot of the current DVD VM state.
Definition at line 1936 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::SetBookmark().
| double MythDVDBuffer::GetFrameRate | ( | void | ) |
used by DecoderBase for the total frame number calculation for position map support and ffw/rew.
FPS for a dvd is determined by AFD::normalized_fps
Definition at line 1963 of file mythdvdbuffer.cpp.
Referenced by DecoderBase::PosMapFromDb().
| int32_t MythDVDBuffer::GetLastEvent | ( | void | ) | const |
Definition at line 496 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::ReadPacket().
| void MythDVDBuffer::GetMenuSPUPkt | ( | uint8_t * | Buffer, |
| int | Size, | ||
| int | StreamID, | ||
| uint32_t | StartTime | ||
| ) |
Get SPU pkt from dvd menu subtitle stream.
Definition at line 1406 of file mythdvdbuffer.cpp.
Referenced by AvFormatDecoder::ProcessSubtitlePacket().
| AVSubtitle * MythDVDBuffer::GetMenuSubtitle | ( | uint & | Version | ) |
returns dvd menu button information if available.
Definition at line 1436 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DisplayDVDButton().
|
overridevirtual |
Get the dvd title and serial num.
Implements MythOpticalBuffer.
Definition at line 1927 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::EventStart(), MythDVDPlayer::GetBookmark(), MythDVDPlayer::SetBookmark(), and TV::ShowLCDDVDInfo().
|
staticprotected |
copied from ffmpeg's dvdsubdec.c
Definition at line 2078 of file mythdvdbuffer.cpp.
Referenced by DecodeRLE().
| int MythDVDBuffer::GetNumAngles | ( | void | ) | const |
Definition at line 451 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GetNumAngles().
| uint16_t MythDVDBuffer::GetNumAudioChannels | ( | int | Index | ) |
Definition at line 1908 of file mythdvdbuffer.cpp.
| int MythDVDBuffer::GetPart | ( | void | ) | const |
Definition at line 441 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GetCurrentChapter().
| void MythDVDBuffer::GetPartAndTitle | ( | int & | Part, |
| int & | Title | ||
| ) | const |
Definition at line 466 of file mythdvdbuffer.cpp.
Referenced by TV::ShowLCDDVDInfo().
|
overridevirtual |
returns current position in the PGC.
Implements MythMediaBuffer.
Definition at line 416 of file mythdvdbuffer.cpp.
Referenced by SafeRead().
| uint MythDVDBuffer::GetSubtitleLanguage | ( | int | Id | ) |
Get the subtitle language from the dvd.
Definition at line 1817 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::PostProcessTracks().
| int8_t MythDVDBuffer::GetSubtitleTrackNum | ( | uint | StreamId | ) |
get the logical subtitle track/stream number from the dvd
| stream_id | the stream id, range 0-31 |
Definition at line 1827 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::PostProcessTracks().
| int MythDVDBuffer::GetTitle | ( | void | ) | const |
Definition at line 431 of file mythdvdbuffer.cpp.
| long long MythDVDBuffer::GetTotalReadPosition | ( | void | ) | const |
Definition at line 456 of file mythdvdbuffer.cpp.
Referenced by DecoderBase::PosMapFromDb().
| std::chrono::seconds MythDVDBuffer::GetTotalTimeOfTitle | ( | void | ) | const |
get the total time of the title in seconds 90000 ticks = 1 sec
Definition at line 1159 of file mythdvdbuffer.cpp.
Referenced by IsBookmarkAllowed(), DecoderBase::PosMapFromDb(), TV::ShowLCDDVDInfo(), DecoderBase::SyncPositionMap(), and TitleTimeLeft().
| int MythDVDBuffer::GetTrack | ( | uint | Type | ) | const |
get the track the dvd should be playing.
can either be set by the user using MythDVDBuffer::SetTrack or determined from the dvd IFO.
| type | use either kTrackTypeSubtitle or kTrackTypeAudio |
Definition at line 1899 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::PostProcessTracks().
| bool MythDVDBuffer::GoBack | ( | void | ) |
Attempts to back-up by trying to jump to the 'Go up' PGC, the root menu or the title menu in turn.
Definition at line 1276 of file mythdvdbuffer.cpp.
Referenced by TV::ActiveHandleAction().
| bool MythDVDBuffer::GoToMenu | ( | const QString & | str | ) |
jump to a dvd root or chapter menu
Definition at line 1252 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GoToMenu().
| void MythDVDBuffer::GoToNextProgram | ( | void | ) |
Definition at line 1314 of file mythdvdbuffer.cpp.
| void MythDVDBuffer::GoToPreviousProgram | ( | void | ) |
Definition at line 1323 of file mythdvdbuffer.cpp.
|
protected |
converts palette values from YUV to RGB
Definition at line 2012 of file mythdvdbuffer.cpp.
Referenced by DecodeSubtitles(), and DVDButtonUpdate().
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 1332 of file mythdvdbuffer.cpp.
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 1353 of file mythdvdbuffer.cpp.
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 221 of file mythdvdbuffer.cpp.
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 226 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DisplayPauseFrame(), TV::DVDJumpForward(), MythDVDPlayer::PrepareAudioSample(), TV::ShowLCDDVDInfo(), MythDVDPlayer::StillFrameCheck(), and MythDVDPlayer::VideoLoop().
|
overridevirtual |
Implements MythMediaBuffer.
Definition at line 216 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GetCurrentAngle(), and MythDVDPlayer::GetNumAngles().
| bool MythDVDBuffer::IsReadingBlocked | ( | void | ) |
Definition at line 1245 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::ReadPacket().
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 231 of file mythdvdbuffer.cpp.
| bool MythDVDBuffer::IsStillFramePending | ( | void | ) | const |
Definition at line 1185 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::VideoLoop().
|
staticprotected |
Obtained from ffmpeg dvdsubdec.c Used to find smallest bounded rectangle.
Definition at line 2087 of file mythdvdbuffer.cpp.
Referenced by FindSmallestBoundingRectangle().
| bool MythDVDBuffer::IsWaiting | ( | void | ) | const |
Definition at line 1195 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::VideoLoop().
|
protected |
Definition at line 1385 of file mythdvdbuffer.cpp.
Referenced by HandleAction().
|
protected |
Definition at line 1358 of file mythdvdbuffer.cpp.
Referenced by HandleAction().
|
protected |
Definition at line 1367 of file mythdvdbuffer.cpp.
Referenced by HandleAction().
|
protected |
Definition at line 1376 of file mythdvdbuffer.cpp.
Referenced by HandleAction().
| bool MythDVDBuffer::NextTrack | ( | void | ) |
Definition at line 1130 of file mythdvdbuffer.cpp.
| long long MythDVDBuffer::NormalSeek | ( | long long | Time | ) |
Definition at line 148 of file mythdvdbuffer.cpp.
Referenced by SeekInternal().
| int MythDVDBuffer::NumMenuButtons | ( | void | ) | const |
Definition at line 1731 of file mythdvdbuffer.cpp.
Referenced by ActivateButton(), DecodeSubtitles(), MythDVDPlayer::DisplayDVDButton(), GetMenuSubtitle(), HandleAction(), MoveButtonDown(), MoveButtonLeft(), MoveButtonRight(), MoveButtonUp(), AvFormatDecoder::ProcessSubtitlePacket(), and SelectDefaultButton().
| int MythDVDBuffer::NumPartsInTitle | ( | void | ) | const |
Definition at line 1200 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GetNumChapters(), and TV::ShowLCDDVDInfo().
|
overridevirtual |
Opens a dvd device for reading.
| lfilename | Path of the dvd device to read. |
Implements MythMediaBuffer.
Definition at line 260 of file mythdvdbuffer.cpp.
Referenced by MythDVDBuffer(), and StartFromBeginning().
| bool MythDVDBuffer::PGCLengthChanged | ( | void | ) |
check if pgc length has changed
Definition at line 1207 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::StreamChangeCheck().
| void MythDVDBuffer::PlayTitleAndPart | ( | int | Title, |
| int | Part | ||
| ) |
Definition at line 1981 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::InitialSeek().
| bool MythDVDBuffer::PlayTrack | ( | int | Track | ) |
Definition at line 1117 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DoJumpChapter().
| void MythDVDBuffer::PrevTrack | ( | void | ) |
Definition at line 1144 of file mythdvdbuffer.cpp.
| void MythDVDBuffer::ReleaseMenuButton | ( | void | ) |
Definition at line 1451 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DisplayDVDButton().
| bool MythDVDBuffer::RestoreDVDStateSnapshot | ( | const QString & | State | ) |
Restore a DVD VM from a snapshot.
Definition at line 1952 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::VideoStart().
|
overrideprotectedvirtual |
Implements MythMediaBuffer.
Definition at line 525 of file mythdvdbuffer.cpp.
| bool MythDVDBuffer::SectorSeek | ( | uint64_t | Sector | ) |
Definition at line 154 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::CheckContext(), and MythDVDDecoder::ProcessVideoPacket().
|
protected |
Definition at line 171 of file mythdvdbuffer.cpp.
Referenced by NormalSeek(), PlayTrack(), and PrevTrack().
|
overrideprotectedvirtual |
Implements MythMediaBuffer.
Definition at line 96 of file mythdvdbuffer.cpp.
|
protected |
determines the default dvd menu button to show when you initially access the dvd menu.
Definition at line 1860 of file mythdvdbuffer.cpp.
Referenced by GetMenuSPUPkt().
| void MythDVDBuffer::SetDVDSpeed | ( | int | Speed | ) |
set dvd speed.
Definition at line 1994 of file mythdvdbuffer.cpp.
| void MythDVDBuffer::SetDVDSpeed | ( | void | ) |
set dvd speed. uses the constant DVD_DRIVE_SPEED table
Definition at line 1987 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::ChangeSpeed(), CloseDVD(), OpenFile(), and SetDVDSpeed().
| void MythDVDBuffer::SetParent | ( | MythDVDPlayer * | Parent | ) |
Definition at line 2192 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::EventEnd(), and MythDVDPlayer::EventStart().
| void MythDVDBuffer::SetTrack | ( | uint | Type, |
| int | TrackNo | ||
| ) |
set the dvd subtitle/audio track used
| type | currently kTrackTypeSubtitle or kTrackTypeAudio |
| trackNo | if -1 then autoselect the track num from the dvd IFO |
Definition at line 1880 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DisableCaptions(), MythDVDPlayer::EnableCaptions(), MythDVDPlayer::InitialSeek(), and MythDVDPlayer::SetTrack().
| void MythDVDBuffer::SkipDVDWaitingForPlayer | ( | void | ) |
Definition at line 1235 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::VideoLoop().
| void MythDVDBuffer::SkipStillFrame | ( | void | ) |
Definition at line 1214 of file mythdvdbuffer.cpp.
Referenced by SafeRead(), and MythDVDPlayer::StillFrameCheck().
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 328 of file mythdvdbuffer.cpp.
| bool MythDVDBuffer::StartOfTitle | ( | void | ) | const |
Definition at line 1971 of file mythdvdbuffer.cpp.
| bool MythDVDBuffer::SwitchAngle | ( | int | Angle | ) |
Definition at line 2177 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::SwitchAngle().
| std::chrono::seconds MythDVDBuffer::TitleTimeLeft | ( | void | ) | const |
returns seconds left in the title
Definition at line 2001 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::CalcMaxFFTime(), and DecoderBase::DoFastForward().
| void MythDVDBuffer::UnblockReading | ( | void | ) |
Definition at line 1240 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::ReadPacket().
|
protected |
Definition at line 501 of file mythdvdbuffer.cpp.
Referenced by SafeRead().
| void MythDVDBuffer::WaitSkip | ( | void | ) |
Definition at line 1227 of file mythdvdbuffer.cpp.
Referenced by SafeRead(), and MythDVDPlayer::VideoLoop().
|
staticprotected |
Definition at line 197 of file mythdvdbuffer.h.
Referenced by Seek().
|
protected |
Definition at line 177 of file mythdvdbuffer.h.
Referenced by AudioStreamsChanged(), CloseDVD(), SafeRead(), and StartFromBeginning().
|
protected |
Definition at line 193 of file mythdvdbuffer.h.
Referenced by SafeRead(), and SetTrack().
|
protected |
Definition at line 210 of file mythdvdbuffer.h.
Referenced by DecodeSubtitles(), and DVDButtonUpdate().
|
protected |
Definition at line 209 of file mythdvdbuffer.h.
Referenced by DecodeSubtitles(), and DVDButtonUpdate().
|
protected |
Definition at line 183 of file mythdvdbuffer.h.
Referenced by ClearMenuButton(), GetButtonCoords(), GetMenuSPUPkt(), GetMenuSubtitle(), and SafeRead().
|
protected |
Definition at line 184 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 182 of file mythdvdbuffer.h.
Referenced by GetMenuSPUPkt(), and SafeRead().
|
protected |
Definition at line 207 of file mythdvdbuffer.h.
Referenced by GetMenuSPUPkt(), and SafeRead().
|
protected |
Definition at line 206 of file mythdvdbuffer.h.
Referenced by GetMenuSubtitle().
|
protected |
Definition at line 161 of file mythdvdbuffer.h.
Referenced by CellChanged(), and SafeRead().
|
protected |
Definition at line 186 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 190 of file mythdvdbuffer.h.
Referenced by SafeRead(), and SelectDefaultButton().
|
protected |
Definition at line 160 of file mythdvdbuffer.h.
Referenced by GetCellStart(), and SafeRead().
|
protected |
Definition at line 181 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 198 of file mythdvdbuffer.h.
Referenced by ClearChapterCache(), and GetChapterTimes().
|
protected |
Definition at line 208 of file mythdvdbuffer.h.
Referenced by GuessPalette(), and SafeRead().
|
protected |
Definition at line 202 of file mythdvdbuffer.h.
Referenced by CloseDVD(), GetDVDContext(), OpenFile(), SafeRead(), and StartFromBeginning().
|
protected |
Definition at line 201 of file mythdvdbuffer.h.
Referenced by CloseDVD(), GetDVDContext(), OpenFile(), SafeRead(), and StartFromBeginning().
|
protected |
Definition at line 191 of file mythdvdbuffer.h.
Referenced by GetTrack(), SafeRead(), and SetTrack().
|
protected |
Definition at line 164 of file mythdvdbuffer.h.
Referenced by SafeRead(), and Seek().
|
protected |
Definition at line 196 of file mythdvdbuffer.h.
Referenced by GetCurrentTime(), and SafeRead().
|
protected |
Definition at line 172 of file mythdvdbuffer.h.
Referenced by GetNumAngles(), and SafeRead().
|
protected |
Definition at line 192 of file mythdvdbuffer.h.
Referenced by GetTrack(), SafeRead(), and SetTrack().
|
protected |
Definition at line 155 of file mythdvdbuffer.h.
|
protected |
Definition at line 156 of file mythdvdbuffer.h.
|
protected |
Definition at line 157 of file mythdvdbuffer.h.
|
protected |
Definition at line 154 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 204 of file mythdvdbuffer.h.
Referenced by GetLastEvent(), IsSeekingAllowed(), and SafeRead().
|
protected |
Definition at line 205 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 214 of file mythdvdbuffer.h.
Referenced by ClearMenuButton(), DVDButtonUpdate(), GetMenuSPUPkt(), and GetMenuSubtitle().
|
protected |
Definition at line 153 of file mythdvdbuffer.h.
Referenced by ActivateButton(), CloseDVD(), DVDButtonUpdate(), GetAudioLanguage(), GetAudioTrackNum(), GetAudioTrackType(), GetChapterTimes(), GetDVDStateSnapshot(), GetFrameRate(), GetNumAudioChannels(), GetReadPosition(), GetSubtitleLanguage(), GetSubtitleTrackNum(), GoBack(), GoToMenu(), GoToNextProgram(), GoToPreviousProgram(), IsOpen(), IsStillFramePending(), MoveButtonDown(), MoveButtonLeft(), MoveButtonRight(), MoveButtonUp(), NextTrack(), NumMenuButtons(), OpenFile(), PlayTitleAndPart(), PlayTrack(), PrevTrack(), RestoreDVDStateSnapshot(), SafeRead(), SectorSeek(), Seek(), SelectDefaultButton(), SetTrack(), SkipStillFrame(), StartFromBeginning(), SwitchAngle(), and WaitSkip().
|
protected |
Definition at line 203 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 178 of file mythdvdbuffer.h.
Referenced by IsWaiting(), SafeRead(), and WaitSkip().
|
protected |
Definition at line 173 of file mythdvdbuffer.h.
Referenced by SafeRead(), and StartFromBeginning().
|
protected |
Definition at line 200 of file mythdvdbuffer.h.
Referenced by GetAspectOverride(), and SafeRead().
|
protected |
Definition at line 171 of file mythdvdbuffer.h.
Referenced by CloseDVD(), NextTrack(), PlayTrack(), PrevTrack(), SafeRead(), Seek(), and StartFromBeginning().
|
protected |
Definition at line 211 of file mythdvdbuffer.h.
Referenced by ClearMenuSPUParameters(), DVDButtonUpdate(), and GetButtonCoords().
|
protected |
Definition at line 185 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 187 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 166 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 176 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 168 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 189 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 215 of file mythdvdbuffer.h.
Referenced by GetMenuSPUPkt(), GetMenuSubtitle(), ReleaseMenuButton(), SafeRead(), and ~MythDVDBuffer().
|
protected |
Definition at line 213 of file mythdvdbuffer.h.
Referenced by ClearMenuSPUParameters(), GetMenuSPUPkt(), and GetMenuSubtitle().
|
protected |
Definition at line 212 of file mythdvdbuffer.h.
Referenced by ClearMenuSPUParameters(), and GetMenuSPUPkt().
|
protected |
Definition at line 199 of file mythdvdbuffer.h.
Referenced by DVDButtonUpdate(), SafeRead(), Seek(), SetParent(), and SkipStillFrame().
|
protected |
Definition at line 165 of file mythdvdbuffer.h.
Referenced by EndOfTitle(), GetDescForPos(), GetPart(), GetPartAndTitle(), NextTrack(), PrevTrack(), SafeRead(), and StartOfTitle().
|
protected |
Definition at line 159 of file mythdvdbuffer.h.
Referenced by GetTotalTimeOfTitle(), and SafeRead().
|
protected |
Definition at line 162 of file mythdvdbuffer.h.
Referenced by PGCLengthChanged(), and SafeRead().
|
protected |
Definition at line 158 of file mythdvdbuffer.h.
Referenced by GetChapterLength(), and SafeRead().
|
protected |
Definition at line 163 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 169 of file mythdvdbuffer.h.
Referenced by DVDWaitingForPlayer(), SkipDVDWaitingForPlayer(), and WaitForPlayer().
|
protected |
Definition at line 194 of file mythdvdbuffer.h.
Referenced by SafeRead(), and Seek().
|
protected |
Definition at line 216 of file mythdvdbuffer.h.
Referenced by GoBack(), GoToMenu(), GoToNextProgram(), GoToPreviousProgram(), NextTrack(), NormalSeek(), PlayTrack(), PrevTrack(), SafeRead(), SectorSeek(), SetDVDSpeed(), SkipStillFrame(), StartFromBeginning(), and WaitSkip().
|
protected |
Definition at line 195 of file mythdvdbuffer.h.
Referenced by SafeRead(), and Seek().
|
protected |
Definition at line 180 of file mythdvdbuffer.h.
Referenced by IgnoreWaitStates(), SafeRead(), and WaitForPlayer().
|
protected |
Definition at line 175 of file mythdvdbuffer.h.
Referenced by IsInStillFrame(), SafeRead(), and SkipStillFrame().
|
protected |
Definition at line 174 of file mythdvdbuffer.h.
Referenced by AdjustTimestamp(), SafeRead(), and StartFromBeginning().
|
protected |
Definition at line 167 of file mythdvdbuffer.h.
Referenced by GetChapterTimes(), GetDescForPos(), GetPartAndTitle(), GetTitle(), NextTrack(), PlayTrack(), PrevTrack(), and SafeRead().
|
protected |
Definition at line 179 of file mythdvdbuffer.h.
Referenced by GetTotalReadPosition(), and SafeRead().
|
protected |
Definition at line 170 of file mythdvdbuffer.h.
Referenced by EndOfTitle(), NextTrack(), NumPartsInTitle(), PlayTrack(), and SafeRead().
|
protected |
Definition at line 188 of file mythdvdbuffer.h.
Referenced by SafeRead().