Commit de4f5320 authored by Laurent Aimar's avatar Laurent Aimar

* x264: added aspect support.

 * transcode: added H264 codec id.
 * demux: added h264 demux shortcut.
parent 1f7367c4
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* x264.c: h264 video encoder * x264.c: h264 video encoder
***************************************************************************** *****************************************************************************
* Copyright (C) 2004 VideoLAN * Copyright (C) 2004 VideoLAN
* $Id: encoder.c 7342 2004-04-13 14:13:07Z gbazin $ * $Id$
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -38,7 +38,7 @@ static void Close( vlc_object_t * ); ...@@ -38,7 +38,7 @@ static void Close( vlc_object_t * );
vlc_module_begin(); vlc_module_begin();
set_description( _("h264 video encoder using x264 library")); set_description( _("h264 video encoder using x264 library"));
set_capability( "encoder", 10 ); set_capability( "encoder", 200 );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
vlc_module_end(); vlc_module_end();
...@@ -100,9 +100,11 @@ static int Open ( vlc_object_t *p_this ) ...@@ -100,9 +100,11 @@ static int Open ( vlc_object_t *p_this )
if( p_enc->fmt_in.video.i_aspect > 0 ) if( p_enc->fmt_in.video.i_aspect > 0 )
{ {
/* TODO */ p_sys->param.vui.i_sar_width = p_enc->fmt_in.video.i_aspect *
p_sys->param.vui.i_sar_width = 0; p_enc->fmt_in.video.i_height *
p_sys->param.vui.i_sar_height = 0; p_enc->fmt_in.video.i_height /
p_enc->fmt_in.video.i_width;
p_sys->param.vui.i_sar_height = p_enc->fmt_in.video.i_height;
} }
if( p_enc->fmt_in.video.i_frame_rate_base > 0 ) if( p_enc->fmt_in.video.i_frame_rate_base > 0 )
{ {
......
...@@ -65,6 +65,7 @@ vlc_module_begin(); ...@@ -65,6 +65,7 @@ vlc_module_begin();
add_shortcut( "mpgv" ); add_shortcut( "mpgv" );
add_shortcut( "rawdv" ); add_shortcut( "rawdv" );
add_shortcut( "ogg" ); add_shortcut( "ogg" );
add_shortcut( "h264" );
vlc_module_end(); vlc_module_end();
/***************************************************************************** /*****************************************************************************
......
...@@ -631,6 +631,7 @@ static struct ...@@ -631,6 +631,7 @@ static struct
{ VLC_FOURCC( 'S', 'V', 'Q', '1' ), CODEC_ID_SVQ1 }, { VLC_FOURCC( 'S', 'V', 'Q', '1' ), CODEC_ID_SVQ1 },
#if LIBAVCODEC_BUILD >= 4666 #if LIBAVCODEC_BUILD >= 4666
{ VLC_FOURCC( 'S', 'V', 'Q', '3' ), CODEC_ID_SVQ3 }, { VLC_FOURCC( 'S', 'V', 'Q', '3' ), CODEC_ID_SVQ3 },
{ VLC_FOURCC( 'h', '2', '6', '4' ), CODEC_ID_H264 },
#endif #endif
/* raw video code, only used for 'encoding' */ /* raw video code, only used for 'encoding' */
......
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