Repository navigation
Expand file tree
/
Copy pathdecoder.h
More file actions
141 lines (120 loc) · 5.15 KB
/
Copy pathdecoder.h
File metadata and controls
141 lines (120 loc) · 5.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*****************************************************************************
* decoder.h: Input decoder functions
*****************************************************************************
* Copyright (C) 1998-2008 VLC authors and VideoLAN
* Copyright (C) 2008 Laurent Aimar
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef LIBVLC_INPUT_DECODER_H
#define LIBVLC_INPUT_DECODER_H 1
#include <vlc_common.h>
#include <vlc_codec.h>
#include <vlc_mouse.h>
struct input_decoder_callbacks {
/* notifications */
void (*on_vout_added)(decoder_t *decoder, vout_thread_t *vout,
enum vlc_vout_order vout_order,
void *userdata);
void (*on_vout_deleted)(decoder_t *decoder, vout_thread_t *vout,
void *userdata);
void (*on_thumbnail_ready)(decoder_t *decoder, picture_t *pic,
void *userdata);
void (*on_new_video_stats)(decoder_t *decoder, unsigned decoded,
unsigned lost, unsigned displayed,
void *userdata);
void (*on_new_audio_stats)(decoder_t *decoder, unsigned decoded,
unsigned lost, unsigned played, void *userdata);
/* requests */
int (*get_attachments)(decoder_t *decoder,
input_attachment_t ***ppp_attachment,
void *userdata);
};
decoder_t *input_DecoderNew( vlc_object_t *parent, es_format_t *, vlc_clock_t *,
input_resource_t *, sout_instance_t *,
bool thumbnailing,
const struct input_decoder_callbacks *cbs,
void *userdata ) VLC_USED;
/**
* This function changes the pause state.
* The date parameter MUST hold the exact date at which the change has been
* done for proper vout/aout pausing.
*/
void input_DecoderChangePause( decoder_t *, bool b_paused, vlc_tick_t i_date );
/**
* Changes the decoder rate.
*
* This function changes rate of the intended playback speed to nominal speed.
* \param dec decoder
* \param rate playback rate (default is 1)
*/
void input_DecoderChangeRate( decoder_t *dec, float rate );
/**
* This function changes the delay.
*/
void input_DecoderChangeDelay( decoder_t *, vlc_tick_t i_delay );
/**
* This function makes the decoder start waiting for a valid data block from its fifo.
*/
void input_DecoderStartWait( decoder_t * );
/**
* This function waits for the decoder to actually receive data.
*/
void input_DecoderWait( decoder_t * );
/**
* This function exits the waiting mode of the decoder.
*/
void input_DecoderStopWait( decoder_t * );
/**
* This function returns true if the decoder fifo is empty and false otherwise.
*/
bool input_DecoderIsEmpty( decoder_t * );
/**
* This function activates the request closed caption channel.
*/
int input_DecoderSetCcState( decoder_t *, vlc_fourcc_t, int i_channel, bool b_decode );
/**
* This function returns an error if the requested channel does not exist and
* set pb_decode to the channel status(active or not) otherwise.
*/
int input_DecoderGetCcState( decoder_t *, vlc_fourcc_t, int i_channel, bool *pb_decode );
/**
* This function get cc channels descriptions
*/
void input_DecoderGetCcDesc( decoder_t *, decoder_cc_desc_t * );
/**
* This function force the display of the next picture and fills the stream
* time consumed.
*/
void input_DecoderFrameNext( decoder_t *p_dec, vlc_tick_t *pi_duration );
/**
* This function will return true if the ES format or meta data have changed since
* the last call. In which case, it will do a copy of the current es_format_t if p_fmt
* is not NULL and will do a copy of the current description if pp_meta is non NULL.
* The es_format_t MUST be freed by es_format_Clean and *pp_meta MUST be freed by
* vlc_meta_Delete.
* Otherwise it will return false and will not initialize p_fmt and *pp_meta.
*/
bool input_DecoderHasFormatChanged( decoder_t *p_dec, es_format_t *p_fmt, vlc_meta_t **pp_meta );
/**
* This function returns the current size in bytes of the decoder fifo
*/
size_t input_DecoderGetFifoSize( decoder_t *p_dec );
void input_DecoderSetVoutMouseEvent( decoder_t *, vlc_mouse_event, void * );
int input_DecoderAddVoutOverlay( decoder_t *, subpicture_t *, size_t * );
int input_DecoderDelVoutOverlay( decoder_t *, size_t );
#endif