Commit 00a3f0e4 authored by Simon Latapie's avatar Simon Latapie

* put the beautiful "no picture" black screen.

parent fb88af7f
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* vout.m: MacOS X video output plugin * vout.m: MacOS X video output plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2003 VideoLAN * Copyright (C) 2001-2003 VideoLAN
* $Id: vout.m,v 1.54 2003/08/20 16:22:27 garf Exp $ * $Id: vout.m,v 1.55 2003/08/25 14:51:47 garf Exp $
* *
* Authors: Colin Delacroix <colin@zoy.org> * Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org> * Florian G. Pflug <fgp@phlo.org>
...@@ -486,10 +486,13 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -486,10 +486,13 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
GetPortBounds( p_vout->p_sys->p_qdportold, &oldrect ); GetPortBounds( p_vout->p_sys->p_qdportold, &oldrect );
GetClip( oldClip ); GetClip( oldClip );
LockPortBits( p_vout->p_sys->p_qdport );
SetPort( p_vout->p_sys->p_qdport ); SetPort( p_vout->p_sys->p_qdport );
SetOrigin( p_vout->p_sys->portx , p_vout->p_sys->porty ); SetOrigin( p_vout->p_sys->portx , p_vout->p_sys->porty );
ClipRect( &p_vout->p_sys->rect ); ClipRect( &p_vout->p_sys->rect );
if( ( err = DecompressSequenceFrameS( if( ( err = DecompressSequenceFrameS(
p_vout->p_sys->i_seq, p_vout->p_sys->i_seq,
p_pic->p_sys->p_info, p_pic->p_sys->p_info,
...@@ -503,9 +506,13 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -503,9 +506,13 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
QDFlushPortBuffer( p_vout->p_sys->p_qdport, p_vout->p_sys->mask ); QDFlushPortBuffer( p_vout->p_sys->p_qdport, p_vout->p_sys->mask );
} }
SetOrigin( oldrect.left , oldrect.top ); SetOrigin( oldrect.left , oldrect.top );
SetClip( oldClip ); SetClip( oldClip );
SetPort( p_vout->p_sys->p_qdportold ); SetPort( p_vout->p_sys->p_qdportold );
UnlockPortBits( p_vout->p_sys->p_qdport );
} }
else else
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcshell.cpp: a VLC plugin for Mozilla * vlcshell.cpp: a VLC plugin for Mozilla
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlcshell.cpp,v 1.18 2003/08/19 14:07:51 garf Exp $ * $Id: vlcshell.cpp,v 1.19 2003/08/25 14:51:49 garf Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
#ifdef XP_MACOSX #ifdef XP_MACOSX
/* Mac OS X stuff */ /* Mac OS X stuff */
# include <QuickDraw.h> # include <Quickdraw.h>
#endif #endif
#include "vlcpeer.h" #include "vlcpeer.h"
...@@ -208,7 +208,6 @@ int16 NPP_HandleEvent( NPP instance, void * event ) ...@@ -208,7 +208,6 @@ int16 NPP_HandleEvent( NPP instance, void * event )
{ {
value.i_int = 1; value.i_int = 1;
VLC_Set( p_plugin->i_vlc, "drawableredraw", value ); VLC_Set( p_plugin->i_vlc, "drawableredraw", value );
return true; return true;
} }
...@@ -413,6 +412,8 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window ) ...@@ -413,6 +412,8 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
vlc_value_t valuer; vlc_value_t valuer;
vlc_value_t valueportx; vlc_value_t valueportx;
vlc_value_t valueporty; vlc_value_t valueporty;
Rect black_rect;
char * text;
#endif #endif
if( instance == NULL ) if( instance == NULL )
...@@ -454,6 +455,24 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window ) ...@@ -454,6 +455,24 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
p_plugin->window = window; p_plugin->window = window;
/* draw the beautiful "No Picture" */
black_rect.top = valuet.i_int - valuey.i_int;
black_rect.left = valuel.i_int - valuex.i_int;
black_rect.bottom = valueb.i_int - valuey.i_int;
black_rect.right = valuer.i_int - valuex.i_int;
SetPort( value.i_int );
SetOrigin( valueportx.i_int , valueporty.i_int );
ForeColor(blackColor);
PenMode( patCopy );
PaintRect( &black_rect );
ForeColor(whiteColor);
text = strdup( WINDOW_TEXT );
MoveTo( valuew.i_int / 2 - 40 , valueh.i_int / 2 );
DrawText( text , 0 , strlen(text) );
#else #else
/* 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;
......
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