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 |
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. Calls StopReads(void). More... | |
void | Unpause (void) |
Unpauses the read-ahead thread. Calls StartReads(void). 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 bool | IsInDiscMenuOrStillFrame (void) const |
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 long long | GetRealFileSizeInternal (void) const |
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 () |
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 | usleep (std::chrono::microseconds time) |
template<typename R , typename P > | |
static std::enable_if_t< std::chrono::treat_as_floating_point< R >::value, void > | usleep (std::chrono::duration< R, P > time) |
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 47 of file mythdvdbuffer.cpp.
|
override |
Definition at line 53 of file mythdvdbuffer.cpp.
|
overridevirtual |
Implements MythMediaBuffer.
Definition at line 215 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GetCurrentAngle(), and MythDVDPlayer::GetNumAngles().
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 220 of file mythdvdbuffer.cpp.
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 230 of file mythdvdbuffer.cpp.
|
inlineoverridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 48 of file mythdvdbuffer.h.
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 225 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DisplayPauseFrame(), TV::DVDJumpForward(), MythDVDPlayer::PrepareAudioSample(), TV::ShowLCDDVDInfo(), MythDVDPlayer::StillFrameCheck(), and MythDVDPlayer::VideoLoop().
|
overridevirtual |
Opens a dvd device for reading.
lfilename | Path of the dvd device to read. |
Implements MythMediaBuffer.
Definition at line 259 of file mythdvdbuffer.cpp.
Referenced by MythDVDBuffer(), and StartFromBeginning().
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 1330 of file mythdvdbuffer.cpp.
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 1351 of file mythdvdbuffer.cpp.
|
overridevirtual |
Reimplemented from MythMediaBuffer.
Definition at line 327 of file mythdvdbuffer.cpp.
|
overridevirtual |
returns current position in the PGC.
Implements MythMediaBuffer.
Definition at line 414 of file mythdvdbuffer.cpp.
Referenced by SafeRead().
|
overridevirtual |
Get the dvd title and serial num.
Implements MythOpticalBuffer.
Definition at line 1917 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::EventStart(), MythDVDPlayer::GetBookmark(), MythDVDPlayer::SetBookmark(), and TV::ShowLCDDVDInfo().
int MythDVDBuffer::GetTitle | ( | void | ) | const |
Definition at line 429 of file mythdvdbuffer.cpp.
bool MythDVDBuffer::DVDWaitingForPlayer | ( | void | ) | const |
Definition at line 434 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::VideoLoop().
int MythDVDBuffer::GetPart | ( | void | ) | const |
Definition at line 439 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GetCurrentChapter().
int MythDVDBuffer::GetCurrentAngle | ( | void | ) | const |
Definition at line 444 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GetCurrentAngle().
int MythDVDBuffer::GetNumAngles | ( | void | ) | const |
Definition at line 449 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GetNumAngles().
long long MythDVDBuffer::GetTotalReadPosition | ( | void | ) | const |
Definition at line 454 of file mythdvdbuffer.cpp.
Referenced by DecoderBase::PosMapFromDb().
std::chrono::seconds MythDVDBuffer::GetChapterLength | ( | void | ) | const |
Definition at line 459 of file mythdvdbuffer.cpp.
void MythDVDBuffer::GetChapterTimes | ( | QList< std::chrono::seconds > & | Times | ) |
Definition at line 371 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GetChapterTimes(), and SafeRead().
std::chrono::seconds MythDVDBuffer::GetChapterTimes | ( | int | Title | ) |
Definition at line 382 of file mythdvdbuffer.cpp.
void MythDVDBuffer::GetDescForPos | ( | QString & | Description | ) | const |
Definition at line 240 of file mythdvdbuffer.cpp.
void MythDVDBuffer::GetPartAndTitle | ( | int & | Part, |
int & | Title | ||
) | const |
Definition at line 464 of file mythdvdbuffer.cpp.
Referenced by TV::ShowLCDDVDInfo().
std::chrono::seconds MythDVDBuffer::GetTotalTimeOfTitle | ( | void | ) | const |
get the total time of the title in seconds 90000 ticks = 1 sec
Definition at line 1157 of file mythdvdbuffer.cpp.
Referenced by IsBookmarkAllowed(), DecoderBase::PosMapFromDb(), TV::ShowLCDDVDInfo(), DecoderBase::SyncPositionMap(), and TitleTimeLeft().
float MythDVDBuffer::GetAspectOverride | ( | void | ) | const |
Definition at line 1162 of file mythdvdbuffer.cpp.
Referenced by AvFormatDecoder::MpegPreProcessPkt().
std::chrono::seconds MythDVDBuffer::GetCellStart | ( | void | ) | const |
get the start of the cell in seconds
Definition at line 1169 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DoJumpChapter().
bool MythDVDBuffer::PGCLengthChanged | ( | void | ) |
check if pgc length has changed
Definition at line 1205 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::StreamChangeCheck().
bool MythDVDBuffer::CellChanged | ( | void | ) |
check if dvd cell has changed
Definition at line 1176 of file mythdvdbuffer.cpp.
bool MythDVDBuffer::IsStillFramePending | ( | void | ) | const |
Definition at line 1183 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::VideoLoop().
bool MythDVDBuffer::AudioStreamsChanged | ( | void | ) | const |
Definition at line 1188 of file mythdvdbuffer.cpp.
Referenced by AvFormatDecoder::ScanStreams(), and MythDVDDecoder::StreamChangeCheck().
bool MythDVDBuffer::IsWaiting | ( | void | ) | const |
Definition at line 1193 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::VideoLoop().
int MythDVDBuffer::NumPartsInTitle | ( | void | ) | const |
Definition at line 1198 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GetNumChapters(), and TV::ShowLCDDVDInfo().
void MythDVDBuffer::GetMenuSPUPkt | ( | uint8_t * | Buffer, |
int | Size, | ||
int | StreamID, | ||
uint32_t | StartTime | ||
) |
Get SPU pkt from dvd menu subtitle stream.
Definition at line 1404 of file mythdvdbuffer.cpp.
Referenced by AvFormatDecoder::ProcessSubtitlePacket().
uint32_t MythDVDBuffer::AdjustTimestamp | ( | uint32_t | Timestamp | ) | const |
Definition at line 470 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::ReadPacket(), and SafeRead().
int64_t MythDVDBuffer::AdjustTimestamp | ( | int64_t | Timestamp | ) | const |
Definition at line 478 of file mythdvdbuffer.cpp.
MythDVDContext * MythDVDBuffer::GetDVDContext | ( | void | ) |
Definition at line 486 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::ProcessDataPacket().
int32_t MythDVDBuffer::GetLastEvent | ( | void | ) | const |
Definition at line 494 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::ReadPacket().
AVSubtitle * MythDVDBuffer::GetMenuSubtitle | ( | uint & | Version | ) |
returns dvd menu button information if available.
Definition at line 1434 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DisplayDVDButton().
int MythDVDBuffer::NumMenuButtons | ( | void | ) | const |
Definition at line 1721 of file mythdvdbuffer.cpp.
Referenced by ActivateButton(), DecodeSubtitles(), MythDVDPlayer::DisplayDVDButton(), GetMenuSubtitle(), HandleAction(), MoveButtonDown(), MoveButtonLeft(), MoveButtonRight(), MoveButtonUp(), AvFormatDecoder::ProcessSubtitlePacket(), and SelectDefaultButton().
QRect MythDVDBuffer::GetButtonCoords | ( | void | ) |
get coordinates of highlighted button
Definition at line 1456 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DisplayDVDButton().
void MythDVDBuffer::ReleaseMenuButton | ( | void | ) |
Definition at line 1449 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DisplayDVDButton().
uint MythDVDBuffer::GetSubtitleLanguage | ( | int | Id | ) |
Get the subtitle language from the dvd.
Definition at line 1807 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 1817 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::PostProcessTracks().
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 1468 of file mythdvdbuffer.cpp.
Referenced by GetMenuSPUPkt(), and AvFormatDecoder::ProcessSubtitlePacket().
uint MythDVDBuffer::GetAudioLanguage | ( | int | Index | ) |
get the audio language from the dvd
Definition at line 1732 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 1756 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::GetAudioLanguage(), MythDVDDecoder::GetAudioTrackType(), SafeRead(), and AvFormatDecoder::ScanStreams().
int MythDVDBuffer::GetAudioTrackType | ( | uint | Index | ) |
Definition at line 1788 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::GetAudioTrackType().
bool MythDVDBuffer::GetDVDStateSnapshot | ( | QString & | State | ) |
Get a snapshot of the current DVD VM state.
Definition at line 1926 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::SetBookmark().
bool MythDVDBuffer::RestoreDVDStateSnapshot | ( | const QString & | State | ) |
Restore a DVD VM from a snapshot.
Definition at line 1942 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::VideoStart().
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 1953 of file mythdvdbuffer.cpp.
Referenced by DecoderBase::PosMapFromDb().
bool MythDVDBuffer::StartOfTitle | ( | void | ) | const |
Definition at line 1961 of file mythdvdbuffer.cpp.
bool MythDVDBuffer::EndOfTitle | ( | void | ) | const |
Definition at line 1966 of file mythdvdbuffer.cpp.
void MythDVDBuffer::PlayTitleAndPart | ( | int | Title, |
int | Part | ||
) |
Definition at line 1971 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::InitialSeek().
void MythDVDBuffer::CloseDVD | ( | void | ) |
Definition at line 64 of file mythdvdbuffer.cpp.
Referenced by OpenFile(), StartFromBeginning(), and ~MythDVDBuffer().
bool MythDVDBuffer::PlayTrack | ( | int | Track | ) |
Definition at line 1115 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DoJumpChapter().
bool MythDVDBuffer::NextTrack | ( | void | ) |
Definition at line 1128 of file mythdvdbuffer.cpp.
void MythDVDBuffer::PrevTrack | ( | void | ) |
Definition at line 1142 of file mythdvdbuffer.cpp.
long long MythDVDBuffer::NormalSeek | ( | long long | Time | ) |
Definition at line 147 of file mythdvdbuffer.cpp.
Referenced by SeekInternal().
bool MythDVDBuffer::SectorSeek | ( | uint64_t | Sector | ) |
Definition at line 153 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::CheckContext(), and MythDVDDecoder::ProcessVideoPacket().
void MythDVDBuffer::SkipStillFrame | ( | void | ) |
Definition at line 1212 of file mythdvdbuffer.cpp.
Referenced by SafeRead(), and MythDVDPlayer::StillFrameCheck().
void MythDVDBuffer::WaitSkip | ( | void | ) |
Definition at line 1225 of file mythdvdbuffer.cpp.
Referenced by SafeRead(), and MythDVDPlayer::VideoLoop().
void MythDVDBuffer::SkipDVDWaitingForPlayer | ( | void | ) |
Definition at line 1233 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::VideoLoop().
void MythDVDBuffer::UnblockReading | ( | void | ) |
Definition at line 1238 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::ReadPacket().
bool MythDVDBuffer::IsReadingBlocked | ( | void | ) |
Definition at line 1243 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::ReadPacket().
bool MythDVDBuffer::GoToMenu | ( | const QString & | str | ) |
jump to a dvd root or chapter menu
Definition at line 1250 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::GoToMenu().
void MythDVDBuffer::GoToNextProgram | ( | void | ) |
Definition at line 1312 of file mythdvdbuffer.cpp.
void MythDVDBuffer::GoToPreviousProgram | ( | void | ) |
Definition at line 1321 of file mythdvdbuffer.cpp.
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 1274 of file mythdvdbuffer.cpp.
Referenced by TV::ActiveHandleAction().
void MythDVDBuffer::AudioStreamsChanged | ( | bool | Change | ) |
Definition at line 1910 of file mythdvdbuffer.cpp.
std::chrono::seconds MythDVDBuffer::GetCurrentTime | ( | void | ) | const |
Definition at line 1996 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::DVDFindPosition(), MythDVDPlayer::GetMillisecondsPlayed(), TitleTimeLeft(), and MythDVDDecoder::UpdateFramesPlayed().
std::chrono::seconds MythDVDBuffer::TitleTimeLeft | ( | void | ) | const |
returns seconds left in the title
Definition at line 1991 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::CalcMaxFFTime(), and DecoderBase::DoFastForward().
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 1870 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::DisableCaptions(), MythDVDPlayer::EnableCaptions(), MythDVDPlayer::InitialSeek(), and MythDVDPlayer::SetTrack().
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 1889 of file mythdvdbuffer.cpp.
Referenced by MythDVDDecoder::PostProcessTracks().
uint16_t MythDVDBuffer::GetNumAudioChannels | ( | int | Index | ) |
Definition at line 1898 of file mythdvdbuffer.cpp.
void MythDVDBuffer::SetDVDSpeed | ( | void | ) |
set dvd speed. uses the constant DVD_DRIVE_SPEED table
Definition at line 1977 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::ChangeSpeed(), CloseDVD(), and OpenFile().
void MythDVDBuffer::SetDVDSpeed | ( | int | Speed | ) |
set dvd speed.
Definition at line 1984 of file mythdvdbuffer.cpp.
bool MythDVDBuffer::SwitchAngle | ( | int | Angle | ) |
Definition at line 2166 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::SwitchAngle().
void MythDVDBuffer::SetParent | ( | MythDVDPlayer * | Parent | ) |
Definition at line 2181 of file mythdvdbuffer.cpp.
Referenced by MythDVDPlayer::EventEnd(), and MythDVDPlayer::EventStart().
|
overrideprotectedvirtual |
Implements MythMediaBuffer.
Definition at line 523 of file mythdvdbuffer.cpp.
|
overrideprotectedvirtual |
Implements MythMediaBuffer.
Definition at line 95 of file mythdvdbuffer.cpp.
|
protected |
Action taken when a dvd menu button is selected.
Definition at line 1393 of file mythdvdbuffer.cpp.
Referenced by HandleAction().
|
protected |
Definition at line 1356 of file mythdvdbuffer.cpp.
Referenced by HandleAction().
|
protected |
Definition at line 1365 of file mythdvdbuffer.cpp.
Referenced by HandleAction().
|
protected |
Definition at line 1374 of file mythdvdbuffer.cpp.
Referenced by HandleAction().
|
protected |
Definition at line 1383 of file mythdvdbuffer.cpp.
Referenced by HandleAction().
update the dvd menu button parameters when a user changes the dvd menu button position
Definition at line 1645 of file mythdvdbuffer.cpp.
Referenced by GetMenuSPUPkt(), and SafeRead().
|
protected |
clears the menu SPU pkt and parameters.
necessary action during dvd menu changes
Definition at line 1707 of file mythdvdbuffer.cpp.
Referenced by GetMenuSPUPkt(), and ~MythDVDBuffer().
|
protected |
clears the dvd menu button structures
Definition at line 1686 of file mythdvdbuffer.cpp.
Referenced by ClearMenuSPUParameters().
|
protected |
Definition at line 170 of file mythdvdbuffer.cpp.
Referenced by NormalSeek(), PlayTrack(), and PrevTrack().
|
protected |
Definition at line 86 of file mythdvdbuffer.cpp.
Referenced by ~MythDVDBuffer().
|
protected |
determines the default dvd menu button to show when you initially access the dvd menu.
Definition at line 1850 of file mythdvdbuffer.cpp.
Referenced by GetMenuSPUPkt().
|
protected |
Definition at line 499 of file mythdvdbuffer.cpp.
Referenced by SafeRead().
converts the subtitle/audio lang code to iso639.
Definition at line 1832 of file mythdvdbuffer.cpp.
Referenced by GetAudioLanguage(), and GetSubtitleLanguage().
|
staticprotected |
copied from ffmpeg's dvdsubdec.c
Definition at line 2067 of file mythdvdbuffer.cpp.
Referenced by DecodeRLE().
|
staticprotected |
decodes the bitmap from the subtitle packet.
copied from ffmpeg's dvdsubdec.c.
Definition at line 2021 of file mythdvdbuffer.cpp.
Referenced by DecodeSubtitles().
|
protected |
converts palette values from YUV to RGB
Definition at line 2002 of file mythdvdbuffer.cpp.
Referenced by DecodeSubtitles(), and DVDButtonUpdate().
|
staticprotected |
Obtained from ffmpeg dvdsubdec.c Used to find smallest bounded rectangle.
Definition at line 2076 of file mythdvdbuffer.cpp.
Referenced by FindSmallestBoundingRectangle().
|
staticprotected |
Obtained from ffmpeg dvdsubdec.c Used to find smallest bounded rect and helps prevent jerky picture during subtitle creation.
Definition at line 2091 of file mythdvdbuffer.cpp.
Referenced by DecodeSubtitles().
|
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 154 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
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 158 of file mythdvdbuffer.h.
Referenced by GetChapterLength(), and SafeRead().
|
protected |
Definition at line 159 of file mythdvdbuffer.h.
Referenced by GetTotalTimeOfTitle(), and SafeRead().
|
protected |
Definition at line 160 of file mythdvdbuffer.h.
Referenced by GetCellStart(), and SafeRead().
Definition at line 161 of file mythdvdbuffer.h.
Referenced by CellChanged(), and SafeRead().
Definition at line 162 of file mythdvdbuffer.h.
Referenced by PGCLengthChanged(), and SafeRead().
|
protected |
Definition at line 163 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 164 of file mythdvdbuffer.h.
Referenced by SafeRead(), and Seek().
|
protected |
Definition at line 165 of file mythdvdbuffer.h.
Referenced by EndOfTitle(), GetDescForPos(), GetPart(), GetPartAndTitle(), NextTrack(), PrevTrack(), SafeRead(), and StartOfTitle().
|
protected |
Definition at line 166 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 167 of file mythdvdbuffer.h.
Referenced by GetChapterTimes(), GetDescForPos(), GetPartAndTitle(), GetTitle(), NextTrack(), PlayTrack(), PrevTrack(), and SafeRead().
|
protected |
Definition at line 168 of file mythdvdbuffer.h.
Referenced by SafeRead().
Definition at line 169 of file mythdvdbuffer.h.
Referenced by DVDWaitingForPlayer(), SkipDVDWaitingForPlayer(), and WaitForPlayer().
|
protected |
Definition at line 170 of file mythdvdbuffer.h.
Referenced by EndOfTitle(), NextTrack(), NumPartsInTitle(), PlayTrack(), and SafeRead().
Definition at line 171 of file mythdvdbuffer.h.
Referenced by CloseDVD(), NextTrack(), PlayTrack(), PrevTrack(), SafeRead(), Seek(), and StartFromBeginning().
|
protected |
Definition at line 172 of file mythdvdbuffer.h.
Referenced by GetNumAngles(), and SafeRead().
|
protected |
Definition at line 173 of file mythdvdbuffer.h.
Referenced by SafeRead(), and StartFromBeginning().
|
protected |
Definition at line 174 of file mythdvdbuffer.h.
Referenced by AdjustTimestamp(), SafeRead(), and StartFromBeginning().
|
protected |
Definition at line 175 of file mythdvdbuffer.h.
Referenced by IsInStillFrame(), SafeRead(), and SkipStillFrame().
|
protected |
Definition at line 176 of file mythdvdbuffer.h.
Referenced by SafeRead().
Definition at line 177 of file mythdvdbuffer.h.
Referenced by AudioStreamsChanged(), CloseDVD(), SafeRead(), and StartFromBeginning().
Definition at line 178 of file mythdvdbuffer.h.
Referenced by IsWaiting(), SafeRead(), and WaitSkip().
|
protected |
Definition at line 179 of file mythdvdbuffer.h.
Referenced by GetTotalReadPosition(), and SafeRead().
Definition at line 180 of file mythdvdbuffer.h.
Referenced by IgnoreWaitStates(), SafeRead(), and WaitForPlayer().
|
protected |
Definition at line 181 of file mythdvdbuffer.h.
Referenced by SafeRead().
Definition at line 182 of file mythdvdbuffer.h.
Referenced by GetMenuSPUPkt(), and SafeRead().
Definition at line 183 of file mythdvdbuffer.h.
Referenced by ClearMenuButton(), GetButtonCoords(), GetMenuSPUPkt(), GetMenuSubtitle(), and SafeRead().
Definition at line 184 of file mythdvdbuffer.h.
Referenced by SafeRead().
Definition at line 185 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 186 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 187 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 188 of file mythdvdbuffer.h.
Referenced by SafeRead().
|
protected |
Definition at line 189 of file mythdvdbuffer.h.
Referenced by SafeRead().
Definition at line 190 of file mythdvdbuffer.h.
Referenced by SafeRead(), and SelectDefaultButton().
|
protected |
Definition at line 191 of file mythdvdbuffer.h.
Referenced by GetTrack(), SafeRead(), and SetTrack().
|
protected |
Definition at line 192 of file mythdvdbuffer.h.
Referenced by GetTrack(), SafeRead(), and SetTrack().
Definition at line 193 of file mythdvdbuffer.h.
Referenced by SafeRead(), and SetTrack().
Definition at line 194 of file mythdvdbuffer.h.
Referenced by SafeRead(), and Seek().
|
protected |
Definition at line 195 of file mythdvdbuffer.h.
Referenced by SafeRead(), and Seek().
|
protected |
Definition at line 196 of file mythdvdbuffer.h.
Referenced by GetCurrentTime(), and SafeRead().
|
staticprotected |
Definition at line 197 of file mythdvdbuffer.h.
Referenced by Seek().
|
protected |
Definition at line 198 of file mythdvdbuffer.h.
Referenced by ClearChapterCache(), and GetChapterTimes().
|
protected |
Definition at line 199 of file mythdvdbuffer.h.
Referenced by DVDButtonUpdate(), SafeRead(), Seek(), SetParent(), and SkipStillFrame().
|
protected |
Definition at line 200 of file mythdvdbuffer.h.
Referenced by GetAspectOverride(), and SafeRead().
|
protected |
Definition at line 201 of file mythdvdbuffer.h.
Referenced by CloseDVD(), GetDVDContext(), OpenFile(), SafeRead(), and StartFromBeginning().
|
protected |
Definition at line 202 of file mythdvdbuffer.h.
Referenced by CloseDVD(), GetDVDContext(), OpenFile(), SafeRead(), and StartFromBeginning().
|
protected |
Definition at line 203 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 206 of file mythdvdbuffer.h.
Referenced by GetMenuSubtitle().
|
protected |
Definition at line 207 of file mythdvdbuffer.h.
Referenced by GetMenuSPUPkt(), and SafeRead().
|
protected |
Definition at line 208 of file mythdvdbuffer.h.
Referenced by GuessPalette(), and SafeRead().
|
protected |
Definition at line 209 of file mythdvdbuffer.h.
Referenced by DecodeSubtitles(), and DVDButtonUpdate().
|
protected |
Definition at line 210 of file mythdvdbuffer.h.
Referenced by DecodeSubtitles(), and DVDButtonUpdate().
|
protected |
Definition at line 211 of file mythdvdbuffer.h.
Referenced by ClearMenuSPUParameters(), DVDButtonUpdate(), and GetButtonCoords().
|
protected |
Definition at line 212 of file mythdvdbuffer.h.
Referenced by ClearMenuSPUParameters(), and GetMenuSPUPkt().
|
protected |
Definition at line 213 of file mythdvdbuffer.h.
Referenced by ClearMenuSPUParameters(), GetMenuSPUPkt(), and GetMenuSubtitle().
|
protected |
Definition at line 214 of file mythdvdbuffer.h.
Referenced by ClearMenuButton(), DVDButtonUpdate(), GetMenuSPUPkt(), and GetMenuSubtitle().
|
protected |
Definition at line 215 of file mythdvdbuffer.h.
Referenced by GetMenuSPUPkt(), GetMenuSubtitle(), ReleaseMenuButton(), SafeRead(), and ~MythDVDBuffer().
|
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().