Commit 58fe5c23 authored by Gildas Bazin's avatar Gildas Bazin

* src/video_output/video_output.c: new "deinterlace" object variable.
* modules/gui/macosx/prefs.m: compilation fix.
* modules/gui/wxwindows/menus.cpp: use the "deinterlace" object var.
* modules/gui/skins/*: couple of fixes.
parent 73afb0aa
......@@ -2,7 +2,7 @@
* prefs.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.m,v 1.25 2003/05/24 02:48:55 hartman Exp $
* $Id: prefs.m,v 1.26 2003/05/24 20:54:27 gbazin Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj at users.sf.net>
......@@ -140,8 +140,8 @@
NSString *o_value;
o_value = [o_vlc_config titleOfSelectedItem];
[o_value isEqualToString: _NS("Auto") ] ? psz_value = "" :
psz_value = (char *)[o_value lossyCString];
psz_value = [o_value isEqualToString: _NS("Auto") ] ? "" :
(char *)[o_value lossyCString];
config_PutPsz( p_intf, psz_name, psz_value );
}
break;
......
......@@ -2,7 +2,7 @@
* themeloader.cpp: ThemeLoader class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: themeloader.cpp,v 1.9 2003/05/02 15:53:32 gbazin Exp $
* $Id: themeloader.cpp,v 1.10 2003/05/24 20:54:27 gbazin Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -331,7 +331,11 @@ int tar_extract_all( TAR *t, char *prefix )
* Always expect complete blocks to process
* the tar information.
*/
if(len != BLOCKSIZE) fprintf(stderr, "gzread: incomplete block read");
if(len != BLOCKSIZE)
{
fprintf(stderr, "gzread: incomplete block read");
return -1;
}
/*
* If we have to get a tar header
......
......@@ -2,7 +2,7 @@
* x11_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_run.cpp,v 1.6 2003/05/19 21:39:34 asmax Exp $
* $Id: x11_run.cpp,v 1.7 2003/05/24 20:54:27 gbazin Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
......@@ -344,9 +344,10 @@ void OSRun( intf_thread_t *p_intf )
VlcProc *proc = new VlcProc( p_intf );
/* wxTheApp = new Instance( p_intf, callbackobj );
wxEntry( 1, p_args );*/
#ifndef BASIC_SKINS
wxTheApp = new Instance( p_intf );
wxEntry( 1, p_args );
#endif
Display *display = ((OSTheme *)p_intf->p_sys->p_theme)->GetDisplay();
......
......@@ -2,7 +2,7 @@
* menus.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: menus.cpp,v 1.12 2003/05/21 13:27:25 gbazin Exp $
* $Id: menus.cpp,v 1.13 2003/05/24 20:54:27 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -129,6 +129,8 @@ void PopupMenu( intf_thread_t *_p_intf, Interface *_p_main_interface,
{
ppsz_varnames[i] = "fullscreen";
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "deinterlace";
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "directx-on-top";
pi_objects[i++] = p_object->i_object_id;
vlc_object_release( p_object );
......@@ -225,6 +227,8 @@ wxMenu *VideoMenu( intf_thread_t *_p_intf, Interface *_p_main_interface )
{
ppsz_varnames[i] = "fullscreen";
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "deinterlace";
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "directx-on-top";
pi_objects[i++] = p_object->i_object_id;
vlc_object_release( p_object );
......
......@@ -5,7 +5,7 @@
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: video_output.c,v 1.222 2003/05/21 13:27:25 gbazin Exp $
* $Id: video_output.c,v 1.223 2003/05/24 20:54:27 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -60,6 +60,8 @@ static void InitWindowSize ( vout_thread_t *, int *, int * );
/* Object variables callbacks */
static int FullscreenCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int DeinterlaceCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
/*****************************************************************************
* vout_Request: find a video output thread, create one, or destroy one.
......@@ -383,6 +385,25 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent,
var_Change( p_vout, "fullscreen", VLC_VAR_SETTEXT, &text, NULL );
var_AddCallback( p_vout, "fullscreen", FullscreenCallback, NULL );
var_Create( p_vout, "deinterlace", VLC_VAR_STRING | VLC_VAR_HASCHOICE );
text.psz_string = _("Deinterlace");
var_Change( p_vout, "deinterlace", VLC_VAR_SETTEXT, &text, NULL );
val.psz_string = ""; text.psz_string = _("Disable");
var_Change( p_vout, "deinterlace", VLC_VAR_ADDCHOICE, &val, &text );
var_Set( p_vout, "deinterlace", val );
val.psz_string = "discard"; text.psz_string = _("Discard");
var_Change( p_vout, "deinterlace", VLC_VAR_ADDCHOICE, &val, &text );
val.psz_string = "blend"; text.psz_string = _("Blend");
var_Change( p_vout, "deinterlace", VLC_VAR_ADDCHOICE, &val, &text );
val.psz_string = "mean"; text.psz_string = _("Mean");
var_Change( p_vout, "deinterlace", VLC_VAR_ADDCHOICE, &val, &text );
val.psz_string = "bob"; text.psz_string = _("Bob");
var_Change( p_vout, "deinterlace", VLC_VAR_ADDCHOICE, &val, &text );
val.psz_string = "linear"; text.psz_string = _("Linear");
var_Change( p_vout, "deinterlace", VLC_VAR_ADDCHOICE, &val, &text );
//var_Change( p_vout, "deinterlace", VLC_VAR_INHERITVALUE, NULL, NULL );
var_AddCallback( p_vout, "deinterlace", DeinterlaceCallback, NULL );
/* Calculate delay created by internal caching */
p_input_thread = (input_thread_t *)vlc_object_find( p_vout,
VLC_OBJECT_INPUT, FIND_ANYWHERE );
......@@ -1175,3 +1196,76 @@ static int FullscreenCallback( vlc_object_t *p_this, char const *psz_cmd,
var_Set( p_vout, "intf-change", val );
return VLC_SUCCESS;
}
static int DeinterlaceCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
input_thread_t *p_input;
vlc_value_t val;
char *psz_mode = newval.psz_string;
char *psz_filter;
unsigned int i;
psz_filter = config_GetPsz( p_vout, "filter" );
if( !psz_mode || !*psz_mode )
{
config_PutPsz( p_vout, "filter", "" );
}
else
{
if( !psz_filter || !*psz_filter )
{
config_PutPsz( p_vout, "filter", "deinterlace" );
}
else
{
if( strstr( psz_filter, "deinterlace" ) == NULL )
{
psz_filter = realloc( psz_filter, strlen( psz_filter ) + 20 );
strcat( psz_filter, ",deinterlace" );
}
config_PutPsz( p_vout, "filter", psz_filter );
}
}
if( psz_filter ) free( psz_filter );
/* now restart all video streams */
p_input = (input_thread_t *)vlc_object_find( p_this, VLC_OBJECT_INPUT,
FIND_PARENT );
if( p_input )
{
vlc_mutex_lock( &p_input->stream.stream_lock );
p_vout->b_filter_change = VLC_TRUE;
#define ES p_input->stream.pp_es[i]
for( i = 0 ; i < p_input->stream.i_es_number ; i++ )
{
if( ( ES->i_cat == VIDEO_ES ) && ES->p_decoder_fifo != NULL )
{
input_UnselectES( p_input, ES );
input_SelectES( p_input, ES );
}
#undef ES
}
vlc_mutex_unlock( &p_input->stream.stream_lock );
vlc_object_release( p_input );
}
if( psz_mode && *psz_mode )
{
val.psz_string = psz_mode;
if( var_Set( p_vout, "deinterlace-mode", val ) != VLC_SUCCESS )
config_PutPsz( p_vout, "deinterlace-mode", psz_mode );
}
val.b_bool = VLC_TRUE;
var_Set( p_vout, "intf-change", val );
return VLC_SUCCESS;
}
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