src/player_control.h File Reference

#include "notify.h"
#include "audio_format.h"
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  player_control

Enumerations

enum  player_state { PLAYER_STATE_STOP = 0, PLAYER_STATE_PAUSE, PLAYER_STATE_PLAY }
enum  player_command {
  PLAYER_COMMAND_NONE = 0, PLAYER_COMMAND_EXIT, PLAYER_COMMAND_STOP, PLAYER_COMMAND_PLAY,
  PLAYER_COMMAND_PAUSE, PLAYER_COMMAND_SEEK, PLAYER_COMMAND_CLOSE_AUDIO, PLAYER_COMMAND_QUEUE,
  PLAYER_COMMAND_CANCEL
}
enum  player_error {
  PLAYER_ERROR_NOERROR = 0, PLAYER_ERROR_FILE, PLAYER_ERROR_AUDIO, PLAYER_ERROR_SYSTEM,
  PLAYER_ERROR_UNKTYPE, PLAYER_ERROR_FILENOTFOUND
}

Functions

void pc_init (unsigned buffer_chunks, unsigned buffered_before_play)
void pc_deinit (void)
void pc_song_deleted (const struct song *song)
 Call this function when the specified song pointer is about to be invalidated.
void playerPlay (struct song *song)
void pc_cancel (void)
 see PLAYER_COMMAND_CANCEL
void playerSetPause (int pause_flag)
void playerPause (void)
void playerKill (void)
int getPlayerTotalTime (void)
int getPlayerElapsedTime (void)
unsigned long getPlayerBitRate (void)
enum player_state getPlayerState (void)
void clearPlayerError (void)
char * getPlayerErrorStr (void)
enum player_error getPlayerError (void)
void playerWait (void)
void queueSong (struct song *song)
bool pc_seek (struct song *song, float seek_time)
 Makes the player thread seek the specified song to a position.
void setPlayerCrossFade (float crossFadeInSeconds)
float getPlayerCrossFade (void)
void setPlayerSoftwareVolume (int volume)
double getPlayerTotalPlayTime (void)
static struct audio_formatplayer_get_audio_format (void)
void playerInit (void)

Variables

struct player_control pc


Enumeration Type Documentation

Enumerator:
PLAYER_COMMAND_NONE 
PLAYER_COMMAND_EXIT 
PLAYER_COMMAND_STOP 
PLAYER_COMMAND_PLAY 
PLAYER_COMMAND_PAUSE 
PLAYER_COMMAND_SEEK 
PLAYER_COMMAND_CLOSE_AUDIO 
PLAYER_COMMAND_QUEUE  player_control.next_song has been updated
PLAYER_COMMAND_CANCEL  cancel pre-decoding player_control.next_song; if the player has already started playing this song, it will completely stop

Definition at line 34 of file player_control.h.

Enumerator:
PLAYER_ERROR_NOERROR 
PLAYER_ERROR_FILE 
PLAYER_ERROR_AUDIO 
PLAYER_ERROR_SYSTEM 
PLAYER_ERROR_UNKTYPE 
PLAYER_ERROR_FILENOTFOUND 

Definition at line 54 of file player_control.h.

Enumerator:
PLAYER_STATE_STOP 
PLAYER_STATE_PAUSE 
PLAYER_STATE_PLAY 

Definition at line 28 of file player_control.h.


Function Documentation

void clearPlayerError ( void   ) 

unsigned long getPlayerBitRate ( void   ) 

float getPlayerCrossFade ( void   ) 

int getPlayerElapsedTime ( void   ) 

enum player_error getPlayerError ( void   ) 

char* getPlayerErrorStr ( void   ) 

enum player_state getPlayerState ( void   ) 

double getPlayerTotalPlayTime ( void   ) 

int getPlayerTotalTime ( void   ) 

void pc_cancel ( void   ) 

see PLAYER_COMMAND_CANCEL

void pc_deinit ( void   ) 

void pc_init ( unsigned  buffer_chunks,
unsigned  buffered_before_play 
)

bool pc_seek ( struct song song,
float  seek_time 
)

Makes the player thread seek the specified song to a position.

Returns:
true on success, false on failure (e.g. if MPD isn't playing currently)

void pc_song_deleted ( const struct song song  ) 

Call this function when the specified song pointer is about to be invalidated.

This makes sure that player_control.errored_song does not point to an invalid pointer.

static struct audio_format* player_get_audio_format ( void   )  [static, read]

Definition at line 153 of file player_control.h.

void playerInit ( void   ) 

void playerKill ( void   ) 

void playerPause ( void   ) 

void playerPlay ( struct song song  ) 

void playerSetPause ( int  pause_flag  ) 

void playerWait ( void   ) 

void queueSong ( struct song song  ) 

void setPlayerCrossFade ( float  crossFadeInSeconds  ) 

void setPlayerSoftwareVolume ( int  volume  ) 


Variable Documentation


Generated on Wed Aug 25 00:21:21 2010 for MPD by  doxygen 1.5.7.1