MPD  0.20.15
Public Member Functions | Data Fields | Static Public Attributes
Partition Struct Referencefinal

A partition of the Music Player Daemon. More...

#include <Partition.hxx>

Inheritance diagram for Partition:
[legend]
Collaboration diagram for Partition:
[legend]

Public Member Functions

 Partition (Instance &_instance, unsigned max_length, unsigned buffer_chunks, unsigned buffered_before_play, AudioFormat configured_audio_format, const ReplayGainConfig &replay_gain_config)
 
void EmitGlobalEvent (unsigned mask)
 
void EmitIdle (unsigned mask)
 
void ClearQueue ()
 
unsigned AppendURI (const SongLoader &loader, const char *uri_utf8)
 
void DeletePosition (unsigned position)
 
void DeleteId (unsigned id)
 
void DeleteRange (unsigned start, unsigned end)
 Deletes a range of songs from the playlist. More...
 
void StaleSong (const char *uri)
 
void Shuffle (unsigned start, unsigned end)
 
void MoveRange (unsigned start, unsigned end, int to)
 
void MoveId (unsigned id, int to)
 
void SwapPositions (unsigned song1, unsigned song2)
 
void SwapIds (unsigned id1, unsigned id2)
 
void SetPriorityRange (unsigned start_position, unsigned end_position, uint8_t priority)
 
void SetPriorityId (unsigned song_id, uint8_t priority)
 
void Stop ()
 
void PlayPosition (int position)
 
void PlayId (int id)
 
void PlayNext ()
 
void PlayPrevious ()
 
void SeekSongPosition (unsigned song_position, SongTime seek_time)
 
void SeekSongId (unsigned song_id, SongTime seek_time)
 
void SeekCurrent (SignedSongTime seek_time, bool relative)
 
void SetRepeat (bool new_value)
 
bool GetRandom () const
 
void SetRandom (bool new_value)
 
void SetSingle (bool new_value)
 
void SetConsume (bool new_value)
 
void SetReplayGainMode (ReplayGainMode mode)
 
void UpdateEffectiveReplayGainMode ()
 Publishes the effective ReplayGainMode to all subsystems. More...
 
void TagModified ()
 A tag in the play queue has been modified by the player thread. More...
 
void SyncWithPlayer ()
 Synchronize the player with the play queue. More...
 

Data Fields

Instanceinstance
 
MaskMonitor global_events
 
struct playlist playlist
 
MultipleOutputs outputs
 
PlayerControl pc
 
ReplayGainMode replay_gain_mode = ReplayGainMode::OFF
 

Static Public Attributes

static constexpr unsigned TAG_MODIFIED = 0x1
 
static constexpr unsigned SYNC_WITH_PLAYER = 0x2
 

Detailed Description

A partition of the Music Player Daemon.

It is a separate unit with a playlist, a player, outputs etc.

Definition at line 42 of file Partition.hxx.

Constructor & Destructor Documentation

◆ Partition()

Partition::Partition ( Instance _instance,
unsigned  max_length,
unsigned  buffer_chunks,
unsigned  buffered_before_play,
AudioFormat  configured_audio_format,
const ReplayGainConfig replay_gain_config 
)

Member Function Documentation

◆ AppendURI()

unsigned Partition::AppendURI ( const SongLoader loader,
const char *  uri_utf8 
)
inline

Definition at line 75 of file Partition.hxx.

◆ ClearQueue()

void Partition::ClearQueue ( )
inline

Definition at line 71 of file Partition.hxx.

◆ DeleteId()

void Partition::DeleteId ( unsigned  id)
inline

Definition at line 84 of file Partition.hxx.

◆ DeletePosition()

void Partition::DeletePosition ( unsigned  position)
inline

Definition at line 80 of file Partition.hxx.

◆ DeleteRange()

void Partition::DeleteRange ( unsigned  start,
unsigned  end 
)
inline

Deletes a range of songs from the playlist.

Parameters
startthe position of the first song to delete
endthe position after the last song to delete

Definition at line 94 of file Partition.hxx.

◆ EmitGlobalEvent()

void Partition::EmitGlobalEvent ( unsigned  mask)
inline

Definition at line 65 of file Partition.hxx.

◆ EmitIdle()

void Partition::EmitIdle ( unsigned  mask)

◆ GetRandom()

bool Partition::GetRandom ( ) const
inline

Definition at line 168 of file Partition.hxx.

◆ MoveId()

void Partition::MoveId ( unsigned  id,
int  to 
)
inline

Definition at line 110 of file Partition.hxx.

◆ MoveRange()

void Partition::MoveRange ( unsigned  start,
unsigned  end,
int  to 
)
inline

Definition at line 106 of file Partition.hxx.

◆ PlayId()

void Partition::PlayId ( int  id)
inline

Definition at line 140 of file Partition.hxx.

◆ PlayNext()

void Partition::PlayNext ( )
inline

Definition at line 144 of file Partition.hxx.

◆ PlayPosition()

void Partition::PlayPosition ( int  position)
inline

Definition at line 136 of file Partition.hxx.

◆ PlayPrevious()

void Partition::PlayPrevious ( )
inline

Definition at line 148 of file Partition.hxx.

◆ SeekCurrent()

void Partition::SeekCurrent ( SignedSongTime  seek_time,
bool  relative 
)
inline

Definition at line 160 of file Partition.hxx.

◆ SeekSongId()

void Partition::SeekSongId ( unsigned  song_id,
SongTime  seek_time 
)
inline

Definition at line 156 of file Partition.hxx.

◆ SeekSongPosition()

void Partition::SeekSongPosition ( unsigned  song_position,
SongTime  seek_time 
)
inline

Definition at line 152 of file Partition.hxx.

◆ SetConsume()

void Partition::SetConsume ( bool  new_value)
inline

Definition at line 180 of file Partition.hxx.

◆ SetPriorityId()

void Partition::SetPriorityId ( unsigned  song_id,
uint8_t  priority 
)
inline

Definition at line 128 of file Partition.hxx.

◆ SetPriorityRange()

void Partition::SetPriorityRange ( unsigned  start_position,
unsigned  end_position,
uint8_t  priority 
)
inline

Definition at line 122 of file Partition.hxx.

◆ SetRandom()

void Partition::SetRandom ( bool  new_value)
inline

Definition at line 172 of file Partition.hxx.

◆ SetRepeat()

void Partition::SetRepeat ( bool  new_value)
inline

Definition at line 164 of file Partition.hxx.

◆ SetReplayGainMode()

void Partition::SetReplayGainMode ( ReplayGainMode  mode)
inline

Definition at line 184 of file Partition.hxx.

◆ SetSingle()

void Partition::SetSingle ( bool  new_value)
inline

Definition at line 176 of file Partition.hxx.

◆ Shuffle()

void Partition::Shuffle ( unsigned  start,
unsigned  end 
)
inline

Definition at line 102 of file Partition.hxx.

◆ StaleSong()

void Partition::StaleSong ( const char *  uri)
inline

Definition at line 98 of file Partition.hxx.

◆ Stop()

void Partition::Stop ( )
inline

Definition at line 132 of file Partition.hxx.

◆ SwapIds()

void Partition::SwapIds ( unsigned  id1,
unsigned  id2 
)
inline

Definition at line 118 of file Partition.hxx.

◆ SwapPositions()

void Partition::SwapPositions ( unsigned  song1,
unsigned  song2 
)
inline

Definition at line 114 of file Partition.hxx.

◆ SyncWithPlayer()

void Partition::SyncWithPlayer ( )

Synchronize the player with the play queue.

◆ TagModified()

void Partition::TagModified ( )

A tag in the play queue has been modified by the player thread.

Propagate the change to all subsystems.

◆ UpdateEffectiveReplayGainMode()

void Partition::UpdateEffectiveReplayGainMode ( )

Publishes the effective ReplayGainMode to all subsystems.

ReplayGainMode::AUTO is substituted.

Field Documentation

◆ global_events

MaskMonitor Partition::global_events

Definition at line 48 of file Partition.hxx.

◆ instance

Instance& Partition::instance

Definition at line 46 of file Partition.hxx.

◆ outputs

MultipleOutputs Partition::outputs

Definition at line 52 of file Partition.hxx.

◆ pc

PlayerControl Partition::pc

Definition at line 54 of file Partition.hxx.

◆ playlist

struct playlist Partition::playlist

Definition at line 50 of file Partition.hxx.

◆ replay_gain_mode

ReplayGainMode Partition::replay_gain_mode = ReplayGainMode::OFF

Definition at line 56 of file Partition.hxx.

◆ SYNC_WITH_PLAYER

constexpr unsigned Partition::SYNC_WITH_PLAYER = 0x2
static

Definition at line 44 of file Partition.hxx.

◆ TAG_MODIFIED

constexpr unsigned Partition::TAG_MODIFIED = 0x1
static

Definition at line 43 of file Partition.hxx.


The documentation for this struct was generated from the following file: