xine-lib  1.2.10
ffmpeg_decoder.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2001-2018 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 
21 #ifndef HAVE_XINE_DECODER_H
22 #define HAVE_XINE_DECODER_H
23 
24 #ifdef HAVE_CONFIG_H
25 #include "config.h"
26 #endif
27 
28 #ifdef HAVE_FFMPEG_AVUTIL_H
29 # include <avcodec.h>
30 #else
31 # include <libavcodec/avcodec.h>
32 # include <libavutil/mem.h>
33 #endif
34 
35 typedef struct ff_codec_s {
36  uint32_t type;
37 #if defined LIBAVCODEC_VERSION_INT && LIBAVCODEC_VERSION_INT >= ((54<<16)|(25<<8))
38  enum AVCodecID id;
39 #else
40  enum CodecID id;
41 #endif
42  const char *name;
43 } ff_codec_t;
44 
45 void *init_audio_plugin (xine_t *xine, const void *data);
46 void *init_video_plugin (xine_t *xine, const void *data);
47 void *init_avio_input_plugin (xine_t *xine, const void *data);
48 void *init_avformat_input_plugin (xine_t *xine, const void *data);
49 void *init_avformat_demux_plugin (xine_t *xine, const void *data);
50 
57 extern const input_info_t input_info_avio;
58 
59 /* communication between avio/avformat input and avformat demux plugins */
60 #define INPUT_OPTIONAL_DATA_pb 0x1000
61 #define INPUT_OPTIONAL_DATA_fmt_ctx 0x1001
62 
63 /* plugin ids */
64 #define INPUT_AVIO_ID "avio"
65 #define DEMUX_AVFORMAT_ID "avformat"
66 
67 extern pthread_once_t once_control;
68 void init_once_routine(void);
69 
70 extern pthread_mutex_t ffmpeg_lock;
71 
72 #endif
xine_s
Definition: xine_internal.h:80
init_audio_plugin
void * init_audio_plugin(xine_t *xine, const void *data)
Definition: ff_audio_decoder.c:1341
init_avformat_input_plugin
void * init_avformat_input_plugin(xine_t *xine, const void *data)
Definition: demux_avformat.c:248
init_audio_plugin
void * init_audio_plugin(xine_t *xine, const void *data)
Definition: ff_audio_decoder.c:1341
dec_info_ffmpeg_wmv9
const decoder_info_t dec_info_ffmpeg_wmv9
Definition: ff_video_decoder.c:3095
PLUGIN_MUST_PRELOAD
#define PLUGIN_MUST_PRELOAD
Definition: xine_plugin.h:46
once_control
pthread_once_t once_control
Definition: ffmpeg_decoder.c:42
dec_info_ffmpeg_wmv8
const decoder_info_t dec_info_ffmpeg_wmv8
Definition: ff_video_decoder.c:3090
init_avformat_input_plugin
void * init_avformat_input_plugin(xine_t *xine, const void *data)
Definition: demux_avformat.c:248
dec_info_ffmpeg_audio
const decoder_info_t dec_info_ffmpeg_audio
Definition: ff_audio_decoder.c:1373
XFF_AVCODEC_REGISTER_ALL
#define XFF_AVCODEC_REGISTER_ALL()
Definition: ffmpeg_compat.h:254
once_control
pthread_once_t once_control
Definition: ffmpeg_decoder.c:42
demux_info_avformat
const demuxer_info_t demux_info_avformat
Definition: demux_avformat.c:916
ffmpeg_lock
pthread_mutex_t ffmpeg_lock
Definition: ffmpeg_decoder.c:43
PLUGIN_AUDIO_DECODER
#define PLUGIN_AUDIO_DECODER
Definition: xine_plugin.h:32
init_avio_input_plugin
void * init_avio_input_plugin(xine_t *xine, const void *data)
Definition: input_avio.c:348
ff_codec_s::name
const char * name
Definition: ffmpeg_decoder.h:42
dec_info_ffmpeg_wmv8
const decoder_info_t dec_info_ffmpeg_wmv8
Definition: ff_video_decoder.c:3090
init_avformat_demux_plugin
void * init_avformat_demux_plugin(xine_t *xine, const void *data)
Definition: demux_avformat.c:902
ffmpeg_lock
pthread_mutex_t ffmpeg_lock
Definition: ffmpeg_decoder.c:43
demuxer_info_t
Definition: xine_plugin.h:88
init_once_routine
void init_once_routine(void)
Definition: ffmpeg_decoder.c:45
PLUGIN_INPUT
#define PLUGIN_INPUT
Definition: xine_plugin.h:30
ff_codec_s::id
enum CodecID id
Definition: ffmpeg_decoder.h:40
dec_info_ffmpeg_audio
const decoder_info_t dec_info_ffmpeg_audio
Definition: ff_audio_decoder.c:1373
init_avformat_demux_plugin
void * init_avformat_demux_plugin(xine_t *xine, const void *data)
Definition: demux_avformat.c:902
ff_codec_s::type
uint32_t type
Definition: ffmpeg_decoder.h:36
NULL
NULL
Definition: xine_plugin.c:78
INPUT_AVIO_ID
#define INPUT_AVIO_ID
Definition: ffmpeg_decoder.h:64
input_info_avformat
const input_info_t input_info_avformat
Definition: demux_avformat.c:273
decoder_info_t
Definition: xine_plugin.h:77
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
dec_info_ffmpeg_wmv9
const decoder_info_t dec_info_ffmpeg_wmv9
Definition: ff_video_decoder.c:3095
init_once_routine
void init_once_routine(void)
Definition: ffmpeg_decoder.c:45
PLUGIN_DEMUX
#define PLUGIN_DEMUX
Definition: xine_plugin.h:31
XFF_AVCODEC_INIT
#define XFF_AVCODEC_INIT()
Definition: ffmpeg_compat.h:203
DEMUX_AVFORMAT_ID
#define DEMUX_AVFORMAT_ID
Definition: ffmpeg_decoder.h:65
PLUGIN_VIDEO_DECODER
#define PLUGIN_VIDEO_DECODER
Definition: xine_plugin.h:33
ff_codec_t
struct ff_codec_s ff_codec_t
init_video_plugin
void * init_video_plugin(xine_t *xine, const void *data)
Definition: ff_video_decoder.c:2987
ffmpeg_compat.h
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
ffmpeg_decoder.h
xine_internal.h
dec_info_ffmpeg_video
const decoder_info_t dec_info_ffmpeg_video
Definition: ff_video_decoder.c:3085
EXPORTED
const plugin_info_t xine_plugin_info[] EXPORTED
Definition: ffmpeg_decoder.c:62
config.h
demux_info_avformat
const demuxer_info_t demux_info_avformat
Definition: demux_avformat.c:916
dec_info_ffmpeg_video
const decoder_info_t dec_info_ffmpeg_video
Definition: ff_video_decoder.c:3085
input_info_avio
const input_info_t input_info_avio
Definition: input_avio.c:369
input_info_t
Definition: xine_plugin.h:93
init_video_plugin
void * init_video_plugin(xine_t *xine, const void *data)
Definition: ff_video_decoder.c:2987
ff_codec_s
Definition: ffmpeg_decoder.h:35
input_info_avformat
const input_info_t input_info_avformat
Definition: demux_avformat.c:273
plugin_info_t
Definition: xine_plugin.h:55