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>
35 * This defines an opaque input resource handler.
37 typedef struct input_resource_t input_resource_t
;
40 VLC_API decoder_t
* input_DecoderCreate( vlc_object_t
*, const es_format_t
*, input_resource_t
* ) VLC_USED
;
41 VLC_API
void input_DecoderDelete( decoder_t
* );
42 VLC_API
void input_DecoderDecode( decoder_t
*, block_t
*, bool b_do_pace
);
43 VLC_API
void input_DecoderDrain( decoder_t
* );
44 VLC_API
void input_DecoderFlush( decoder_t
* );
45 VLC_API
int input_DecoderSetSpuHighlight( decoder_t
*, const vlc_spu_highlight_t
* );
48 * It creates an empty input resource handler.
50 * The given object MUST stay alive as long as the input_resource_t is
53 VLC_API input_resource_t
* input_resource_New( vlc_object_t
* ) VLC_USED
;
56 * It releases an input resource.
58 VLC_API
void input_resource_Release( input_resource_t
* );
61 * \return the current audio output if any.
62 * Use aout_Release() to drop the reference.
64 VLC_API audio_output_t
*input_resource_HoldAout( input_resource_t
* );
67 * This function creates or recycles an audio output.
69 VLC_API audio_output_t
*input_resource_GetAout( input_resource_t
* );
72 * This function retains or destroys an audio output.
74 VLC_API
void input_resource_PutAout( input_resource_t
*, audio_output_t
* );