Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
Functions | Variables
playback.c File Reference
#include <glib.h>
#include <pthread.h>
#include <libaudcore/audstrings.h>
#include <libaudcore/eventqueue.h>
#include <libaudcore/hook.h>
#include "audconfig.h"
#include "config.h"
#include "i18n.h"
#include "interface.h"
#include "output.h"
#include "playback.h"
#include "playlist.h"

Go to the source code of this file.

Functions

static gboolean playback_start (gint playlist, gint entry, gint seek_time, gboolean pause)
static void cancel_set_tuple (void)
static void read_gain_from_tuple (const Tuple *tuple)
static gboolean ready_cb (void *unused)
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 gboolean set_tuple_cb (void *unused)
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 gint current_entry
static gchar * current_filename
static InputPlugin * current_decoder
static void * current_data
static gint current_bitrate
static gint current_samplerate
static gint current_channels
static gchar * current_title
static gint current_length
static ReplayGainInfo gain_from_playlist
static gint time_offset
static gint start_time
static gint stop_time
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
static gint ready_source = 0
static gint set_tuple_source = 0
static Tupletuple_to_be_set = NULL

Function Documentation

static void cancel_set_tuple ( void  ) [static]

Definition at line 70 of file playback.c.

Referenced by playback_cleanup(), and set_tuple().

static void complete_stop ( void  ) [static]

Definition at line 273 of file playback.c.

Referenced by playback_stop(), and end_cb().

static gboolean end_cb ( void *  unused) [static]

Definition at line 301 of file playback.c.

Referenced by playback_thread().

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

Definition at line 464 of file playback.c.

static void playback_cleanup ( void  ) [static]

Definition at line 250 of file playback.c.

Referenced by playback_stop(), and end_cb().

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

Definition at line 562 of file playback.c.

Referenced by get_status_cb(), and drct_get_info().

gint playback_get_length ( void  )

Definition at line 556 of file playback.c.

Referenced by get_status_cb(), drct_get_length(), and playback_seek().

gboolean playback_get_paused ( void  )
gboolean playback_get_playing ( void  )
gboolean playback_get_ready ( void  )

Definition at line 125 of file playback.c.

Referenced by drct_get_ready(), update_cb(), playback_get_time(), and playback_get_title().

gint playback_get_time ( void  )

Definition at line 189 of file playback.c.

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

gchar* playback_get_title ( void  )

Definition at line 526 of file playback.c.

Referenced by drct_get_title().

void playback_get_volume ( gint l,
gint r 
)

Definition at line 570 of file playback.c.

Referenced by drct_get_volume(), and sw_volume_toggled().

void playback_pause ( void  )

Definition at line 234 of file playback.c.

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

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

Definition at line 444 of file playback.c.

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

void playback_set_volume ( gint  l,
gint  r 
)

Definition at line 579 of file playback.c.

Referenced by drct_set_volume().

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

Definition at line 366 of file playback.c.

Referenced by playback_play(), and end_cb().

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

Definition at line 347 of file playback.c.

Referenced by playback_start().

static void read_gain_from_tuple ( const Tuple tuple) [static]

Definition at line 86 of file playback.c.

Referenced by playback_start(), and set_tuple().

static gboolean ready_cb ( void *  unused) [static]

Definition at line 115 of file playback.c.

Referenced by set_pb_ready().

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

Definition at line 458 of file playback.c.

static void set_gain_from_playlist ( InputPlayback *  p) [static]

Definition at line 510 of file playback.c.

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

Definition at line 470 of file playback.c.

static void set_pb_ready ( InputPlayback *  p) [static]

Definition at line 134 of file playback.c.

Referenced by playback_thread().

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

Definition at line 497 of file playback.c.

static gboolean set_tuple_cb ( void *  unused) [static]

Definition at line 482 of file playback.c.

Referenced by set_tuple().

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

Definition at line 157 of file playback.c.

Referenced by playback_cleanup(), and playback_start().

static void wait_until_ready ( void  ) [static]

Definition at line 146 of file playback.c.

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


Variable Documentation

Definition at line 50 of file playback.c.

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

Definition at line 50 of file playback.c.

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

void* current_data [static]

Definition at line 49 of file playback.c.

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

InputPlugin* current_decoder [static]
gint current_entry [static]

Definition at line 46 of file playback.c.

Referenced by update_cb(), and playback_start().

gchar* current_filename [static]

Definition at line 47 of file playback.c.

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

gint current_length [static]

Definition at line 50 of file playback.c.

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

gchar* current_title [static]

Definition at line 51 of file playback.c.

Referenced by update_cb(), playback_cleanup(), playback_start(), and playback_get_title().

gint end_source = 0 [static]

Definition at line 60 of file playback.c.

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

gint failed_entries [static]

Definition at line 44 of file playback.c.

Referenced by playback_play(), and end_cb().

Definition at line 54 of file playback.c.

gboolean paused [static]

Definition at line 57 of file playback.c.

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 40 of file playback.c.

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

Definition at line 43 of file playback.c.

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

pthread_t playback_thread_handle [static]

Definition at line 59 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 63 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]
gint ready_source = 0 [static]

Definition at line 65 of file playback.c.

Referenced by ready_cb(), set_pb_ready(), and playback_cleanup().

gint set_tuple_source = 0 [static]

Definition at line 67 of file playback.c.

Referenced by cancel_set_tuple(), set_tuple_cb(), and set_tuple().

Definition at line 56 of file playback.c.

Referenced by playback_thread(), and playback_start().

Definition at line 56 of file playback.c.

Referenced by playback_thread(), and playback_start().

gint time_offset [static]

Definition at line 56 of file playback.c.

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

Tuple* tuple_to_be_set = NULL [static]

Definition at line 68 of file playback.c.