#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <glib.h>
#include <libaudcore/audstrings.h>
#include <libaudcore/hook.h>
#include <libaudcore/tuple.h>
#include "config.h"
#include "i18n.h"
#include "misc.h"
#include "playback.h"
#include "playlist.h"
#include "plugins.h"
#include "util.h"
Go to the source code of this file.
Classes | |
struct | Update |
struct | Entry |
struct | Playlist |
struct | ScanItem |
Defines | |
#define | SCAN_THREADS 2 |
#define | STATE_FILE "playlist-state" |
#define | ENTER pthread_mutex_lock (& mutex) |
#define | LEAVE pthread_mutex_unlock (& mutex) |
#define | LEAVE_RET_VOID |
#define | LEAVE_RET(ret) |
#define | DECLARE_PLAYLIST Playlist * playlist |
#define | DECLARE_PLAYLIST_ENTRY |
#define | LOOKUP_PLAYLIST |
#define | LOOKUP_PLAYLIST_RET(ret) |
#define | LOOKUP_PLAYLIST_ENTRY |
#define | LOOKUP_PLAYLIST_ENTRY_RET(ret) |
#define | SELECTION_HAS_CHANGED(p, a, c) queue_update (PLAYLIST_UPDATE_SELECTION, p, a, c) |
#define | METADATA_HAS_CHANGED(p, a, c) queue_update (PLAYLIST_UPDATE_METADATA, p, a, c) |
#define | PLAYLIST_HAS_CHANGED(p, a, c) queue_update (PLAYLIST_UPDATE_STRUCTURE, p, a, c) |
Enumerations | |
enum | { RESUME_STOP, RESUME_PLAY, RESUME_PAUSE } |
Functions | |
static void * | scanner (void *unused) |
static void | scan_trigger (void) |
static char * | title_from_tuple (Tuple *tuple) |
static void | entry_set_tuple_real (Entry *entry, Tuple *tuple) |
static void | entry_set_tuple (Playlist *playlist, Entry *entry, Tuple *tuple) |
static void | entry_set_failed (Playlist *playlist, Entry *entry) |
static void | entry_cancel_scan (Entry *entry) |
static Entry * | entry_new (char *filename, Tuple *tuple, PluginHandle *decoder) |
static void | entry_free (Entry *entry) |
static int | new_unique_id (int preferred) |
static Playlist * | playlist_new (int id) |
static void | playlist_free (Playlist *playlist) |
static void | number_playlists (int at, int length) |
static Playlist * | lookup_playlist (int playlist_num) |
static void | number_entries (Playlist *playlist, int at, int length) |
static Entry * | lookup_entry (Playlist *playlist, int entry_num) |
static bool_t | update (void *unused) |
static void | queue_update (int level, int list, int at, int count) |
bool_t | playlist_update_pending (void) |
int | playlist_updated_range (int playlist_num, int *at, int *count) |
bool_t | playlist_scan_in_progress (int playlist_num) |
static bool_t | entry_scan_is_queued (Entry *entry) |
static void | entry_queue_scan (Playlist *playlist, Entry *entry) |
static void | check_scan_complete (Playlist *p) |
static ScanItem * | entry_find_to_scan (void) |
static Entry * | get_entry (int playlist_num, int entry_num, bool_t need_decoder, bool_t need_tuple) |
static Entry * | get_playback_entry (bool_t need_decoder, bool_t need_tuple) |
void | playlist_init (void) |
void | playlist_end (void) |
int | playlist_count (void) |
void | playlist_insert_with_id (int at, int id) |
void | playlist_insert (int at) |
void | playlist_reorder (int from, int to, int count) |
void | playlist_delete (int playlist_num) |
int | playlist_get_unique_id (int playlist_num) |
int | playlist_by_unique_id (int id) |
void | playlist_set_filename (int playlist_num, const char *filename) |
char * | playlist_get_filename (int playlist_num) |
void | playlist_set_title (int playlist_num, const char *title) |
char * | playlist_get_title (int playlist_num) |
void | playlist_set_modified (int playlist_num, bool_t modified) |
bool_t | playlist_get_modified (int playlist_num) |
void | playlist_set_active (int playlist_num) |
int | playlist_get_active (void) |
void | playlist_set_playing (int playlist_num) |
int | playlist_get_playing (void) |
int | playlist_get_blank (void) |
int | playlist_get_temporary (void) |
static void | set_position (Playlist *playlist, Entry *entry) |
int | playlist_entry_count (int playlist_num) |
void | playlist_entry_insert_batch_raw (int playlist_num, int at, Index *filenames, Index *tuples, Index *decoders) |
void | playlist_entry_delete (int playlist_num, int at, int number) |
char * | playlist_entry_get_filename (int playlist_num, int entry_num) |
PluginHandle * | playlist_entry_get_decoder (int playlist_num, int entry_num, bool_t fast) |
Tuple * | playlist_entry_get_tuple (int playlist_num, int entry_num, bool_t fast) |
char * | playlist_entry_get_title (int playlist_num, int entry_num, bool_t fast) |
void | playlist_entry_describe (int playlist_num, int entry_num, char **title, char **artist, char **album, bool_t fast) |
int | playlist_entry_get_length (int playlist_num, int entry_num, bool_t fast) |
void | playlist_set_position (int playlist_num, int entry_num) |
int | playlist_get_position (int playlist_num) |
void | playlist_entry_set_selected (int playlist_num, int entry_num, bool_t selected) |
bool_t | playlist_entry_get_selected (int playlist_num, int entry_num) |
int | playlist_selected_count (int playlist_num) |
void | playlist_select_all (int playlist_num, bool_t selected) |
int | playlist_shift (int playlist_num, int entry_num, int distance) |
void | playlist_delete_selected (int playlist_num) |
void | playlist_reverse (int playlist_num) |
void | playlist_randomize (int playlist_num) |
static int | filename_compare (const void *_a, const void *_b, void *compare) |
static int | tuple_compare (const void *_a, const void *_b, void *compare) |
static int | title_compare (const void *_a, const void *_b, void *compare) |
static void | sort (Playlist *playlist, int(*compare)(const void *a, const void *b, void *inner), void *inner) |
static void | sort_selected (Playlist *playlist, int(*compare)(const void *a, const void *b, void *inner), void *inner) |
static bool_t | entries_are_scanned (Playlist *playlist, bool_t selected) |
void | playlist_sort_by_filename (int playlist_num, int(*compare)(const char *a, const char *b)) |
void | playlist_sort_by_tuple (int playlist_num, int(*compare)(const Tuple *a, const Tuple *b)) |
void | playlist_sort_by_title (int playlist_num, int(*compare)(const char *a, const char *b)) |
void | playlist_sort_selected_by_filename (int playlist_num, int(*compare)(const char *a, const char *b)) |
void | playlist_sort_selected_by_tuple (int playlist_num, int(*compare)(const Tuple *a, const Tuple *b)) |
void | playlist_sort_selected_by_title (int playlist_num, int(*compare)(const char *a, const char *b)) |
void | playlist_reformat_titles (void) |
void | playlist_trigger_scan (void) |
static void | playlist_rescan_real (int playlist_num, bool_t selected) |
void | playlist_rescan (int playlist_num) |
void | playlist_rescan_selected (int playlist_num) |
void | playlist_rescan_file (const char *filename) |
int64_t | playlist_get_total_length (int playlist_num) |
int64_t | playlist_get_selected_length (int playlist_num) |
int | playlist_queue_count (int playlist_num) |
void | playlist_queue_insert (int playlist_num, int at, int entry_num) |
void | playlist_queue_insert_selected (int playlist_num, int at) |
int | playlist_queue_get_entry (int playlist_num, int at) |
int | playlist_queue_find_entry (int playlist_num, int entry_num) |
void | playlist_queue_delete (int playlist_num, int at, int number) |
void | playlist_queue_delete_selected (int playlist_num) |
static bool_t | shuffle_prev (Playlist *playlist) |
bool_t | playlist_prev_song (int playlist_num) |
static bool_t | shuffle_next (Playlist *playlist) |
static void | shuffle_reset (Playlist *playlist) |
bool_t | playlist_next_song (int playlist_num, bool_t repeat) |
int | playback_entry_get_position (void) |
PluginHandle * | playback_entry_get_decoder (void) |
Tuple * | playback_entry_get_tuple (void) |
char * | playback_entry_get_title (void) |
int | playback_entry_get_length (void) |
void | playback_entry_set_tuple (Tuple *tuple) |
int | playback_entry_get_start_time (void) |
int | playback_entry_get_end_time (void) |
void | playlist_save_state (void) |
static void | parse_next (FILE *handle) |
static bool_t | parse_integer (const char *key, int *value) |
static char * | parse_string (const char *key) |
void | playlist_load_state (void) |
void | playlist_resume (void) |
Variables | |
static const char *const | default_title = N_("New Playlist") |
static const char *const | temp_title = N_("Now Playing") |
static pthread_mutex_t | mutex = PTHREAD_MUTEX_INITIALIZER |
static pthread_cond_t | cond = PTHREAD_COND_INITIALIZER |
static GHashTable * | unique_id_table = NULL |
static int | next_unique_id = 1000 |
static Index * | playlists = NULL |
static Playlist * | active_playlist = NULL |
static Playlist * | playing_playlist = NULL |
static int | update_source = 0 |
static int | update_level |
static int | resume_state |
static int | resume_time |
static pthread_t | scan_threads [SCAN_THREADS] |
static bool_t | scan_quit |
static int | scan_playlist |
static int | scan_row |
static GQueue | scan_queue = G_QUEUE_INIT |
static ScanItem * | scan_items [SCAN_THREADS] |
static char * | title_format |
static char | parse_key [512] |
static char * | parse_value |
Definition at line 60 of file playlist-new.c.
Referenced by playlist_delete(), playlist_delete_selected(), playlist_entry_count(), playlist_entry_delete(), playlist_entry_insert_batch_raw(), playlist_get_filename(), playlist_get_modified(), playlist_get_position(), playlist_get_selected_length(), playlist_get_title(), playlist_get_total_length(), playlist_get_unique_id(), playlist_next_song(), playlist_prev_song(), playlist_queue_count(), playlist_queue_delete(), playlist_queue_delete_selected(), playlist_queue_get_entry(), playlist_queue_insert_selected(), playlist_randomize(), playlist_rescan_real(), playlist_reverse(), playlist_scan_in_progress(), playlist_select_all(), playlist_selected_count(), playlist_set_active(), playlist_set_filename(), playlist_set_modified(), playlist_set_playing(), playlist_set_title(), playlist_sort_by_filename(), playlist_sort_by_title(), playlist_sort_by_tuple(), playlist_sort_selected_by_filename(), playlist_sort_selected_by_title(), playlist_sort_selected_by_tuple(), and playlist_updated_range().
#define DECLARE_PLAYLIST_ENTRY |
Definition at line 63 of file playlist-new.c.
Referenced by playlist_entry_get_filename(), playlist_entry_get_selected(), playlist_entry_set_selected(), playlist_queue_find_entry(), playlist_queue_insert(), playlist_set_position(), and playlist_shift().
#define ENTER pthread_mutex_lock (& mutex) |
Definition at line 47 of file playlist-new.c.
Referenced by playback_entry_get_decoder(), playback_entry_get_end_time(), playback_entry_get_length(), playback_entry_get_position(), playback_entry_get_start_time(), playback_entry_get_title(), playback_entry_get_tuple(), playback_entry_set_tuple(), playlist_by_unique_id(), playlist_count(), playlist_delete(), playlist_delete_selected(), playlist_end(), playlist_entry_count(), playlist_entry_delete(), playlist_entry_describe(), playlist_entry_get_decoder(), playlist_entry_get_filename(), playlist_entry_get_length(), playlist_entry_get_selected(), playlist_entry_get_title(), playlist_entry_get_tuple(), playlist_entry_insert_batch_raw(), playlist_entry_set_selected(), playlist_get_active(), playlist_get_filename(), playlist_get_modified(), playlist_get_playing(), playlist_get_position(), playlist_get_selected_length(), playlist_get_title(), playlist_get_total_length(), playlist_get_unique_id(), playlist_init(), playlist_insert_with_id(), playlist_load_state(), playlist_next_song(), playlist_prev_song(), playlist_queue_count(), playlist_queue_delete(), playlist_queue_delete_selected(), playlist_queue_find_entry(), playlist_queue_get_entry(), playlist_queue_insert(), playlist_queue_insert_selected(), playlist_randomize(), playlist_reformat_titles(), playlist_reorder(), playlist_rescan_file(), playlist_rescan_real(), playlist_reverse(), playlist_save_state(), playlist_scan_in_progress(), playlist_select_all(), playlist_selected_count(), playlist_set_active(), playlist_set_filename(), playlist_set_modified(), playlist_set_playing(), playlist_set_position(), playlist_set_title(), playlist_shift(), playlist_sort_by_filename(), playlist_sort_by_title(), playlist_sort_by_tuple(), playlist_sort_selected_by_filename(), playlist_sort_selected_by_title(), playlist_sort_selected_by_tuple(), playlist_trigger_scan(), playlist_update_pending(), playlist_updated_range(), scanner(), and update().
#define LEAVE pthread_mutex_unlock (& mutex) |
Definition at line 48 of file playlist-new.c.
Referenced by playback_entry_set_tuple(), playlist_delete(), playlist_delete_selected(), playlist_end(), playlist_entry_delete(), playlist_entry_describe(), playlist_entry_insert_batch_raw(), playlist_entry_set_selected(), playlist_init(), playlist_insert_with_id(), playlist_load_state(), playlist_next_song(), playlist_prev_song(), playlist_queue_delete(), playlist_queue_delete_selected(), playlist_queue_insert(), playlist_queue_insert_selected(), playlist_randomize(), playlist_reformat_titles(), playlist_reorder(), playlist_rescan_file(), playlist_rescan_real(), playlist_reverse(), playlist_save_state(), playlist_select_all(), playlist_set_active(), playlist_set_filename(), playlist_set_modified(), playlist_set_playing(), playlist_set_position(), playlist_set_title(), playlist_sort_by_filename(), playlist_sort_by_title(), playlist_sort_by_tuple(), playlist_sort_selected_by_filename(), playlist_sort_selected_by_title(), playlist_sort_selected_by_tuple(), playlist_trigger_scan(), scanner(), and update().
#define LEAVE_RET | ( | ret | ) |
do { \ pthread_mutex_unlock (& mutex); \ return ret; \ } while (0)
Definition at line 55 of file playlist-new.c.
Referenced by playback_entry_get_decoder(), playback_entry_get_end_time(), playback_entry_get_length(), playback_entry_get_position(), playback_entry_get_start_time(), playback_entry_get_title(), playback_entry_get_tuple(), playlist_by_unique_id(), playlist_count(), playlist_entry_count(), playlist_entry_get_decoder(), playlist_entry_get_filename(), playlist_entry_get_length(), playlist_entry_get_selected(), playlist_entry_get_title(), playlist_entry_get_tuple(), playlist_get_active(), playlist_get_filename(), playlist_get_modified(), playlist_get_playing(), playlist_get_position(), playlist_get_selected_length(), playlist_get_title(), playlist_get_total_length(), playlist_get_unique_id(), playlist_next_song(), playlist_prev_song(), playlist_queue_count(), playlist_queue_find_entry(), playlist_queue_get_entry(), playlist_scan_in_progress(), playlist_selected_count(), playlist_shift(), playlist_update_pending(), playlist_updated_range(), and scanner().
#define LEAVE_RET_VOID |
do { \ pthread_mutex_unlock (& mutex); \ return; \ } while (0)
Definition at line 50 of file playlist-new.c.
Referenced by playback_entry_set_tuple(), playlist_delete_selected(), playlist_entry_set_selected(), playlist_load_state(), playlist_queue_insert(), playlist_reorder(), and playlist_save_state().
#define LOOKUP_PLAYLIST |
do { \ if (! (playlist = lookup_playlist (playlist_num))) \ LEAVE_RET_VOID; \ } while (0)
Definition at line 67 of file playlist-new.c.
Referenced by playlist_delete(), playlist_delete_selected(), playlist_entry_delete(), playlist_entry_insert_batch_raw(), playlist_queue_delete(), playlist_queue_delete_selected(), playlist_queue_insert_selected(), playlist_randomize(), playlist_rescan_real(), playlist_reverse(), playlist_select_all(), playlist_set_active(), playlist_set_filename(), playlist_set_modified(), playlist_set_playing(), playlist_set_position(), playlist_set_title(), playlist_sort_by_filename(), playlist_sort_by_title(), playlist_sort_by_tuple(), playlist_sort_selected_by_filename(), playlist_sort_selected_by_title(), and playlist_sort_selected_by_tuple().
#define LOOKUP_PLAYLIST_ENTRY |
do { \ LOOKUP_PLAYLIST; \ if (! (entry = lookup_entry (playlist, entry_num))) \ LEAVE_RET_VOID; \ } while (0)
Definition at line 77 of file playlist-new.c.
Referenced by playlist_entry_set_selected(), playlist_queue_insert(), and playlist_set_position().
#define LOOKUP_PLAYLIST_ENTRY_RET | ( | ret | ) |
do { \ LOOKUP_PLAYLIST_RET(ret); \ if (! (entry = lookup_entry (playlist, entry_num))) \ LEAVE_RET(ret); \ } while (0)
Definition at line 83 of file playlist-new.c.
Referenced by playlist_entry_get_filename(), playlist_entry_get_selected(), playlist_queue_find_entry(), and playlist_shift().
#define LOOKUP_PLAYLIST_RET | ( | ret | ) |
do { \ if (! (playlist = lookup_playlist (playlist_num))) \ LEAVE_RET(ret); \ } while (0)
Definition at line 72 of file playlist-new.c.
Referenced by playlist_entry_count(), playlist_get_filename(), playlist_get_modified(), playlist_get_position(), playlist_get_selected_length(), playlist_get_title(), playlist_get_total_length(), playlist_get_unique_id(), playlist_next_song(), playlist_prev_song(), playlist_queue_count(), playlist_queue_get_entry(), playlist_scan_in_progress(), playlist_selected_count(), and playlist_updated_range().
Definition at line 92 of file playlist-new.c.
Referenced by playback_entry_set_tuple(), playlist_reformat_titles(), playlist_rescan_file(), playlist_rescan_real(), playlist_set_filename(), and playlist_set_title().
Definition at line 95 of file playlist-new.c.
Referenced by playlist_delete(), playlist_delete_selected(), playlist_entry_delete(), playlist_entry_insert_batch_raw(), playlist_insert_with_id(), playlist_randomize(), playlist_reorder(), playlist_reverse(), playlist_shift(), sort(), and sort_selected().
#define SCAN_THREADS 2 |
Definition at line 44 of file playlist-new.c.
Referenced by check_scan_complete(), entry_cancel_scan(), entry_scan_is_queued(), playlist_end(), and playlist_init().
Definition at line 89 of file playlist-new.c.
Referenced by playlist_entry_set_selected(), playlist_queue_delete(), playlist_queue_delete_selected(), playlist_queue_insert(), playlist_queue_insert_selected(), and playlist_select_all().
#define STATE_FILE "playlist-state" |
Definition at line 45 of file playlist-new.c.
Referenced by playlist_load_state(), and playlist_save_state().
anonymous enum |
Definition at line 42 of file playlist-new.c.
static void check_scan_complete | ( | Playlist * | p | ) | [static] |
Definition at line 529 of file playlist-new.c.
Referenced by entry_find_to_scan(), and scanner().
Definition at line 1619 of file playlist-new.c.
Referenced by playlist_sort_by_title(), playlist_sort_by_tuple(), playlist_sort_selected_by_title(), and playlist_sort_selected_by_tuple().
static void entry_cancel_scan | ( | Entry * | entry | ) | [static] |
Definition at line 251 of file playlist-new.c.
Referenced by entry_free(), and playback_entry_set_tuple().
static ScanItem* entry_find_to_scan | ( | void | ) | [static] |
Definition at line 553 of file playlist-new.c.
Referenced by scanner().
static void entry_free | ( | Entry * | entry | ) | [static] |
Definition at line 301 of file playlist-new.c.
Referenced by playlist_delete_selected(), playlist_entry_delete(), and playlist_free().
static Entry* entry_new | ( | char * | filename, | |
Tuple * | tuple, | |||
PluginHandle * | decoder | |||
) | [static] |
Definition at line 276 of file playlist-new.c.
Referenced by playlist_entry_insert_batch_raw().
Definition at line 516 of file playlist-new.c.
Referenced by get_entry(), and get_playback_entry().
Definition at line 498 of file playlist-new.c.
Referenced by entry_find_to_scan(), and entry_queue_scan().
Definition at line 245 of file playlist-new.c.
Referenced by scanner().
Definition at line 226 of file playlist-new.c.
Referenced by entry_set_failed(), playback_entry_set_tuple(), playlist_rescan_file(), playlist_rescan_real(), and scanner().
static void entry_set_tuple_real | ( | Entry * | entry, | |
Tuple * | tuple | |||
) | [static] |
Definition at line 173 of file playlist-new.c.
Referenced by entry_new(), and entry_set_tuple().
static int filename_compare | ( | const void * | _a, | |
const void * | _b, | |||
void * | compare | |||
) | [static] |
Definition at line 1531 of file playlist-new.c.
Referenced by playlist_sort_by_filename(), and playlist_sort_selected_by_filename().
static Entry* get_entry | ( | int | playlist_num, | |
int | entry_num, | |||
bool_t | need_decoder, | |||
bool_t | need_tuple | |||
) | [static] |
Definition at line 664 of file playlist-new.c.
Referenced by playlist_entry_describe(), playlist_entry_get_decoder(), playlist_entry_get_length(), playlist_entry_get_title(), and playlist_entry_get_tuple().
Definition at line 687 of file playlist-new.c.
Referenced by playback_entry_get_decoder(), playback_entry_get_length(), playback_entry_get_position(), playback_entry_get_title(), and playback_entry_get_tuple().
Definition at line 394 of file playlist-new.c.
Referenced by get_entry().
Definition at line 379 of file playlist-new.c.
Referenced by get_entry(), playlist_load_state(), and queue_update().
Definition at line 316 of file playlist-new.c.
Referenced by playlist_new().
Definition at line 385 of file playlist-new.c.
Referenced by playlist_delete_selected(), playlist_entry_delete(), playlist_entry_insert_batch_raw(), playlist_randomize(), playlist_reverse(), playlist_shift(), sort(), and sort_selected().
Definition at line 370 of file playlist-new.c.
Referenced by playlist_delete(), playlist_insert_with_id(), and playlist_reorder().
Definition at line 2314 of file playlist-new.c.
Referenced by playlist_load_state().
static void parse_next | ( | FILE * | handle | ) | [static] |
Definition at line 2295 of file playlist-new.c.
Referenced by playlist_load_state().
static char* parse_string | ( | const char * | key | ) | [static] |
Definition at line 2320 of file playlist-new.c.
Referenced by playlist_load_state().
PluginHandle* playback_entry_get_decoder | ( | void | ) |
Definition at line 2176 of file playlist-new.c.
Referenced by playback_thread().
int playback_entry_get_end_time | ( | void | ) |
Definition at line 2244 of file playlist-new.c.
Referenced by playback_thread().
int playback_entry_get_length | ( | void | ) |
Definition at line 2210 of file playlist-new.c.
Referenced by playback_thread(), and update_from_playlist().
int playback_entry_get_position | ( | void | ) |
Definition at line 2166 of file playlist-new.c.
Referenced by update_from_playlist().
int playback_entry_get_start_time | ( | void | ) |
Definition at line 2234 of file playlist-new.c.
Referenced by playback_thread().
char* playback_entry_get_title | ( | void | ) |
Definition at line 2199 of file playlist-new.c.
Referenced by update_from_playlist().
Tuple* playback_entry_get_tuple | ( | void | ) |
Definition at line 2186 of file playlist-new.c.
Referenced by playback_thread().
void playback_entry_set_tuple | ( | Tuple * | tuple | ) |
Definition at line 2220 of file playlist-new.c.
Referenced by set_tuple().
Definition at line 861 of file playlist-new.c.
Referenced by add_finish().
int playlist_count | ( | void | ) |
Definition at line 764 of file playlist-new.c.
Referenced by load_playlists_real(), playlist_get_blank(), playlist_get_temporary(), and save_playlists_real().
void playlist_delete | ( | int | playlist_num | ) |
Definition at line 823 of file playlist-new.c.
void playlist_delete_selected | ( | int | playlist_num | ) |
Definition at line 1424 of file playlist-new.c.
Referenced by drct_pl_delete_selected(), playlist_remove_duplicates_by_scheme(), and playlist_remove_failed().
void playlist_end | ( | void | ) |
Definition at line 727 of file playlist-new.c.
Referenced by shut_down().
Definition at line 1055 of file playlist-new.c.
Referenced by add_finish(), add_list(), audacious_rc_clear(), audacious_rc_length(), mpris_emit_tracklist_change(), mpris_tracklist_get_length(), playlist_get_blank(), playlist_insert_playlist_raw(), playlist_remove_duplicates_by_scheme(), playlist_remove_failed(), playlist_save(), and playlist_select_by_patterns().
Definition at line 1113 of file playlist-new.c.
Referenced by add_list(), audacious_rc_clear(), audacious_rc_delete(), drct_pl_delete_selected(), and mpris_tracklist_del_track().
void playlist_entry_describe | ( | int | playlist_num, | |
int | entry_num, | |||
char ** | title, | |||
char ** | artist, | |||
char ** | album, | |||
bool_t | fast | |||
) |
Definition at line 1203 of file playlist-new.c.
PluginHandle* playlist_entry_get_decoder | ( | int | playlist_num, | |
int | entry_num, | |||
bool_t | fast | |||
) |
Definition at line 1170 of file playlist-new.c.
Definition at line 1159 of file playlist-new.c.
Referenced by audacious_rc_song_filename(), get_mpris_metadata(), mpris_emit_track_change(), playback_start(), playlist_remove_duplicates_by_scheme(), playlist_remove_failed(), playlist_save(), and position_hook().
Definition at line 1216 of file playlist-new.c.
Definition at line 1286 of file playlist-new.c.
Referenced by drct_pl_delete_selected(), playlist_delete_selected(), and playlist_select_by_patterns().
Definition at line 1193 of file playlist-new.c.
Definition at line 1180 of file playlist-new.c.
Referenced by get_field(), get_mpris_metadata(), mpris_emit_track_change(), playlist_remove_duplicates_by_scheme(), playlist_save(), and playlist_select_by_patterns().
void playlist_entry_insert_batch_raw | ( | int | playlist_num, | |
int | at, | |||
Index * | filenames, | |||
Index * | tuples, | |||
Index * | decoders | |||
) |
Definition at line 1066 of file playlist-new.c.
Referenced by add_finish(), and playlist_insert_playlist_raw().
Definition at line 1259 of file playlist-new.c.
Referenced by drct_pl_delete_selected(), playlist_remove_duplicates_by_scheme(), playlist_remove_failed(), and playlist_select_by_patterns().
static void playlist_free | ( | Playlist * | playlist | ) | [static] |
Definition at line 355 of file playlist-new.c.
Referenced by playlist_delete(), and playlist_end().
int playlist_get_active | ( | void | ) |
Definition at line 963 of file playlist-new.c.
Referenced by add_list(), audacious_rc_clear(), audacious_rc_delete(), audacious_rc_get_active_playlist_name(), audacious_rc_get_playqueue_length(), audacious_rc_jump(), audacious_rc_length(), audacious_rc_playlist_ins_url_string(), audacious_rc_playqueue_add(), audacious_rc_playqueue_clear(), audacious_rc_playqueue_is_queued(), audacious_rc_playqueue_remove(), audacious_rc_position(), audacious_rc_queue_get_list_pos(), audacious_rc_queue_get_queue_pos(), audacious_rc_song_filename(), audacious_rc_song_frames(), audacious_rc_song_title(), audacious_rc_song_tuple(), drct_pl_next(), drct_pl_prev(), drct_play(), mpris_playlist_update_hook(), mpris_tracklist_add_track(), mpris_tracklist_del_track(), mpris_tracklist_get_current_track(), mpris_tracklist_get_length(), mpris_tracklist_get_metadata(), playback_play(), and playlist_get_blank().
int playlist_get_blank | ( | void | ) |
Definition at line 997 of file playlist-new.c.
Referenced by playlist_get_temporary().
char* playlist_get_filename | ( | int | playlist_num | ) |
Definition at line 885 of file playlist-new.c.
Definition at line 932 of file playlist-new.c.
Referenced by save_playlists_real().
int playlist_get_playing | ( | void | ) |
Definition at line 990 of file playlist-new.c.
Referenced by drct_pl_delete_selected(), drct_pl_next(), drct_pl_prev(), end_cb(), mpris_emit_track_change(), mpris_player_get_metadata(), playback_get_title(), playback_play(), playlist_delete(), playlist_delete_selected(), playlist_entry_delete(), playlist_next_song(), playlist_prev_song(), playlist_set_position(), and position_hook().
Definition at line 1248 of file playlist-new.c.
Referenced by audacious_rc_position(), drct_pl_delete_selected(), end_cb(), mpris_emit_track_change(), mpris_player_get_metadata(), mpris_tracklist_get_current_track(), playback_get_title(), playback_play(), playlist_delete_selected(), playlist_entry_delete(), and position_hook().
int64_t playlist_get_selected_length | ( | int | playlist_num | ) |
Definition at line 1827 of file playlist-new.c.
int playlist_get_temporary | ( | void | ) |
Definition at line 1012 of file playlist-new.c.
Referenced by add_list().
char* playlist_get_title | ( | int | playlist_num | ) |
Definition at line 910 of file playlist-new.c.
Referenced by audacious_rc_get_active_playlist_name(), playlist_get_blank(), playlist_get_temporary(), and playlist_save().
int64_t playlist_get_total_length | ( | int | playlist_num | ) |
Definition at line 1816 of file playlist-new.c.
Definition at line 850 of file playlist-new.c.
Referenced by playlist_add_in_progress(), playlist_entry_insert_filtered(), and save_playlists_real().
void playlist_init | ( | void | ) |
Definition at line 707 of file playlist-new.c.
Referenced by init_two().
void playlist_insert | ( | int | at | ) |
Definition at line 785 of file playlist-new.c.
Referenced by load_playlists_real(), and playlist_get_blank().
Definition at line 771 of file playlist-new.c.
Referenced by load_playlists_real(), and playlist_insert().
void playlist_load_state | ( | void | ) |
Definition at line 2325 of file playlist-new.c.
Referenced by load_playlists().
Definition at line 329 of file playlist-new.c.
Referenced by playlist_delete(), and playlist_insert_with_id().
Definition at line 2111 of file playlist-new.c.
Referenced by drct_pl_delete_selected(), drct_pl_next(), end_cb(), and playback_play().
Definition at line 2024 of file playlist-new.c.
Referenced by drct_pl_prev().
Definition at line 1838 of file playlist-new.c.
Referenced by add_list(), audacious_rc_get_playqueue_length(), and audacious_rc_playqueue_clear().
Definition at line 1924 of file playlist-new.c.
Referenced by add_list(), audacious_rc_playqueue_clear(), and audacious_rc_playqueue_remove().
void playlist_queue_delete_selected | ( | int | playlist_num | ) |
Definition at line 1971 of file playlist-new.c.
Definition at line 1913 of file playlist-new.c.
Referenced by audacious_rc_playqueue_is_queued(), audacious_rc_playqueue_remove(), and audacious_rc_queue_get_queue_pos().
Definition at line 1901 of file playlist-new.c.
Referenced by audacious_rc_queue_get_list_pos().
Definition at line 1849 of file playlist-new.c.
Referenced by audacious_rc_playqueue_add().
Definition at line 1869 of file playlist-new.c.
void playlist_randomize | ( | int | playlist_num | ) |
Definition at line 1509 of file playlist-new.c.
void playlist_reformat_titles | ( | void | ) |
Definition at line 1715 of file playlist-new.c.
Referenced by on_titlestring_entry_changed().
Definition at line 790 of file playlist-new.c.
void playlist_rescan | ( | int | playlist_num | ) |
Definition at line 1778 of file playlist-new.c.
void playlist_rescan_file | ( | const char * | filename | ) |
Definition at line 1788 of file playlist-new.c.
Referenced by file_write_tuple().
Definition at line 1756 of file playlist-new.c.
Referenced by playlist_rescan(), and playlist_rescan_selected().
void playlist_rescan_selected | ( | int | playlist_num | ) |
Definition at line 1783 of file playlist-new.c.
void playlist_resume | ( | void | ) |
Definition at line 2401 of file playlist-new.c.
Referenced by do_commands().
void playlist_reverse | ( | int | playlist_num | ) |
Definition at line 1487 of file playlist-new.c.
void playlist_save_state | ( | void | ) |
Definition at line 2254 of file playlist-new.c.
Referenced by save_playlists().
Definition at line 487 of file playlist-new.c.
Definition at line 1308 of file playlist-new.c.
Referenced by playlist_remove_duplicates_by_scheme(), playlist_remove_failed(), and playlist_select_by_patterns().
Definition at line 1297 of file playlist-new.c.
void playlist_set_active | ( | int | playlist_num | ) |
Definition at line 943 of file playlist-new.c.
Referenced by add_list(), and load_playlists_real().
void playlist_set_filename | ( | int | playlist_num, | |
const char * | filename | |||
) |
Definition at line 871 of file playlist-new.c.
Definition at line 921 of file playlist-new.c.
Referenced by load_playlists_real(), and save_playlists_real().
void playlist_set_playing | ( | int | playlist_num | ) |
Definition at line 970 of file playlist-new.c.
Referenced by add_finish(), drct_pl_next(), drct_pl_prev(), drct_play(), and playback_play().
Definition at line 1226 of file playlist-new.c.
Referenced by add_finish(), audacious_rc_jump(), and end_cb().
void playlist_set_title | ( | int | playlist_num, | |
const char * | title | |||
) |
Definition at line 896 of file playlist-new.c.
Referenced by playlist_get_temporary(), and playlist_insert_playlist_raw().
Definition at line 1346 of file playlist-new.c.
Definition at line 1639 of file playlist-new.c.
Referenced by playlist_remove_duplicates_by_scheme(), and playlist_sort_by_scheme().
Definition at line 1664 of file playlist-new.c.
Referenced by playlist_sort_by_scheme().
Definition at line 1651 of file playlist-new.c.
Referenced by playlist_remove_duplicates_by_scheme(), and playlist_sort_by_scheme().
void playlist_sort_selected_by_filename | ( | int | playlist_num, | |
int(*)(const char *a, const char *b) | compare | |||
) |
Definition at line 1677 of file playlist-new.c.
Referenced by playlist_sort_selected_by_scheme().
void playlist_sort_selected_by_title | ( | int | playlist_num, | |
int(*)(const char *a, const char *b) | compare | |||
) |
Definition at line 1702 of file playlist-new.c.
Referenced by playlist_sort_selected_by_scheme().
void playlist_sort_selected_by_tuple | ( | int | playlist_num, | |
int(*)(const Tuple *a, const Tuple *b) | compare | |||
) |
Definition at line 1689 of file playlist-new.c.
Referenced by playlist_sort_selected_by_scheme().
void playlist_trigger_scan | ( | void | ) |
Definition at line 1741 of file playlist-new.c.
bool_t playlist_update_pending | ( | void | ) |
Definition at line 465 of file playlist-new.c.
Definition at line 472 of file playlist-new.c.
Definition at line 426 of file playlist-new.c.
Referenced by scanner().
static void scan_trigger | ( | void | ) | [static] |
Definition at line 656 of file playlist-new.c.
Referenced by playlist_trigger_scan(), and queue_update().
static void * scanner | ( | void * | unused | ) | [static] |
Definition at line 592 of file playlist-new.c.
Referenced by playlist_init().
Definition at line 1038 of file playlist-new.c.
Referenced by playlist_delete_selected(), playlist_entry_delete(), playlist_load_state(), playlist_next_song(), playlist_prev_song(), playlist_set_position(), and shuffle_next().
Definition at line 2053 of file playlist-new.c.
Referenced by playlist_next_song().
Definition at line 2002 of file playlist-new.c.
Referenced by playlist_prev_song().
static void shuffle_reset | ( | Playlist * | playlist | ) | [static] |
Definition at line 2098 of file playlist-new.c.
Referenced by playlist_next_song().
static void sort | ( | Playlist * | playlist, | |
int(*)(const void *a, const void *b, void *inner) | compare, | |||
void * | inner | |||
) | [static] |
Definition at line 1579 of file playlist-new.c.
Referenced by playlist_sort_by_filename(), playlist_sort_by_title(), playlist_sort_by_tuple(), and playlist_sort_selected_by_title().
static void sort_selected | ( | Playlist * | playlist, | |
int(*)(const void *a, const void *b, void *inner) | compare, | |||
void * | inner | |||
) | [static] |
Definition at line 1588 of file playlist-new.c.
Referenced by playlist_sort_selected_by_filename(), and playlist_sort_selected_by_tuple().
static int title_compare | ( | const void * | _a, | |
const void * | _b, | |||
void * | compare | |||
) | [static] |
Definition at line 1564 of file playlist-new.c.
Referenced by playlist_sort_by_title(), and playlist_sort_selected_by_title().
static char* title_from_tuple | ( | Tuple * | tuple | ) | [static] |
Definition at line 165 of file playlist-new.c.
Referenced by entry_set_tuple_real(), and playlist_reformat_titles().
static int tuple_compare | ( | const void * | _a, | |
const void * | _b, | |||
void * | compare | |||
) | [static] |
Definition at line 1545 of file playlist-new.c.
Referenced by playlist_sort_by_tuple(), and playlist_sort_selected_by_tuple().
static bool_t update | ( | void * | unused | ) | [static] |
Definition at line 400 of file playlist-new.c.
Referenced by queue_update().
Playlist* active_playlist = NULL [static] |
Definition at line 143 of file playlist-new.c.
pthread_cond_t cond = PTHREAD_COND_INITIALIZER [static] |
Definition at line 135 of file playlist-new.c.
Referenced by entry_queue_scan(), get_entry(), get_playback_entry(), playlist_end(), scan_trigger(), and scanner().
const char* const default_title = N_("New Playlist") [static] |
Definition at line 131 of file playlist-new.c.
Referenced by playlist_get_blank(), and playlist_new().
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER [static] |
Definition at line 134 of file playlist-new.c.
Referenced by get_entry(), get_playback_entry(), and scanner().
int next_unique_id = 1000 [static] |
Definition at line 140 of file playlist-new.c.
Referenced by new_unique_id().
char parse_key[512] [static] |
Definition at line 2292 of file playlist-new.c.
char* parse_value [static] |
Definition at line 2293 of file playlist-new.c.
Playlist* playing_playlist = NULL [static] |
Definition at line 144 of file playlist-new.c.
Index* playlists = NULL [static] |
Definition at line 142 of file playlist-new.c.
Referenced by entry_find_to_scan(), lookup_playlist(), number_playlists(), playlist_count(), playlist_delete(), playlist_end(), playlist_init(), playlist_insert_with_id(), playlist_load_state(), playlist_reformat_titles(), playlist_reorder(), playlist_rescan_file(), playlist_save_state(), playlist_trigger_scan(), and update().
int resume_state [static] |
Definition at line 147 of file playlist-new.c.
Referenced by playlist_load_state(), playlist_resume(), and playlist_save_state().
int resume_time [static] |
Definition at line 147 of file playlist-new.c.
Referenced by playlist_load_state(), playlist_resume(), and playlist_save_state().
ScanItem* scan_items[SCAN_THREADS] [static] |
Definition at line 158 of file playlist-new.c.
int scan_playlist [static] |
Definition at line 156 of file playlist-new.c.
Referenced by entry_find_to_scan(), playlist_init(), and scan_trigger().
GQueue scan_queue = G_QUEUE_INIT [static] |
Definition at line 157 of file playlist-new.c.
Referenced by check_scan_complete(), entry_cancel_scan(), entry_find_to_scan(), entry_queue_scan(), and entry_scan_is_queued().
Definition at line 155 of file playlist-new.c.
Referenced by playlist_end(), playlist_init(), and scanner().
Definition at line 156 of file playlist-new.c.
Referenced by entry_find_to_scan(), playlist_init(), and scan_trigger().
pthread_t scan_threads[SCAN_THREADS] [static] |
Definition at line 154 of file playlist-new.c.
Referenced by playlist_end(), and playlist_init().
const char* const temp_title = N_("Now Playing") [static] |
Definition at line 132 of file playlist-new.c.
Referenced by playlist_get_temporary().
char* title_format [static] |
Definition at line 163 of file playlist-new.c.
Referenced by playlist_end(), playlist_reformat_titles(), and title_from_tuple().
GHashTable* unique_id_table = NULL [static] |
Definition at line 139 of file playlist-new.c.
Referenced by new_unique_id(), playlist_by_unique_id(), playlist_end(), playlist_free(), playlist_init(), and playlist_new().
int update_level [static] |
Definition at line 146 of file playlist-new.c.
Referenced by playlist_init(), playlist_load_state(), playlist_update_pending(), queue_update(), and update().
int update_source = 0 [static] |
Definition at line 146 of file playlist-new.c.
Referenced by playlist_end(), playlist_load_state(), queue_update(), and update().