]> git.sesse.net Git - vlc/blobdiff - src/video_output/vout_internal.h
vout: use atomic variables for stats instead of spin lock
[vlc] / src / video_output / vout_internal.h
index de8f05834924e3eebcbdcbee77ee8d4a5acf46f0..1f7184590c557d57d187dfe6767ab5f846d62017 100644 (file)
@@ -1,34 +1,29 @@
 /*****************************************************************************
  * vout_internal.h : Internal vout definitions
  *****************************************************************************
- * Copyright (C) 2008 the VideoLAN team
+ * Copyright (C) 2008 VLC authors and VideoLAN
  * Copyright (C) 2008 Laurent Aimar
  * $Id$
  *
  * Authors: Laurent Aimar < fenrir _AT_ videolan _DOT_ org >
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-
-#if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
-# error This header file can only be included from LibVLC.
-#endif
-
-#ifndef _VOUT_INTERNAL_H
-#define _VOUT_INTERNAL_H 1
+#ifndef LIBVLC_VOUT_INTERNAL_H
+#define LIBVLC_VOUT_INTERNAL_H 1
 
 #include <vlc_picture_fifo.h>
 #include <vlc_picture_pool.h>
@@ -69,11 +64,9 @@ struct vout_thread_sys_t
 
     /* Subpicture unit */
     vlc_mutex_t     spu_lock;
-    spu_t           *p_spu;
-
-    /* Monitor Pixel Aspect Ratio */
-    unsigned int    i_par_num;
-    unsigned int    i_par_den;
+    spu_t           *spu;
+    vlc_fourcc_t    spu_blend_chroma;
+    filter_t        *spu_blend;
 
     /* Video output window */
     struct {
@@ -101,6 +94,8 @@ struct vout_thread_sys_t
         int         qtype;
         bool        is_interlaced;
         picture_t   *decoded;
+        picture_t   *current;
+        picture_t   *next;
     } displayed;
 
     struct {
@@ -124,8 +119,13 @@ struct vout_thread_sys_t
     bool            is_late_dropped;
 
     /* Video filter2 chain */
-    vlc_mutex_t     vfilter_lock;
-    filter_chain_t *vfilter_chain;
+    struct {
+        vlc_mutex_t     lock;
+        char            *configuration;
+        video_format_t  format;
+        filter_chain_t  *chain_static;
+        filter_chain_t  *chain_interactive;
+    } filter;
 
     /* */
     vlc_mouse_t     mouse;
@@ -136,7 +136,6 @@ struct vout_thread_sys_t
     picture_pool_t  *display_pool;
     picture_pool_t  *decoder_pool;
     picture_fifo_t  *decoder_fifo;
-    bool            is_decoder_pool_slow;
     vout_chrono_t   render;           /**< picture render time estimator */
 };
 
@@ -150,6 +149,7 @@ void vout_ControlChangeCropRatio(vout_thread_t *, unsigned num, unsigned den);
 void vout_ControlChangeCropWindow(vout_thread_t *, int x, int y, int width, int height);
 void vout_ControlChangeCropBorder(vout_thread_t *, int left, int top, int right, int bottom);
 void vout_ControlChangeFilters(vout_thread_t *, const char *);
+void vout_ControlChangeSubSources(vout_thread_t *, const char *);
 void vout_ControlChangeSubFilters(vout_thread_t *, const char *);
 void vout_ControlChangeSubMargin(vout_thread_t *, int);
 
@@ -162,8 +162,6 @@ void vout_CloseWrapper(vout_thread_t *, vout_display_state_t *);
 int  vout_InitWrapper(vout_thread_t *);
 void vout_EndWrapper(vout_thread_t *);
 void vout_ManageWrapper(vout_thread_t *);
-void vout_RenderWrapper(vout_thread_t *, picture_t *);
-void vout_DisplayWrapper(vout_thread_t *, picture_t *);
 
 /* */
 int spu_ProcessMouse(spu_t *, const vlc_mouse_t *, const video_format_t *);
@@ -171,4 +169,3 @@ void spu_Attach( spu_t *, vlc_object_t *input, bool );
 void spu_ChangeMargin(spu_t *, int);
 
 #endif
-