1 /*****************************************************************************
2 * vlc_decoder.h: decoder API
3 *****************************************************************************
4 * Copyright (C) 1999-2015 VLC authors and VideoLAN
6 * Authors: Christophe Massiot <massiot@via.ecp.fr>
7 * Laurent Aimar <fenrir@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Lesser General Public License as published by
11 * the Free Software Foundation; either version 2.1 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
25 #define VLC_DECODER_H 1
32 #include <vlc_subpicture.h>
34 typedef struct vlc_input_decoder_t vlc_input_decoder_t
;
37 * This defines an opaque input resource handler.
39 typedef struct input_resource_t input_resource_t
;
42 VLC_API vlc_input_decoder_t
*
43 vlc_input_decoder_Create( vlc_object_t
*, const es_format_t
*, input_resource_t
* ) VLC_USED
;
44 VLC_API
void vlc_input_decoder_Delete( vlc_input_decoder_t
* );
45 VLC_API
void vlc_input_decoder_Decode( vlc_input_decoder_t
*, block_t
*, bool b_do_pace
);
46 VLC_API
void vlc_input_decoder_Drain( vlc_input_decoder_t
* );
47 VLC_API
void vlc_input_decoder_Flush( vlc_input_decoder_t
* );
48 VLC_API
int vlc_input_decoder_SetSpuHighlight( vlc_input_decoder_t
*, const vlc_spu_highlight_t
* );
51 * It creates an empty input resource handler.
53 * The given object MUST stay alive as long as the input_resource_t is
56 VLC_API input_resource_t
* input_resource_New( vlc_object_t
* ) VLC_USED
;
59 * It releases an input resource.
61 VLC_API
void input_resource_Release( input_resource_t
* );
64 * \return the current audio output if any.
65 * Use aout_Release() to drop the reference.
67 VLC_API audio_output_t
*input_resource_HoldAout( input_resource_t
* );
70 * This function creates or recycles an audio output.
72 VLC_API audio_output_t
*input_resource_GetAout( input_resource_t
* );
75 * This function retains or destroys an audio output.
77 VLC_API
void input_resource_PutAout( input_resource_t
*, audio_output_t
* );