summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Sundermann <ssundermann@gnome.org>2014-08-01 15:07:22 +0200
committerStephan Sundermann <ssundermann@gnome.org>2014-08-01 15:07:22 +0200
commitc0d824ab7b868b7019b10783c51b837feb7c9ef8 (patch)
tree34cf6b84dede82b248588867c33aa8f3296c23ac
parente90703356ddb760e4abaf5c47a4fcdde18479cc9 (diff)
Add sample makefile
-rw-r--r--.gitignore9
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac15
-rw-r--r--samples/Makefile.am21
-rw-r--r--samples/Playback.cs2
5 files changed, 41 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index cde114e..9eabff5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,9 +14,10 @@ libtool
ltmain.sh
missing
stamp-h
+compile
# gedit temporary files
-*.*~
+*~
# glue binaries/objects (FIXME: kill the glue, kthxbye)
sources/glue/.deps/
@@ -31,9 +32,13 @@ sources/glue/generated.c
doc/*
sources/generated-stamp
sources/gstreamer-sharp-api.xml
+sources/*.gir
+sources/AssemblyInfo.cs
+gstreamer-sharp-1.0.pc
# our "bin" folder when using makefile build
-out/*
+out/gstreamer-sharp.dll
+*.exe
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
diff --git a/Makefile.am b/Makefile.am
index 16c38f4..d8e82eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = sources sources/glue doc
+SUBDIRS = sources sources/glue samples doc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gstreamer-sharp-1.0.pc
diff --git a/configure.ac b/configure.ac
index 8cac0db..56696aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,8 +73,9 @@ AC_SUBST(GACUTIL_FLAGS)
AC_SUBST(LIB_PREFIX)
AC_SUBST(LIB_SUFFIX)
+GTK_SHARP_VERSION=2.99.3
dnl Check for glib-sharp
-PKG_CHECK_MODULES(GLIB_SHARP, glib-sharp-3.0 >= 2.99.3)
+PKG_CHECK_MODULES(GLIB_SHARP, glib-sharp-3.0 >= $GTK_SHARP_VERSION)
AC_SUBST(GLIB_SHARP_CFLAGS)
AC_SUBST(GLIB_SHARP_LIBS)
gtksharp_prefix=`pkg-config --variable=prefix gtk-sharp-3.0`
@@ -83,12 +84,17 @@ AC_SUBST(gtksharp_prefix)
AC_SUBST(gapidir)
dnl Check for gio-sharp
-PKG_CHECK_MODULES(GIO_SHARP, gio-sharp-3.0 >= 2.99.3)
+PKG_CHECK_MODULES(GIO_SHARP, gio-sharp-3.0 >= $GTK_SHARP_VERSION)
AC_SUBST(GIO_SHARP_CFLAGS)
AC_SUBST(GIO_SHARP_LIBS)
+dnl Check for gtk-sharp
+PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-3.0 >= $GTK_SHARP_VERSION)
+AC_SUBST(GTK_SHARP_CFLAGS)
+AC_SUBST(GTK_SHARP_LIBS)
+
dnl Find GAPI
-PKG_CHECK_MODULES(GAPI, gapi-3.0 >= 2.99.3)
+PKG_CHECK_MODULES(GAPI, gapi-3.0 >= $GTK_SHARP_VERSION)
dnl Check for gapi
AC_PATH_PROG(GAPI_PARSER, gapi3-parser, no)
@@ -151,7 +157,7 @@ PKG_CHECK_MODULES(GST,
gstreamer-tag-1.0 >= $GSTREAMER_REQUIRED_VERSION
)
-gstreamer_prefix=/usr
+gstreamer_prefix=`pkg-config --variable=prefix gtk-sharp-3.0`
AC_SUBST(gstreamer_prefix)
AC_SUBST(GST_LIBS)
AC_SUBST(GST_CFLAGS)
@@ -164,6 +170,7 @@ AC_CONFIG_FILES([
Makefile
sources/Makefile
sources/glue/Makefile
+ samples/Makefile
sources/AssemblyInfo.cs
gstreamer-sharp-1.0.pc
doc/Makefile
diff --git a/samples/Makefile.am b/samples/Makefile.am
new file mode 100644
index 0000000..38d6445
--- /dev/null
+++ b/samples/Makefile.am
@@ -0,0 +1,21 @@
+TARGETS = playback.exe video-overlay.exe
+
+DEBUGS = $(addsuffix .mdb, $(TARGETS))
+assemblies = \
+ $(top_builddir)/out/gstreamer-sharp.dll
+
+references=$(addprefix -r:, $(assemblies))
+
+noinst_SCRIPTS = $(TARGETS)
+CLEANFILES = $(TARGETS) $(DEBUGS)
+
+playback.exe: $(srcdir)/Playback.cs $(assemblies)
+ $(CSC) $(CSFLAGS) -out:playback.exe $(references) $(GLIB_SHARP_LIBS) $(srcdir)/Playback.cs
+
+video-overlay.exe: $(srcdir)/VideoOverlay.cs $(assemblies)
+ $(CSC) $(CSFLAGS) -out:video-overlay.exe $(references) $(GTK_SHARP_LIBS) $(srcdir)/VideoOverlay.cs
+
+
+EXTRA_DIST = \
+ Playback.cs \
+ VideoOverlay.cs
diff --git a/samples/Playback.cs b/samples/Playback.cs
index e7676af..fc53b5c 100644
--- a/samples/Playback.cs
+++ b/samples/Playback.cs
@@ -28,7 +28,7 @@ namespace GstreamerSharp
Loop = new GLib.MainLoop();
Application.Init(ref args);
- element = Gst.Parse.ParseLaunch("playbin uri=http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/Sintel_Trailer1.1080p.DivX_Plus_HD.mkv");
+ element = Gst.Parse.Launch("playbin uri=http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/Sintel_Trailer1.1080p.DivX_Plus_HD.mkv");
element.Bus.AddSignalWatch();
element.Bus.Message += Handle;