Commit b6b1bef8 authored by Sam Hocevar's avatar Sam Hocevar

* ./mozilla/vlcshell.cpp: fixed the Mozilla plugin's target drawable.

  * ./modules/video_output/directx/directx.c, ./modules/video_output/x11/x11.c,
    ./modules/video_output/x11/xvideo.c: removed the drawable configuration
    variables which are now deprecated.
parent 79264035
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout.c: Windows DirectX video output display method * vout.c: Windows DirectX video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: directx.c,v 1.11 2003/02/01 09:40:50 babal Exp $ * $Id: directx.c,v 1.12 2003/02/01 18:54:10 sam Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -102,17 +102,12 @@ static int DirectXGetSurfaceDesc ( vout_thread_t *p_vout, picture_t *p_pic ); ...@@ -102,17 +102,12 @@ static int DirectXGetSurfaceDesc ( vout_thread_t *p_vout, picture_t *p_pic );
"isn't recommended as usually using video memory allows to benefit from " \ "isn't recommended as usually using video memory allows to benefit from " \
"more hardware acceleration (like rescaling or YUV->RGB conversions). " \ "more hardware acceleration (like rescaling or YUV->RGB conversions). " \
"This option doesn't have any effect when using overlays." ) "This option doesn't have any effect when using overlays." )
#define WINDOW_TEXT N_("specify an existing window")
#define WINDOW_LONGTEXT N_( \
"Specify a window to use instead of opening a new one. This option is " \
"DANGEROUS, use with care." )
vlc_module_begin(); vlc_module_begin();
add_category_hint( N_("Video"), NULL ); add_category_hint( N_("Video"), NULL );
add_bool( "directx-on-top", 0, NULL, ON_TOP_TEXT, ON_TOP_LONGTEXT ); add_bool( "directx-on-top", 0, NULL, ON_TOP_TEXT, ON_TOP_LONGTEXT );
add_bool( "directx-hw-yuv", 1, NULL, HW_YUV_TEXT, HW_YUV_LONGTEXT ); add_bool( "directx-hw-yuv", 1, NULL, HW_YUV_TEXT, HW_YUV_LONGTEXT );
add_bool( "directx-use-sysmem", 0, NULL, SYSMEM_TEXT, SYSMEM_LONGTEXT ); add_bool( "directx-use-sysmem", 0, NULL, SYSMEM_TEXT, SYSMEM_LONGTEXT );
add_integer( "directx-window", 0, NULL, WINDOW_TEXT, WINDOW_LONGTEXT );
set_description( _("DirectX video module") ); set_description( _("DirectX video module") );
set_capability( "video output", 100 ); set_capability( "video output", 100 );
add_shortcut( "directx" ); add_shortcut( "directx" );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* events.c: Windows DirectX video output events handler * events.c: Windows DirectX video output events handler
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: events.c,v 1.10 2003/01/27 01:42:19 ipkiss Exp $ * $Id: events.c,v 1.11 2003/02/01 18:54:10 sam Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -280,6 +280,8 @@ static int DirectXCreateWindow( vout_thread_t *p_vout ) ...@@ -280,6 +280,8 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
HMENU hMenu; HMENU hMenu;
RECT rect_window; RECT rect_window;
vlc_value_t val;
msg_Dbg( p_vout, "DirectXCreateWindow" ); msg_Dbg( p_vout, "DirectXCreateWindow" );
/* Get this module's instance */ /* Get this module's instance */
...@@ -323,8 +325,9 @@ static int DirectXCreateWindow( vout_thread_t *p_vout ) ...@@ -323,8 +325,9 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
ReleaseDC( NULL, hdc ); ReleaseDC( NULL, hdc );
/* If an external window was specified, we'll draw in it. */ /* If an external window was specified, we'll draw in it. */
var_Get( p_vout->p_vlc, "drawable", &val );
p_vout->p_sys->hparent = p_vout->p_sys->hwnd = p_vout->p_sys->hparent = p_vout->p_sys->hwnd =
(void*)(ptrdiff_t)config_GetInt( p_vout, "directx-window" ); val.i_int ? (void*)(ptrdiff_t) val.i_int : NULL;
if( p_vout->p_sys->hparent ) if( p_vout->p_sys->hparent )
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* x11.c : X11 plugin for vlc * x11.c : X11 plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: x11.c,v 1.2 2002/08/26 09:12:46 sam Exp $ * $Id: x11.c,v 1.3 2003/02/01 18:54:10 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -54,11 +54,6 @@ extern void E_(Deactivate) ( vlc_object_t * ); ...@@ -54,11 +54,6 @@ extern void E_(Deactivate) ( vlc_object_t * );
"Specify the X11 hardware display you want to use. By default vlc will " \ "Specify the X11 hardware display you want to use. By default vlc will " \
"use the value of the DISPLAY environment variable.") "use the value of the DISPLAY environment variable.")
#define DRAWABLE_TEXT N_("X11 drawable")
#define DRAWABLE_LONGTEXT N_( \
"Specify a X11 drawable to use instead of opening a new window. This " \
"option is DANGEROUS, use with care.")
#define SHM_TEXT N_("use shared memory") #define SHM_TEXT N_("use shared memory")
#define SHM_LONGTEXT N_( \ #define SHM_LONGTEXT N_( \
"Use shared memory to communicate between vlc and the X server.") "Use shared memory to communicate between vlc and the X server.")
...@@ -67,7 +62,6 @@ vlc_module_begin(); ...@@ -67,7 +62,6 @@ vlc_module_begin();
add_category_hint( N_("X11"), NULL ); add_category_hint( N_("X11"), NULL );
add_string( "x11-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT ); add_string( "x11-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT );
add_bool( "x11-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT ); add_bool( "x11-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT );
add_integer( "x11-drawable", -1, NULL, DRAWABLE_TEXT, DRAWABLE_LONGTEXT );
#ifdef HAVE_SYS_SHM_H #ifdef HAVE_SYS_SHM_H
add_bool( "x11-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT ); add_bool( "x11-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT );
#endif #endif
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* xcommon.c: Functions common to the X11 and XVideo plugins * xcommon.c: Functions common to the X11 and XVideo plugins
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: xcommon.c,v 1.12 2003/01/28 16:57:28 sam Exp $ * $Id: xcommon.c,v 1.13 2003/02/01 18:54:10 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -111,7 +111,8 @@ static void XVideoReleasePort( vout_thread_t *, int ); ...@@ -111,7 +111,8 @@ static void XVideoReleasePort( vout_thread_t *, int );
#endif #endif
#ifdef MODULE_NAME_IS_x11 #ifdef MODULE_NAME_IS_x11
static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); static void SetPalette ( vout_thread_t *,
uint16_t *, uint16_t *, uint16_t * );
#endif #endif
/***************************************************************************** /*****************************************************************************
...@@ -822,6 +823,7 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win ) ...@@ -822,6 +823,7 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
vlc_bool_t b_configure_notify; vlc_bool_t b_configure_notify;
vlc_bool_t b_map_notify; vlc_bool_t b_map_notify;
vlc_value_t val;
long long int i_drawable; long long int i_drawable;
/* Prepare window manager hints and properties */ /* Prepare window manager hints and properties */
...@@ -840,10 +842,10 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win ) ...@@ -840,10 +842,10 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
xwindow_attributes.event_mask = ExposureMask | StructureNotifyMask; xwindow_attributes.event_mask = ExposureMask | StructureNotifyMask;
/* Check whether someone provided us with a window ID */ /* Check whether someone provided us with a window ID */
i_drawable = p_vout->b_fullscreen ? var_Get( p_vout->p_vlc, "drawable", &val );
-1 : config_GetInt( p_vout, MODULE_STRING "-drawable"); i_drawable = p_vout->b_fullscreen ? 0 : val.i_int;
if( i_drawable == -1 ) if( !i_drawable )
{ {
p_win->b_owned = VLC_TRUE; p_win->b_owned = VLC_TRUE;
...@@ -1424,10 +1426,13 @@ static void EnableXScreenSaver( vout_thread_t *p_vout ) ...@@ -1424,10 +1426,13 @@ static void EnableXScreenSaver( vout_thread_t *p_vout )
int dummy; int dummy;
#endif #endif
if( p_vout->p_sys->i_ss_timeout )
{
XSetScreenSaver( p_vout->p_sys->p_display, p_vout->p_sys->i_ss_timeout, XSetScreenSaver( p_vout->p_sys->p_display, p_vout->p_sys->i_ss_timeout,
p_vout->p_sys->i_ss_interval, p_vout->p_sys->i_ss_interval,
p_vout->p_sys->i_ss_blanking, p_vout->p_sys->i_ss_blanking,
p_vout->p_sys->i_ss_exposure ); p_vout->p_sys->i_ss_exposure );
}
/* Restore DPMS settings */ /* Restore DPMS settings */
#ifdef DPMSINFO_IN_DPMS_H #ifdef DPMSINFO_IN_DPMS_H
...@@ -1459,10 +1464,13 @@ static void DisableXScreenSaver( vout_thread_t *p_vout ) ...@@ -1459,10 +1464,13 @@ static void DisableXScreenSaver( vout_thread_t *p_vout )
&p_vout->p_sys->i_ss_exposure ); &p_vout->p_sys->i_ss_exposure );
/* Disable screen saver */ /* Disable screen saver */
if( p_vout->p_sys->i_ss_timeout )
{
XSetScreenSaver( p_vout->p_sys->p_display, 0, XSetScreenSaver( p_vout->p_sys->p_display, 0,
p_vout->p_sys->i_ss_interval, p_vout->p_sys->i_ss_interval,
p_vout->p_sys->i_ss_blanking, p_vout->p_sys->i_ss_blanking,
p_vout->p_sys->i_ss_exposure ); p_vout->p_sys->i_ss_exposure );
}
/* Disable DPMS */ /* Disable DPMS */
#ifdef DPMSINFO_IN_DPMS_H #ifdef DPMSINFO_IN_DPMS_H
...@@ -2027,7 +2035,8 @@ static IMAGE_TYPE * CreateImage( vout_thread_t *p_vout, ...@@ -2027,7 +2035,8 @@ static IMAGE_TYPE * CreateImage( vout_thread_t *p_vout,
* anything, but could later send information on which colors it was unable * anything, but could later send information on which colors it was unable
* to set. * to set.
*****************************************************************************/ *****************************************************************************/
static void SetPalette( vout_thread_t *p_vout, u16 *red, u16 *green, u16 *blue ) static void SetPalette( vout_thread_t *p_vout,
uint16_t *red, uint16_t *green, uint16_t *blue )
{ {
int i; int i;
XColor p_colors[255]; XColor p_colors[255];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* xvideo.c : Xvideo plugin for vlc * xvideo.c : Xvideo plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: xvideo.c,v 1.2 2002/08/26 09:12:46 sam Exp $ * $Id: xvideo.c,v 1.3 2003/02/01 18:54:10 sam Exp $
* *
* Authors: Shane Harper <shanegh@optusnet.com.au> * Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -65,11 +65,6 @@ extern void E_(Deactivate) ( vlc_object_t * ); ...@@ -65,11 +65,6 @@ extern void E_(Deactivate) ( vlc_object_t * );
"Force the XVideo renderer to use a specific chroma format instead of " \ "Force the XVideo renderer to use a specific chroma format instead of " \
"trying to improve performances by using the most efficient one.") "trying to improve performances by using the most efficient one.")
#define DRAWABLE_TEXT N_("X11 drawable")
#define DRAWABLE_LONGTEXT N_( \
"Specify a X11 drawable to use instead of opening a new window. This " \
"option is DANGEROUS, use with care.")
#define SHM_TEXT N_("use shared memory") #define SHM_TEXT N_("use shared memory")
#define SHM_LONGTEXT N_( \ #define SHM_LONGTEXT N_( \
"Use shared memory to communicate between vlc and the X server.") "Use shared memory to communicate between vlc and the X server.")
...@@ -80,7 +75,6 @@ vlc_module_begin(); ...@@ -80,7 +75,6 @@ vlc_module_begin();
add_integer( "xvideo-adaptor", -1, NULL, ADAPTOR_TEXT, ADAPTOR_LONGTEXT ); add_integer( "xvideo-adaptor", -1, NULL, ADAPTOR_TEXT, ADAPTOR_LONGTEXT );
add_bool( "xvideo-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT ); add_bool( "xvideo-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT );
add_string( "xvideo-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT ); add_string( "xvideo-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT );
add_integer( "xvideo-drawable", -1, NULL, DRAWABLE_TEXT, DRAWABLE_LONGTEXT );
#ifdef HAVE_SYS_SHM_H #ifdef HAVE_SYS_SHM_H
add_bool( "xvideo-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT ); add_bool( "xvideo-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT );
#endif #endif
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcplugin.cpp: a VideoLAN Client plugin for Mozilla * vlcplugin.cpp: a VideoLAN Client plugin for Mozilla
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlcplugin.cpp,v 1.2 2002/09/30 11:05:41 sam Exp $ * $Id: vlcplugin.cpp,v 1.3 2003/02/01 18:54:10 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcshell.c: a VideoLAN Client plugin for Mozilla * vlcshell.c: a VideoLAN Client plugin for Mozilla
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlcshell.cpp,v 1.8 2003/01/28 16:57:28 sam Exp $ * $Id: vlcshell.cpp,v 1.9 2003/02/01 18:54:10 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -359,11 +359,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window ) ...@@ -359,11 +359,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
/* FIXME: this cast sucks */ /* FIXME: this cast sucks */
value.i_int = (int) (ptrdiff_t) (void *) window->window; value.i_int = (int) (ptrdiff_t) (void *) window->window;
VLC_Set( p_plugin->i_vlc, "conf::x11-drawable", value ); VLC_Set( p_plugin->i_vlc, "drawable", value );
VLC_Set( p_plugin->i_vlc, "conf::xvideo-drawable", value );
value.i_int = (int) (ptrdiff_t) (void *) window->window;
VLC_Set( p_plugin->i_vlc, "conf::directx-window", value );
#endif #endif
/* /*
...@@ -469,7 +465,7 @@ NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream *stream, ...@@ -469,7 +465,7 @@ NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream *stream,
VlcPlugin* p_plugin = (VlcPlugin*)instance->pdata; VlcPlugin* p_plugin = (VlcPlugin*)instance->pdata;
#endif #endif
fprintf(stderr, "NPP_NewStream - FILE mode !!\n"); /* fprintf(stderr, "NPP_NewStream - FILE mode !!\n"); */
/* We want a *filename* ! */ /* We want a *filename* ! */
*stype = NP_ASFILE; *stype = NP_ASFILE;
...@@ -495,7 +491,7 @@ int32 NPP_WriteReady( NPP instance, NPStream *stream ) ...@@ -495,7 +491,7 @@ int32 NPP_WriteReady( NPP instance, NPStream *stream )
{ {
VlcPlugin* p_plugin; VlcPlugin* p_plugin;
fprintf(stderr, "NPP_WriteReady\n"); /* fprintf(stderr, "NPP_WriteReady\n"); */
if (instance != NULL) if (instance != NULL)
{ {
...@@ -514,7 +510,7 @@ int32 NPP_WriteReady( NPP instance, NPStream *stream ) ...@@ -514,7 +510,7 @@ int32 NPP_WriteReady( NPP instance, NPStream *stream )
int32 NPP_Write( NPP instance, NPStream *stream, int32 offset, int32 NPP_Write( NPP instance, NPStream *stream, int32 offset,
int32 len, void *buffer ) int32 len, void *buffer )
{ {
fprintf(stderr, "NPP_Write %i\n", (int)len); /* fprintf(stderr, "NPP_Write %i\n", (int)len); */
if( instance != NULL ) if( instance != NULL )
{ {
...@@ -543,13 +539,13 @@ void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname ) ...@@ -543,13 +539,13 @@ void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* fname )
return; return;
} }
fprintf(stderr, "NPP_StreamAsFile %s\n", fname); /* fprintf(stderr, "NPP_StreamAsFile %s\n", fname); */
#if USE_LIBVLC #if USE_LIBVLC
/* VlcPlugin* p_plugin = (VlcPlugin*)instance->pdata; */ VlcPlugin* p_plugin = (VlcPlugin*)instance->pdata;
/* VLC_AddTarget( p_plugin->i_vlc, fname, VLC_AddTarget( p_plugin->i_vlc, fname,
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );*/ PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
#endif #endif
} }
......
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