#define APPEND_TEXT N_("Append to file")
#define APPEND_LONGTEXT N_( "Append to file if it exists instead " \
"of replacing it.")
+#define FORMAT_TEXT N_("Format time and date")
+#define FORMAT_LONGTEXT N_("Perform ISO C time and date formatting " \
+ "on the file path")
#define SYNC_TEXT N_("Synchronous writing")
#define SYNC_LONGTEXT N_( "Open the file with synchronous writing.")
OVERWRITE_LONGTEXT, true )
add_bool( SOUT_CFG_PREFIX "append", false, APPEND_TEXT,APPEND_LONGTEXT,
true )
+ add_bool( SOUT_CFG_PREFIX "format", false, FORMAT_TEXT, FORMAT_LONGTEXT,
+ true )
#ifdef O_SYNC
add_bool( SOUT_CFG_PREFIX "sync", false, SYNC_TEXT,SYNC_LONGTEXT,
false )
*****************************************************************************/
static const char *const ppsz_sout_options[] = {
"append",
+ "format",
"overwrite",
#ifdef O_SYNC
"sync",
}
else
{
- char *path = str_format_time (p_access->psz_path);
- path_sanitize (path);
+ const char *path = p_access->psz_path;
+ char *buf = NULL;
+
+ if (var_InheritBool (p_access, SOUT_CFG_PREFIX"format"))
+ {
+ buf = str_format_time (path);
+ path_sanitize (buf);
+ path = buf;
+ }
int flags = O_RDWR | O_CREAT | O_LARGEFILE;
if (!overwrite)
"overridden and its content will be lost."),
_("Keep existing file"),
_("Overwrite"), NULL) == 2);
- free (path);
+ free (buf);
if (fd == -1)
return VLC_EGENERIC;
}
if( i_bits == 24 )
{
- uint8_t *p_out = p_aout_buffer->p_buffer;
+ uint32_t *p_out = p_aout_buffer->p_buffer;
while( p_block->i_buffer / 7 )
{
}
else if( i_bits == 20 )
{
- uint8_t *p_out = p_aout_buffer->p_buffer;
+ uint32_t *p_out = p_aout_buffer->p_buffer;
while( p_block->i_buffer / 6 )
{
}
else
{
- p_dec->fmt_out.i_codec = i_bits == 16 ? VLC_CODEC_S16L : VLC_CODEC_S24L;
- p_dec->fmt_out.audio.i_bitspersample = i_bits == 16 ? 16 : 24;
+ p_dec->fmt_out.i_codec = i_bits == 16 ? VLC_CODEC_S16N : VLC_CODEC_S32N;
+ p_dec->fmt_out.audio.i_bitspersample = i_bits == 16 ? 16 : 32;
}
p_dec->fmt_out.audio.i_channels = i_channels;