]> git.sesse.net Git - vlc/commitdiff
*) Added "#include <string.>" to include/threads.h
authorFlorian G. Pflug <fgp@videolan.org>
Thu, 29 Nov 2001 01:01:48 +0000 (01:01 +0000)
committerFlorian G. Pflug <fgp@videolan.org>
Thu, 29 Nov 2001 01:01:48 +0000 (01:01 +0000)
     It' wouldn't compile on OSX without this.

  *) Removed the mutex the vout and intf thread (were supposed to use)
     for syncronizing acces to the p_vout->p_sys structure.
     The p_vout->change_lock mutex is used for syncronization now. (and
     should make synronization work)

include/threads.h
plugins/macosx/aout_macosx.c
plugins/macosx/intf_main.c
plugins/macosx/intf_vlc_wrapper.c
plugins/macosx/macosx.h
plugins/macosx/vout_macosx.c

index 60239457e084c391916d426e546486568e1e61d9..a579d8edf9b4a8dc0d670a963e892bfc8584fa71 100644 (file)
@@ -3,7 +3,7 @@
  * This header provides a portable threads implementation.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: threads.h,v 1.28 2001/11/28 15:08:04 massiot Exp $
+ * $Id: threads.h,v 1.29 2001/11/29 01:01:47 fgp Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -24,6 +24,7 @@
  *****************************************************************************/
 
 #include <stdio.h>
+#include <string.h>
 
 #if defined(GPROF) || defined(DEBUG)
 #   include <sys/time.h>
index a3f81b2df36c502e9a1b4eff48a3283013678967..46f9119d4e332d4983d02c3cdc0d2263fa731648 100644 (file)
@@ -2,7 +2,7 @@
  * aout_darwin.c : Darwin audio output plugin
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_macosx.c,v 1.5 2001/10/30 23:45:08 massiot Exp $
+ * $Id: aout_macosx.c,v 1.6 2001/11/29 01:01:48 fgp Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *
 
 #include "config.h"
 #include "common.h"                                     /* boolean_t, byte_t */
+#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
 #include "threads.h"
 #include "mtime.h"
 #include "tests.h"
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
 #include "main.h"
 
 #include "modules.h"
index 8d6e24e3afe293fe4e02d91f5696f35436f98c00..c4fed7c233c9d1a865d24e72e4eb122631a057ab 100644 (file)
 
 #include "config.h"
 #include "common.h"
+#include "intf_msg.h"
 #include "threads.h"
 #include "mtime.h"
 #include "tests.h"
 
 #include "interface.h"
-#include "intf_msg.h"
 
 #include "modules.h"
 #include "modules_export.h"
index 97e3091519e8fb666a8fc0f4bd43c04228ffcde9..d28e8e50ea71ac79513f9e21780a22a5753331a5 100644 (file)
 
 #include "config.h"
 #include "common.h"
+#include "intf_msg.h"
 #include "threads.h"
 #include "mtime.h"
 #include "tests.h"
 
 #include "interface.h"
-#include "intf_msg.h"
 #include "intf_playlist.h"
 
 #include "main.h"
         vlc_mutex_lock(&p_vout_bank->lock) ;
         if (p_vout_bank->i_count) {
             vlc_mutex_lock(&p_vout_bank->pp_vout[0]->change_lock) ;
-            vlc_mutex_lock(&p_vout_bank->pp_vout[0]->p_sys->lock) ;
             return p_vout_bank->pp_vout[0] ;
         }
         else
     }
     
     - (void) unlockVout {
-        vlc_mutex_lock(&p_vout_bank->pp_vout[0]->p_sys->lock) ;
         vlc_mutex_unlock(&p_vout_bank->pp_vout[0]->change_lock) ;
         vlc_mutex_unlock(&p_vout_bank->lock) ;
     }
index 1c6c17c9769c36c76e0fceb1918ee5bb71e38110..726b6ea3c8381cafc9f617a9f15166b5ad96eacd 100644 (file)
@@ -39,7 +39,6 @@
     #define OSX_COM_STRUCT osx_com_s
 #endif
 typedef struct OSX_COM_STRUCT {
-    vlc_mutex_t lock ;
     unsigned int i_changes ;
     
     CGrafPtr p_qdport ;
index eecd8187b034ae7c4c8b5b446acc87854ad957b1..ca2ca8b6b33b55b34ef6055d3e98758138e6a561 100644 (file)
 
 #include "config.h"
 #include "common.h"
+#include "intf_msg.h"
 #include "threads.h"
 #include "mtime.h"
 #include "tests.h"
 
 #include "interface.h"
-#include "intf_msg.h"
 
 #include "video.h"
 #include "video_output.h"
@@ -154,9 +154,7 @@ static int vout_Init( vout_thread_t *p_vout )
     p_vout->b_need_render = 0 ;
     p_vout->i_bytes_per_line = p_vout->i_width ;
     p_vout->p_sys->c_codec = 'NONE' ;
-    vlc_mutex_lock( &p_vout->p_sys->osx_communication.lock ) ;
-        p_vout->p_sys->osx_communication.i_changes |= OSX_VOUT_INTF_REQUEST_QDPORT ;
-    vlc_mutex_unlock( &p_vout->p_sys->osx_communication.lock ) ;
+    p_vout->p_sys->osx_communication.i_changes |= OSX_VOUT_INTF_REQUEST_QDPORT ;
     
     return 0 ;
 }
@@ -166,11 +164,8 @@ static int vout_Init( vout_thread_t *p_vout )
  *****************************************************************************/
 static void vout_End( vout_thread_t *p_vout )
 {
-    vlc_mutex_lock( &p_vout->p_sys->osx_communication.lock ) ;
-        p_vout->p_sys->osx_communication.i_changes |= OSX_VOUT_INTF_RELEASE_QDPORT ;
-    vlc_mutex_unlock( &p_vout->p_sys->osx_communication.lock ) ;
-    
     dispose_QTSequence( p_vout ) ;
+    p_vout->p_sys->osx_communication.i_changes |= OSX_VOUT_INTF_RELEASE_QDPORT ;
 }
 
 /*****************************************************************************
@@ -191,22 +186,20 @@ static void vout_Destroy( vout_thread_t *p_vout )
  *****************************************************************************/
 static int vout_Manage( vout_thread_t *p_vout )
 {    
-    vlc_mutex_lock( &p_vout->p_sys->osx_communication.lock ) ;
-        if ( p_vout->p_sys->osx_communication.i_changes & OSX_INTF_VOUT_QDPORT_CHANGE ) {
-            dispose_QTSequence( p_vout ) ;
-            create_QTSequenceBestCodec( p_vout ) ;
-        }
-        else if ( p_vout->p_sys->osx_communication.i_changes & OSX_INTF_VOUT_SIZE_CHANGE ) {
-            fillout_ScalingMatrix( p_vout ) ;
-            SetDSequenceMatrix( p_vout->p_sys->i_seq, p_vout->p_sys->p_matrix ) ;
-        }
-        
-        p_vout->p_sys->osx_communication.i_changes &= ~( 
-            OSX_INTF_VOUT_QDPORT_CHANGE |
-            OSX_INTF_VOUT_SIZE_CHANGE
-        ) ;
-    vlc_mutex_unlock( &p_vout->p_sys->osx_communication.lock ) ;
-        
+      if ( p_vout->p_sys->osx_communication.i_changes & OSX_INTF_VOUT_QDPORT_CHANGE ) {
+          dispose_QTSequence( p_vout ) ;
+          create_QTSequenceBestCodec( p_vout ) ;
+      }
+      else if ( p_vout->p_sys->osx_communication.i_changes & OSX_INTF_VOUT_SIZE_CHANGE ) {
+          fillout_ScalingMatrix( p_vout ) ;
+          SetDSequenceMatrix( p_vout->p_sys->i_seq, p_vout->p_sys->p_matrix ) ;
+      }
+
+      p_vout->p_sys->osx_communication.i_changes &= ~( 
+          OSX_INTF_VOUT_QDPORT_CHANGE |
+          OSX_INTF_VOUT_SIZE_CHANGE
+      ) ;
+
     return 0 ;
 }
 
@@ -220,7 +213,7 @@ static int vout_Manage( vout_thread_t *p_vout )
 void vout_Display( vout_thread_t *p_vout )
 {
     CodecFlags out_flags ;
-    
+
     switch (p_vout->p_sys->c_codec)
     {
         case 'yuv2':