The CCMediaPlayList class manages a playlist with various play modes.
More...
#include <CCMediaPlayList.h>
|
void | flush_play_list () |
| Flush the editable play list into actual_play_list, making changes effective.
|
|
The CCMediaPlayList class manages a playlist with various play modes.
◆ PlayMode
PlayMode enum defines playback modes.
Enumerator |
---|
OneShot | Play one media once then stop.
|
OneCycle | Repeat the current media endlessly.
|
ListPlay | Play the playlist once in order.
|
ListCycle | Play the playlist repeatedly.
|
◆ CCMediaPlayList()
CCMediaPlayList::CCMediaPlayList |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ actualList()
QStringList CCMediaPlayList::actualList |
( |
| ) |
const |
|
inline |
Get the editable play list.
- Returns
- QStringList of media in play list (modifiable)
◆ currentPlayingList()
QStringList CCMediaPlayList::currentPlayingList |
( |
| ) |
const |
|
inline |
Get the current actual playing list.
- Returns
- QStringList of media actually played
- Note
- This list is the one actively used for playback (immutable until flushed)
◆ enqueue_play()
void CCMediaPlayList::enqueue_play |
( |
const QStringList & |
media_sources | ) |
|
Append media sources to the play list.
- Parameters
-
media_sources | List of media paths/names to add |
◆ fetch_current_play()
Fetch current media info.
- Returns
- MediaListMails of currently playing media
◆ fetch_first_play()
Fetch first media info in the actual playlist.
- Returns
- MediaListMails of first media
◆ fetch_from_name()
MediaListMails CCMediaPlayList::fetch_from_name |
( |
const QString & |
where | ) |
|
Fetch media info by name.
- Parameters
-
where | The media name or path to fetch |
- Returns
- MediaListMails with play info for the given media
◆ fetch_last_play()
Fetch last media info in the actual playlist.
- Returns
- MediaListMails of last media
◆ fetch_next_play()
Fetch next media info according to play mode.
- Returns
- MediaListMails containing next enabled flag and current playing info
◆ fetch_prev_play()
Fetch previous media info according to play mode.
- Returns
- MediaListMails containing prev enabled flag and current playing info
◆ get_actualListlist_size()
int CCMediaPlayList::get_actualListlist_size |
( |
| ) |
|
|
inline |
Get size of the editable play list.
- Returns
- int size of play_list
◆ get_play_mode()
PlayMode CCMediaPlayList::get_play_mode |
( |
| ) |
const |
|
inline |
Get current play mode.
- Returns
- current PlayMode
◆ playModeChanged
void CCMediaPlayList::playModeChanged |
( |
const PlayMode |
mode | ) |
|
|
signal |
Signal emitted when play mode changes.
- Parameters
-
◆ remove_play_list()
void CCMediaPlayList::remove_play_list |
( |
const QStringList & |
media_sources | ) |
|
Remove media sources from the play list.
- Parameters
-
media_sources | List of media paths/names to remove |
◆ set_play_mode()
void CCMediaPlayList::set_play_mode |
( |
const PlayMode |
mode | ) |
|
Set the play mode.
- Parameters
-
The documentation for this class was generated from the following files:
- extern_app/MediaPlayer/core/CCMediaPlayList.h
- extern_app/MediaPlayer/core/CCMediaPlayList.cpp