xine-lib  1.2.9
video_decoder.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2000-2017 the xine project
3  *
4  * This file is part of xine, a free video player.
5  *
6  * xine is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * xine is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19  *
20  * xine video decoder plugin interface
21  */
22 
23 #ifndef HAVE_VIDEO_DECODER_H
24 #define HAVE_VIDEO_DECODER_H
25 
26 #include <xine/os_types.h>
27 #include <xine/buffer.h>
28 
29 #ifdef XINE_COMPILE
30 # include <xine/plugin_catalog.h>
31 #endif
32 
33 #define VIDEO_DECODER_IFACE_VERSION 19
34 
35 
36 /*
37  * generic xine video decoder plugin interface
38  */
39 
42 
44 
45  /*
46  * open a new instance of this plugin class
47  */
48  video_decoder_t* (*open_plugin) (video_decoder_class_t *this_gen, xine_stream_t *stream);
49 
53  const char *identifier;
54 
60  const char *description;
61 
65  const char *text_domain;
66 
67  /*
68  * free all class-related resources
69  */
70  void (*dispose) (video_decoder_class_t *this_gen);
71 };
72 
73 #define default_video_decoder_class_dispose (void (*) (video_decoder_class_t *this_gen))free
74 
76 
77  /*
78  * decode data from buf and feed decoded frames to
79  * video output
80  */
81  void (*decode_data) (video_decoder_t *this_gen, buf_element_t *buf);
82 
83  /*
84  * reset decoder after engine flush (prepare for new
85  * video data not related to recently decoded data)
86  */
87  void (*reset) (video_decoder_t *this_gen);
88 
89  /*
90  * inform decoder that a time reference discontinuity has happened.
91  * that is, it must forget any currently held pts value
92  */
93  void (*discontinuity) (video_decoder_t *this_gen);
94 
95  /*
96  * flush out any frames that are still stored in the decoder
97  */
98  void (*flush) (video_decoder_t *this_gen);
99 
100  /*
101  * close down, free all resources
102  */
103  void (*dispose) (video_decoder_t *this_gen);
104 
111 #ifdef XINE_COMPILE
113 #else
114  void *node;
115 #endif
116 };
117 
118 #endif
plugin_node_t * node
Pointer to the loaded plugin node.
Definition: video_decoder.h:112
Definition: buffer.h:334
const char * identifier
short human readable identifier for this plugin class
Definition: video_decoder.h:53
Definition: plugin_catalog.h:44
void(* decode_data)(video_decoder_t *this_gen, buf_element_t *buf)
Definition: video_decoder.h:81
Definition: xine_internal.h:210
Definition: video_decoder.h:43
const char * description
human readable (verbose = 1 line) description for this plugin class
Definition: video_decoder.h:60
void(* flush)(video_decoder_t *this_gen)
Definition: video_decoder.h:98
void(* dispose)(video_decoder_t *this_gen)
Definition: video_decoder.h:103
const char * text_domain
Optional non-standard catalog to use with dgettext() for description.
Definition: video_decoder.h:65
void(* discontinuity)(video_decoder_t *this_gen)
Definition: video_decoder.h:93
Definition: video_decoder.h:75
void(* reset)(video_decoder_t *this_gen)
Definition: video_decoder.h:87
void(* dispose)(video_decoder_class_t *this_gen)
Definition: video_decoder.h:70