mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 04:31:50 +00:00
add metadata functions to sound file api
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2139 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -866,6 +866,25 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_write(switch_file_handle_t *fh,
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_seek(switch_file_handle_t *fh, unsigned int *cur_pos, int64_t samples, int whence);
|
||||
|
||||
/*!
|
||||
\brief Set metadata to the desired string
|
||||
\param fh the file handle to set data to
|
||||
\param col the enum of the col name
|
||||
\param string the string to add
|
||||
\return SWITCH_STATUS_SUCCESS with cur_pos adjusted to new position
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_set_string(switch_file_handle_t *fh, switch_audio_col_t col, const char *string);
|
||||
|
||||
/*!
|
||||
\brief get metadata of the desired string
|
||||
\param fh the file handle to get data from
|
||||
\param col the enum of the col name
|
||||
\param string pointer to the string to fetch
|
||||
\return SWITCH_STATUS_SUCCESS with cur_pos adjusted to new position
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_get_string(switch_file_handle_t *fh, switch_audio_col_t col, const char **string);
|
||||
|
||||
|
||||
/*!
|
||||
\brief Close an open file handle
|
||||
\param fh the file handle to close
|
||||
|
||||
@@ -266,6 +266,10 @@ struct switch_file_interface {
|
||||
switch_status_t (*file_write)(switch_file_handle_t *, void *data, switch_size_t *len);
|
||||
/*! function to seek to a certian position in the file */
|
||||
switch_status_t (*file_seek)(switch_file_handle_t *, unsigned int *cur_pos, int64_t samples, int whence);
|
||||
/*! function to set meta data */
|
||||
switch_status_t (*file_set_string)(switch_file_handle_t *fh, switch_audio_col_t col, const char *string);
|
||||
/*! function to get meta data */
|
||||
switch_status_t (*file_get_string)(switch_file_handle_t *fh, switch_audio_col_t col, const char **string);
|
||||
/*! list of supported file extensions */
|
||||
char **extens;
|
||||
const struct switch_file_interface *next;
|
||||
|
||||
@@ -94,6 +94,16 @@ SWITCH_DECLARE_DATA extern switch_directories SWITCH_GLOBAL_dirs;
|
||||
#define SWITCH_FALSE 0
|
||||
#define SWITCH_CORE_QUEUE_LEN 100000
|
||||
|
||||
|
||||
typedef enum {
|
||||
SWITCH_AUDIO_COL_STR_TITLE = 0x01,
|
||||
SWITCH_AUDIO_COL_STR_COPYRIGHT = 0x02,
|
||||
SWITCH_AUDIO_COL_STR_SOFTWARE = 0x03,
|
||||
SWITCH_AUDIO_COL_STR_ARTIST = 0x04,
|
||||
SWITCH_AUDIO_COL_STR_COMMENT = 0x05,
|
||||
SWITCH_AUDIO_COL_STR_DATE = 0x06
|
||||
} switch_audio_col_t;
|
||||
|
||||
typedef enum {
|
||||
SWITCH_XML_SECTION_RESULT = 0,
|
||||
SWITCH_XML_SECTION_CONFIG = (1 << 0),
|
||||
|
||||
Reference in New Issue
Block a user