static inline void vlc_audio_replay_gain_MergeFromMeta( audio_replay_gain_t *p_dst,
const vlc_meta_t *p_meta )
{
- char * psz_value;
+ const char * psz_value;
if( !p_meta )
return;
- if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_TRACK_GAIN" )) ||
- (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_RADIO" )) )
+ if( (psz_value = vlc_meta_GetExtra(p_meta, "REPLAYGAIN_TRACK_GAIN")) ||
+ (psz_value = vlc_meta_GetExtra(p_meta, "RG_RADIO")) )
{
p_dst->pb_gain[AUDIO_REPLAY_GAIN_TRACK] = true;
p_dst->pf_gain[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
}
- else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_TRACK_PEAK" )) ||
- (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_PEAK" )) )
+ else if( (psz_value = vlc_meta_GetExtra(p_meta, "REPLAYGAIN_TRACK_PEAK" )) ||
+ (psz_value = vlc_meta_GetExtra(p_meta, "RG_PEAK" )) )
{
p_dst->pb_peak[AUDIO_REPLAY_GAIN_TRACK] = true;
p_dst->pf_peak[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
}
- else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_ALBUM_GAIN" )) ||
- (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_AUDIOPHILE" )) )
+ else if( (psz_value = vlc_meta_GetExtra(p_meta, "REPLAYGAIN_ALBUM_GAIN" )) ||
+ (psz_value = vlc_meta_GetExtra(p_meta, "RG_AUDIOPHILE" )) )
{
p_dst->pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = true;
p_dst->pf_gain[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
}
- else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_ALBUM_PEAK" )) )
+ else if( (psz_value = vlc_meta_GetExtra(p_meta, "REPLAYGAIN_ALBUM_PEAK" )) )
{
p_dst->pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = true;
p_dst->pf_peak[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
*/
struct input_thread_t
{
- VLC_COMMON_MEMBERS;
+ VLC_COMMON_MEMBERS
bool b_eof;
bool b_preparsing;
/**
* Input rate.
*
- * It is an integer used by the variable "rate" in the
- * range [INPUT_RATE_MIN, INPUT_RATE_MAX] the default value
- * being INPUT_RATE_DEFAULT.
+ * It is an float used by the variable "rate" in the
+ * range [INPUT_RATE_DEFAULT/INPUT_RATE_MAX, INPUT_RATE_DEFAULT/INPUT_RATE_MAX]
+ * the default value being 1. It represents the ratio of playback speed to
+ * nominal speed (bigger is faster).
*
- * A value lower than INPUT_RATE_DEFAULT plays faster.
- * A value higher than INPUT_RATE_DEFAULT plays slower.
+ * Internally, the rate is stored as a value in the range
+ * [INPUT_RATE_MIN, INPUT_RATE_MAX].
+ * internal rate = INPUT_RATE_DEFAULT / rate variable
*/
/**
INPUT_EVENT_ITEM_INFO,
/* input_item_t name has changed */
INPUT_EVENT_ITEM_NAME,
+ /* input_item_t epg has changed */
+ INPUT_EVENT_ITEM_EPG,
/* Input statistics have been updated */
INPUT_EVENT_STATISTICS,
INPUT_GET_TIME, /* arg1= int64_t * res= */
INPUT_SET_TIME, /* arg1= int64_t res=can fail */
- /* input variable "rate" (1 is DEFAULT_RATE) */
+ /* input variable "rate" (nominal is INPUT_RATE_DEFAULT) */
INPUT_GET_RATE, /* arg1= int * res= */
INPUT_SET_RATE, /* arg1= int res=can fail */
VLC_EXPORT( void, input_Stop, ( input_thread_t *, bool b_abort ) );
-#define input_Read(a,b,c) __input_Read(VLC_OBJECT(a),b, c)
-VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t *, bool ) );
+#define input_Read(a,b) __input_Read(VLC_OBJECT(a),b)
+VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t * ) );
VLC_EXPORT( int, input_vaControl,( input_thread_t *, int i_query, va_list ) );
static inline vout_thread_t *input_GetVout( input_thread_t *p_input )
{
vout_thread_t **pp_vout, *p_vout;
- unsigned i_vout;
+ size_t i_vout;
if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) )
return NULL;
- for( unsigned i = 1; i < i_vout; i++ )
+ for( size_t i = 1; i < i_vout; i++ )
vlc_object_release( (vlc_object_t *)(pp_vout[i]) );
p_vout = (i_vout >= 1) ? pp_vout[0] : NULL;
*/
VLC_EXPORT( char *, input_CreateFilename, ( vlc_object_t *, const char *psz_path, const char *psz_prefix, const char *psz_extension ) );
+/**
+ * This function detaches resources from a dead input.
+ *
+ * It MUST be called on a dead input (p_input->b_dead true) otherwise
+ * it will assert.
+ * It does not support concurrent calls.
+ */
+VLC_EXPORT(input_resource_t *, input_DetachResource, ( input_thread_t * ) );
+
+/**
+ * This function releases the input resource.
+ */
+VLC_EXPORT(void, input_resource_Delete, ( input_resource_t * ) );
+
#endif