#include <vlc_codec.h>
#include <vlc_aout.h>
#include <vlc_input.h>
-#include <vlc_playlist.h>
#include <vlc_sout.h>
#include <ogg/ogg.h>
#endif
add_integer( ENC_CFG_PREFIX "quality", 0, NULL, ENC_QUALITY_TEXT,
- ENC_QUALITY_LONGTEXT, false );
+ ENC_QUALITY_LONGTEXT, false )
+ change_integer_range( 0, 10 )
add_integer( ENC_CFG_PREFIX "max-bitrate", 0, NULL, ENC_MAXBR_TEXT,
- ENC_MAXBR_LONGTEXT, false );
+ ENC_MAXBR_LONGTEXT, false )
add_integer( ENC_CFG_PREFIX "min-bitrate", 0, NULL, ENC_MINBR_TEXT,
- ENC_MINBR_LONGTEXT, false );
+ ENC_MINBR_LONGTEXT, false )
add_bool( ENC_CFG_PREFIX "cbr", 0, NULL, ENC_CBR_TEXT,
- ENC_CBR_LONGTEXT, false );
+ ENC_CBR_LONGTEXT, false )
#endif
vlc_module_end ()
}
/* Allocate the memory needed to store the decoder's structure */
- if( ( p_dec->p_sys = p_sys =
- (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
+ if( ( p_dec->p_sys = p_sys = malloc( sizeof(*p_sys) ) ) == NULL )
return VLC_ENOMEM;
/* Misc init */
*****************************************************************************/
static void ParseVorbisComments( decoder_t *p_dec )
{
- input_thread_t *p_input = (input_thread_t *)p_dec->p_parent;
char *psz_name, *psz_value, *psz_comment;
- input_item_t *p_item;
int i = 0;
- if( p_input->i_object_type != VLC_OBJECT_INPUT ) return;
-
- p_item = input_GetItem( p_input );
-
while( i < p_dec->p_sys->vc.comments )
{
psz_comment = strdup( p_dec->p_sys->vc.user_comments[i] );
{
*psz_value = '\0';
psz_value++;
- input_Control( p_input, INPUT_ADD_INFO, _("Vorbis comment"),
- psz_name, "%s", psz_value );
-/*TODO: dot he test at the beginning and save time !! */
-#ifndef HAVE_TAGLIB
- if( psz_value && ( *psz_value != '\0' ) )
- {
- if( !strcasecmp( psz_name, "artist" ) )
- input_item_SetArtist( p_item, psz_value );
- else if( !strcasecmp( psz_name, "title" ) )
- {
- input_item_SetTitle( p_item, psz_value );
- p_item->psz_name = strdup( psz_value );
- }
- else if( !strcasecmp( psz_name, "album" ) )
- {
- input_item_SetAlbum( p_item, psz_value );
- }
- else if( !strcasecmp( psz_name, "musicbrainz_trackid" ) )
- input_item_SetTrackID( p_item, psz_value );
-#if 0 //not used
- else if( !strcasecmp( psz_name, "musicbrainz_artistid" ) )
- vlc_meta_SetArtistID( p_item, psz_value );
- else if( !strcasecmp( psz_name, "musicbrainz_albumid" ) )
- input_item_SetAlbumID( p_item, psz_value );
-#endif
- }
-#endif
+
+ if( !p_dec->p_description )
+ p_dec->p_description = vlc_meta_New();
+ if( p_dec->p_description )
+ vlc_meta_AddExtra( p_dec->p_description, psz_name, psz_value );
+
if( !strcasecmp( psz_name, "REPLAYGAIN_TRACK_GAIN" ) ||
!strcasecmp( psz_name, "RG_RADIO" ) )
{
r->pf_peak[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
}
}
- var_SetInteger( pl_Hold( p_input ), "item-change", p_item->i_id );
- pl_Release( p_input );
free( psz_comment );
i++;
}