Skip to content

Commit a5b8c56

Browse files
committed
Initial code
1 parent ba4ef3b commit a5b8c56

5 files changed

Lines changed: 461 additions & 0 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build/
2+
build-env.sh
3+
*~
4+
*.swp
5+
*.swo

meson.build

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
project('gst-airplay', 'c', version : '0.1', license : 'GPL')
2+
3+
plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
4+
5+
cc = meson.get_compiler('c')
6+
7+
gst_version = meson.project_version()
8+
9+
api_version = '1.0'
10+
11+
gio_dep = dependency('gio-2.0')
12+
13+
gst_dep = dependency('gstreamer-1.0',
14+
fallback : ['gstreamer', 'gst_dep'])
15+
gstbase_dep = dependency('gstreamer-base-1.0',
16+
fallback : ['gstreamer', 'gst_base_dep'])
17+
gstvideo_dep = dependency('gstreamer-video-1.0',
18+
fallback : ['gst-plugins-base', 'video_dep'])
19+
20+
plugin_c_args = ['-DHAVE_CONFIG_H']
21+
22+
cdata = configuration_data()
23+
cdata.set_quoted('PACKAGE_VERSION', gst_version)
24+
cdata.set_quoted('PACKAGE', 'gst-airplay-plugin')
25+
cdata.set_quoted('GST_LICENSE', 'GPL')
26+
cdata.set_quoted('GST_API_VERSION', api_version)
27+
cdata.set_quoted('GST_PACKAGE_NAME', 'GStreamer airplay Plug-ins')
28+
cdata.set_quoted('GST_PACKAGE_ORIGIN', 'https://github.com/knuesel/gst-airplay')
29+
configure_file(output : 'config.h', configuration : cdata)
30+
31+
#gstaudio_dep = dependency('gstreamer-audio-1.0',
32+
# fallback: ['gst-plugins-base', 'audio_dep'])
33+
34+
# Video source
35+
airplay_sources = [
36+
'src/gstairplay.c',
37+
'src/gstairplaysrc.c'
38+
]
39+
40+
libairplaydep = dependency('airplay')
41+
42+
gstairplay = library('gstairplay',
43+
airplay_sources,
44+
c_args: plugin_c_args,
45+
dependencies : [gstbase_dep, gstvideo_dep, libairplaydep, gio_dep],
46+
install : true,
47+
install_dir : plugins_install_dir,
48+
)

src/gstairplay.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#ifdef HAVE_CONFIG_H
2+
#include "config.h"
3+
#endif
4+
5+
#include "gstairplaysrc.h"
6+
7+
GST_DEBUG_CATEGORY (gst_debug_airplay);
8+
#define GST_CAT_DEFAULT gst_debug_airplay
9+
10+
static gboolean
11+
plugin_init (GstPlugin * plugin)
12+
{
13+
GST_DEBUG_CATEGORY_INIT (gst_debug_airplay, "airplay", 0, "AirPlay");
14+
15+
if (!gst_element_register (plugin, "airplaysrc", GST_RANK_PRIMARY,
16+
GST_TYPE_AIRPLAY_SRC))
17+
return FALSE;
18+
19+
return TRUE;
20+
}
21+
22+
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
23+
GST_VERSION_MINOR,
24+
airplay,
25+
"receive video through Apple AirPlay",
26+
plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);

0 commit comments

Comments
 (0)