Commit 8919d218 authored by Laurent Aimar's avatar Laurent Aimar

Fixed vlc_meta_SetXXX macros

Added decoder_GetInputAttachments.
parent 1dcd31cc
......@@ -136,6 +136,22 @@
} \
} while(0)
#define TAB_INSERT_CAST( cast, count, tab, p, index ) do { \
if( (count) > 0 ) \
(tab) = cast realloc( tab, sizeof( void ** ) * ( (count) + 1 ) ); \
else \
(tab) = cast malloc( sizeof( void ** ) ); \
if( (count) - (index) > 0 ) \
memmove( (void**)(tab) + (index) + 1, \
(void**)(tab) + (index), \
((count) - (index)) * sizeof(*(tab)) );\
(tab)[(index)] = (p); \
(count)++; \
} while(0)
#define TAB_INSERT( count, tab, p, index ) \
TAB_INSERT_CAST( , count, tab, p, index )
/**
* Binary search in a sorted array. The key must be comparable by < and >
* \param entries array of entries
......
......@@ -143,5 +143,7 @@ struct encoder_t
*/
VLC_EXPORT( input_attachment_t *, decoder_GetInputAttachment, ( decoder_t *, const char *psz_name ) );
VLC_EXPORT( int, decoder_GetInputAttachments, ( decoder_t *p_dec, input_attachment_t ***ppp_attachment, int *pi_attachment ) );
#endif /* _VLC_CODEC_H */
......@@ -90,23 +90,23 @@ struct vlc_meta_t
if( meta->psz_##var ) free( meta->psz_##var ); \
meta->psz_##var = str ? strdup( str ) : NULL; } while(0)
#define vlc_meta_SetTitle( meta, b ) vlc_meta_Set( meta, title, b );
#define vlc_meta_SetArtist( meta, b ) vlc_meta_Set( meta, artist, b );
#define vlc_meta_SetGenre( meta, b ) vlc_meta_Set( meta, genre, b );
#define vlc_meta_SetCopyright( meta, b ) vlc_meta_Set( meta, copyright, b );
#define vlc_meta_SetAlbum( meta, b ) vlc_meta_Set( meta, album, b );
#define vlc_meta_SetTracknum( meta, b ) vlc_meta_Set( meta, tracknum, b );
#define vlc_meta_SetDescription( meta, b ) vlc_meta_Set( meta, description, b );
#define vlc_meta_SetRating( meta, b ) vlc_meta_Set( meta, rating, b );
#define vlc_meta_SetDate( meta, b ) vlc_meta_Set( meta, date, b );
#define vlc_meta_SetSetting( meta, b ) vlc_meta_Set( meta, setting, b );
#define vlc_meta_SetURL( meta, b ) vlc_meta_Set( meta, url, b );
#define vlc_meta_SetLanguage( meta, b ) vlc_meta_Set( meta, language, b );
#define vlc_meta_SetNowPlaying( meta, b ) vlc_meta_Set( meta, nowplaying, b );
#define vlc_meta_SetPublisher( meta, b ) vlc_meta_Set( meta, publisher, b );
#define vlc_meta_SetEncodedBy( meta, b ) vlc_meta_Set( meta, encodedby, b );
#define vlc_meta_SetArtURL( meta, b ) vlc_meta_Set( meta, arturl, b );
#define vlc_meta_SetTrackID( meta, b ) vlc_meta_Set( meta, trackid, b );
#define vlc_meta_SetTitle( meta, b ) vlc_meta_Set( meta, title, b )
#define vlc_meta_SetArtist( meta, b ) vlc_meta_Set( meta, artist, b )
#define vlc_meta_SetGenre( meta, b ) vlc_meta_Set( meta, genre, b )
#define vlc_meta_SetCopyright( meta, b ) vlc_meta_Set( meta, copyright, b )
#define vlc_meta_SetAlbum( meta, b ) vlc_meta_Set( meta, album, b )
#define vlc_meta_SetTracknum( meta, b ) vlc_meta_Set( meta, tracknum, b )
#define vlc_meta_SetDescription( meta, b ) vlc_meta_Set( meta, description, b )
#define vlc_meta_SetRating( meta, b ) vlc_meta_Set( meta, rating, b )
#define vlc_meta_SetDate( meta, b ) vlc_meta_Set( meta, date, b )
#define vlc_meta_SetSetting( meta, b ) vlc_meta_Set( meta, setting, b )
#define vlc_meta_SetURL( meta, b ) vlc_meta_Set( meta, url, b )
#define vlc_meta_SetLanguage( meta, b ) vlc_meta_Set( meta, language, b )
#define vlc_meta_SetNowPlaying( meta, b ) vlc_meta_Set( meta, nowplaying, b )
#define vlc_meta_SetPublisher( meta, b ) vlc_meta_Set( meta, publisher, b )
#define vlc_meta_SetEncodedBy( meta, b ) vlc_meta_Set( meta, encodedby, b )
#define vlc_meta_SetArtURL( meta, b ) vlc_meta_Set( meta, arturl, b )
#define vlc_meta_SetTrackID( meta, b ) vlc_meta_Set( meta, trackid, b )
static inline vlc_meta_t *vlc_meta_New( void )
{
......
......@@ -94,13 +94,23 @@ struct decoder_owner_sys_t
/* decoder_GetInputAttachment:
*/
input_attachment_t *decoder_GetInputAttachment( decoder_t *p_dec, const char *psz_name )
input_attachment_t *decoder_GetInputAttachment( decoder_t *p_dec,
const char *psz_name )
{
input_attachment_t *p_attachment;
if( input_Control( p_dec->p_owner->p_input, INPUT_GET_ATTACHMENT, &p_attachment, psz_name ) )
return NULL;
return p_attachment;
}
/* decoder_GetInputAttachments:
*/
int decoder_GetInputAttachments( decoder_t *p_dec,
input_attachment_t ***ppp_attachment,
int *pi_attachment )
{
return input_Control( p_dec->p_owner->p_input, INPUT_GET_ATTACHMENTS,
ppp_attachment, pi_attachment );
}
/**
* Spawns a new decoder thread
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment