VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_decoder.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_decoder.h: decoder API
3 *****************************************************************************
4 * Copyright (C) 1999-2015 VLC authors and VideoLAN
5 *
6 * Authors: Christophe Massiot <massiot@via.ecp.fr>
7 * Laurent Aimar <fenrir@via.ecp.fr>
8 *
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.
13 *
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.
18 *
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 *****************************************************************************/
23
24#ifndef VLC_DECODER_H
25#define VLC_DECODER_H 1
26
27/**
28 * \ingroup decoder
29 * @{
30 */
31
32#include <vlc_tick.h>
33
37/**
38 * This defines an opaque input resource handler.
39 */
42/* */
43struct vlc_clock_t;
44struct vlc_frame_t;
45
46
47/**
48 * Spawn a decoder thread outside of the input thread.
49 */
51vlc_input_decoder_Create( vlc_object_t *, const es_format_t *, const char *es_id,
53
54/**
55 * Delete an existing vlc_input_decoder_t instance.
56 *
57 * Close the decoder implementation and delete the vlc_input_decoder_t
58 * instance.
59 * The instance must have been drained using vlc_input_decoder_Drain() or
60 * flushed using vlc_input_decoder_Flush() after any previous call to
61 * vlc_input_decoder_Decode() before calling the destructor.
62 *
63 * @param decoder The vlc_input_decoder_t to delete, created from
64 * vlc_input_decoder_Create().
65 */
67
68/**
69 * Put a vlc_frame_t in the decoder's fifo.
70 * Thread-safe w.r.t. the decoder. May be a cancellation point.
71 *
72 * @param p_dec the decoder object
73 * @param frame the data frame
74 * @param do_pace whether we wait for some decoding to happen or not
75 */
76VLC_API void vlc_input_decoder_Decode( vlc_input_decoder_t *p_dec, struct vlc_frame_t *frame, bool do_pace );
77
78/**
79 * Signals that there are no further frames to decode, and requests that the
80 * decoder drain all pending buffers. This is used to ensure that all
81 * intermediate buffers empty and no samples get lost at the end of the stream.
82 *
83 * @note The function does not actually wait for draining. It just signals that
84 * draining should be performed once the decoder has emptied FIFO.
85 */
87
88/**
89 * Requests that the decoder immediately discard all pending buffers.
90 * This is useful when seeking or when deselecting a stream.
91 */
95
96/**
97 * It creates an empty input resource handler.
98 *
99 * The given object MUST stay alive as long as the input_resource_t is
100 * not deleted.
101 */
103
104/**
105 * It releases an input resource.
106 */
108
109/** @} */
110#endif
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_API
Definition fourcc_gen.c:31
void input_resource_Release(input_resource_t *)
It releases an input resource.
Definition resource.c:328
void vlc_input_decoder_Delete(vlc_input_decoder_t *decoder)
Delete an existing vlc_input_decoder_t instance.
Definition decoder.c:2307
vlc_input_decoder_t * vlc_input_decoder_Create(vlc_object_t *, const es_format_t *, const char *es_id, struct vlc_clock_t *, input_resource_t *)
Spawn a decoder thread outside of the input thread.
Definition decoder.c:2273
void vlc_input_decoder_Decode(vlc_input_decoder_t *p_dec, struct vlc_frame_t *frame, bool do_pace)
Put a vlc_frame_t in the decoder's fifo.
Definition decoder.c:2469
int vlc_input_decoder_SetSpuHighlight(vlc_input_decoder_t *, const vlc_spu_highlight_t *)
Definition decoder.c:2817
void vlc_input_decoder_Flush(vlc_input_decoder_t *)
Requests that the decoder immediately discard all pending buffers.
Definition decoder.c:2518
input_resource_t * input_resource_New(vlc_object_t *)
It creates an empty input resource handler.
Definition resource.c:306
void vlc_input_decoder_Drain(vlc_input_decoder_t *)
Signals that there are no further frames to decode, and requests that the decoder drain all pending b...
Definition decoder.c:2501
void vlc_input_decoder_ChangeDelay(vlc_input_decoder_t *, vlc_tick_t i_delay)
Definition decoder.c:2645
Definition vlc_es.h:633
Definition resource.c:58
Definition clock.c:105
Definition vlc_frame.h:123
Definition decoder.c:117
VLC object common members.
Definition vlc_objects.h:53
Definition vlc_subpicture.h:110
This file is a collection of common definitions and types.
int64_t vlc_tick_t
High precision date or time interval.
Definition vlc_tick.h:48