22 #ifndef __BG_PLUGIN_H_
23 #define __BG_PLUGIN_H_
26 #include <gavl/compression.h>
27 #include <gavl/connectors.h>
28 #include <gavl/metadata.h>
31 #include <gavl/gavf.h>
33 #include <gmerlin/parameter.h>
34 #include <gmerlin/streaminfo.h>
35 #include <gmerlin/accelerator.h>
36 #include <gmerlin/edl.h>
108 #define BG_PLUGIN_REMOVABLE (1<<0)
109 #define BG_PLUGIN_FILE (1<<1)
110 #define BG_PLUGIN_RECORDER (1<<2)
111 #define BG_PLUGIN_URL (1<<3)
112 #define BG_PLUGIN_PLAYBACK (1<<4)
113 #define BG_PLUGIN_PIPE (1<<8)
114 #define BG_PLUGIN_TUNER (1<<9)
115 #define BG_PLUGIN_FILTER_1 (1<<10)
116 #define BG_PLUGIN_EMBED_WINDOW (1<<11)
117 #define BG_PLUGIN_VISUALIZE_FRAME (1<<12)
118 #define BG_PLUGIN_VISUALIZE_GL (1<<13)
119 #define BG_PLUGIN_PP (1<<14)
120 #define BG_PLUGIN_CALLBACKS (1<<15)
121 #define BG_PLUGIN_BROADCAST (1<<16)
122 #define BG_PLUGIN_DEVPARAM (1<<17)
123 #define BG_PLUGIN_OV_STILL (1<<18)
124 #define BG_PLUGIN_GAVF_IO (1<<19)
126 #define BG_PLUGIN_AUDIO_COMPRESSOR (1<<19)
127 #define BG_PLUGIN_VIDEO_COMPRESSOR (1<<20)
128 #define BG_PLUGIN_AUDIO_DECOMPRESSOR (1<<21)
129 #define BG_PLUGIN_VIDEO_DECOMPRESSOR (1<<22)
130 #define BG_PLUGIN_OVERLAY_COMPRESSOR (1<<23)
131 #define BG_PLUGIN_OVERLAY_DECOMPRESSOR (1<<24)
133 #define BG_PLUGIN_UNSUPPORTED (1<<25)
136 #define BG_PLUGIN_ALL 0xFFFFFFFF
141 #define BG_PLUGIN_API_VERSION 27
146 #define BG_GET_PLUGIN_API_VERSION \
147 int get_plugin_api_version() __attribute__ ((visibility("default"))); \
148 int get_plugin_api_version() { return BG_PLUGIN_API_VERSION; }
150 #define BG_PLUGIN_PRIORITY_MIN 1
151 #define BG_PLUGIN_PRIORITY_MAX 10
409 char ** username,
char ** password);
423 int pixel_width,
int pixel_height);
459 const char * (*get_protocols)(
void * priv);
464 const char * (*get_mimetypes)(
void * priv);
470 const char * (*get_extensions)(
void * priv);
488 int (*
open)(
void * priv,
const char * arg);
498 int (*
open_fd)(
void * priv,
int fd, int64_t total_bytes,
499 const char * mimetype);
512 int (*
open_io)(
void * priv, gavf_io_t * io);
519 const gavl_edl_t * (*get_edl)(
void * priv);
528 const char * (*get_disc_name)(
void * priv);
577 int (*
set_track)(
void * priv,
int track);
678 int (*
start)(
void * priv);
713 gavl_audio_source_t * (*get_audio_source)(
void * priv,
int stream);
744 gavl_video_source_t * (*get_video_source)(
void * priv,
int stream);
778 gavl_packet_source_t * (*get_audio_packet_source)(
void * priv,
int stream);
788 gavl_packet_source_t * (*get_video_packet_source)(
void * priv,
int stream);
798 gavl_packet_source_t * (*get_overlay_packet_source)(
void * priv,
int stream);
812 void (*
skip_video)(
void * priv,
int stream, int64_t * time,
int scale,
int exact);
844 gavl_video_source_t * (*get_overlay_source)(
void * priv,
int stream);
877 gavl_packet_source_t * (*get_text_source)(
void * priv,
int stream);
887 gavl_packet_source_t * (*get_subtitle_packet_source)(
void * priv,
int stream);
900 void (*
seek)(
void * priv, int64_t * time,
int scale);
909 void (*
stop)(
void * priv);
917 void (*
close)(
void * priv);
959 int (*
start)(
void * priv);
966 gavl_audio_sink_t * (*get_sink)(
void * priv);
985 void (*
stop)(
void * priv);
993 void (*
close)(
void * priv);
1078 gavl_audio_source_t * (*get_audio_source)(
void * priv);
1087 gavl_video_source_t * (*get_video_source)(
void * priv);
1093 void (*
close)(
void * priv);
1268 void (*
set_window)(
void * priv,
const char * window_id);
1275 const char * (*get_window)(
void * priv);
1369 gavl_video_sink_t * (*get_sink)(
void * priv);
1387 void (*
update_aspect)(
void * priv,
int pixel_width,
int pixel_height);
1404 void (*
close)(
void * priv);
1537 int (*
open)(
void * data,
const char * filename,
1538 const gavl_metadata_t * metadata,
1539 const gavl_chapter_list_t * chapter_list);
1549 int (*
open_io)(
void * data, gavf_io_t * io,
1550 const gavl_metadata_t * metadata,
1551 const gavl_chapter_list_t * chapter_list);
1638 const gavl_metadata_t * m,
1653 const gavl_metadata_t * m,
1664 const gavl_metadata_t * m,
1665 uint32_t * timescale);
1680 const gavl_metadata_t * m,
1697 const gavl_metadata_t * m,
1765 int (*
set_video_pass)(
void * priv,
int stream,
int pass,
int total_passes,
1766 const char * stats_file);
1776 int (*
start)(
void * priv);
1783 gavl_audio_sink_t * (*get_audio_sink)(
void * priv,
int stream);
1790 gavl_packet_sink_t * (*get_audio_packet_sink)(
void * priv,
int stream);
1797 gavl_video_sink_t * (*get_video_sink)(
void * priv,
int stream);
1804 gavl_packet_sink_t * (*get_video_packet_sink)(
void * priv,
int stream);
1811 gavl_packet_sink_t * (*get_text_sink)(
void * priv,
int stream);
1818 gavl_video_sink_t * (*get_overlay_sink)(
void * priv,
int stream);
1825 gavl_packet_sink_t * (*get_overlay_packet_sink)(
void * priv,
int stream);
1844 int (*
close)(
void * data,
int do_delete);
1874 void (*action_callback)(
void * data,
char * action);
1885 void (*progress_callback)(
void * data,
float perc);
1927 int (*
init)(
void * priv);
1945 void (*
add_track)(
void * priv,
const char * filename,
1946 gavl_metadata_t * metadata,
int pp_only);
1957 void (*
run)(
void * priv,
const char * directory,
int cleanup);
1968 void (*
stop)(
void * priv);
2003 int (*
read_header)(
void * priv,
const char * filename,
2011 const gavl_metadata_t * (*get_metadata)(
void * priv);
2092 int (*
write_header)(
void * priv,
const char * filename,
2160 void (*
reset)(
void * priv);
2171 gavl_audio_source_t * (*connect)(
void * priv, gavl_audio_source_t *,
2207 void (*
reset)(
void * priv);
2227 gavl_video_source_t * (*connect)(
void * priv,
2228 gavl_video_source_t * src,
2305 const char * window_id);
2346 void (*
close)(
void * priv);
2382 gavl_audio_sink_t * (*open_encode_audio)(
void * priv,
2385 gavl_metadata_t * m);
2395 gavl_video_sink_t * (*open_encode_video)(
void * priv,
2398 gavl_metadata_t * m);
2408 gavl_video_sink_t * (*open_encode_overlay)(
void * priv,
2411 gavl_metadata_t * m);
2428 gavl_audio_source_t * (*connect_decode_audio)(
void * priv,
2429 gavl_packet_source_t * src,
2432 gavl_metadata_t * m);
2442 gavl_video_source_t * (*connect_decode_video)(
void * priv,
2443 gavl_packet_source_t * src,
2446 gavl_metadata_t * m);
2456 gavl_video_source_t * (*connect_decode_overlay)(
void * priv,
2457 gavl_packet_source_t * src,
2460 gavl_metadata_t * m);
2469 void (*
reset)(
void * priv);
2477 int64_t (*
skip)(
void * priv, int64_t t);
2486 int (*
set_pass)(
void * priv,
int pass,
int total_passes,
2487 const char * stats_file);
2495 #endif // __BG_PLUGIN_H_