VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_codec.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_codec.h: Definition of the decoder and encoder structures
3 *****************************************************************************
4 * Copyright (C) 1999-2003 VLC authors and VideoLAN
5 *
6 * Authors: Gildas Bazin <gbazin@netcourrier.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
22
23#ifndef VLC_CODEC_H
24#define VLC_CODEC_H 1
25
26#include <assert.h>
27
28#include <vlc_block.h>
29#include <vlc_es.h>
30#include <vlc_window.h>
31#include <vlc_picture.h>
32#include <vlc_subpicture.h>
33
34/**
35 * \defgroup decoder Decoder
36 * \ingroup input
37 * Audio, video and text decoders
38 * @{
39 *
40 * \file
41 * Decoder and encoder modules interface
42 */
43
48 union
49 {
50 struct
51 {
52 vlc_decoder_device * (*get_device)( decoder_t * );
55 /* cf. decoder_NewPicture, can be called from any decoder thread */
56 picture_t* (*buffer_new)( decoder_t * );
57 /* cf.decoder_QueueVideo */
58 void (*queue)( decoder_t *, picture_t * );
59 /* cf.decoder_QueueCC */
60 void (*queue_cc)( decoder_t *, vlc_frame_t *,
62
63 /* Display date
64 * cf. decoder_GetDisplayDate */
66 /* Display rate
67 * cf. decoder_GetDisplayRate */
68 float (*get_display_rate)( decoder_t * );
70 struct
71 {
72 int (*format_update)( decoder_t * );
73
74 /* cf.decoder_QueueAudio */
75 void (*queue)( decoder_t *, vlc_frame_t * );
76 } audio;
77 struct
78 {
79 /* cf. decoder_NewSubpicture */
80 subpicture_t* (*buffer_new)( decoder_t *,
82
83 /* cf.decoder_QueueSub */
84 void (*queue)( decoder_t *, subpicture_t *);
85 } spu;
86 };
87
88 /* Input attachments
89 * cf. decoder_GetInputAttachments */
90 int (*get_attachments)( decoder_t *p_dec,
91 input_attachment_t ***ppp_attachment,
92 int *pi_attachment );
93};
94
95/*
96 * BIG FAT WARNING : the code relies in the first 3 members of filter_t
97 * and decoder_t to be the same, so if you have anything to add, do it
98 * at the end of the structure.
99 */
100struct decoder_t
102 struct vlc_object_t obj;
104 /* Module properties */
106 void *p_sys;
108 /* Input format ie from demuxer (XXX: a lot of fields could be invalid),
109 cannot be NULL */
110 const es_format_t *fmt_in;
112 /* Output format of decoder/packetizer */
115 /* Tell the decoder if it is allowed to drop frames */
118 /**
119 * Number of extra (ie in addition to the DPB) picture buffers
120 * needed for decoding.
121 */
124 union
125 {
126# define VLCDEC_SUCCESS VLC_SUCCESS
127# define VLCDEC_ECRITICAL VLC_EGENERIC
128# define VLCDEC_RELOAD (-100)
129 /* This function is called to decode one packetized block.
130 *
131 * The module implementation will own the input block (p_block) and should
132 * process and release it. Depending of the decoder type, the module should
133 * send output frames/blocks via decoder_QueueVideo(), decoder_QueueAudio()
134 * or decoder_QueueSub().
135 *
136 * If frame is NULL, the decoder asks the module to drain itself. The
137 * module should return all available output frames/block via the queue
138 * functions.
139 *
140 * Return values can be:
141 * VLCDEC_SUCCESS: pf_decode will be called again
142 * VLCDEC_ECRITICAL: in case of critical error, pf_decode won't be called
143 * again.
144 * VLCDEC_RELOAD: Request that the decoder should be reloaded. The current
145 * module will be unloaded. Reloading a module may cause a loss of frames.
146 * When returning this status, the implementation shouldn't release or
147 * modify the frame in argument (The same frame will be feed to the
148 * next decoder module).
149 */
150 int ( * pf_decode ) ( decoder_t *, vlc_frame_t *frame );
152 /* This function is called in a loop with the same pp_block argument until
153 * it returns NULL. This allows a module implementation to return more than
154 * one output blocks for one input block.
155 *
156 * pp_block or *pp_block can be NULL.
157 *
158 * If pp_block and *pp_block are not NULL, the module implementation will
159 * own the input block (*pp_block) and should process and release it. The
160 * module can also process a part of the block. In that case, it should
161 * modify (*ppframe)->p_buffer/i_buffer accordingly and return a valid
162 * output block. The module can also set *ppframe to NULL when the input
163 * block is consumed.
164 *
165 * If ppframe is not NULL but *ppframe is NULL, a previous call of the pf
166 * function has set the *ppframe to NULL. Here, the module can return new
167 * output block for the same, already processed, input block (the
168 * pf_packetize function will be called as long as the module return an
169 * output block).
170 *
171 * When the pf function returns NULL, the next call to this function will
172 * have a new a valid ppframe (if the packetizer is not drained).
173 *
174 * If ppframe is NULL, the packetizer asks the module to drain itself. In
175 * that case, the module has to return all output frames available (the
176 * pf_packetize function will be called as long as the module return an
177 * output block).
178 */
179 vlc_frame_t * ( * pf_packetize )( decoder_t *, vlc_frame_t **ppframe );
180 };
181
182 /* */
183 void ( * pf_flush ) ( decoder_t * );
185 /* Closed Caption (CEA 608/708) extraction.
186 * If set, it *may* be called after pf_packetize returned data. It should
187 * return CC for the pictures returned by the last pf_packetize call only,
188 * channel bitmaps will be used to known which cc channel are present (but
189 * globally, not necessary for the current packet. Video decoders should use
190 * the decoder_QueueCc() function to pass closed captions. */
191 vlc_frame_t * ( * pf_get_cc ) ( decoder_t *, decoder_cc_desc_t * );
193 /* Meta data at codec level
194 * The decoder owner set it back to NULL once it has retrieved what it needs.
195 * The decoder owner is responsible of its release except when you overwrite it.
196 */
199 /* Private structure for the owner of the decoder */
200 const struct decoder_owner_callbacks *cbs;
202
203/* struct for packetizer get_cc polling/decoder queue_cc
204 * until we have a proper metadata way */
207 uint8_t i_608_channels; /* 608 channels bitmap */
208 uint64_t i_708_channels; /* 708 */
209 int i_reorder_depth; /* reorder depth, -1 for no reorder, 0 for old P/B flag based */
211
212/**
213 * @}
214 */
215
218 struct
219 {
220 vlc_decoder_device *(*get_device)( encoder_t * );
223
224/**
225 * Creates/Updates the output decoder device.
226 *
227 * \note
228 * This function is not reentrant.
229 *
230 * @return the held decoder device, NULL if none should be used
231 */
233
234
235/**
236 * \defgroup encoder Encoder
237 * \ingroup sout
238 * Audio, video and text encoders
239 * @{
240 */
241
244 void (*close)(encoder_t *);
246 union {
247 block_t * (*encode_video)(encoder_t *, picture_t *);
248 block_t * (*encode_audio)(encoder_t *, block_t *);
249 block_t * (*encode_sub)(encoder_t *, subpicture_t *);
250 };
251};
252
253struct encoder_t
255 struct vlc_object_t obj;
257 /* Module properties */
259 void *p_sys;
261 /* Properties of the input data fed to the encoder */
263 vlc_video_context *vctx_in; /* for video */
265 /* Properties of the output of the encoder */
268 /* Common encoder options */
269 int i_threads; /* Number of threads to use during encoding */
270 int i_iframes; /* One I frame per i_iframes */
271 int i_bframes; /* One B frame per i_bframes */
272 int i_tolerance; /* Bitrate tolerance */
274 /* Encoder config */
277 /* Private structure for the owner of the encoder */
278 const struct vlc_encoder_operations *ops;
281
283
284static inline block_t *
287 assert(encoder->fmt_in.i_cat == VIDEO_ES);
288 return encoder->ops->encode_video(encoder, pic);
289}
290
291static inline block_t *
294 assert(encoder->fmt_in.i_cat == AUDIO_ES);
295 return encoder->ops->encode_audio(encoder, audio);
296}
297
298static inline block_t *
301 assert(encoder->fmt_in.i_cat == SPU_ES);
302 return encoder->ops->encode_sub(encoder, sub);
303}
304
305/**
306 * @}
307 *
308 * \ingroup decoder
309 * @{
310 */
311
312/**
313 * Creates/Updates the output decoder device.
314 *
315 * This function notifies the video output pipeline of a new video output
316 * format (fmt_out.video). If there was no decoder device so far or a new
317 * decoder device is required, a new decoder device will be set up.
318 * decoder_UpdateVideoOutput() can then be used.
319 *
320 * If the format is unchanged, this function has no effects and returns zero.
321 *
322 * \param dec the decoder object
323 *
324 * \note
325 * This function is not reentrant.
326 *
327 * @return the received of the held decoder device, NULL not to get one
328 */
331 vlc_assert( dec->fmt_in->i_cat == VIDEO_ES && dec->cbs != NULL );
332 if ( unlikely(dec->fmt_in->i_cat != VIDEO_ES || dec->cbs == NULL ) )
333 return NULL;
334
335 vlc_assert(dec->cbs->video.get_device != NULL);
336 return dec->cbs->video.get_device( dec );
337}
338
339/**
340 * Creates/Updates the rest of the video output pipeline.
341 *
342 * After a call to decoder_GetDecoderDevice() this function notifies the
343 * video output pipeline of a new video output format (fmt_out.video). If there
344 * was no video output from the decoder so far, a new decoder video output will
345 * be set up. decoder_NewPicture() can then be used to allocate picture buffers.
346 *
347 * If the format is unchanged, this function has no effects and returns zero.
348 *
349 * \note
350 * This function is not reentrant.
351 *
352 * @return 0 if the video output was set up successfully, -1 otherwise.
353 */
355
356/**
357 * Updates the video output format.
358 *
359 * This function notifies the video output pipeline of a new video output
360 * format (fmt_out.video). If there was no video output from the decoder so far
361 * or if the video output format has changed, a new video output will be set
362 * up. decoder_NewPicture() can then be used to allocate picture buffers.
363 *
364 * If the format is unchanged, this function has no effects and returns zero.
365 *
366 * \note
367 * This function is not reentrant.
368 *
369 * @return 0 if the video output was set up successfully, -1 otherwise.
370 */
372
373/**
374 * Allocates an output picture buffer.
375 *
376 * This function pulls an output picture buffer for the decoder from the
377 * buffer pool of the video output. The picture must be released with
378 * picture_Release() when it is no longer referenced by the decoder.
379 *
380 * \note
381 * This function is reentrant. However, decoder_UpdateVideoFormat() cannot be
382 * used concurrently; the caller is responsible for serialization.
383 *
384 * \warning
385 * The behaviour is undefined if decoder_UpdateVideoFormat() was not called or
386 * if the last call returned an error.
387 *
388 * \return a picture buffer on success, NULL on error
389 */
391
392/**
393 * Initialize a decoder structure before creating the decoder.
394 *
395 * To be used by decoder owners.
396 * By default frame drop is not allowed.
397 *
398 * @param dec the decoder to be initialized
399 * @param fmt_in the es_format_t where the decoder owner stores the input ES format
400 * @param fmt the input es_format_t used to initialize the decoder
401 */
402VLC_API void decoder_Init( decoder_t *dec, es_format_t *fmt_in, const es_format_t *fmt );
404/**
405 * Destroy a decoder and reset the structure.
406 *
407 * To be used by decoder owners.
408 */
409VLC_API void decoder_Destroy( decoder_t *p_dec );
410
411/**
412 * Unload a decoder module and reset the input/output formats.
413 *
414 * To be used by decoder owners.
415 */
416VLC_API void decoder_Clean( decoder_t *p_dec );
417
418/**
419 * This function queues a single picture to the video output.
420 *
421 * \note
422 * The caller doesn't own the picture anymore after this call (even in case of
423 * error).
424 * FIXME: input_DecoderFrameNext won't work if a module use this function.
425 */
426static inline void decoder_QueueVideo( decoder_t *dec, picture_t *p_pic )
428 vlc_assert( dec->fmt_in->i_cat == VIDEO_ES && dec->cbs != NULL );
430 vlc_assert( dec->cbs->video.queue != NULL );
431 dec->cbs->video.queue( dec, p_pic );
432}
433
434/**
435 * This function queues the Closed Captions
436 *
437 * \param dec the decoder object
438 * \param p_cc the closed-caption to queue
439 * \param p_desc decoder_cc_desc_t description structure
440 */
441static inline void decoder_QueueCc( decoder_t *dec, vlc_frame_t *p_cc,
442 const decoder_cc_desc_t *p_desc )
443{
444 vlc_assert( dec->fmt_in->i_cat == VIDEO_ES && dec->cbs != NULL );
445
446 if( dec->cbs->video.queue_cc == NULL )
447 block_Release( p_cc );
448 else
449 dec->cbs->video.queue_cc( dec, p_cc, p_desc );
450}
451
452/**
453 * This function queues a single audio block to the audio output.
454 *
455 * \note
456 * The caller doesn't own the audio block anymore after this call (even in case
457 * of error).
458 */
459static inline void decoder_QueueAudio( decoder_t *dec, vlc_frame_t *p_aout_buf )
461 vlc_assert( dec->fmt_in->i_cat == AUDIO_ES && dec->cbs != NULL );
462 vlc_assert( p_aout_buf->p_next == NULL );
463 vlc_assert( dec->cbs->audio.queue != NULL );
464 dec->cbs->audio.queue( dec, p_aout_buf );
465}
466
467/**
468 * This function queues a single subtitle to the video output.
469 *
470 * \note
471 * The caller doesn't own the subtitle anymore after this call (even in case of
472 * error).
473 */
474static inline void decoder_QueueSub( decoder_t *dec, subpicture_t *p_spu )
476 vlc_assert( dec->fmt_in->i_cat == SPU_ES && dec->cbs != NULL );
477 vlc_assert( p_spu->p_next == NULL );
478 vlc_assert( dec->cbs->spu.queue != NULL );
479 dec->cbs->spu.queue( dec, p_spu );
480}
481
482/**
483 * This function notifies the audio output pipeline of a new audio output
484 * format (fmt_out.audio). If there is currently no audio output or if the
485 * audio output format has changed, a new audio output will be set up.
486 * @return 0 if the audio output is working, -1 if not. */
488static inline int decoder_UpdateAudioFormat( decoder_t *dec )
490 vlc_assert( dec->fmt_in->i_cat == AUDIO_ES && dec->cbs != NULL );
491
492 if( dec->fmt_in->i_cat == AUDIO_ES && dec->cbs->audio.format_update != NULL )
493 return dec->cbs->audio.format_update( dec );
494 else
495 return -1;
496}
497
498/**
499 * This function will return a new audio buffer usable by a decoder as an
500 * output buffer. It must be released with block_Release() or returned it to
501 * the caller as a decoder_QueueAudio parameter.
502 */
504
505/**
506 * This function will return a new subpicture usable by a decoder as an output
507 * buffer. You have to release it using subpicture_Delete() or by returning
508 * it to the caller as a decoder_QueueSub parameter.
509 */
511static inline subpicture_t *decoder_NewSubpicture( decoder_t *dec,
512 const subpicture_updater_t *p_dyn )
513{
514 vlc_assert( dec->fmt_in->i_cat == SPU_ES && dec->cbs != NULL );
515
516 subpicture_t *p_subpicture = dec->cbs->spu.buffer_new( dec, p_dyn );
517 if( !p_subpicture )
518 msg_Warn( dec, "can't get output subpicture" );
519 else
520 p_subpicture->b_subtitle = true;
521 return p_subpicture;
522}
523
524/**
525 * This function gives all input attachments at once.
526 *
527 * You MUST release the returned values
528 */
529static inline int decoder_GetInputAttachments( decoder_t *dec,
530 input_attachment_t ***ppp_attachment,
531 int *pi_attachment )
532{
533 vlc_assert( dec->cbs != NULL );
534
535 if( !dec->cbs->get_attachments )
536 return VLC_EGENERIC;
537
538 return dec->cbs->get_attachments( dec, ppp_attachment, pi_attachment );
539}
540
541/**
542 * This function converts a decoder timestamp into a display date comparable
543 * to vlc_tick_now().
544 * You MUST use it *only* for gathering statistics about speed.
545 */
548 vlc_tick_t system_now,
549 vlc_tick_t i_ts )
550{
551 vlc_assert( dec->fmt_in->i_cat == VIDEO_ES && dec->cbs != NULL );
552
553 if( !dec->cbs->video.get_display_date )
554 return VLC_TICK_INVALID;
555
556 return dec->cbs->video.get_display_date( dec, system_now, i_ts );
557}
558
559/**
560 * This function returns the current input rate.
561 * You MUST use it *only* for gathering statistics about speed.
562 */
564static inline float decoder_GetDisplayRate( decoder_t *dec )
566 vlc_assert( dec->fmt_in->i_cat == VIDEO_ES && dec->cbs != NULL );
567
568 if( !dec->cbs->video.get_display_rate )
569 return 1.f;
570
571 return dec->cbs->video.get_display_rate( dec );
572}
573
574/** @} */
575
576/**
577 * \defgroup decoder_device Decoder hardware device
578 * \ingroup input
579 * @{
580 */
581
582/** Decoder device type */
598 void (*close)(struct vlc_decoder_device *);
600
601/**
602 * Decoder context struct
603 */
604typedef struct vlc_decoder_device
606 struct vlc_object_t obj;
610 /** Private context that could be used by the "decoder device" module
611 * implementation */
612 void *sys;
614 /** Must be set from the "decoder device" module open entry point */
617 /**
618 * Could be set from the "decoder device" module open entry point and will
619 * be used by hardware decoder modules.
620 *
621 * The type of pointer will depend of the type:
622 * VAAPI: VADisplay
623 * VDPAU: vdp_t *
624 * DXVA2: d3d9_decoder_device_t*
625 * D3D11VA: d3d11_decoder_device_t*
626 * VIDEOTOOLBOX: NULL
627 * AWindow: android AWindowHandler*
628 * NVDEC: decoder_device_nvdec_t*
629 * MMAL: MMAL_PORT_T*
630 */
631 void *opaque;
634/**
635 * "decoder device" module open entry point
636 *
637 * @param device the "decoder device" structure to initialize
638 * @param window pointer to a window to help device initialization (can be NULL)
639 **/
640typedef int (*vlc_decoder_device_Open)(vlc_decoder_device *device,
641 vlc_window_t *window);
642
643#define set_callback_dec_device(activate, priority) \
644 { \
645 vlc_decoder_device_Open open__ = activate; \
646 (void) open__; \
647 set_callback(activate) \
648 } \
649 set_capability( "decoder device", priority )
650
651
652/**
653 * Create a decoder device from a window
654 *
655 * This function will be hidden in the future. It is now used by opengl vout
656 * module as a transition.
657 */
660
661/**
662 * Hold a decoder device
663 */
666
667/**
668 * Release a decoder device
669 */
670VLC_API void
672
673/** @} */
674#endif /* _VLC_CODEC_H */
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_API
Definition fourcc_gen.c:31
#define unlikely(p)
Predicted false condition.
Definition vlc_common.h:246
#define vlc_assert(pred)
Run-time assertion.
Definition vlc_common.h:290
vlc_decoder_device * vlc_decoder_device_Create(vlc_object_t *, vlc_window_t *window)
Create a decoder device from a window.
Definition decoder_device.c:49
void vlc_decoder_device_Release(vlc_decoder_device *device)
Release a decoder device.
Definition decoder_device.c:82
int(* vlc_decoder_device_Open)(vlc_decoder_device *device, vlc_window_t *window)
"decoder device" module open entry point
Definition vlc_codec.h:641
vlc_decoder_device_type
Decoder device type.
Definition vlc_codec.h:585
vlc_decoder_device * vlc_decoder_device_Hold(vlc_decoder_device *device)
Hold a decoder device.
Definition decoder_device.c:73
@ VLC_DECODER_DEVICE_AWINDOW
Definition vlc_codec.h:591
@ VLC_DECODER_DEVICE_NVDEC
Definition vlc_codec.h:592
@ VLC_DECODER_DEVICE_D3D11VA
Definition vlc_codec.h:589
@ VLC_DECODER_DEVICE_VIDEOTOOLBOX
Definition vlc_codec.h:590
@ VLC_DECODER_DEVICE_VDPAU
Definition vlc_codec.h:587
@ VLC_DECODER_DEVICE_GSTDECODE
Definition vlc_codec.h:594
@ VLC_DECODER_DEVICE_VAAPI
Definition vlc_codec.h:586
@ VLC_DECODER_DEVICE_DXVA2
Definition vlc_codec.h:588
@ VLC_DECODER_DEVICE_MMAL
Definition vlc_codec.h:593
void decoder_Destroy(decoder_t *p_dec)
Destroy a decoder and reset the structure.
Definition decoder_helpers.c:71
int decoder_UpdateVideoFormat(decoder_t *dec)
Updates the video output format.
Definition decoder_helpers.c:80
static int decoder_GetInputAttachments(decoder_t *dec, input_attachment_t ***ppp_attachment, int *pi_attachment)
This function gives all input attachments at once.
Definition vlc_codec.h:530
static void decoder_QueueSub(decoder_t *dec, subpicture_t *p_spu)
This function queues a single subtitle to the video output.
Definition vlc_codec.h:475
static vlc_tick_t decoder_GetDisplayDate(decoder_t *dec, vlc_tick_t system_now, vlc_tick_t i_ts)
This function converts a decoder timestamp into a display date comparable to vlc_tick_now().
Definition vlc_codec.h:548
static void decoder_QueueAudio(decoder_t *dec, vlc_frame_t *p_aout_buf)
This function queues a single audio block to the audio output.
Definition vlc_codec.h:460
static void decoder_QueueCc(decoder_t *dec, vlc_frame_t *p_cc, const decoder_cc_desc_t *p_desc)
This function queues the Closed Captions.
Definition vlc_codec.h:442
vlc_frame_t * decoder_NewAudioBuffer(decoder_t *, int i_nb_samples)
This function will return a new audio buffer usable by a decoder as an output buffer.
Definition decoder.c:1016
int decoder_UpdateVideoOutput(decoder_t *dec, vlc_video_context *vctx_out)
Creates/Updates the rest of the video output pipeline.
Definition decoder_helpers.c:85
static int decoder_UpdateAudioFormat(decoder_t *dec)
This function notifies the audio output pipeline of a new audio output format (fmt_out....
Definition vlc_codec.h:489
static float decoder_GetDisplayRate(decoder_t *dec)
This function returns the current input rate.
Definition vlc_codec.h:565
void decoder_Init(decoder_t *dec, es_format_t *fmt_in, const es_format_t *fmt)
Initialize a decoder structure before creating the decoder.
void decoder_Clean(decoder_t *p_dec)
Unload a decoder module and reset the input/output formats.
Definition decoder_helpers.c:54
picture_t * decoder_NewPicture(decoder_t *dec)
Allocates an output picture buffer.
Definition decoder_helpers.c:159
static vlc_decoder_device * decoder_GetDecoderDevice(decoder_t *dec)
Creates/Updates the output decoder device.
Definition vlc_codec.h:330
static void decoder_QueueVideo(decoder_t *dec, picture_t *p_pic)
This function queues a single picture to the video output.
Definition vlc_codec.h:427
static subpicture_t * decoder_NewSubpicture(decoder_t *dec, const subpicture_updater_t *p_dyn)
This function will return a new subpicture usable by a decoder as an output buffer.
Definition vlc_codec.h:512
static block_t * vlc_encoder_EncodeAudio(encoder_t *encoder, block_t *audio)
Definition vlc_codec.h:293
static block_t * vlc_encoder_EncodeSub(encoder_t *encoder, subpicture_t *sub)
Definition vlc_codec.h:300
static block_t * vlc_encoder_EncodeVideo(encoder_t *encoder, picture_t *pic)
Definition vlc_codec.h:286
void vlc_encoder_Destroy(encoder_t *encoder)
Definition decoder_helpers.c:177
#define VLC_EGENERIC
Unspecified error.
Definition vlc_common.h:480
#define msg_Warn(p_this,...)
Definition vlc_messages.h:104
static bool picture_HasChainedPics(const picture_t *pic)
Check whether a picture has other pictures linked.
Definition vlc_picture.h:177
Definition vlc_configuration.h:320
Definition vlc_codec.h:207
int i_reorder_depth
Definition vlc_codec.h:210
uint8_t i_608_channels
Definition vlc_codec.h:208
uint64_t i_708_channels
Definition vlc_codec.h:209
Definition vlc_codec.h:48
struct decoder_owner_callbacks::@192::@195 audio
int(* get_attachments)(decoder_t *p_dec, input_attachment_t ***ppp_attachment, int *pi_attachment)
Definition vlc_codec.h:91
struct decoder_owner_callbacks::@192::@196 spu
int(* format_update)(decoder_t *, vlc_video_context *)
Definition vlc_codec.h:54
void(* queue)(decoder_t *, picture_t *)
Definition vlc_codec.h:59
void(* queue_cc)(decoder_t *, vlc_frame_t *, const decoder_cc_desc_t *)
Definition vlc_codec.h:61
struct decoder_owner_callbacks::@192::@194 video
picture_t *(* buffer_new)(decoder_t *)
Definition vlc_codec.h:57
vlc_tick_t(* get_display_date)(decoder_t *, vlc_tick_t, vlc_tick_t)
Definition vlc_codec.h:66
vlc_decoder_device *(* get_device)(decoder_t *)
Definition vlc_codec.h:53
float(* get_display_rate)(decoder_t *)
Definition vlc_codec.h:69
Definition vlc_codec.h:102
module_t * p_module
Definition vlc_codec.h:106
struct vlc_object_t obj
Definition vlc_codec.h:103
void(* pf_flush)(decoder_t *)
Definition vlc_codec.h:184
void * p_sys
Definition vlc_codec.h:107
es_format_t fmt_out
Definition vlc_codec.h:114
bool b_frame_drop_allowed
Definition vlc_codec.h:117
const es_format_t * fmt_in
Definition vlc_codec.h:111
int i_extra_picture_buffers
Number of extra (ie in addition to the DPB) picture buffers needed for decoding.
Definition vlc_codec.h:123
const struct decoder_owner_callbacks * cbs
Definition vlc_codec.h:201
vlc_meta_t * p_description
Definition vlc_codec.h:198
int(* pf_decode)(decoder_t *, vlc_frame_t *frame)
Definition vlc_codec.h:151
Definition vlc_codec.h:218
struct encoder_owner_callbacks::@199 video
Definition vlc_codec.h:255
void * p_sys
Definition vlc_codec.h:260
config_chain_t * p_cfg
Definition vlc_codec.h:276
es_format_t fmt_in
Definition vlc_codec.h:263
int i_threads
Definition vlc_codec.h:270
module_t * p_module
Definition vlc_codec.h:259
struct vlc_object_t obj
Definition vlc_codec.h:256
es_format_t fmt_out
Definition vlc_codec.h:267
int i_tolerance
Definition vlc_codec.h:273
int i_iframes
Definition vlc_codec.h:271
const struct encoder_owner_callbacks * cbs
Definition vlc_codec.h:280
int i_bframes
Definition vlc_codec.h:272
const struct vlc_encoder_operations * ops
Definition vlc_codec.h:279
vlc_video_context * vctx_in
Definition vlc_codec.h:264
Definition vlc_es.h:633
enum es_format_category_e i_cat
ES category.
Definition vlc_es.h:634
Definition vlc_input.h:169
Internal module descriptor.
Definition modules.h:76
Video picture.
Definition vlc_picture.h:130
Video subtitle.
Definition vlc_subpicture.h:234
subpicture_t * p_next
an increasing unique number
Definition vlc_subpicture.h:244
bool b_subtitle
subtitle with timestamps relative to the video
Definition vlc_subpicture.h:259
Definition vlc_subpicture.h:203
Definition vlc_codec.h:598
void(* close)(struct vlc_decoder_device *)
Definition vlc_codec.h:599
Decoder context struct.
Definition vlc_codec.h:606
enum vlc_decoder_device_type type
Must be set from the "decoder device" module open entry point.
Definition vlc_codec.h:616
void * sys
Private context that could be used by the "decoder device" module implementation.
Definition vlc_codec.h:613
void * opaque
Could be set from the "decoder device" module open entry point and will be used by hardware decoder m...
Definition vlc_codec.h:632
const struct vlc_decoder_device_operations * ops
Definition vlc_codec.h:609
struct vlc_object_t obj
Definition vlc_codec.h:607
Definition vlc_codec.h:244
void(* close)(encoder_t *)
Definition vlc_codec.h:245
block_t *(* encode_audio)(encoder_t *, block_t *)
Definition vlc_codec.h:249
block_t *(* encode_sub)(encoder_t *, subpicture_t *)
Definition vlc_codec.h:250
block_t *(* encode_video)(encoder_t *, picture_t *)
Definition vlc_codec.h:248
Definition vlc_frame.h:123
vlc_frame_t * p_next
Definition vlc_frame.h:124
Definition meta.c:46
VLC object common members.
Definition vlc_objects.h:53
Definition decoder_device.c:98
Window object.
Definition vlc_window.h:373
#define block_Release
Definition vlc_block.h:87
vlc_decoder_device * vlc_encoder_GetDecoderDevice(encoder_t *)
Creates/Updates the output decoder device.
Definition decoder_helpers.c:168
This file is a collection of common definitions and types.
#define VLC_TICK_INVALID
Definition vlc_config.h:44
This file defines the elementary streams format types.
@ SPU_ES
Definition vlc_es.h:620
@ AUDIO_ES
Definition vlc_es.h:619
@ VIDEO_ES
Definition vlc_es.h:618
This file defines picture structures and functions in vlc.
Subpictures functions.
int64_t vlc_tick_t
High precision date or time interval.
Definition vlc_tick.h:48
Window modules interface.