set_description( N_("Theora video packetizer") )
set_capability( "packetizer", 100 )
set_callbacks( OpenPacketizer, CloseDecoder )
+ add_shortcut( "theora" )
add_submodule ()
set_description( N_("Theora video encoder") )
set_capability( "encoder", 150 )
set_callbacks( OpenEncoder, CloseEncoder )
+ add_shortcut( "theora" )
# define ENC_CFG_PREFIX "sout-theora-"
add_integer( ENC_CFG_PREFIX "quality", 2, NULL, ENC_QUALITY_TEXT,
- ENC_QUALITY_LONGTEXT, false );
+ ENC_QUALITY_LONGTEXT, false )
vlc_module_end ()
static const char *const ppsz_enc_options[] = {
}
/* 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;
p_dec->p_sys->b_packetizer = false;
}
/*****************************************************************************
- * ParseTheoraComments: FIXME should be done in demuxer
+ * ParseTheoraComments:
*****************************************************************************/
static void ParseTheoraComments( decoder_t *p_dec )
{
- input_thread_t *p_input = (input_thread_t *)p_dec->p_parent;
char *psz_name, *psz_value, *psz_comment;
int i = 0;
- if( p_input->i_object_type != VLC_OBJECT_INPUT ) return;
-
while ( i < p_dec->p_sys->tc.comments )
{
psz_comment = strdup( p_dec->p_sys->tc.user_comments[i] );
{
*psz_value = '\0';
psz_value++;
- input_Control( p_input, INPUT_ADD_INFO, _("Theora comment"),
- psz_name, "%s", psz_value );
+
+ 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 );
}
free( psz_comment );
i++;