Merge pull request #1564 in FS/freeswitch from fs-11310-switch-core-file-pre-close to master

* commit '720128b61ed0fba0c45ba7caa0d3d7a4bde2ffb4':
  FS-11310 #resolve add more params for conference record stop event
  FS-11310 #resolve add optional switch_core_file_pre_close() to stop writing to file and possible to get file size related params
This commit is contained in:
Mike Jerris
2018-08-09 06:53:04 +00:00
5 changed files with 100 additions and 8 deletions
+6
View File
@@ -1943,6 +1943,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_set_string(_In_ switch_file_han
*/
SWITCH_DECLARE(switch_status_t) switch_core_file_get_string(_In_ switch_file_handle_t *fh, switch_audio_col_t col, const char **string);
/*!
\brief Pre close an open file handle, then can get file size etc., no more wirte to the file
\param fh the file handle to close
\return SWITCH_STATUS_SUCCESS if the file handle was pre closed
*/
SWITCH_DECLARE(switch_status_t) switch_core_file_pre_close(_In_ switch_file_handle_t *fh);
/*!
\brief Close an open file handle
+2
View File
@@ -298,6 +298,8 @@ struct switch_file_interface {
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);
/*! function to pre close the file to read params */
switch_status_t (*file_pre_close) (switch_file_handle_t *fh);
/*! function to control the underlying tech of the file */
switch_status_t (*file_command) (switch_file_handle_t *fh, switch_file_command_t command);
/*! list of supported file extensions */
+11 -1
View File
@@ -583,12 +583,22 @@ typedef enum {
typedef uint32_t switch_caller_profile_flag_t;
typedef enum {
// flags matching libsndfile
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_STR_DATE = 0x06,
SWITCH_AUDIO_COL_STR_ALBUM = 0x07,
SWITCH_AUDIO_COL_STR_LICENSE = 0x08,
SWITCH_AUDIO_COL_STR_TRACKNUMBER = 0x09,
SWITCH_AUDIO_COL_STR_GENRE = 0x10,
// custom flags
SWITCH_AUDIO_COL_STR_FILE_SIZE = 0xF0,
SWITCH_AUDIO_COL_STR_FILE_TRIMMED = 0xF1,
SWITCH_AUDIO_COL_STR_FILE_TRIMMED_MS = 0xF2
} switch_audio_col_t;
typedef enum {