Commit 0b625864 authored by Christophe Massiot's avatar Christophe Massiot

* Placed a callback to the decoder in the bitstream structure ;

* Fixed a purify bug in input_ps.c ;
* Added -mcpu=pentiumpro in the Makefile.
parent 9f553534
...@@ -116,11 +116,9 @@ ifneq (,$(findstring 86,$(ARCH))) ...@@ -116,11 +116,9 @@ ifneq (,$(findstring 86,$(ARCH)))
CFLAGS += -malign-double CFLAGS += -malign-double
# Optional Pentium Pro optimizations # Optional Pentium Pro optimizations
ifneq (,$(findstring ppro,$(ARCH))) ifneq (,$(findstring ppro,$(ARCH)))
ifneq ($(SYS), BSD) CFLAGS += -march=pentiumpro -mcpu=pentiumpro
CFLAGS += -march=pentiumpro
endif
else else
CFLAGS += -march=pentium CFLAGS += -march=pentium -mcpu=pentium
endif endif
endif endif
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders * input_ext-dec.h: structures exported to the VideoLAN decoders
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * 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: * Authors:
* *
...@@ -144,6 +144,12 @@ typedef struct bit_stream_s ...@@ -144,6 +144,12 @@ typedef struct bit_stream_s
/* Function to jump to the next data packet */ /* Function to jump to the next data packet */
void (* pf_next_data_packet)( struct bit_stream_s * ); 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 * Byte structures
*/ */
......
...@@ -43,6 +43,8 @@ void InitBitstream( bit_stream_t * p_bit_stream, decoder_fifo_t * p_fifo ) ...@@ -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->p_decoder_fifo = p_fifo;
p_bit_stream->pf_next_data_packet = NextDataPacket; 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. */ /* Get the first data packet. */
vlc_mutex_lock( &p_fifo->data_lock ); vlc_mutex_lock( &p_fifo->data_lock );
...@@ -150,6 +152,12 @@ void NextDataPacket( bit_stream_t * p_bit_stream ) ...@@ -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_byte = p_bit_stream->p_data->p_payload_start;
p_bit_stream->p_end = p_bit_stream->p_data->p_payload_end; 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 */ /* Copy remaining bits of the previous packet */
*((WORD_TYPE *)p_bit_stream->p_byte - 1) = buffer_left; *((WORD_TYPE *)p_bit_stream->p_byte - 1) = buffer_left;
p_bit_stream->p_byte -= i_bytes_left; p_bit_stream->p_byte -= i_bytes_left;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ps.c: PS demux and packet management * input_ps.c: PS demux and packet management
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * 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: * Authors:
* *
...@@ -92,6 +92,7 @@ static void PSInit( input_thread_t * p_input ) ...@@ -92,6 +92,7 @@ static void PSInit( input_thread_t * p_input )
} }
p_input->p_plugin_data = (void *)p_method; p_input->p_plugin_data = (void *)p_method;
p_input->p_method_data = NULL;
/* Re-open the socket as a buffered FILE stream */ /* Re-open the socket as a buffered FILE stream */
if( (p_method->stream = fdopen( p_input->i_handle, "r" )) == NULL ) if( (p_method->stream = fdopen( p_input->i_handle, "r" )) == NULL )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment