mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 17:05:52 +00:00
Make sure GStreamer is at least 1.14
Since we broke ABI with https://bugzilla.gnome.org/show_bug.cgi?id=743062#c30 it is the safest way to do handle. Update the README accordingly
This commit is contained in:
parent
c40730fe93
commit
2f6752b3fe
2 changed files with 19 additions and 4 deletions
|
@ -10,9 +10,9 @@ the core and base gstreamer libraries.
|
||||||
|
|
||||||
Prerequisites
|
Prerequisites
|
||||||
----
|
----
|
||||||
These libraries are needed for clutter-sharp to compile:
|
These libraries are needed for gstreamer-sharp to compile:
|
||||||
* gstreamer core, base and good 1.4 or higher
|
* gstreamer core, base and good 1.14 or higher
|
||||||
* [gtk-sharp] 3.22.6 or higher - *NOTE: This can be built as a meson subproject if using the meson build system.*
|
* [gtk-sharp] 3.22.0 or higher - *NOTE: This can be built as a meson subproject.*
|
||||||
|
|
||||||
You will also need various .NET/mono bits (mcs and al). On debian-based distros
|
You will also need various .NET/mono bits (mcs and al). On debian-based distros
|
||||||
you can install these with:
|
you can install these with:
|
||||||
|
@ -70,5 +70,5 @@ License
|
||||||
gstreamer-sharp is licensed under the [LGPL 2.1](https://www.gnu.org/licenses/lgpl-2.1.html)
|
gstreamer-sharp is licensed under the [LGPL 2.1](https://www.gnu.org/licenses/lgpl-2.1.html)
|
||||||
|
|
||||||
[bindinator]:https://github.com/GLibSharp/bindinator
|
[bindinator]:https://github.com/GLibSharp/bindinator
|
||||||
[gtk-sharp]:https://github.com/GLibSharp/GtlSharp
|
[gtk-sharp]:https://github.com/GLibSharp/GtkSharp
|
||||||
[gstreamer]: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/
|
[gstreamer]: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/
|
||||||
|
|
|
@ -21,6 +21,9 @@ namespace Gst {
|
||||||
|
|
||||||
partial class Application
|
partial class Application
|
||||||
{
|
{
|
||||||
|
// Because of: https://bugzilla.gnome.org/show_bug.cgi?id=743062#c30
|
||||||
|
private static uint MIN_GSTREAMER_MINOR = 14;
|
||||||
|
|
||||||
static Application () {
|
static Application () {
|
||||||
GLib.GType.Register (List.GType, typeof(List));
|
GLib.GType.Register (List.GType, typeof(List));
|
||||||
GLib.GType.Register (Fraction.GType, typeof(Fraction));
|
GLib.GType.Register (Fraction.GType, typeof(Fraction));
|
||||||
|
@ -38,9 +41,15 @@ namespace Gst {
|
||||||
[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void gst_init(IntPtr argc, IntPtr argv);
|
static extern void gst_init(IntPtr argc, IntPtr argv);
|
||||||
|
|
||||||
|
private static void CheckVersion() {
|
||||||
|
if (Gst.Version.Minor < MIN_GSTREAMER_MINOR)
|
||||||
|
throw new Exception(Gst.Version.Description + " found but GStreamer 1." +
|
||||||
|
MIN_GSTREAMER_MINOR + " required.");
|
||||||
|
}
|
||||||
|
|
||||||
public static void Init() {
|
public static void Init() {
|
||||||
gst_init (IntPtr.Zero, IntPtr.Zero);
|
gst_init (IntPtr.Zero, IntPtr.Zero);
|
||||||
|
CheckVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Init(ref string[] argv) {
|
public static void Init(ref string[] argv) {
|
||||||
|
@ -52,6 +61,8 @@ namespace Gst {
|
||||||
gst_init(ref cnt_argv, ref native_argv);
|
gst_init(ref cnt_argv, ref native_argv);
|
||||||
foreach (var native_arg in native_arg_list)
|
foreach (var native_arg in native_arg_list)
|
||||||
GLib.Marshaller.Free (native_arg);
|
GLib.Marshaller.Free (native_arg);
|
||||||
|
|
||||||
|
CheckVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
@ -63,6 +74,8 @@ namespace Gst {
|
||||||
public static bool InitCheck() {
|
public static bool InitCheck() {
|
||||||
IntPtr error = IntPtr.Zero;
|
IntPtr error = IntPtr.Zero;
|
||||||
bool ret = gst_init_check (IntPtr.Zero, IntPtr.Zero, out error);
|
bool ret = gst_init_check (IntPtr.Zero, IntPtr.Zero, out error);
|
||||||
|
|
||||||
|
CheckVersion();
|
||||||
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -78,6 +91,8 @@ namespace Gst {
|
||||||
foreach (var native_arg in native_arg_list)
|
foreach (var native_arg in native_arg_list)
|
||||||
GLib.Marshaller.Free (native_arg);
|
GLib.Marshaller.Free (native_arg);
|
||||||
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
if (error != IntPtr.Zero) throw new GLib.GException (error);
|
||||||
|
|
||||||
|
CheckVersion();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue