I also removed its use where it cannot/should not happen.
#endif
/* Non official codecs, used to force a profile in an encoder */
+/* MPEG-1 video */
#define VLC_CODEC_MP1V VLC_FOURCC('m','p','1','v')
+/* MPEG-2 video */
#define VLC_CODEC_MP2V VLC_FOURCC('m','p','2','v')
+/* MPEG-I/II layer 3 audio */
+#define VLC_CODEC_MP3 VLC_FOURCC('m','p','3',' ')
/**
* It returns the codec associatedto a fourcc within a ES category.
encoder_sys_t *p_sys;
/* FIXME: what about layers 1 and 2 ? shine is an 'MP3' encoder */
- if( p_enc->fmt_out.i_codec != VLC_FOURCC('m','p','3',' ') ||
+ if( p_enc->fmt_out.i_codec != VLC_CODEC_MP3 ||
p_enc->fmt_out.audio.i_channels > 2 )
return VLC_EGENERIC;
p_es->psz_rtpmap = NULL;
break;
case VLC_CODEC_MPGA:
- case VLC_FOURCC( 'm', 'p', '3', ' ' ):
p_es->i_payload_type = 14;
p_es->psz_rtpmap = strdup( "MPA/90000" );
break;
switch( p_input->p_fmt->i_codec )
{
case VLC_CODEC_MPGA:
- case VLC_FOURCC( 'm', 'p', '3', ' ' ):
p_stream->i_stream_type =
p_input->p_fmt->audio.i_rate >= 32000 ? 0x03 : 0x04;
p_stream->i_stream_id = 0xc0;
rtp_set_ptime (id, 20, 1);
break;
case VLC_CODEC_MPGA:
- case VLC_FOURCC( 'm', 'p', '3', ' ' ):
id->i_payload_type = 14;
id->psz_enc = "MPA";
id->i_clock_rate = 90000; /* not 44100 */
if( p_sys->i_acodec )
{
- if( p_sys->i_acodec == VLC_FOURCC('m','p','3',' ') &&
- p_sys->i_channels > 2 )
+ if( ( p_sys->i_acodec == VLC_CODEC_MP3 ||
+ p_sys->i_acodec == VLC_CODEC_MPGA ) && p_sys->i_channels > 2 )
{
msg_Warn( p_stream, "%d channels invalid for mp3, forcing to 2",
p_sys->i_channels );