Compare commits

...

8 commits

Author SHA1 Message Date
Nick Steel 8dbc335d9a Merge branch 'log-trait-adapter' into 'main'
log: `Log` trait adapter around the GStreamer debug system

Closes #187

See merge request gstreamer/gstreamer-rs!1426
2024-04-27 08:43:13 +00:00
Sebastian Dröge 57050f66c6 Regenerate with latest gir / gir-files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1429>
2024-04-27 11:31:11 +03:00
Sebastian Dröge 63654c67da Update gir-files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1429>
2024-04-27 11:30:29 +03:00
Sebastian Dröge 70a15e8dbe Update gir
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1429>
2024-04-27 11:30:25 +03:00
Nick Steel a77022ba0e log: check category above threshold 2024-04-22 01:05:38 +01:00
Nick Steel 8dd9a2d5ee log: DebugCategoryLogger is optional via 'log' feature 2024-04-21 22:23:36 +01:00
Sebastian Dröge 1438fa88db Apply 1 suggestion(s) to 1 file(s) 2024-04-21 09:22:32 +00:00
Nick Steel 08169aca96 log: Log trait adapter around the GStreamer debug system
Allows usage of normal `log` crate macros, and for other crates
using those macros to have their log messages go to the GStreamer
debug logs.

This implementation is based on the one found in Servo.

Fixes #187
2024-04-21 00:12:31 +01:00
82 changed files with 321 additions and 130 deletions

2
gir

@ -1 +1 @@
Subproject commit 0e476ab5c1dec04355e4f516ebcce4edaa940c9e
Subproject commit 5223ce91b97a833b09d6cbd04bbeab1bf18112b7

@ -1 +1 @@
Subproject commit cfc0305f903bcce1c9fb5b5055d3ae8a30912750
Subproject commit 65efc10e710972dc43f91266d0f98c5e39390af4

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -19,8 +19,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -18,8 +18,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -19,8 +19,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -20,8 +20,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -19,8 +19,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -19,8 +19,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -19,8 +19,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -21,8 +21,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -18,8 +18,11 @@ use gstreamer_gl_sys as gst_gl;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -25,8 +25,11 @@ pub use manual::*;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -18,8 +18,11 @@ use gstreamer_gl_sys as gst_gl;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -18,8 +18,11 @@ use gstreamer_gl_sys as gst_gl;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -18,8 +18,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -19,8 +19,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -21,8 +21,11 @@ use gstreamer_video_sys as gst_video;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -20,8 +20,11 @@ use gstreamer_video_sys as gst_video;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -20,8 +20,11 @@ use gstreamer_video_sys as gst_video;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -19,8 +19,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -23,8 +23,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -21,8 +21,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -18,8 +18,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -19,8 +19,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -20,8 +20,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -20,8 +20,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -19,8 +19,11 @@ use gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

View file

@ -23,6 +23,7 @@ num-rational = { version = "0.4", default-features = false, features = [] }
futures-core = "0.3"
futures-channel = "0.3"
futures-util = { version = "0.3", default-features = false }
log = { version = "0.4", optional = true }
muldiv = "1"
opt-ops = { package = "option-operations", version = "0.5" }
serde = { version = "1.0", optional = true, features = ["derive"] }
@ -48,6 +49,7 @@ v1_20 = ["ffi/v1_20", "v1_18"]
v1_22 = ["ffi/v1_22", "v1_20"]
v1_24 = ["ffi/v1_24", "v1_22"]
serde = ["num-rational/serde", "dep:serde", "serde_bytes"]
log = ["dep:log"]
[package.metadata.docs.rs]
all-features = true

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -49,6 +49,8 @@ mod serde_macros;
#[macro_use]
pub mod log;
#[cfg(feature = "log")]
pub use crate::log::DebugCategoryLogger;
pub use crate::log::{
DebugCategory, DebugLogFunction, DebugMessage, LoggedObject, CAT_BUFFER, CAT_BUFFER_LIST,
CAT_BUS, CAT_CALL_TRACE, CAT_CAPS, CAT_CLOCK, CAT_CONTEXT, CAT_DEFAULT, CAT_ELEMENT_PADS,

View file

@ -4,6 +4,8 @@ use std::{borrow::Cow, ffi::CStr, fmt, ptr};
use glib::{ffi::gpointer, prelude::*, translate::*};
use libc::c_char;
#[cfg(feature = "log")]
use log;
use once_cell::sync::Lazy;
use crate::DebugLevel;
@ -1064,6 +1066,54 @@ macro_rules! log_with_level(
}};
);
#[cfg(feature = "log")]
#[derive(Debug)]
pub struct DebugCategoryLogger(DebugCategory);
#[cfg(feature = "log")]
impl DebugCategoryLogger {
pub fn new(cat: DebugCategory) -> Self {
Self(cat)
}
fn to_level(level: log::Level) -> crate::DebugLevel {
match level {
log::Level::Error => DebugLevel::Error,
log::Level::Warn => DebugLevel::Warning,
log::Level::Info => DebugLevel::Info,
log::Level::Debug => DebugLevel::Debug,
log::Level::Trace => DebugLevel::Trace,
}
}
}
#[cfg(feature = "log")]
impl log::Log for DebugCategoryLogger {
fn enabled(&self, metadata: &log::Metadata) -> bool {
let lvl = DebugCategoryLogger::to_level(metadata.level());
is_active() && self.0.above_threshold(lvl)
}
fn log(&self, record: &log::Record) {
if !self.enabled(record.metadata()) {
return;
}
let lvl = DebugCategoryLogger::to_level(record.level());
let file = record.file().unwrap_or("");
let file = glib::GStr::from_str_until_nul(file).unwrap_or_default();
self.0.log(
None::<&glib::Object>,
lvl,
file,
record.module_path().unwrap_or(""),
record.line().unwrap_or(0),
record.args().clone(),
);
}
fn flush(&self) {}
}
unsafe extern "C" fn log_handler<T>(
category: *mut ffi::GstDebugCategory,
level: ffi::GstDebugLevel,
@ -1308,6 +1358,65 @@ mod tests {
memdump!(cat, obj: obj, "meh");
}
#[cfg(feature = "log")]
static LOGGER: Lazy<DebugCategoryLogger> = Lazy::new(|| {
DebugCategoryLogger::new(DebugCategory::new(
"Log_trait",
crate::DebugColorFlags::empty(),
Some("Using the Log trait"),
))
});
#[test]
#[cfg(feature = "log")]
fn log_trait() {
crate::init().unwrap();
log::set_logger(&(*LOGGER)).expect("Failed to set logger");
log::set_max_level(log::LevelFilter::Trace);
log::error!("meh");
log::warn!("fish");
let (sender, receiver) = mpsc::channel();
let sender = Arc::new(Mutex::new(sender));
let handler = move |category: DebugCategory,
level: DebugLevel,
_file: &glib::GStr,
_function: &glib::GStr,
_line: u32,
_object: Option<&LoggedObject>,
message: &DebugMessage| {
let cat = DebugCategory::get("Log_trait").unwrap();
if category != cat {
// This test can run in parallel with other tests, including new_and_log above.
// We cannot be certain we only see our own messages.
return;
}
assert_eq!(level, DebugLevel::Error);
assert_eq!(message.get().unwrap().as_ref(), "meh");
let _ = sender.lock().unwrap().send(());
};
remove_default_log_function();
add_log_function(handler);
let cat = LOGGER.0;
cat.set_threshold(crate::DebugLevel::Warning);
log::error!("meh");
receiver.recv().unwrap();
cat.set_threshold(crate::DebugLevel::Error);
log::error!("meh");
receiver.recv().unwrap();
cat.set_threshold(crate::DebugLevel::None);
log::error!("fish");
log::warn!("meh");
}
#[test]
fn log_handler() {
crate::init().unwrap();

View file

@ -1,3 +1,3 @@
Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de)
from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b)
Generated by gir (https://github.com/gtk-rs/gir @ 5223ce91b97a)
from gir-files (https://github.com/gtk-rs/gir-files @ 65efc10e7109)
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ bca9723cb3e5)

View file

@ -18,8 +18,11 @@ use gobject_sys as gobject;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, uintptr_t, FILE,
intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};