]> git.sesse.net Git - vlc/commitdiff
* Placed a callback to the decoder in the bitstream structure ;
authorChristophe Massiot <massiot@videolan.org>
Wed, 10 Jan 2001 16:24:11 +0000 (16:24 +0000)
committerChristophe Massiot <massiot@videolan.org>
Wed, 10 Jan 2001 16:24:11 +0000 (16:24 +0000)
* Fixed a purify bug in input_ps.c ;
* Added -mcpu=pentiumpro in the Makefile.

Makefile.in
include/input_ext-dec.h
src/input/input_ext-dec.c
src/input/input_ps.c

index 9e2656c0ce9de34e040fe49f37ef3a07ddd913f3..a263021df4e40aa00db9b274f69afb14f2556643 100644 (file)
@@ -116,11 +116,9 @@ ifneq (,$(findstring 86,$(ARCH)))
 CFLAGS += -malign-double
 # Optional Pentium Pro optimizations
 ifneq (,$(findstring ppro,$(ARCH)))
-ifneq ($(SYS), BSD)
-CFLAGS += -march=pentiumpro
-endif
+CFLAGS += -march=pentiumpro -mcpu=pentiumpro
 else
-CFLAGS += -march=pentium
+CFLAGS += -march=pentium -mcpu=pentium
 endif
 endif
 
index b2b331c41ec44c6cda263a2f14ec5f208dd9b9ec..7593fe3087d889c7d83aa0ca86543ec9c19bfa03 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-dec.h: structures exported to the VideoLAN decoders
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-dec.h,v 1.8 2001/01/09 21:03:47 sam Exp $
+ * $Id: input_ext-dec.h,v 1.9 2001/01/10 16:24:11 massiot Exp $
  *
  * Authors:
  *
@@ -144,6 +144,12 @@ typedef struct bit_stream_s
     /* Function to jump to the next data packet */
     void                 (* pf_next_data_packet)( struct bit_stream_s * );
 
+    /* Callback to the decoder used when changing data packets ; set
+     * to NULL if your decoder doesn't need it. */
+    void                 (* pf_bitstream_callback)( struct bit_stream_s * );
+    /* Optional argument to the callback */
+    void *                  p_callback_arg;
+
     /*
      * Byte structures
      */
index 97aa4221f9aec23a8afdbab632cd70b9e098c1b1..9f404214eba9ea2d713874a1f15e403d52a9efe0 100644 (file)
@@ -43,6 +43,8 @@ void InitBitstream( bit_stream_t * p_bit_stream, decoder_fifo_t * p_fifo )
 {
     p_bit_stream->p_decoder_fifo = p_fifo;
     p_bit_stream->pf_next_data_packet = NextDataPacket;
+    p_bit_stream->pf_bitstream_callback = NULL;
+    p_bit_stream->p_callback_arg = NULL;
 
     /* Get the first data packet. */
     vlc_mutex_lock( &p_fifo->data_lock );
@@ -150,6 +152,12 @@ void NextDataPacket( bit_stream_t * p_bit_stream )
     p_bit_stream->p_byte = p_bit_stream->p_data->p_payload_start;
     p_bit_stream->p_end  = p_bit_stream->p_data->p_payload_end;
 
+    /* Call back the decoder. */
+    if( p_bit_stream->pf_bitstream_callback != NULL )
+    {
+        p_bit_stream->pf_bitstream_callback( p_bit_stream );
+    }
+
     /* Copy remaining bits of the previous packet */
     *((WORD_TYPE *)p_bit_stream->p_byte - 1) = buffer_left;
     p_bit_stream->p_byte -= i_bytes_left;
index 83d5c7b126205df59abc5127cbe26d9ef9c44555..ea4693830af0193bc5db7712b9c2fdf0fbd07596 100644 (file)
@@ -2,7 +2,7 @@
  * input_ps.c: PS demux and packet management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ps.c,v 1.18 2001/01/05 18:46:44 massiot Exp $
+ * $Id: input_ps.c,v 1.19 2001/01/10 16:24:11 massiot Exp $
  *
  * Authors: 
  *
@@ -92,6 +92,7 @@ static void PSInit( input_thread_t * p_input )
     }
 
     p_input->p_plugin_data = (void *)p_method;
+    p_input->p_method_data = NULL;
 
     /* Re-open the socket as a buffered FILE stream */
     if( (p_method->stream = fdopen( p_input->i_handle, "r" )) == NULL )