decoder.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * decoder.h: Input decoder functions
00003  *****************************************************************************
00004  * Copyright (C) 1998-2008 VLC authors and VideoLAN
00005  * Copyright (C) 2008 Laurent Aimar
00006  * $Id: 1c9e1b61e5969145b930175374c6c74e2d12b097 $
00007  *
00008  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
00009  *
00010  * This program is free software; you can redistribute it and/or modify it
00011  * under the terms of the GNU Lesser General Public License as published by
00012  * the Free Software Foundation; either version 2.1 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018  * GNU Lesser General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU Lesser General Public License
00021  * along with this program; if not, write to the Free Software Foundation,
00022  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef LIBVLC_INPUT_DECODER_H
00026 #define LIBVLC_INPUT_DECODER_H 1
00027 
00028 #include <vlc_common.h>
00029 #include <vlc_codec.h>
00030 
00031 #define BLOCK_FLAG_CORE_FLUSH (1 <<BLOCK_FLAG_CORE_PRIVATE_SHIFT)
00032 #define BLOCK_FLAG_CORE_EOS   (1 <<(BLOCK_FLAG_CORE_PRIVATE_SHIFT + 1))
00033 
00034 decoder_t *input_DecoderNew( input_thread_t *, es_format_t *, input_clock_t *,
00035                              sout_instance_t * ) VLC_USED;
00036 
00037 /**
00038  * This function changes the pause state.
00039  * The date parameter MUST hold the exact date at wich the change has been
00040  * done for proper vout/aout pausing.
00041  */
00042 void input_DecoderChangePause( decoder_t *, bool b_paused, mtime_t i_date );
00043 
00044 /**
00045  * This function changes the delay.
00046  */
00047 void input_DecoderChangeDelay( decoder_t *, mtime_t i_delay );
00048 
00049 /**
00050  * This function starts the buffering mode.
00051  */
00052 void input_DecoderStartBuffering( decoder_t * );
00053 
00054 /**
00055  * This function waits for the decoder to have buffered sufficient data.
00056  */
00057 void input_DecoderWaitBuffering( decoder_t * );
00058 
00059 /**
00060  * This function stops the buffering mode.
00061  */
00062 void input_DecoderStopBuffering( decoder_t * );
00063 
00064 /**
00065  * This function returns true if the decoder fifo is empty and false otherwise.
00066  */
00067 bool input_DecoderIsEmpty( decoder_t * );
00068 
00069 /**
00070  * This function activates the request closed caption channel.
00071  */
00072 int input_DecoderSetCcState( decoder_t *, bool b_decode, int i_channel );
00073 
00074 /**
00075  * This function returns an error if the requested channel does not exist and
00076  * set pb_decode to the channel status(active or not) otherwise.
00077  */
00078 int input_DecoderGetCcState( decoder_t *, bool *pb_decode, int i_channel );
00079 
00080 /**
00081  * This function set each pb_present entry to true if the corresponding channel
00082  * exists or false otherwise.
00083  */
00084 void input_DecoderIsCcPresent( decoder_t *, bool pb_present[4] );
00085 
00086 /**
00087  * This function force the display of the next picture and fills the stream
00088  * time consumed.
00089  */
00090 void input_DecoderFrameNext( decoder_t *p_dec, mtime_t *pi_duration );
00091 
00092 /**
00093  * This function will return true if the ES format or meta data have changed since
00094  * the last call. In which case, it will do a copy of the current es_format_t if p_fmt
00095  * is not NULL and will do a copy of the current description if pp_meta is non NULL.
00096  * The es_format_t MUST be freed by es_format_Clean and *pp_meta MUST be freed by
00097  * vlc_meta_Delete.
00098  * Otherwise it will return false and will not initialize p_fmt and *pp_meta.
00099  */
00100 bool input_DecoderHasFormatChanged( decoder_t *p_dec, es_format_t *p_fmt, vlc_meta_t **pp_meta );
00101 
00102 /**
00103  * This function returns the current size in bytes of the decoder fifo
00104  */
00105 size_t input_DecoderGetFifoSize( decoder_t *p_dec );
00106 
00107 /**
00108  * This function returns the objects associated to a decoder
00109  *
00110  * They must be released using vlc_object_release().
00111  */
00112 void input_DecoderGetObjects( decoder_t *, vout_thread_t **, audio_output_t ** );
00113 
00114 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines