|
vdr-plugin-softhddevice-drm-gles 1.5.9-20e15de
|
#include <mediaplayer.h>
Public Member Functions | |
| cSoftHdPlayer (const char *, cSoftHdDevice *) | |
| Create a new player for a file or playlist. | |
| virtual | ~cSoftHdPlayer () |
| void | SetEntry (int) |
| Set the current entry to play. | |
| const char * | GetSource (void) |
| void | JumpSec (int seconds) |
| void | Pause (bool pause) |
| bool | IsPaused (void) |
| void | Stop (void) |
| void | ToggleRandomPlay (void) |
| bool | IsRandomPlayActive (void) |
| int | GetCurrentTime (void) |
| int | GetDuration (void) |
| cPlaylistEntry * | GetFirstPlaylistEntry (void) |
| cPlaylistEntry * | GetCurrentPlaylistEntry (void) |
Protected Member Functions | |
| virtual void | Activate (bool On) |
| Start player thread. | |
| virtual void | Action (void) |
| Main thread action which invokes replay start. | |
Private Member Functions | |
| void | Play (const char *) |
| Play a file. | |
| void | ReadPlaylist (const char *) |
| Read the playlist file. | |
Private Attributes | |
| cPlaylistEntry * | m_pFirstEntry = nullptr |
| cPlaylistEntry * | m_pCurrentEntry = nullptr |
| char * | m_pSource |
| int | m_entries |
| cSoftHdDevice * | m_pDevice |
| cSoftHdAudio * | m_pAudio |
| std::atomic< int > | m_jumpSec = 0 |
| std::atomic< bool > | m_paused = false |
| std::atomic< bool > | m_stopped = false |
| std::atomic< bool > | m_random = false |
| bool | m_noModify = false |
| int | m_currentTime = 0 |
| int | m_duration = 0 |
Definition at line 59 of file mediaplayer.h.
| cSoftHdPlayer::cSoftHdPlayer | ( | const char * | url, |
| cSoftHdDevice * | device | ||
| ) |
Create a new player for a file or playlist.
| url | file or playlist to be played |
| device | pointer to device |
Definition at line 92 of file mediaplayer.cpp.
References IsM3UPlaylist(), L_MEDIA, LOGDEBUG2, m_pCurrentEntry, m_pFirstEntry, m_pSource, and ReadPlaylist().
|
virtual |
Definition at line 109 of file mediaplayer.cpp.
References cPlaylistEntry::GetNextEntry(), L_MEDIA, LOGDEBUG2, m_entries, m_pFirstEntry, m_pSource, and m_stopped.
|
protectedvirtual |
Main thread action which invokes replay start.
Definition at line 142 of file mediaplayer.cpp.
References AV_NOPTS_VALUE, cSoftHdControl::Close(), cSoftHdControl::Control(), cSoftHdAudio::GetHardwareOutputPtsMs(), cPlaylistEntry::GetNextEntry(), cPlaylistEntry::GetPath(), IsM3UPlaylist(), L_MEDIA, LOGDEBUG2, m_entries, m_jumpSec, m_noModify, m_pAudio, m_pCurrentEntry, m_pSource, m_random, cSoftHdMenu::Menu(), Play(), cSoftHdMenu::PlayListMenu(), and SetEntry().
|
protectedvirtual |
Start player thread.
Called right after the player has been attached
| on | true starts the player, false does nothing |
Definition at line 131 of file mediaplayer.cpp.
|
inline |
Definition at line 77 of file mediaplayer.h.
References m_pCurrentEntry.
Referenced by cSoftHdMenu::PlayListMenu(), and cSoftHdControl::ShowProgress().
|
inline |
Definition at line 74 of file mediaplayer.h.
References m_currentTime.
Referenced by cSoftHdControl::ShowProgress().
|
inline |
Definition at line 75 of file mediaplayer.h.
References m_duration.
Referenced by cSoftHdControl::ShowProgress().
|
inline |
Definition at line 76 of file mediaplayer.h.
References m_pFirstEntry.
Referenced by cSoftHdMenu::PlayListMenu().
|
inline |
Definition at line 66 of file mediaplayer.h.
References m_pSource.
Referenced by cSoftHdControl::ShowProgress().
|
inline |
Definition at line 70 of file mediaplayer.h.
References m_paused.
Referenced by cSoftHdControl::ProcessKey().
|
inline |
Definition at line 73 of file mediaplayer.h.
References m_random.
|
inline |
Definition at line 68 of file mediaplayer.h.
References m_jumpSec.
Referenced by cSoftHdControl::ProcessKey(), and cSoftHdMenu::ProcessKey().
|
inline |
Definition at line 69 of file mediaplayer.h.
References m_paused.
Referenced by cSoftHdControl::ProcessKey().
|
private |
Play a file.
| url | file to play |
Definition at line 232 of file mediaplayer.cpp.
References cSoftHdDevice::Clear(), cSoftHdAudio::GetHardwareOutputPtsMs(), L_MEDIA, LOGDEBUG2, LOGERROR, LOGFATAL, m_currentTime, m_duration, m_jumpSec, m_pAudio, m_paused, m_pDevice, m_stopped, cSoftHdDevice::PlayAudioPkts(), cSoftHdDevice::PlayVideoPkts(), cSoftHdDevice::SetAudioCodec(), and cSoftHdDevice::SetVideoCodec().
Referenced by Action().
|
private |
Read the playlist file.
Definition at line 177 of file mediaplayer.cpp.
References LOGERROR, m_entries, m_pFirstEntry, and cPlaylistEntry::SetNextEntry().
Referenced by cSoftHdPlayer().
| void cSoftHdPlayer::SetEntry | ( | int | index | ) |
Set the current entry to play.
| index | list index (in random mode) or menu item index cOsdMenu::Current() |
Definition at line 213 of file mediaplayer.cpp.
References cPlaylistEntry::GetNextEntry(), m_noModify, m_pCurrentEntry, m_pFirstEntry, and m_stopped.
Referenced by Action(), and cSoftHdMenu::ProcessKey().
|
inline |
Definition at line 71 of file mediaplayer.h.
References m_stopped.
Referenced by cSoftHdControl::ProcessKey(), and cSoftHdMenu::ProcessKey().
|
inline |
Definition at line 72 of file mediaplayer.h.
References m_random.
Referenced by cSoftHdMenu::ProcessKey().
|
private |
Definition at line 99 of file mediaplayer.h.
Referenced by GetCurrentTime(), and Play().
|
private |
Definition at line 100 of file mediaplayer.h.
Referenced by GetDuration(), and Play().
|
private |
Definition at line 91 of file mediaplayer.h.
Referenced by Action(), ReadPlaylist(), and ~cSoftHdPlayer().
|
private |
Definition at line 94 of file mediaplayer.h.
|
private |
Definition at line 98 of file mediaplayer.h.
Referenced by Action(), and SetEntry().
|
private |
Definition at line 93 of file mediaplayer.h.
|
private |
Definition at line 95 of file mediaplayer.h.
Referenced by IsPaused(), Pause(), and Play().
|
private |
Definition at line 88 of file mediaplayer.h.
Referenced by Action(), cSoftHdPlayer(), GetCurrentPlaylistEntry(), and SetEntry().
|
private |
Definition at line 92 of file mediaplayer.h.
Referenced by Play().
|
private |
Definition at line 87 of file mediaplayer.h.
Referenced by cSoftHdPlayer(), GetFirstPlaylistEntry(), ReadPlaylist(), SetEntry(), and ~cSoftHdPlayer().
|
private |
Definition at line 90 of file mediaplayer.h.
Referenced by Action(), cSoftHdPlayer(), GetSource(), and ~cSoftHdPlayer().
|
private |
Definition at line 97 of file mediaplayer.h.
Referenced by Action(), IsRandomPlayActive(), and ToggleRandomPlay().
|
private |
Definition at line 96 of file mediaplayer.h.
Referenced by Play(), SetEntry(), Stop(), and ~cSoftHdPlayer().