* modules/gui/wxwindows/preferences_widgets.cpp: compilation fix.
* src/misc/configuration.c: use strtol() instead of atoi().
* vlc_codec.h: codec related structures
*****************************************************************************
* Copyright (C) 1999-2003 VideoLAN
* vlc_codec.h: codec related structures
*****************************************************************************
* Copyright (C) 1999-2003 VideoLAN
- * $Id: vlc_codec.h,v 1.2 2003/10/27 01:04:38 gbazin Exp $
+ * $Id: vlc_codec.h,v 1.3 2003/11/05 18:59:01 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
/* FIXME: move these to the ffmpeg encoder */
int i_frame_rate;
int i_frame_rate_base;
/* FIXME: move these to the ffmpeg encoder */
int i_frame_rate;
int i_frame_rate_base;
int i_key_int;
int i_b_frames;
int i_vtolerance;
int i_key_int;
int i_b_frames;
int i_vtolerance;
* encoder.c: video and audio encoder using the ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* encoder.c: video and audio encoder using the ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: encoder.c,v 1.4 2003/11/05 17:46:21 gbazin Exp $
+ * $Id: encoder.c,v 1.5 2003/11/05 18:59:01 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
p_context->bit_rate = p_enc->i_bitrate;
p_context->frame_rate = p_enc->i_frame_rate;
p_context->bit_rate = p_enc->i_bitrate;
p_context->frame_rate = p_enc->i_frame_rate;
+#if LIBAVCODEC_BUILD >= 4662
p_context->frame_rate_base= p_enc->i_frame_rate_base;
p_context->frame_rate_base= p_enc->i_frame_rate_base;
+#endif
+
+#if LIBAVCODEC_BUILD >= 4687
+ p_context->sample_aspect_ratio =
+ av_d2q( p_enc->i_aspect * p_context->height / p_context->width /
+ VOUT_ASPECT_FACTOR, 255 );
+#else
+ p_context->aspect_ratio = ((float)p_enc->i_aspect) / VOUT_ASPECT_FACTOR );
+#endif
p_context->gop_size = p_enc->i_key_int >= 0 ? p_enc->i_key_int : 50;
p_context->max_b_frames =
p_context->gop_size = p_enc->i_key_int >= 0 ? p_enc->i_key_int : 50;
p_context->max_b_frames =
* preferences_widgets.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* preferences_widgets.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: preferences_widgets.cpp,v 1.12 2003/11/05 17:46:21 gbazin Exp $
+ * $Id: preferences_widgets.cpp,v 1.13 2003/11/05 18:59:01 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Sigmund Augdal <sigmunau@idi.ntnu.no>
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Sigmund Augdal <sigmunau@idi.ntnu.no>
int selected = combo->GetSelection();
if( selected != -1 )
{
int selected = combo->GetSelection();
if( selected != -1 )
{
- return (char *)combo->GetClientData( selected );
+ return wxU((char *)combo->GetClientData( selected ));
* transcode.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* transcode.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: transcode.c,v 1.48 2003/10/30 12:01:01 gbazin Exp $
+ * $Id: transcode.c,v 1.49 2003/11/05 18:59:01 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
#if LIBAVCODEC_BUILD >= 4662
id->p_encoder->i_frame_rate_base= id->ff_dec_c->frame_rate_base;
#endif
#if LIBAVCODEC_BUILD >= 4662
id->p_encoder->i_frame_rate_base= id->ff_dec_c->frame_rate_base;
#endif
+
+#if LIBAVCODEC_BUILD >= 4687
+ id->p_encoder->i_aspect = VOUT_ASPECT_FACTOR *
+ ( av_q2d(id->ff_dec_c->sample_aspect_ratio) *
+ id->ff_dec_c->width / id->ff_dec_c->height );
+#else
+ id->p_encoder->i_aspect = VOUT_ASPECT_FACTOR *
+ id->ff_dec_c->aspect_ratio;
+#endif
+
* configuration.c management of the modules configuration
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* configuration.c management of the modules configuration
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.68 2003/11/05 17:57:29 gbazin Exp $
+ * $Id: configuration.c,v 1.69 2003/11/05 18:59:01 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
case CONFIG_ITEM_INTEGER:
if( !*psz_option_value )
break; /* ignore empty option */
case CONFIG_ITEM_INTEGER:
if( !*psz_option_value )
break; /* ignore empty option */
- p_item->i_value = atoi( psz_option_value);
+ p_item->i_value = strtol( psz_option_value, 0, 0 );
#if 0
msg_Dbg( p_this, "option \"%s\", value %i",
p_item->psz_name, p_item->i_value );
#if 0
msg_Dbg( p_this, "option \"%s\", value %i",
p_item->psz_name, p_item->i_value );
config_PutPsz( p_this, psz_name, optarg );
break;
case CONFIG_ITEM_INTEGER:
config_PutPsz( p_this, psz_name, optarg );
break;
case CONFIG_ITEM_INTEGER:
- config_PutInt( p_this, psz_name, atoi(optarg));
+ config_PutInt( p_this, psz_name, strtol(optarg, 0, 0));
break;
case CONFIG_ITEM_FLOAT:
config_PutFloat( p_this, psz_name, (float)atof(optarg) );
break;
case CONFIG_ITEM_FLOAT:
config_PutFloat( p_this, psz_name, (float)atof(optarg) );
else
{
config_PutInt( p_this, pp_shortopts[i_cmd]->psz_name,
else
{
config_PutInt( p_this, pp_shortopts[i_cmd]->psz_name,
+ strtol(optarg, 0, 0) );
}
break;
case CONFIG_ITEM_BOOL:
}
break;
case CONFIG_ITEM_BOOL: