From 816d87e1d38dc0fecbe1fa47794b2d7a18d2e321 Mon Sep 17 00:00:00 2001 From: waker Date: Thu, 17 May 2012 20:50:47 +0200 Subject: fixed many calls to pl_find_meta[_raw] being called without pl_lock; added debug pl_ensure_lock function which asserts when pl_lock is not set when it is required; added new API functions for thread-safe metadata access --- deadbeef.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'deadbeef.h') diff --git a/deadbeef.h b/deadbeef.h index 73452c4e..6de9e9d0 100644 --- a/deadbeef.h +++ b/deadbeef.h @@ -61,6 +61,7 @@ extern "C" { // api version history: // 9.9 -- devel +// 1.4 -- deadbeef-0.5.5 // 1.3 -- deadbeef-0.5.3 // 1.2 -- deadbeef-0.5.2 // 1.1 -- deadbeef-0.5.1 @@ -750,10 +751,20 @@ typedef struct { void (*metacache_unref) (const char *str); // this function must return original un-overriden value (ignoring the keys prefixed with '!') + // it's not thread-safe, and must be used under the same conditions as the + // pl_find_meta const char *(*pl_find_meta_raw) (DB_playItem_t *it, const char *key); // ******* new 1.3 APIs ******** int (*streamer_dsp_chain_save) (void); + + // ******* new 1.4 APIs ******** + int (*pl_get_meta) (DB_playItem_t *it, const char *key, char *val, int size); + int (*pl_get_meta_raw) (DB_playItem_t *it, const char *key, char *val, int size); + int (*plt_get_meta) (ddb_playlist_t *handle, const char *key, char *val, int size); + + // fast way to test if a field exists in playitem + int (*pl_meta_exists) (DB_playItem_t *it, const char *key); } DB_functions_t; // NOTE: an item placement must be selected like this -- cgit v1.2.3