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
28 * \defgroup input Decoder
34 #include <vlc_subpicture.h>
37 * This defines an opaque input resource handler.
39 typedef struct input_resource_t input_resource_t
;
42 VLC_API decoder_t
* input_DecoderCreate( vlc_object_t
*, const es_format_t
*, input_resource_t
* ) VLC_USED
;
43 VLC_API
void input_DecoderDelete( decoder_t
* );
44 VLC_API
void input_DecoderDecode( decoder_t
*, block_t
*, bool b_do_pace
);
45 VLC_API
void input_DecoderDrain( decoder_t
* );
46 VLC_API
void input_DecoderFlush( decoder_t
* );
47 VLC_API
int input_DecoderSetSpuHighlight( decoder_t
*, const vlc_spu_highlight_t
* );
50 * It creates an empty input resource handler.
52 * The given object MUST stay alive as long as the input_resource_t is
55 VLC_API input_resource_t
* input_resource_New( vlc_object_t
* ) VLC_USED
;
58 * It releases an input resource.
60 VLC_API
void input_resource_Release( input_resource_t
* );
63 * Forcefully destroys the video output (e.g. when the playlist is stopped).
65 VLC_API
void input_resource_TerminateVout( input_resource_t
* );
68 * This function releases all resources (object).
70 VLC_API
void input_resource_Terminate( input_resource_t
* );
73 * \return the current audio output if any.
74 * Use aout_Release() to drop the reference.
76 VLC_API audio_output_t
*input_resource_HoldAout( input_resource_t
* );
79 * This function creates or recycles an audio output.
81 VLC_API audio_output_t
*input_resource_GetAout( input_resource_t
* );
84 * This function retains or destroys an audio output.
86 VLC_API
void input_resource_PutAout( input_resource_t
*, audio_output_t
* );
89 * Prevents the existing audio output (if any) from being recycled.
91 VLC_API
void input_resource_ResetAout( input_resource_t
* );