]> git.sesse.net Git - vlc/blobdiff - src/video_parser/video_fifo.c
The motion compensation routines are now modules as well ; choose your
[vlc] / src / video_parser / video_fifo.c
index 39223556417ffad717cf9030307ad334f8edbbfa..c42aa1647b0ce9fa947aaded43768efa328393f0 100644 (file)
@@ -1,58 +1,76 @@
-/*******************************************************************************
+/*****************************************************************************
  * video_fifo.c : video FIFO management
- * (c)1999 VideoLAN
- *******************************************************************************/
+ *****************************************************************************
+ * Copyright (C) 1999, 2000 VideoLAN
+ * $Id: video_fifo.c,v 1.28 2001/01/18 05:13:23 sam Exp $
+ *
+ * Authors: Christophe Massiot <massiot@via.ecp.fr>
+ *
+ * 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
+ * (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.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
 
-/*******************************************************************************
+/*****************************************************************************
  * Preamble
- *******************************************************************************/
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/uio.h>
+ *****************************************************************************/
+#include "defs.h"
 
 #include "config.h"
 #include "common.h"
+#include "threads.h"
 #include "mtime.h"
-#include "vlc_thread.h"
+#include "plugins.h"
 
 #include "intf_msg.h"
-#include "debug.h"                      /* ?? temporaire, requis par netlist.h */
 
-#include "input.h"
-#include "input_netlist.h"
-#include "decoder_fifo.h"
+#include "stream_control.h"
+#include "input_ext-dec.h"
+
 #include "video.h"
 #include "video_output.h"
 
-#include "vdec_idct.h"
 #include "video_decoder.h"
 #include "vdec_motion.h"
+#include "../video_decoder/vdec_idct.h"
 
 #include "vpar_blocks.h"
-#include "vpar_headers.h"
-#include "vpar_synchro.h"
-#include "video_parser.h"
-#include "video_fifo.h"
+#include "../video_decoder/vpar_headers.h"
+#include "../video_decoder/vpar_synchro.h"
+#include "../video_decoder/video_parser.h"
+#include "../video_decoder/video_fifo.h"
 
 /*****************************************************************************
  * vpar_InitFIFO : initialize the video FIFO
  *****************************************************************************/
 void vpar_InitFIFO( vpar_thread_t * p_vpar )
 {
+#ifdef VDEC_SMP
     int                 i_dummy;
-    
+#endif
+
+    p_vpar->vfifo.p_vpar = p_vpar;
+
+#ifdef VDEC_SMP
+
     /* Initialize mutex and cond */
     vlc_mutex_init( &p_vpar->vfifo.lock );
     vlc_cond_init( &p_vpar->vfifo.wait );
     vlc_mutex_init( &p_vpar->vbuffer.lock );
-    
+
     /* Initialize FIFO properties */
     p_vpar->vfifo.i_start = p_vpar->vfifo.i_end = 0;
-    p_vpar->vfifo.p_vpar = p_vpar;
-    
+
     /* Initialize buffer properties */
     p_vpar->vbuffer.i_index = VFIFO_SIZE; /* all structures are available */
     for( i_dummy = 0; i_dummy < VFIFO_SIZE + 1; i_dummy++ )
@@ -60,4 +78,5 @@ void vpar_InitFIFO( vpar_thread_t * p_vpar )
         p_vpar->vbuffer.pp_mb_free[i_dummy] = p_vpar->vbuffer.p_macroblocks
                                                + i_dummy;
     }
+#endif
 }