X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Finput_ext-plugins.h;h=60ad0342151a025dcc4cedd8af123339cda18a1c;hb=53ccc56f2a77f345abcad4a2a987c2922e621d49;hp=d8d529307cf50c9883c9b406093c767d0b89bf0b;hpb=66c62b438630d3836cfe5c15226ae0a9db89a342;p=vlc diff --git a/include/input_ext-plugins.h b/include/input_ext-plugins.h index d8d529307c..60ad034215 100644 --- a/include/input_ext-plugins.h +++ b/include/input_ext-plugins.h @@ -3,7 +3,7 @@ * but exported to plug-ins ***************************************************************************** * Copyright (C) 1999-2002 VideoLAN - * $Id: input_ext-plugins.h,v 1.34 2002/08/07 00:29:36 sam Exp $ + * $Id: input_ext-plugins.h,v 1.47 2004/01/26 20:48:09 fenrir Exp $ * * Authors: Christophe Massiot * @@ -40,14 +40,14 @@ *****************************************************************************/ VLC_EXPORT( int, input_InitStream,( input_thread_t *, size_t ) ); VLC_EXPORT( void, input_EndStream, ( input_thread_t * ) ); -VLC_EXPORT( pgrm_descriptor_t *, input_FindProgram,( input_thread_t *, u16 ) ); -VLC_EXPORT( pgrm_descriptor_t *, input_AddProgram, ( input_thread_t *, u16, size_t ) ); +VLC_EXPORT( pgrm_descriptor_t *, input_FindProgram,( input_thread_t *, uint16_t ) ); +VLC_EXPORT( pgrm_descriptor_t *, input_AddProgram, ( input_thread_t *, uint16_t, size_t ) ); VLC_EXPORT( void, input_DelProgram,( input_thread_t *, pgrm_descriptor_t * ) ); VLC_EXPORT( int, input_SetProgram,( input_thread_t *, pgrm_descriptor_t * ) ); -VLC_EXPORT( input_area_t *, input_AddArea,( input_thread_t * ) ); +VLC_EXPORT( input_area_t *, input_AddArea,( input_thread_t *, uint16_t, uint16_t ) ); VLC_EXPORT( void, input_DelArea, ( input_thread_t *, input_area_t * ) ); -VLC_EXPORT( es_descriptor_t *, input_FindES,( input_thread_t *, u16 ) ); -VLC_EXPORT( es_descriptor_t *, input_AddES, ( input_thread_t *, pgrm_descriptor_t *, u16, size_t ) ); +VLC_EXPORT( es_descriptor_t *, input_FindES,( input_thread_t *, uint16_t ) ); +VLC_EXPORT( es_descriptor_t *, input_AddES, ( input_thread_t *, pgrm_descriptor_t *, uint16_t, int, char const *, size_t ) ); VLC_EXPORT( void, input_DelES, ( input_thread_t *, es_descriptor_t * ) ); VLC_EXPORT( int, input_SelectES, ( input_thread_t *, es_descriptor_t * ) ); VLC_EXPORT( int, input_UnselectES,( input_thread_t *, es_descriptor_t * ) ); @@ -55,13 +55,25 @@ VLC_EXPORT( int, input_UnselectES,( input_thread_t *, es_descriptor_t * ) ); /***************************************************************************** * Prototypes from input_dec.c *****************************************************************************/ -//decoder_capabilities_t * input_ProbeDecoder( void ); -decoder_fifo_t * input_RunDecoder( input_thread_t *, es_descriptor_t * ); +decoder_t * input_RunDecoder( input_thread_t *, es_descriptor_t * ); void input_EndDecoder( input_thread_t *, es_descriptor_t * ); -VLC_EXPORT( void, input_DecodePES, ( decoder_fifo_t *, pes_packet_t * ) ); + +VLC_EXPORT( void, input_DecodePES, ( decoder_t *, pes_packet_t * ) ); +VLC_EXPORT( void, input_DecodeBlock,( decoder_t *, block_t * ) ); + void input_EscapeDiscontinuity( input_thread_t * ); void input_EscapeAudioDiscontinuity( input_thread_t * ); +/***************************************************************************** + * Prototypes from es_out.c + *****************************************************************************/ +/* input internal use only */ +es_out_t *input_EsOutNew( input_thread_t * ); +void input_EsOutDelete( es_out_t * ); + +stream_t *input_StreamNew( input_thread_t * ); +void input_StreamDelete( stream_t * ); + /***************************************************************************** * Prototypes from input_clock.c *****************************************************************************/ @@ -76,6 +88,7 @@ VLC_EXPORT( mtime_t, input_ClockGetTS, ( input_thread_t *, pgrm_descriptor_t *, VLC_EXPORT( input_info_category_t *, input_InfoCategory, ( input_thread_t *, char * ) ); VLC_EXPORT( int, input_AddInfo, ( input_info_category_t *, char *, char *, ... ) ); int input_DelInfo( input_thread_t * p_input ); /* no need to export this */ + /***************************************************************************** * Prototypes from input_ext-plugins.h (buffers management) *****************************************************************************/ @@ -89,7 +102,6 @@ VLC_EXPORT( data_packet_t *, input_ShareBuffer, ( input_buffers_t *, data_buffer VLC_EXPORT( data_packet_t *, input_NewPacket, ( input_buffers_t *, size_t ) ); VLC_EXPORT( void, input_DeletePacket, ( input_buffers_t *, data_packet_t * ) ); VLC_EXPORT( pes_packet_t *, input_NewPES, ( input_buffers_t * ) ); -VLC_EXPORT( void, input_DeletePES, ( input_buffers_t *, pes_packet_t * ) ); VLC_EXPORT( ssize_t, input_FillBuffer, ( input_thread_t * ) ); VLC_EXPORT( ssize_t, input_Peek, ( input_thread_t *, byte_t **, size_t ) ); VLC_EXPORT( ssize_t, input_SplitBuffer, ( input_thread_t *, data_packet_t **, size_t ) ); @@ -97,51 +109,6 @@ VLC_EXPORT( int, input_AccessInit, ( input_thread_t * ) ); VLC_EXPORT( void, input_AccessReinit, ( input_thread_t * ) ); VLC_EXPORT( void, input_AccessEnd, ( input_thread_t * ) ); -/***************************************************************************** - * Create a NULL packet for padding in case of a data loss - *****************************************************************************/ -static inline void input_NullPacket( input_thread_t * p_input, - es_descriptor_t * p_es ) -{ - data_packet_t * p_pad_data; - pes_packet_t * p_pes; - - if( (p_pad_data = input_NewPacket( p_input->p_method_data, - PADDING_PACKET_SIZE )) == NULL ) - { - msg_Err( p_input, "no new packet" ); - p_input->b_error = 1; - return; - } - - memset( p_pad_data->p_payload_start, 0, PADDING_PACKET_SIZE ); - p_pad_data->b_discard_payload = 1; - p_pes = p_es->p_pes; - - if( p_pes != NULL ) - { - p_pes->b_discontinuity = 1; - p_pes->p_last->p_next = p_pad_data; - p_pes->p_last = p_pad_data; - p_pes->i_nb_data++; - } - else - { - if( (p_pes = input_NewPES( p_input->p_method_data )) == NULL ) - { - msg_Err( p_input, "no PES packet" ); - p_input->b_error = 1; - return; - } - - p_pes->i_rate = p_input->stream.control.i_rate; - p_pes->p_first = p_pes->p_last = p_pad_data; - p_pes->i_nb_data = 1; - p_pes->b_discontinuity = 1; - input_DecodePES( p_es->p_decoder_fifo, p_pes ); - } -} - /* * Optional standard file descriptor operations (input_ext-plugins.h) */ @@ -155,14 +122,3 @@ struct input_socket_t int i_handle; }; -/***************************************************************************** - * Prototypes - *****************************************************************************/ -VLC_EXPORT( void, __input_FDClose, ( vlc_object_t * ) ); -#define input_FDClose(a) __input_FDClose(VLC_OBJECT(a)) -VLC_EXPORT( void, __input_FDNetworkClose, ( vlc_object_t * ) ); -#define input_FDNetworkClose(a) __input_FDNetworkClose(VLC_OBJECT(a)) -VLC_EXPORT( ssize_t, input_FDRead, ( input_thread_t *, byte_t *, size_t ) ); -VLC_EXPORT( ssize_t, input_FDNetworkRead, ( input_thread_t *, byte_t *, size_t ) ); -VLC_EXPORT( void, input_FDSeek, ( input_thread_t *, off_t ) ); -