/*****************************************************************************
* Public API
*****************************************************************************/
+
+#undef spu_Create
/**
* Creates the subpicture unit
*
* \param p_this the parent object which creates the subpicture unit
*/
-spu_t *__spu_Create( vlc_object_t *p_this )
+spu_t *spu_Create( vlc_object_t *p_this )
{
spu_t *p_spu;
spu_private_t *p_sys;
p_sys->p_scale = NULL;
p_sys->p_scale_yuvp = NULL;
- p_sys->i_margin = config_GetInt( p_spu, "sub-margin" );
+ p_sys->i_margin = var_InheritInteger( p_spu, "sub-margin" );
/* Register the default subpicture channel */
p_sys->i_channel = 2;
p_region = p_subpic->p_region;
if( !p_region->fmt.i_sar_num || !p_region->fmt.i_sar_den )
{
- if( p_region->fmt.i_aspect != 0 )
- {
- p_region->fmt.i_sar_den = p_region->fmt.i_aspect;
- p_region->fmt.i_sar_num = VOUT_ASPECT_FACTOR;
- }
- else
- {
- p_region->fmt.i_sar_den = p_fmt_dst->i_sar_den;
- p_region->fmt.i_sar_num = p_fmt_dst->i_sar_num;
- }
+ p_region->fmt.i_sar_den = p_fmt_dst->i_sar_den;
+ p_region->fmt.i_sar_num = p_fmt_dst->i_sar_num;
}
/* Take care of the aspect ratio */
p_subpic->i_original_picture_width = fmt_out.i_width;
p_subpic->i_original_picture_height = fmt_out.i_height;
- fmt_out.i_aspect = 0;
fmt_out.i_sar_num =
fmt_out.i_sar_den = 0;
if( p_filter->p_module )
module_unneed( p_filter, p_filter->p_module );
- vlc_object_detach( p_filter );
vlc_object_release( p_filter );
}
p_scale->fmt_out.video.i_width =
p_scale->fmt_out.video.i_height = b_resize ? 16 : 32;
- p_scale->pf_vout_buffer_new = spu_new_video_buffer;
- p_scale->pf_vout_buffer_del = spu_del_video_buffer;
+ p_scale->pf_video_buffer_new = spu_new_video_buffer;
+ p_scale->pf_video_buffer_del = spu_del_video_buffer;
vlc_object_attach( p_scale, p_obj );
p_scale->p_module = module_need( p_scale, "video filter2", NULL, false );