]> git.sesse.net Git - vlc/commitdiff
* Win32 compilation fixes when downmixsse and downmix3dn are declared as
authorGildas Bazin <gbazin@videolan.org>
Mon, 1 Apr 2002 16:08:23 +0000 (16:08 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 1 Apr 2002 16:08:23 +0000 (16:08 +0000)
    plugins.
* Fixed the waiting on the event thread creation in the directx plugin.

plugins/directx/vout_directx.c
plugins/directx/vout_events.c
plugins/downmix/ac3_downmix_3dn.c
plugins/downmix/ac3_downmix_sse.c

index 625ead19f72007bad988b9bf93bf1bafcd081414..a7910e43110c188ccb3a2a234789ded15a049d33 100644 (file)
@@ -2,7 +2,7 @@
  * vout_directx.c: Windows DirectX video output display method
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vout_directx.c,v 1.28 2002/03/28 10:17:06 gbazin Exp $
+ * $Id: vout_directx.c,v 1.29 2002/04/01 16:08:23 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -168,13 +168,13 @@ static int vout_Create( vout_thread_t *p_vout )
     }
 
     /* We need to wait for the actual creation of the thread and window */
+    vlc_mutex_lock( &p_vout->p_sys->event_thread_lock );
     if( p_vout->p_sys->i_event_thread_status == THREAD_CREATE )
     {
-        vlc_mutex_lock( &p_vout->p_sys->event_thread_lock );
         vlc_cond_wait ( &p_vout->p_sys->event_thread_wait,
                         &p_vout->p_sys->event_thread_lock );
-        vlc_mutex_unlock( &p_vout->p_sys->event_thread_lock );
     }
+    vlc_mutex_unlock( &p_vout->p_sys->event_thread_lock );
     if( p_vout->p_sys->i_event_thread_status != THREAD_READY )
     {
         intf_ErrMsg( "vout error: DirectXEventThread failed" );
index 025eeb532d85ee2bf4848da351b59fff0843fed0..6235afd602772a9a4c4fc1a58312635a10b89600 100644 (file)
@@ -2,7 +2,7 @@
  * vout_events.c: Windows DirectX video output events handler
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vout_events.c,v 1.11 2002/02/19 00:50:19 sam Exp $
+ * $Id: vout_events.c,v 1.12 2002/04/01 16:08:23 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -73,26 +73,23 @@ void DirectXEventThread( vout_thread_t *p_vout )
     /* Create a window for the video */
     /* Creating a window under Windows also initializes the thread's event
      * message qeue */
+    vlc_mutex_lock( &p_vout->p_sys->event_thread_lock );
     if( DirectXCreateWindow( p_vout ) )
     {
         intf_ErrMsg( "vout error: can't create window" );
         p_vout->p_sys->i_event_thread_status = THREAD_FATAL;
-        /* signal the creation of the window */
-        vlc_mutex_lock( &p_vout->p_sys->event_thread_lock );
-        vlc_cond_signal( &p_vout->p_sys->event_thread_wait );
-        vlc_mutex_unlock( &p_vout->p_sys->event_thread_lock );
-        return;
+        p_vout->p_sys->b_event_thread_die = 1;
     }
+    else p_vout->p_sys->i_event_thread_status = THREAD_READY;
 
     /* signal the creation of the window */
-    p_vout->p_sys->i_event_thread_status = THREAD_READY;
-    vlc_mutex_lock( &p_vout->p_sys->event_thread_lock );
     vlc_cond_signal( &p_vout->p_sys->event_thread_wait );
     vlc_mutex_unlock( &p_vout->p_sys->event_thread_lock );
 
     /* Main loop */
     /* GetMessage will sleep if there's no message in the queue */
-    while( GetMessage( &msg, p_vout->p_sys->hwnd, 0, 0 ) )
+    while( !p_vout->p_sys->b_event_thread_die
+           && GetMessage( &msg, p_vout->p_sys->hwnd, 0, 0 ) )
     {
 
         /* Check if we are asked to exit */
@@ -516,7 +513,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
         break;
 
     case WM_ACTIVATE:
-        intf_WarnMsg( 4, "vout: WinProc WM_ACTIVE" );
+        intf_WarnMsg( 4, "vout: WinProc WM_ACTIVATE" );
         break;
 
     case WM_CREATE:
index b9c37bab09ce9332decc531e2571e1c20995de35..e69e494ea9415566b15a558a19107c22ec9fcb52 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_downmix_3dn.c: accelerated 3D Now! ac3 downmix functions
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: ac3_downmix_3dn.c,v 1.9 2001/12/30 07:09:54 sam Exp $
+ * $Id: ac3_downmix_3dn.c,v 1.10 2002/04/01 16:08:23 gbazin Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *
@@ -28,7 +28,7 @@
 
 #include "ac3_downmix.h"
 
-const float sqrt2_3dn __asm__ ("sqrt2_3dn") = 0.7071068;
+static const float sqrt2_3dn __asm__ ("sqrt2_3dn") = 0.7071068;
 
 void _M( downmix_3f_2r_to_2ch ) (float * samples, dm_par_t * dm_par)
 {
index 24b338ade5e10fbf84d470e3b9562b7a980a00a8..ff2d0c13d895a239d3263b1813b826f200f1f202 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_downmix_sse.c: accelerated SSE ac3 downmix functions
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: ac3_downmix_sse.c,v 1.9 2001/12/30 07:09:54 sam Exp $
+ * $Id: ac3_downmix_sse.c,v 1.10 2002/04/01 16:08:23 gbazin Exp $
  *
  * Authors: Renaud Dartus <reno@videolan.org>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
@@ -29,7 +29,7 @@
 
 #include "ac3_downmix.h"
 
-const float sqrt2_sse __asm__ ("sqrt2_sse") __attribute__ ((aligned (16))) = 0.7071068;
+static const float sqrt2_sse __asm__ ("sqrt2_sse") __attribute__ ((aligned (16))) = 0.7071068;
 
 void _M( downmix_3f_2r_to_2ch ) (float * samples, dm_par_t * dm_par)
 {