playback.c File Reference

#include <glib.h>
#include <pthread.h>
#include <libaudcore/audstrings.h>
#include <libaudcore/eventqueue.h>
#include <libaudcore/hook.h>
#include "config.h"
#include "i18n.h"
#include "interface.h"
#include "misc.h"
#include "output.h"
#include "playback.h"
#include "playlist.h"

Go to the source code of this file.

Functions

static void playback_start (gint playlist, gint entry, gint seek_time, gboolean pause)
static void read_gain_from_tuple (const Tuple *tuple)
static gboolean update_from_playlist (void)
gboolean playback_get_ready (void)
static void set_pb_ready (InputPlayback *p)
static void wait_until_ready (void)
static void update_cb (void *hook_data, void *user_data)
gint playback_get_time (void)
void playback_play (gint seek_time, gboolean pause)
void playback_pause (void)
static void playback_cleanup (void)
static void complete_stop (void)
void playback_stop (void)
static gboolean end_cb (void *unused)
static void * playback_thread (void *unused)
gboolean playback_get_playing (void)
gboolean playback_get_paused (void)
void playback_seek (gint time)
static void set_data (InputPlayback *p, void *data)
static void * get_data (InputPlayback *p)
static void set_params (InputPlayback *p, gint bitrate, gint samplerate, gint channels)
static void set_tuple (InputPlayback *p, Tuple *tuple)
static void set_gain_from_playlist (InputPlayback *p)
gchar * playback_get_title (void)
gint playback_get_length (void)
void playback_get_info (gint *bitrate, gint *samplerate, gint *channels)
void playback_get_volume (gint *l, gint *r)
void playback_set_volume (gint l, gint r)

Variables

static InputPlayback playback_api
static gboolean playing = FALSE
static gboolean playback_error
static gint failed_entries
static gchar * current_filename
static gint current_entry
static gchar * current_title
static gint current_length
static InputPlugin * current_decoder
static void * current_data
static gint current_bitrate
static gint current_samplerate
static gint current_channels
static ReplayGainInfo gain_from_playlist
static gint time_offset
static gint initial_seek
static gboolean paused
static pthread_t playback_thread_handle
static gint end_source = 0
static pthread_mutex_t ready_mutex = PTHREAD_MUTEX_INITIALIZER
static pthread_cond_t ready_cond = PTHREAD_COND_INITIALIZER
static gboolean ready_flag

Function Documentation

static void complete_stop ( void   )  [static]

Definition at line 243 of file playback.c.

Referenced by end_cb(), and playback_stop().

static gboolean end_cb ( void *  unused  )  [static]

Definition at line 262 of file playback.c.

Referenced by playback_thread().

static void* get_data ( InputPlayback *  p  )  [static]

Definition at line 397 of file playback.c.

static void playback_cleanup ( void   )  [static]

Definition at line 219 of file playback.c.

Referenced by end_cb(), and playback_stop().

void playback_get_info ( gint bitrate,
gint samplerate,
gint channels 
)

Definition at line 475 of file playback.c.

Referenced by drct_get_info(), and get_status_cb().

gint playback_get_length ( void   ) 

Definition at line 467 of file playback.c.

Referenced by drct_get_length(), and get_status_cb().

gboolean playback_get_paused ( void   ) 
gboolean playback_get_playing ( void   ) 
gboolean playback_get_ready ( void   ) 
gint playback_get_time ( void   ) 

Definition at line 159 of file playback.c.

Referenced by drct_get_time(), effect_enable(), get_status_cb(), and playlist_save_state().

gchar* playback_get_title ( void   ) 

Definition at line 439 of file playback.c.

Referenced by drct_get_title().

void playback_get_volume ( gint l,
gint r 
)

Definition at line 485 of file playback.c.

Referenced by drct_get_volume(), and sw_volume_toggled().

void playback_pause ( void   ) 

Definition at line 202 of file playback.c.

Referenced by do_commands(), drct_pause(), drct_play(), pause_cb(), and play_pause_cb().

void playback_play ( gint  seek_time,
gboolean  pause 
)
void playback_seek ( gint  time  ) 

Definition at line 377 of file playback.c.

Referenced by drct_play(), drct_seek(), and seek_cb().

void playback_set_volume ( gint  l,
gint  r 
)

Definition at line 494 of file playback.c.

Referenced by drct_set_volume().

static void playback_start ( gint  playlist,
gint  entry,
gint  seek_time,
gboolean  pause 
) [static]

Definition at line 342 of file playback.c.

Referenced by end_cb(), and playback_play().

void playback_stop ( void   ) 
static void* playback_thread ( void *  unused  )  [static]

Definition at line 299 of file playback.c.

Referenced by playback_start().

static void read_gain_from_tuple ( const Tuple tuple  )  [static]

Definition at line 68 of file playback.c.

Referenced by playback_thread(), and set_tuple().

static void set_data ( InputPlayback *  p,
void *  data 
) [static]

Definition at line 391 of file playback.c.

static void set_gain_from_playlist ( InputPlayback *  p  )  [static]

Definition at line 423 of file playback.c.

static void set_params ( InputPlayback *  p,
gint  bitrate,
gint  samplerate,
gint  channels 
) [static]

Definition at line 403 of file playback.c.

static void set_pb_ready ( InputPlayback *  p  )  [static]

Definition at line 123 of file playback.c.

Referenced by playback_thread().

static void set_tuple ( InputPlayback *  p,
Tuple tuple 
) [static]

Definition at line 416 of file playback.c.

static void update_cb ( void *  hook_data,
void *  user_data 
) [static]

Definition at line 148 of file playback.c.

Referenced by playback_cleanup(), and playback_start().

static gboolean update_from_playlist ( void   )  [static]

Definition at line 95 of file playback.c.

Referenced by set_pb_ready(), and update_cb().

static void wait_until_ready ( void   )  [static]

Variable Documentation

Definition at line 53 of file playback.c.

Referenced by playback_get_info(), playback_thread(), and set_params().

Definition at line 53 of file playback.c.

Referenced by playback_get_info(), playback_thread(), and set_params().

void* current_data [static]

Definition at line 52 of file playback.c.

Referenced by get_data(), playback_thread(), and set_data().

InputPlugin* current_decoder [static]
gint current_entry [static]

Definition at line 47 of file playback.c.

Referenced by playback_start(), and update_from_playlist().

gchar* current_filename [static]

Definition at line 45 of file playback.c.

Referenced by playback_cleanup(), playback_start(), and playback_thread().

gint current_length [static]

Definition at line 53 of file playback.c.

Referenced by playback_get_info(), playback_thread(), and set_params().

gchar* current_title [static]
gint end_source = 0 [static]

Definition at line 61 of file playback.c.

Referenced by playback_cleanup(), and playback_thread().

gint failed_entries [static]

Definition at line 43 of file playback.c.

Referenced by end_cb(), and playback_play().

Definition at line 55 of file playback.c.

gint initial_seek [static]

Definition at line 57 of file playback.c.

Referenced by playback_start(), and playback_thread().

gboolean paused [static]

Definition at line 58 of file playback.c.

Referenced by playback_get_paused(), playback_pause(), playback_start(), and playback_thread().

static InputPlayback playback_api [static]
Initial value:
 {
    .output = & output_api,
    .set_data = set_data,
    .get_data = get_data,
    .set_pb_ready = set_pb_ready,
    .set_params = set_params,
    .set_tuple = set_tuple,
    .set_gain_from_playlist = set_gain_from_playlist,
}

Definition at line 39 of file playback.c.

Referenced by playback_get_time(), playback_pause(), playback_seek(), playback_stop(), and playback_thread().

Definition at line 42 of file playback.c.

Referenced by end_cb(), playback_start(), and playback_thread().

pthread_t playback_thread_handle [static]

Definition at line 60 of file playback.c.

Referenced by playback_cleanup(), and playback_start().

gboolean playing = FALSE [static]
pthread_cond_t ready_cond = PTHREAD_COND_INITIALIZER [static]

Definition at line 64 of file playback.c.

Referenced by set_pb_ready(), and wait_until_ready().

gboolean ready_flag [static]
pthread_mutex_t ready_mutex = PTHREAD_MUTEX_INITIALIZER [static]

Definition at line 63 of file playback.c.

Referenced by playback_get_ready(), set_pb_ready(), and wait_until_ready().

gint time_offset [static]

Definition at line 57 of file playback.c.

Referenced by playback_get_time(), playback_seek(), and playback_thread().


Generated on 26 Jan 2012 for Audacious by  doxygen 1.6.1