X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fdemux%2Fvoc.c;h=ccdb63a73fea173a6809101613c26de63b2c294f;hb=003189d40ca8e2e1ed37cea1a5f2e0cb7bbd47f7;hp=4b055e796bab898650e38d3aae40de62a1e34d8c;hpb=df61d33b06e2b3cbbe746b2f5a9bea5b370c24ff;p=vlc diff --git a/modules/demux/voc.c b/modules/demux/voc.c index 4b055e796b..ccdb63a73f 100644 --- a/modules/demux/voc.c +++ b/modules/demux/voc.c @@ -29,7 +29,8 @@ # include "config.h" #endif -#include +#include +#include #include #include @@ -41,13 +42,13 @@ static int Open ( vlc_object_t * ); static void Close( vlc_object_t * ); -vlc_module_begin(); - set_description( _("VOC demuxer") ); - set_category( CAT_INPUT ); - set_subcategory( SUBCAT_INPUT_DEMUX ); - set_capability( "demux", 10 ); - set_callbacks( Open, Close ); -vlc_module_end(); +vlc_module_begin () + set_description( N_("VOC demuxer") ) + set_category( CAT_INPUT ) + set_subcategory( SUBCAT_INPUT_DEMUX ) + set_capability( "demux", 10 ) + set_callbacks( Open, Close ) +vlc_module_end () /***************************************************************************** * Local prototypes @@ -195,7 +196,7 @@ static int ReadBlockHeader( demux_t *p_demux ) return VLC_EGENERIC; } - new_fmt.i_codec = VLC_FOURCC('u','8',' ',' '); + new_fmt.i_codec = VLC_CODEC_U8; new_fmt.audio.i_rate = fix_voc_sr( 1000000L / (256L - buf[0]) ); new_fmt.audio.i_bytes_per_frame = 1; new_fmt.audio.i_frame_length = 1; @@ -220,7 +221,7 @@ static int ReadBlockHeader( demux_t *p_demux ) i_block_size = 0; p_sys->i_silence_countdown = GetWLE( buf ); - new_fmt.i_codec = VLC_FOURCC('u','8',' ',' '); + new_fmt.i_codec = VLC_CODEC_U8; new_fmt.audio.i_rate = fix_voc_sr( 1000000L / (256L - buf[0]) ); new_fmt.audio.i_bytes_per_frame = 1; new_fmt.audio.i_frame_length = 1; @@ -271,7 +272,7 @@ static int ReadBlockHeader( demux_t *p_demux ) return VLC_EGENERIC; } - new_fmt.i_codec = VLC_FOURCC('u','8',' ',' '); + new_fmt.i_codec = VLC_CODEC_U8; new_fmt.audio.i_channels = buf[3] + 1; /* can't be nul */ new_fmt.audio.i_rate = 256000000L / ((65536L - GetWLE(buf)) * new_fmt.audio.i_channels); @@ -322,11 +323,11 @@ static int ReadBlockHeader( demux_t *p_demux ) switch( new_fmt.audio.i_bitspersample ) { case 8: - new_fmt.i_codec = VLC_FOURCC('u','8',' ',' '); + new_fmt.i_codec = VLC_CODEC_U8; break; case 16: - new_fmt.i_codec = VLC_FOURCC('u','1','6','l'); + new_fmt.i_codec = VLC_CODEC_U16L; break; default: @@ -340,11 +341,11 @@ static int ReadBlockHeader( demux_t *p_demux ) switch( new_fmt.audio.i_bitspersample ) { case 8: - new_fmt.i_codec = VLC_FOURCC('s','8',' ',' '); + new_fmt.i_codec = VLC_CODEC_S8; break; case 16: - new_fmt.i_codec = VLC_FOURCC('s','1','6','l'); + new_fmt.i_codec = VLC_CODEC_S16L; break; default: