diff --git a/sys/.gitignore b/sys/.gitignore new file mode 100644 index 000000000..6aa106405 --- /dev/null +++ b/sys/.gitignore @@ -0,0 +1,3 @@ +/target/ +**/*.rs.bk +Cargo.lock diff --git a/sys/.gitlab-ci.yml b/sys/.gitlab-ci.yml new file mode 100644 index 000000000..e92a8fede --- /dev/null +++ b/sys/.gitlab-ci.yml @@ -0,0 +1,118 @@ +include: + - remote: "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/raw/master/ci/images_template.yml" + +stages: + - "lint" + - "test" + - "extras" + +.base: + image: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/10:$RUST_VERSION-$GST_RS_IMG_TAG" + variables: + G_DEBUG: "fatal_warnings" + before_script: + - source ./ci/env.sh + - mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config + # If cargo exists assume we probably will want to update the lockfile + - | + if command -v cargo; then + cargo generate-lockfile + cargo update + fi + +.img-stable: + extends: .base + variables: + RUST_VERSION: "stable" + +.img-1-41: + extends: .base + variables: + RUST_VERSION: "1.41.0" + +.img-nightly: + extends: .base + variables: + RUST_VERSION: "nightly" + +.cargo test: + stage: "test" + script: + - rustc --version + - cargo --version + - cargo build --locked --all --color=always + # FIXME: tests are broken + # https://github.com/sdroege/gstreamer-sys/issues/16 + # - cargo test --locked --all --color=always + - cargo build --locked --all --all-features --color=always + # FIXME: tests are broken + # https://github.com/sdroege/gstreamer-sys/issues/16 + # - cargo test --locked --all --all-features --color=always + + # Run tests for crates we can currently run. The others + # need a new release of the C library first + - | + for crate in gstreamer-app-sys \ + gstreamer-audio-sys \ + gstreamer-base-sys \ + gstreamer-check-sys \ + gstreamer-gl-sys \ + gstreamer-mpegts-sys \ + gstreamer-net-sys \ + gstreamer-pbutils-sys \ + gstreamer-player-sys \ + gstreamer-rtsp-sys \ + gstreamer-sdp-sys \ + gstreamer-sys \ + gstreamer-tag-sys \ + gstreamer-video-sys \ + gstreamer-webrtc-sys \ + gstreamer-controller-sys; \ + do \ + cargo test --locked -p $crate; \ + done + +test stable: + extends: + - '.cargo test' + - .img-stable + +test 1.41: + extends: + - '.cargo test' + - .img-1-41 + +test nightly: + extends: + - '.cargo test' + - .img-nightly + +rustfmt: + extends: .img-stable + stage: "lint" + script: + - cargo fmt --version + - cargo fmt -- --color=always --check + +check commits: + extends: .img-stable + stage: "lint" + script: + - ci-fairy check-commits --textwidth 0 --no-signed-off-by + +outdated: + extends: .img-stable + allow_failure: true + stage: 'extras' + only: + - schedules + script: + - cargo outdated --root-deps-only --exit-code 1 -v + +deny: + extends: .img-stable + stage: 'extras' + only: + - schedules + script: + - cargo deny check diff --git a/sys/Cargo.toml b/sys/Cargo.toml new file mode 100644 index 000000000..43286d90e --- /dev/null +++ b/sys/Cargo.toml @@ -0,0 +1,23 @@ +[workspace] + +members = [ + "gstreamer-sys", + "gstreamer-base-sys", + "gstreamer-tag-sys", + "gstreamer-audio-sys", + "gstreamer-video-sys", + "gstreamer-pbutils-sys", + "gstreamer-app-sys", + "gstreamer-player-sys", + "gstreamer-mpegts-sys", + "gstreamer-net-sys", + "gstreamer-sdp-sys", + "gstreamer-rtsp-sys", + "gstreamer-rtsp-server-sys", + "gstreamer-webrtc-sys", + "gstreamer-gl-sys", + "gstreamer-editing-services-sys", + "gstreamer-check-sys", + "gstreamer-rtp-sys", + "gstreamer-controller-sys", +] diff --git a/sys/DEVELOPMENT.md b/sys/DEVELOPMENT.md new file mode 100644 index 000000000..982d62e5d --- /dev/null +++ b/sys/DEVELOPMENT.md @@ -0,0 +1,13 @@ +# How to update the bindings + + * Take the updated .gir files (e.g. from your gst-build checkout) and put + them in the gir-files directory + * In the gir-files directory, run ./fix.sh + * In the GstVideo-1.0.gir file, the `GST_VIDEO_BUFFER_FLAG_ONEFIELD` and + `GST_VIDEO_FRAME_FLAG_ONEFIELD` flags are twice. This is a gir bug. Delete + the second one. + * If there is a new GStreamer version: Manually update `gst*/Cargo.toml` and + `gst*/build.rs` files. generator.py will mess these up. + * Run generator.py + * `git checkout gst*/Cargo.toml gst*/build.rs` + * Investigate the diff and fix any mess-ups diff --git a/sys/Gir_Gst.toml b/sys/Gir_Gst.toml new file mode 100644 index 000000000..cbae1af79 --- /dev/null +++ b/sys/Gir_Gst.toml @@ -0,0 +1,198 @@ +[options] +girs_dir = "gir-files" +library = "Gst" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject", +] + +ignore = [ + "Gst.VERSION_MAJOR", + "Gst.VERSION_MINOR", + "Gst.VERSION_MICRO", + "Gst.VERSION_NANO", + "Gst.ERROR_SYSTEM", + "Gst.TIME_FORMAT", + "Gst.STIME_FORMAT", + "Gst.TIMEP_FORMAT", + "Gst.STIMEP_FORMAT", + "Gst.PTR_FORMAT", + "Gst.SEGMENT_FORMAT", + "Gst.FOURCC_FORMAT", +] + +[[object]] +name = "Gst.Buffer" +status = "generate" + [[object.function]] + name = "ref" + version = "1.18" + [[object.function]] + name = "unref" + version = "1.18" + [[object.function]] + name = "replace" + version = "1.18" + [[object.function]] + name = "copy" + version = "1.18" + +[[object]] +name = "Gst.BufferList" +status = "generate" + [[object.function]] + name = "ref" + version = "1.18" + [[object.function]] + name = "unref" + version = "1.18" + [[object.function]] + name = "copy" + version = "1.18" + +[[object]] +name = "Gst.ParamArray" +status = "generate" + [[object.function]] + name = "get_type" + version = "1.12" + +[[object]] +name = "Gst.*" +status = "generate" + [[object.function]] + name = "reference_timestamp_meta_api_get_type" + version = "1.14" + +[[object]] +name = "Gst.Caps" +status = "generate" + [[object.function]] + name = "copy" + version = "1.16" + [[object.function]] + name = "ref" + version = "1.18" + [[object.function]] + name = "unref" + version = "1.18" + [[object.function]] + name = "replace" + version = "1.18" + [[object.function]] + name = "take" + version = "1.18" + +[[object]] +name = "Gst.Event" +status = "generate" + [[object.function]] + name = "copy" + version = "1.16" + [[object.function]] + name = "ref" + version = "1.18" + [[object.function]] + name = "unref" + version = "1.18" + [[object.function]] + name = "replace" + version = "1.18" + [[object.function]] + name = "take" + version = "1.18" + [[object.function]] + name = "steal" + version = "1.18" + +[[object]] +name = "Gst.Memory" +status = "generate" + [[object.function]] + name = "ref" + version = "1.18" + [[object.function]] + name = "unref" + version = "1.18" + +[[object]] +name = "Gst.Message" +status = "generate" + [[object.function]] + name = "copy" + version = "1.18" + [[object.function]] + name = "ref" + version = "1.18" + [[object.function]] + name = "unref" + version = "1.18" + [[object.function]] + name = "replace" + version = "1.18" + +[[object]] +name = "Gst.Query" +status = "generate" + [[object.function]] + name = "copy" + version = "1.18" + [[object.function]] + name = "ref" + version = "1.18" + [[object.function]] + name = "unref" + version = "1.18" + [[object.function]] + name = "replace" + version = "1.18" + +[[object]] +name = "Gst.Sample" +status = "generate" + [[object.function]] + name = "copy" + version = "1.18" + [[object.function]] + name = "ref" + version = "1.18" + [[object.function]] + name = "unref" + version = "1.18" + +[[object]] +name = "Gst.TagList" +status = "generate" + [[object.function]] + name = "copy" + version = "1.18" + [[object.function]] + name = "ref" + version = "1.18" + [[object.function]] + name = "unref" + version = "1.18" + +[[object]] +name = "Gst.Tracer" +status = "generate" + [[object.function]] + name = "register" + version = "1.18" diff --git a/sys/Gir_GstApp.toml b/sys/Gir_GstApp.toml new file mode 100644 index 000000000..b8a4579df --- /dev/null +++ b/sys/Gir_GstApp.toml @@ -0,0 +1,27 @@ +[options] +girs_dir = "gir-files" +library = "GstApp" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-app-sys" +work_mode = "sys" + +external_libraries = [ + "GLib", +] + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +[external_libraries] +gstreamer="Gst" +gstreamer_base="GstBase" diff --git a/sys/Gir_GstAudio.toml b/sys/Gir_GstAudio.toml new file mode 100644 index 000000000..4fb961e2d --- /dev/null +++ b/sys/Gir_GstAudio.toml @@ -0,0 +1,56 @@ +[options] +girs_dir = "gir-files" +library = "GstAudio" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-audio-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject", +] + +ignore = [ + "GstAudio.AUDIO_FORMATS_ALL", +] + +[external_libraries] +gstreamer="Gst" +gstreamer_base="GstBase" + +[[object]] +name = "GstAudio.AudioBuffer" +status = "generate" + [[object.function]] + name = "clip" + version = "1.0" + [[object.function]] + name = "reorder_channels" + version = "1.0" + +[[object]] +name = "GstAudio.AudioConverter" +status = "generate" + [[object.function]] + name = "get_type" + version = "1.14" + +[[object]] +name = "GstAudio.*" +status = "generate" + [[object.function]] + name = "audio_meta_api_get_type" + version = "1.16" diff --git a/sys/Gir_GstBase.toml b/sys/Gir_GstBase.toml new file mode 100644 index 000000000..202160a66 --- /dev/null +++ b/sys/Gir_GstBase.toml @@ -0,0 +1,27 @@ +[options] +girs_dir = "gir-files" +library = "GstBase" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-base-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject", +] + +[external_libraries] +gstreamer="Gst" diff --git a/sys/Gir_GstCheck.toml b/sys/Gir_GstCheck.toml new file mode 100644 index 000000000..d42040a99 --- /dev/null +++ b/sys/Gir_GstCheck.toml @@ -0,0 +1,27 @@ +[options] +girs_dir = "gir-files" +library = "GstCheck" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-check-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject", +] + +[external_libraries] +gstreamer="Gst" diff --git a/sys/Gir_GstController.toml b/sys/Gir_GstController.toml new file mode 100644 index 000000000..7689ecfdf --- /dev/null +++ b/sys/Gir_GstController.toml @@ -0,0 +1,25 @@ +[options] +girs_dir = "gir-files" +library = "GstController" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-controller-sys" +work_mode = "sys" + +external_libraries = [ + "GLib", + "GObject", +] + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", +] + +[external_libraries] +gstreamer="Gst" +gstreamer_base="GstBase" diff --git a/sys/Gir_GstEditingServices.toml b/sys/Gir_GstEditingServices.toml new file mode 100644 index 000000000..f32d119e6 --- /dev/null +++ b/sys/Gir_GstEditingServices.toml @@ -0,0 +1,30 @@ +[options] +girs_dir = "gir-files" +library = "GES" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-editing-services-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject", + "Gio", +] + +[external_libraries] +gstreamer="Gst" +gstreamer_base="GstBase" +gstreamer_pbutils="GstPbutils" diff --git a/sys/Gir_GstGL.toml b/sys/Gir_GstGL.toml new file mode 100644 index 000000000..31b6ca00d --- /dev/null +++ b/sys/Gir_GstGL.toml @@ -0,0 +1,80 @@ +[options] +girs_dir = "gir-files" +library = "GstGL" +version = "1.0" +min_cfg_version = "1.14" +target_path = "gstreamer-gl-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", +] + +ignore = [ + "GstGL.GL_DISPLAY_EGL_NAME", + "GstGL.GL_COLOR_CONVERT_VIDEO_CAPS", + "GstGL.GL_COLOR_CONVERT_FORMATS", + "GstGL.GL_MEMORY_VIDEO_FORMATS_STR", +] + +external_libraries = [ + "GLib", + "GObject", +] + +[external_libraries] +gstreamer="Gst" +gstreamer-base="GstBase" +gstreamer-video="GstVideo" + +[[object]] +name = "GstGL.GLDisplayEGL" +status = "generate" +cfg_condition = "feature = \"egl\"" + [[object.function]] + pattern = ".*" + cfg_condition = "feature = \"egl\"" + +[[object]] +name = "GstGL.GLDisplayEGLClass" +status = "generate" +cfg_condition = "feature = \"egl\"" + +#[[object]] +#name = "GstGL.GL_DISPLAY_EGL_NAME" +#status = "manual" +#cfg_condition = "feature = \"egl\"" +# [[object.constant]] +# pattern = ".*" +# cfg_condition = "feature = \"egl\"" + +#[[object]] +#name = "GstGL.GL_COLOR_CONVERT_VIDEO_CAPS" +#status = "manual" + +[[object]] +name = "GstGL.GLDisplayX11" +status = "generate" +cfg_condition = "feature = \"x11\"" + [[object.function]] + pattern = ".*" + cfg_condition = "feature = \"x11\"" + +[[object]] +name = "GstGL.GLDisplayX11Class" +status = "generate" +cfg_condition = "feature = \"x11\"" + +[[object]] +name = "GstGL.GLDisplayWayland" +status = "generate" +cfg_condition = "feature = \"wayland\"" + [[object.function]] + pattern = ".*" + cfg_condition = "feature = \"wayland\"" + +[[object]] +name = "GstGL.GLDisplayWaylandClass" +status = "generate" +cfg_condition = "feature = \"wayland\"" diff --git a/sys/Gir_GstMpegts.toml b/sys/Gir_GstMpegts.toml new file mode 100644 index 000000000..3075f3144 --- /dev/null +++ b/sys/Gir_GstMpegts.toml @@ -0,0 +1,27 @@ +[options] +girs_dir = "gir-files" +library = "GstMpegts" +version = "1.0" +min_cfg_version = "1.12" +target_path = "gstreamer-mpegts-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject", +] + +[external_libraries] +gstreamer="Gst" diff --git a/sys/Gir_GstNet.toml b/sys/Gir_GstNet.toml new file mode 100644 index 000000000..553cded7a --- /dev/null +++ b/sys/Gir_GstNet.toml @@ -0,0 +1,28 @@ +[options] +girs_dir = "gir-files" +library = "GstNet" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-net-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject", + "Gio", +] + +[external_libraries] +gstreamer="Gst" diff --git a/sys/Gir_GstPbutils.toml b/sys/Gir_GstPbutils.toml new file mode 100644 index 000000000..46181b579 --- /dev/null +++ b/sys/Gir_GstPbutils.toml @@ -0,0 +1,36 @@ +[options] +girs_dir = "gir-files" +library = "GstPbutils" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-pbutils-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +ignore = [ + "GstPbutils.PLUGINS_BASE_VERSION_MAJOR", + "GstPbutils.PLUGINS_BASE_VERSION_MINOR", + "GstPbutils.PLUGINS_BASE_VERSION_MICRO", + "GstPbutils.PLUGINS_BASE_VERSION_NANO" +] + +external_libraries = [ + "GLib", + "GObject", +] + +[external_libraries] +gstreamer="Gst" +gstreamer_audio="GstAudio" +gstreamer_video="GstVideo" diff --git a/sys/Gir_GstPlayer.toml b/sys/Gir_GstPlayer.toml new file mode 100644 index 000000000..49f6dbd8d --- /dev/null +++ b/sys/Gir_GstPlayer.toml @@ -0,0 +1,22 @@ +[options] +girs_dir = "gir-files" +library = "GstPlayer" +version = "1.0" +min_cfg_version = "1.12" +target_path = "gstreamer-player-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", +] + +external_libraries = [ + "GLib", + "GObject", +] + +[external_libraries] +gstreamer="Gst" +gstreamer_video="GstVideo" diff --git a/sys/Gir_GstRtp.toml b/sys/Gir_GstRtp.toml new file mode 100644 index 000000000..f7c0f28ff --- /dev/null +++ b/sys/Gir_GstRtp.toml @@ -0,0 +1,35 @@ +[options] +girs_dir = "gir-files" +library = "GstRtp" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-rtp-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject" +] + +[external_libraries] +gstreamer="Gst" +gstreamer_base="GstBase" + +[[object]] +name = "GstRtp.*" +status = "generate" + [[object.function]] + name = "rtp_source_meta_api_get_type" + version = "1.16" diff --git a/sys/Gir_GstRtsp.toml b/sys/Gir_GstRtsp.toml new file mode 100644 index 000000000..dd72a5dd9 --- /dev/null +++ b/sys/Gir_GstRtsp.toml @@ -0,0 +1,36 @@ +[options] +girs_dir = "gir-files" +library = "GstRtsp" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-rtsp-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject", + "Gio" +] + +[external_libraries] +gstreamer="Gst" +gstreamer_sdp="GstSdp" + +[[object]] +name = "GstRtsp.RTSPMessage" +status = "generate" + [[object.function]] + name = "get_type" + version = "1.14" diff --git a/sys/Gir_GstRtspServer.toml b/sys/Gir_GstRtspServer.toml new file mode 100644 index 000000000..7840cdd1f --- /dev/null +++ b/sys/Gir_GstRtspServer.toml @@ -0,0 +1,31 @@ +[options] +girs_dir = "gir-files" +library = "GstRtspServer" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-rtsp-server-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject", + "Gio" +] + +[external_libraries] +gstreamer="Gst" +gstreamer_net="GstNet" +gstreamer_sdp="GstSdp" +gstreamer_rtsp="GstRtsp" diff --git a/sys/Gir_GstSdp.toml b/sys/Gir_GstSdp.toml new file mode 100644 index 000000000..a4521b2b1 --- /dev/null +++ b/sys/Gir_GstSdp.toml @@ -0,0 +1,27 @@ +[options] +girs_dir = "gir-files" +library = "GstSdp" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-sdp-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject" +] + +[external_libraries] +gstreamer="Gst" diff --git a/sys/Gir_GstTag.toml b/sys/Gir_GstTag.toml new file mode 100644 index 000000000..75844e385 --- /dev/null +++ b/sys/Gir_GstTag.toml @@ -0,0 +1,28 @@ +[options] +girs_dir = "gir-files" +library = "GstTag" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-tag-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject", +] + +[external_libraries] +gstreamer="Gst" +gstreamer_base="GstBase" diff --git a/sys/Gir_GstVideo.toml b/sys/Gir_GstVideo.toml new file mode 100644 index 000000000..d23eae490 --- /dev/null +++ b/sys/Gir_GstVideo.toml @@ -0,0 +1,62 @@ +[options] +girs_dir = "gir-files" +library = "GstVideo" +version = "1.0" +min_cfg_version = "1.8" +target_path = "gstreamer-video-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", + "1.14", + "1.12", + "1.10", + "1.8", + "1.6", + "1.4", + "1.2", +] + +external_libraries = [ + "GLib", + "GObject", +] + +ignore = [ + "GstVideo.VIDEO_FORMATS_ALL", +] + +[external_libraries] +gstreamer="Gst" +gstreamer_base="GstBase" + +[[object]] +name = "GstVideo.VideoOverlayFormatFlags" +status = "generate" + [[object.function]] + name = "get_type" + version = "1.16" + +[[object]] +name = "GstVideo.VideoTimeCodeFlags" +status = "generate" + [[object.function]] + name = "get_type" + version = "1.18" + +[[object]] +name = "GstVideo.*" +status = "generate" + [[object.function]] + name = "video_time_code_meta_api_get_type" + version = "1.10" + [[object.function]] + name = "video_caption_meta_api_get_type" + version = "1.16" + [[object.function]] + name = "video_afd_meta_api_get_type" + version = "1.18" + [[object.function]] + name = "video_bar_meta_api_get_type" + version = "1.18" diff --git a/sys/Gir_GstWebRTC.toml b/sys/Gir_GstWebRTC.toml new file mode 100644 index 000000000..9ba82fe0d --- /dev/null +++ b/sys/Gir_GstWebRTC.toml @@ -0,0 +1,21 @@ +[options] +girs_dir = "gir-files" +library = "GstWebRTC" +version = "1.0" +min_cfg_version = "1.14" +target_path = "gstreamer-webrtc-sys" +work_mode = "sys" + +extra_versions = [ + "1.18", + "1.16", +] + +external_libraries = [ + "GLib", + "GObject", +] + +[external_libraries] +gstreamer="Gst" +gstreamer_sdp="GstSdp" diff --git a/sys/LICENSE b/sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/README.md b/sys/README.md new file mode 100644 index 000000000..8932e987a --- /dev/null +++ b/sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sys.svg)](https://crates.io/crates/gstreamer-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/ci/env.sh b/sys/ci/env.sh new file mode 100644 index 000000000..0692b9d1b --- /dev/null +++ b/sys/ci/env.sh @@ -0,0 +1,8 @@ +export RUSTUP_HOME='/usr/local/rustup' +export PATH=$PATH:/usr/local/cargo/bin + +export PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-gnu/pkgconfig +export GST_PLUGIN_SYSTEM_PATH=/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0 +export GST_PLUGIN_SCANNER=/usr/local/libexec/gstreamer-1.0/gst-plugin-scanner +export PATH=$PATH:/usr/local/bin +export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH diff --git a/sys/deny.toml b/sys/deny.toml new file mode 100644 index 000000000..f5d0a0f86 --- /dev/null +++ b/sys/deny.toml @@ -0,0 +1,34 @@ +[advisories] +db-path = "~/.cargo/advisory-db" +db-url = "https://github.com/rustsec/advisory-db" +vulnerability = "deny" +unmaintained = "warn" +notice = "warn" +ignore = [] + +[licenses] +unlicensed = "deny" +allow = [ + "Apache-2.0", +] +deny = [ + "GPL-1.0", + "GPL-2.0", + "GPL-3.0", + "AGPL-1.0", + "AGPL-3.0", +] +copyleft = "deny" +allow-osi-fsf-free = "either" +confidence-threshold = 0.8 + +[bans] +multiple-versions = "deny" +highlight = "all" + +[sources] +unknown-registry = "deny" +unknown-git = "deny" +allow-git = [ + "https://github.com/gtk-rs/sys", +] diff --git a/sys/generator.py b/sys/generator.py new file mode 100755 index 000000000..c55c46864 --- /dev/null +++ b/sys/generator.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 + +from os import listdir +from os.path import isfile, join +from subprocess import call +import sys + +need_rebuild = False + +def update_workspace(): + with open('Cargo.toml', 'r') as f: + old_lines = f.readlines() + lines = old_lines[:] + with open('Cargo.toml', 'w') as f: + lines.insert(len(lines) - 2, '"gir",') + f.write(''.join(lines)) + success = True + try: + call(['bash', '-c', 'cd gir && cargo build --release']) + except: + success = False + with open('Cargo.toml', 'w') as f: + f.write(''.join(old_lines)) + return success + + +if not isfile('./gir/src'): + need_rebuild = True + print('=> Initializing gir submodule...') + call(['bash', '-c', 'git submodule update --init']) + print('<= Done!') + +question = 'Do you want to update gir submodule? [y/N]' +if sys.version_info[0] < 3: + line = raw_input(question) +else: + line = input(question) +line = line.strip() +if line.lower() == 'y': + need_rebuild = True + print('=> Updating gir submodule...') + call(['bash', '-c', 'cd gir && git reset --hard HEAD && git pull -f origin master']) + print('<= Done!') + +if need_rebuild is True or not os.path.isfile('./gir/target/release/gir'): + print('=> Building gir...') + if update_workspace() is True: + print('<= Done!') + else: + print('<= Failed...') + sys.exit(1) + +print('=> Regenerating crates...') +for entry in [f for f in listdir('.') if isfile(join('.', f))]: + if entry.startswith('Gir_Gst') and entry.endswith('.toml'): + print('==> Regenerating "{}"...'.format(entry)) + call(['./target/release/gir', '-c', entry]) + print('<== Done!') +call(['cargo', 'fmt']) +print('<= Done!') +print("Don't forget to check if everything has been correctly generated!") diff --git a/sys/gstreamer-app-sys/CHANGELOG.md b/sys/gstreamer-app-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-app-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-app-sys/Cargo.toml b/sys/gstreamer-app-sys/Cargo.toml new file mode 100644 index 000000000..74b12ecf4 --- /dev/null +++ b/sys/gstreamer-app-sys/Cargo.toml @@ -0,0 +1,59 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-base-sys] +path = "../gstreamer-base-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_2 = [] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] + +[lib] +name = "gstreamer_app_sys" + +[package] +authors = ["Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstapp-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_app_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstapp-1.0" +name = "gstreamer-app-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_app_1_0] +name = "gstreamer-app-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_app_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-app-sys/LICENSE b/sys/gstreamer-app-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-app-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-app-sys/README.md b/sys/gstreamer-app-sys/README.md new file mode 100644 index 000000000..c2f0acb6c --- /dev/null +++ b/sys/gstreamer-app-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-app-sys.svg)](https://crates.io/crates/gstreamer-app-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (App library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-app-sys/build.rs b/sys/gstreamer-app-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-app-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-app-sys/src/lib.rs b/sys/gstreamer-app-sys/src/lib.rs new file mode 100644 index 000000000..ea5deadd6 --- /dev/null +++ b/sys/gstreamer-app-sys/src/lib.rs @@ -0,0 +1,265 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstAppStreamType = c_int; +pub const GST_APP_STREAM_TYPE_STREAM: GstAppStreamType = 0; +pub const GST_APP_STREAM_TYPE_SEEKABLE: GstAppStreamType = 1; +pub const GST_APP_STREAM_TYPE_RANDOM_ACCESS: GstAppStreamType = 2; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAppSinkCallbacks { + pub eos: Option, + pub new_preroll: Option gst::GstFlowReturn>, + pub new_sample: Option gst::GstFlowReturn>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAppSinkCallbacks { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAppSinkCallbacks @ {:?}", self as *const _)) + .field("eos", &self.eos) + .field("new_preroll", &self.new_preroll) + .field("new_sample", &self.new_sample) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAppSinkClass { + pub basesink_class: gst_base::GstBaseSinkClass, + pub eos: Option, + pub new_preroll: Option gst::GstFlowReturn>, + pub new_sample: Option gst::GstFlowReturn>, + pub pull_preroll: Option *mut gst::GstSample>, + pub pull_sample: Option *mut gst::GstSample>, + pub try_pull_preroll: + Option *mut gst::GstSample>, + pub try_pull_sample: + Option *mut gst::GstSample>, + pub _gst_reserved: [gpointer; 2], +} + +impl ::std::fmt::Debug for GstAppSinkClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAppSinkClass @ {:?}", self as *const _)) + .field("basesink_class", &self.basesink_class) + .field("eos", &self.eos) + .field("new_preroll", &self.new_preroll) + .field("new_sample", &self.new_sample) + .field("pull_preroll", &self.pull_preroll) + .field("pull_sample", &self.pull_sample) + .field("try_pull_preroll", &self.try_pull_preroll) + .field("try_pull_sample", &self.try_pull_sample) + .finish() + } +} + +#[repr(C)] +pub struct _GstAppSinkPrivate(c_void); + +pub type GstAppSinkPrivate = *mut _GstAppSinkPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAppSrcCallbacks { + pub need_data: Option, + pub enough_data: Option, + pub seek_data: Option gboolean>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAppSrcCallbacks { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAppSrcCallbacks @ {:?}", self as *const _)) + .field("need_data", &self.need_data) + .field("enough_data", &self.enough_data) + .field("seek_data", &self.seek_data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAppSrcClass { + pub basesrc_class: gst_base::GstBaseSrcClass, + pub need_data: Option, + pub enough_data: Option, + pub seek_data: Option gboolean>, + pub push_buffer: + Option gst::GstFlowReturn>, + pub end_of_stream: Option gst::GstFlowReturn>, + pub push_sample: + Option gst::GstFlowReturn>, + pub push_buffer_list: + Option gst::GstFlowReturn>, + pub _gst_reserved: [gpointer; 2], +} + +impl ::std::fmt::Debug for GstAppSrcClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAppSrcClass @ {:?}", self as *const _)) + .field("basesrc_class", &self.basesrc_class) + .field("need_data", &self.need_data) + .field("enough_data", &self.enough_data) + .field("seek_data", &self.seek_data) + .field("push_buffer", &self.push_buffer) + .field("end_of_stream", &self.end_of_stream) + .field("push_sample", &self.push_sample) + .field("push_buffer_list", &self.push_buffer_list) + .finish() + } +} + +#[repr(C)] +pub struct _GstAppSrcPrivate(c_void); + +pub type GstAppSrcPrivate = *mut _GstAppSrcPrivate; + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAppSink { + pub basesink: gst_base::GstBaseSink, + pub priv_: *mut GstAppSinkPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAppSink { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAppSink @ {:?}", self as *const _)) + .field("basesink", &self.basesink) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAppSrc { + pub basesrc: gst_base::GstBaseSrc, + pub priv_: *mut GstAppSrcPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAppSrc { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAppSrc @ {:?}", self as *const _)) + .field("basesrc", &self.basesrc) + .finish() + } +} + +#[link(name = "gstapp-1.0")] +extern "C" { + + //========================================================================= + // GstAppStreamType + //========================================================================= + pub fn gst_app_stream_type_get_type() -> GType; + + //========================================================================= + // GstAppSink + //========================================================================= + pub fn gst_app_sink_get_type() -> GType; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_app_sink_get_buffer_list_support(appsink: *mut GstAppSink) -> gboolean; + pub fn gst_app_sink_get_caps(appsink: *mut GstAppSink) -> *mut gst::GstCaps; + pub fn gst_app_sink_get_drop(appsink: *mut GstAppSink) -> gboolean; + pub fn gst_app_sink_get_emit_signals(appsink: *mut GstAppSink) -> gboolean; + pub fn gst_app_sink_get_max_buffers(appsink: *mut GstAppSink) -> c_uint; + pub fn gst_app_sink_get_wait_on_eos(appsink: *mut GstAppSink) -> gboolean; + pub fn gst_app_sink_is_eos(appsink: *mut GstAppSink) -> gboolean; + pub fn gst_app_sink_pull_preroll(appsink: *mut GstAppSink) -> *mut gst::GstSample; + pub fn gst_app_sink_pull_sample(appsink: *mut GstAppSink) -> *mut gst::GstSample; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_app_sink_set_buffer_list_support(appsink: *mut GstAppSink, enable_lists: gboolean); + pub fn gst_app_sink_set_callbacks( + appsink: *mut GstAppSink, + callbacks: *mut GstAppSinkCallbacks, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_app_sink_set_caps(appsink: *mut GstAppSink, caps: *const gst::GstCaps); + pub fn gst_app_sink_set_drop(appsink: *mut GstAppSink, drop: gboolean); + pub fn gst_app_sink_set_emit_signals(appsink: *mut GstAppSink, emit: gboolean); + pub fn gst_app_sink_set_max_buffers(appsink: *mut GstAppSink, max: c_uint); + pub fn gst_app_sink_set_wait_on_eos(appsink: *mut GstAppSink, wait: gboolean); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_app_sink_try_pull_preroll( + appsink: *mut GstAppSink, + timeout: gst::GstClockTime, + ) -> *mut gst::GstSample; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_app_sink_try_pull_sample( + appsink: *mut GstAppSink, + timeout: gst::GstClockTime, + ) -> *mut gst::GstSample; + + //========================================================================= + // GstAppSrc + //========================================================================= + pub fn gst_app_src_get_type() -> GType; + pub fn gst_app_src_end_of_stream(appsrc: *mut GstAppSrc) -> gst::GstFlowReturn; + pub fn gst_app_src_get_caps(appsrc: *mut GstAppSrc) -> *mut gst::GstCaps; + pub fn gst_app_src_get_current_level_bytes(appsrc: *mut GstAppSrc) -> u64; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_app_src_get_duration(appsrc: *mut GstAppSrc) -> gst::GstClockTime; + pub fn gst_app_src_get_emit_signals(appsrc: *mut GstAppSrc) -> gboolean; + pub fn gst_app_src_get_latency(appsrc: *mut GstAppSrc, min: *mut u64, max: *mut u64); + pub fn gst_app_src_get_max_bytes(appsrc: *mut GstAppSrc) -> u64; + pub fn gst_app_src_get_size(appsrc: *mut GstAppSrc) -> i64; + pub fn gst_app_src_get_stream_type(appsrc: *mut GstAppSrc) -> GstAppStreamType; + pub fn gst_app_src_push_buffer( + appsrc: *mut GstAppSrc, + buffer: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_app_src_push_buffer_list( + appsrc: *mut GstAppSrc, + buffer_list: *mut gst::GstBufferList, + ) -> gst::GstFlowReturn; + pub fn gst_app_src_push_sample( + appsrc: *mut GstAppSrc, + sample: *mut gst::GstSample, + ) -> gst::GstFlowReturn; + pub fn gst_app_src_set_callbacks( + appsrc: *mut GstAppSrc, + callbacks: *mut GstAppSrcCallbacks, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_app_src_set_caps(appsrc: *mut GstAppSrc, caps: *const gst::GstCaps); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_app_src_set_duration(appsrc: *mut GstAppSrc, duration: gst::GstClockTime); + pub fn gst_app_src_set_emit_signals(appsrc: *mut GstAppSrc, emit: gboolean); + pub fn gst_app_src_set_latency(appsrc: *mut GstAppSrc, min: u64, max: u64); + pub fn gst_app_src_set_max_bytes(appsrc: *mut GstAppSrc, max: u64); + pub fn gst_app_src_set_size(appsrc: *mut GstAppSrc, size: i64); + pub fn gst_app_src_set_stream_type(appsrc: *mut GstAppSrc, type_: GstAppStreamType); + +} diff --git a/sys/gstreamer-app-sys/tests/abi.rs b/sys/gstreamer-app-sys/tests/abi.rs new file mode 100644 index 000000000..0b20ee6c6 --- /dev/null +++ b/sys/gstreamer-app-sys/tests/abi.rs @@ -0,0 +1,310 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_app_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_app_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-app-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstAppSink", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppSinkCallbacks", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppSinkClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppSrcCallbacks", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAppStreamType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(gint) GST_APP_STREAM_TYPE_RANDOM_ACCESS", "2"), + ("(gint) GST_APP_STREAM_TYPE_SEEKABLE", "1"), + ("(gint) GST_APP_STREAM_TYPE_STREAM", "0"), +]; diff --git a/sys/gstreamer-app-sys/tests/constant.c b/sys/gstreamer-app-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-app-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-app-sys/tests/layout.c b/sys/gstreamer-app-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-app-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-app-sys/tests/manual.h b/sys/gstreamer-app-sys/tests/manual.h new file mode 100644 index 000000000..379231276 --- /dev/null +++ b/sys/gstreamer-app-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-audio-sys/CHANGELOG.md b/sys/gstreamer-audio-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-audio-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-audio-sys/Cargo.toml b/sys/gstreamer-audio-sys/Cargo.toml new file mode 100644 index 000000000..0806b62ee --- /dev/null +++ b/sys/gstreamer-audio-sys/Cargo.toml @@ -0,0 +1,62 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-base-sys] +path = "../gstreamer-base-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_2 = [] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] + +[lib] +name = "gstreamer_audio_sys" + +[package] +authors = ["Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstaudio-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_audio_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstaudio-1.0" +name = "gstreamer-audio-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_audio_1_0] +name = "gstreamer-audio-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_audio_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-audio-sys/LICENSE b/sys/gstreamer-audio-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-audio-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-audio-sys/README.md b/sys/gstreamer-audio-sys/README.md new file mode 100644 index 000000000..45e2e7977 --- /dev/null +++ b/sys/gstreamer-audio-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-audio-sys.svg)](https://crates.io/crates/gstreamer-audio-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Audio library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-audio-sys/build.rs b/sys/gstreamer-audio-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-audio-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-audio-sys/src/lib.rs b/sys/gstreamer-audio-sys/src/lib.rs new file mode 100644 index 000000000..49dc5c61b --- /dev/null +++ b/sys/gstreamer-audio-sys/src/lib.rs @@ -0,0 +1,2287 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstAudioBaseSinkDiscontReason = c_int; +pub const GST_AUDIO_BASE_SINK_DISCONT_REASON_NO_DISCONT: GstAudioBaseSinkDiscontReason = 0; +pub const GST_AUDIO_BASE_SINK_DISCONT_REASON_NEW_CAPS: GstAudioBaseSinkDiscontReason = 1; +pub const GST_AUDIO_BASE_SINK_DISCONT_REASON_FLUSH: GstAudioBaseSinkDiscontReason = 2; +pub const GST_AUDIO_BASE_SINK_DISCONT_REASON_SYNC_LATENCY: GstAudioBaseSinkDiscontReason = 3; +pub const GST_AUDIO_BASE_SINK_DISCONT_REASON_ALIGNMENT: GstAudioBaseSinkDiscontReason = 4; +pub const GST_AUDIO_BASE_SINK_DISCONT_REASON_DEVICE_FAILURE: GstAudioBaseSinkDiscontReason = 5; + +pub type GstAudioBaseSinkSlaveMethod = c_int; +pub const GST_AUDIO_BASE_SINK_SLAVE_RESAMPLE: GstAudioBaseSinkSlaveMethod = 0; +pub const GST_AUDIO_BASE_SINK_SLAVE_SKEW: GstAudioBaseSinkSlaveMethod = 1; +pub const GST_AUDIO_BASE_SINK_SLAVE_NONE: GstAudioBaseSinkSlaveMethod = 2; +pub const GST_AUDIO_BASE_SINK_SLAVE_CUSTOM: GstAudioBaseSinkSlaveMethod = 3; + +pub type GstAudioBaseSrcSlaveMethod = c_int; +pub const GST_AUDIO_BASE_SRC_SLAVE_RESAMPLE: GstAudioBaseSrcSlaveMethod = 0; +pub const GST_AUDIO_BASE_SRC_SLAVE_RE_TIMESTAMP: GstAudioBaseSrcSlaveMethod = 1; +pub const GST_AUDIO_BASE_SRC_SLAVE_SKEW: GstAudioBaseSrcSlaveMethod = 2; +pub const GST_AUDIO_BASE_SRC_SLAVE_NONE: GstAudioBaseSrcSlaveMethod = 3; + +pub type GstAudioCdSrcMode = c_int; +pub const GST_AUDIO_CD_SRC_MODE_NORMAL: GstAudioCdSrcMode = 0; +pub const GST_AUDIO_CD_SRC_MODE_CONTINUOUS: GstAudioCdSrcMode = 1; + +pub type GstAudioChannelPosition = c_int; +pub const GST_AUDIO_CHANNEL_POSITION_NONE: GstAudioChannelPosition = -3; +pub const GST_AUDIO_CHANNEL_POSITION_MONO: GstAudioChannelPosition = -2; +pub const GST_AUDIO_CHANNEL_POSITION_INVALID: GstAudioChannelPosition = -1; +pub const GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT: GstAudioChannelPosition = 0; +pub const GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT: GstAudioChannelPosition = 1; +pub const GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER: GstAudioChannelPosition = 2; +pub const GST_AUDIO_CHANNEL_POSITION_LFE1: GstAudioChannelPosition = 3; +pub const GST_AUDIO_CHANNEL_POSITION_REAR_LEFT: GstAudioChannelPosition = 4; +pub const GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT: GstAudioChannelPosition = 5; +pub const GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER: GstAudioChannelPosition = 6; +pub const GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER: GstAudioChannelPosition = 7; +pub const GST_AUDIO_CHANNEL_POSITION_REAR_CENTER: GstAudioChannelPosition = 8; +pub const GST_AUDIO_CHANNEL_POSITION_LFE2: GstAudioChannelPosition = 9; +pub const GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT: GstAudioChannelPosition = 10; +pub const GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT: GstAudioChannelPosition = 11; +pub const GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT: GstAudioChannelPosition = 12; +pub const GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT: GstAudioChannelPosition = 13; +pub const GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER: GstAudioChannelPosition = 14; +pub const GST_AUDIO_CHANNEL_POSITION_TOP_CENTER: GstAudioChannelPosition = 15; +pub const GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT: GstAudioChannelPosition = 16; +pub const GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT: GstAudioChannelPosition = 17; +pub const GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_LEFT: GstAudioChannelPosition = 18; +pub const GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_RIGHT: GstAudioChannelPosition = 19; +pub const GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER: GstAudioChannelPosition = 20; +pub const GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_CENTER: GstAudioChannelPosition = 21; +pub const GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_LEFT: GstAudioChannelPosition = 22; +pub const GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT: GstAudioChannelPosition = 23; +pub const GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT: GstAudioChannelPosition = 24; +pub const GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT: GstAudioChannelPosition = 25; +pub const GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT: GstAudioChannelPosition = 26; +pub const GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT: GstAudioChannelPosition = 27; + +pub type GstAudioDitherMethod = c_int; +pub const GST_AUDIO_DITHER_NONE: GstAudioDitherMethod = 0; +pub const GST_AUDIO_DITHER_RPDF: GstAudioDitherMethod = 1; +pub const GST_AUDIO_DITHER_TPDF: GstAudioDitherMethod = 2; +pub const GST_AUDIO_DITHER_TPDF_HF: GstAudioDitherMethod = 3; + +pub type GstAudioFormat = c_int; +pub const GST_AUDIO_FORMAT_UNKNOWN: GstAudioFormat = 0; +pub const GST_AUDIO_FORMAT_ENCODED: GstAudioFormat = 1; +pub const GST_AUDIO_FORMAT_S8: GstAudioFormat = 2; +pub const GST_AUDIO_FORMAT_U8: GstAudioFormat = 3; +pub const GST_AUDIO_FORMAT_S16LE: GstAudioFormat = 4; +pub const GST_AUDIO_FORMAT_S16BE: GstAudioFormat = 5; +pub const GST_AUDIO_FORMAT_U16LE: GstAudioFormat = 6; +pub const GST_AUDIO_FORMAT_U16BE: GstAudioFormat = 7; +pub const GST_AUDIO_FORMAT_S24_32LE: GstAudioFormat = 8; +pub const GST_AUDIO_FORMAT_S24_32BE: GstAudioFormat = 9; +pub const GST_AUDIO_FORMAT_U24_32LE: GstAudioFormat = 10; +pub const GST_AUDIO_FORMAT_U24_32BE: GstAudioFormat = 11; +pub const GST_AUDIO_FORMAT_S32LE: GstAudioFormat = 12; +pub const GST_AUDIO_FORMAT_S32BE: GstAudioFormat = 13; +pub const GST_AUDIO_FORMAT_U32LE: GstAudioFormat = 14; +pub const GST_AUDIO_FORMAT_U32BE: GstAudioFormat = 15; +pub const GST_AUDIO_FORMAT_S24LE: GstAudioFormat = 16; +pub const GST_AUDIO_FORMAT_S24BE: GstAudioFormat = 17; +pub const GST_AUDIO_FORMAT_U24LE: GstAudioFormat = 18; +pub const GST_AUDIO_FORMAT_U24BE: GstAudioFormat = 19; +pub const GST_AUDIO_FORMAT_S20LE: GstAudioFormat = 20; +pub const GST_AUDIO_FORMAT_S20BE: GstAudioFormat = 21; +pub const GST_AUDIO_FORMAT_U20LE: GstAudioFormat = 22; +pub const GST_AUDIO_FORMAT_U20BE: GstAudioFormat = 23; +pub const GST_AUDIO_FORMAT_S18LE: GstAudioFormat = 24; +pub const GST_AUDIO_FORMAT_S18BE: GstAudioFormat = 25; +pub const GST_AUDIO_FORMAT_U18LE: GstAudioFormat = 26; +pub const GST_AUDIO_FORMAT_U18BE: GstAudioFormat = 27; +pub const GST_AUDIO_FORMAT_F32LE: GstAudioFormat = 28; +pub const GST_AUDIO_FORMAT_F32BE: GstAudioFormat = 29; +pub const GST_AUDIO_FORMAT_F64LE: GstAudioFormat = 30; +pub const GST_AUDIO_FORMAT_F64BE: GstAudioFormat = 31; +pub const GST_AUDIO_FORMAT_S16: GstAudioFormat = 4; +pub const GST_AUDIO_FORMAT_U16: GstAudioFormat = 6; +pub const GST_AUDIO_FORMAT_S24_32: GstAudioFormat = 8; +pub const GST_AUDIO_FORMAT_U24_32: GstAudioFormat = 10; +pub const GST_AUDIO_FORMAT_S32: GstAudioFormat = 12; +pub const GST_AUDIO_FORMAT_U32: GstAudioFormat = 14; +pub const GST_AUDIO_FORMAT_S24: GstAudioFormat = 16; +pub const GST_AUDIO_FORMAT_U24: GstAudioFormat = 18; +pub const GST_AUDIO_FORMAT_S20: GstAudioFormat = 20; +pub const GST_AUDIO_FORMAT_U20: GstAudioFormat = 22; +pub const GST_AUDIO_FORMAT_S18: GstAudioFormat = 24; +pub const GST_AUDIO_FORMAT_U18: GstAudioFormat = 26; +pub const GST_AUDIO_FORMAT_F32: GstAudioFormat = 28; +pub const GST_AUDIO_FORMAT_F64: GstAudioFormat = 30; + +pub type GstAudioLayout = c_int; +pub const GST_AUDIO_LAYOUT_INTERLEAVED: GstAudioLayout = 0; +pub const GST_AUDIO_LAYOUT_NON_INTERLEAVED: GstAudioLayout = 1; + +pub type GstAudioNoiseShapingMethod = c_int; +pub const GST_AUDIO_NOISE_SHAPING_NONE: GstAudioNoiseShapingMethod = 0; +pub const GST_AUDIO_NOISE_SHAPING_ERROR_FEEDBACK: GstAudioNoiseShapingMethod = 1; +pub const GST_AUDIO_NOISE_SHAPING_SIMPLE: GstAudioNoiseShapingMethod = 2; +pub const GST_AUDIO_NOISE_SHAPING_MEDIUM: GstAudioNoiseShapingMethod = 3; +pub const GST_AUDIO_NOISE_SHAPING_HIGH: GstAudioNoiseShapingMethod = 4; + +pub type GstAudioResamplerFilterInterpolation = c_int; +pub const GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_NONE: GstAudioResamplerFilterInterpolation = 0; +pub const GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_LINEAR: GstAudioResamplerFilterInterpolation = 1; +pub const GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_CUBIC: GstAudioResamplerFilterInterpolation = 2; + +pub type GstAudioResamplerFilterMode = c_int; +pub const GST_AUDIO_RESAMPLER_FILTER_MODE_INTERPOLATED: GstAudioResamplerFilterMode = 0; +pub const GST_AUDIO_RESAMPLER_FILTER_MODE_FULL: GstAudioResamplerFilterMode = 1; +pub const GST_AUDIO_RESAMPLER_FILTER_MODE_AUTO: GstAudioResamplerFilterMode = 2; + +pub type GstAudioResamplerMethod = c_int; +pub const GST_AUDIO_RESAMPLER_METHOD_NEAREST: GstAudioResamplerMethod = 0; +pub const GST_AUDIO_RESAMPLER_METHOD_LINEAR: GstAudioResamplerMethod = 1; +pub const GST_AUDIO_RESAMPLER_METHOD_CUBIC: GstAudioResamplerMethod = 2; +pub const GST_AUDIO_RESAMPLER_METHOD_BLACKMAN_NUTTALL: GstAudioResamplerMethod = 3; +pub const GST_AUDIO_RESAMPLER_METHOD_KAISER: GstAudioResamplerMethod = 4; + +pub type GstAudioRingBufferFormatType = c_int; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW: GstAudioRingBufferFormatType = 0; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MU_LAW: GstAudioRingBufferFormatType = 1; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_A_LAW: GstAudioRingBufferFormatType = 2; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IMA_ADPCM: GstAudioRingBufferFormatType = 3; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG: GstAudioRingBufferFormatType = 4; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_GSM: GstAudioRingBufferFormatType = 5; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IEC958: GstAudioRingBufferFormatType = 6; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_AC3: GstAudioRingBufferFormatType = 7; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_EAC3: GstAudioRingBufferFormatType = 8; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS: GstAudioRingBufferFormatType = 9; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC: GstAudioRingBufferFormatType = 10; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC: GstAudioRingBufferFormatType = 11; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC_RAW: GstAudioRingBufferFormatType = 12; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC_RAW: GstAudioRingBufferFormatType = 13; +pub const GST_AUDIO_RING_BUFFER_FORMAT_TYPE_FLAC: GstAudioRingBufferFormatType = 14; + +pub type GstAudioRingBufferState = c_int; +pub const GST_AUDIO_RING_BUFFER_STATE_STOPPED: GstAudioRingBufferState = 0; +pub const GST_AUDIO_RING_BUFFER_STATE_PAUSED: GstAudioRingBufferState = 1; +pub const GST_AUDIO_RING_BUFFER_STATE_STARTED: GstAudioRingBufferState = 2; +pub const GST_AUDIO_RING_BUFFER_STATE_ERROR: GstAudioRingBufferState = 3; + +pub type GstStreamVolumeFormat = c_int; +pub const GST_STREAM_VOLUME_FORMAT_LINEAR: GstStreamVolumeFormat = 0; +pub const GST_STREAM_VOLUME_FORMAT_CUBIC: GstStreamVolumeFormat = 1; +pub const GST_STREAM_VOLUME_FORMAT_DB: GstStreamVolumeFormat = 2; + +// Constants +pub const GST_AUDIO_CHANNELS_RANGE: *const c_char = + b"(int) [ 1, max ]\0" as *const u8 as *const c_char; +pub const GST_AUDIO_CONVERTER_OPT_DITHER_METHOD: *const c_char = + b"GstAudioConverter.dither-method\0" as *const u8 as *const c_char; +pub const GST_AUDIO_CONVERTER_OPT_MIX_MATRIX: *const c_char = + b"GstAudioConverter.mix-matrix\0" as *const u8 as *const c_char; +pub const GST_AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD: *const c_char = + b"GstAudioConverter.noise-shaping-method\0" as *const u8 as *const c_char; +pub const GST_AUDIO_CONVERTER_OPT_QUANTIZATION: *const c_char = + b"GstAudioConverter.quantization\0" as *const u8 as *const c_char; +pub const GST_AUDIO_CONVERTER_OPT_RESAMPLER_METHOD: *const c_char = + b"GstAudioConverter.resampler-method\0" as *const u8 as *const c_char; +pub const GST_AUDIO_DECODER_MAX_ERRORS: c_int = 10; +pub const GST_AUDIO_DECODER_SINK_NAME: *const c_char = b"sink\0" as *const u8 as *const c_char; +pub const GST_AUDIO_DECODER_SRC_NAME: *const c_char = b"src\0" as *const u8 as *const c_char; +pub const GST_AUDIO_DEF_CHANNELS: c_int = 2; +pub const GST_AUDIO_DEF_FORMAT: *const c_char = b"S16LE\0" as *const u8 as *const c_char; +pub const GST_AUDIO_DEF_RATE: c_int = 44100; +pub const GST_AUDIO_ENCODER_SINK_NAME: *const c_char = b"sink\0" as *const u8 as *const c_char; +pub const GST_AUDIO_ENCODER_SRC_NAME: *const c_char = b"src\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RATE_RANGE: *const c_char = b"(int) [ 1, max ]\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_CUBIC_B: *const c_char = + b"GstAudioResampler.cubic-b\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_CUBIC_C: *const c_char = + b"GstAudioResampler.cubic-c\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_CUTOFF: *const c_char = + b"GstAudioResampler.cutoff\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_FILTER_INTERPOLATION: *const c_char = + b"GstAudioResampler.filter-interpolation\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_FILTER_MODE: *const c_char = + b"GstAudioResampler.filter-mode\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_FILTER_MODE_THRESHOLD: *const c_char = + b"GstAudioResampler.filter-mode-threshold\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_FILTER_OVERSAMPLE: *const c_char = + b"GstAudioResampler.filter-oversample\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_MAX_PHASE_ERROR: *const c_char = + b"GstAudioResampler.max-phase-error\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_N_TAPS: *const c_char = + b"GstAudioResampler.n-taps\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_STOP_ATTENUATION: *const c_char = + b"GstAudioResampler.stop-attenutation\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_OPT_TRANSITION_BANDWIDTH: *const c_char = + b"GstAudioResampler.transition-bandwidth\0" as *const u8 as *const c_char; +pub const GST_AUDIO_RESAMPLER_QUALITY_DEFAULT: c_int = 4; +pub const GST_AUDIO_RESAMPLER_QUALITY_MAX: c_int = 10; +pub const GST_AUDIO_RESAMPLER_QUALITY_MIN: c_int = 0; +pub const GST_META_TAG_AUDIO_CHANNELS_STR: *const c_char = + b"channels\0" as *const u8 as *const c_char; +pub const GST_META_TAG_AUDIO_RATE_STR: *const c_char = b"rate\0" as *const u8 as *const c_char; +pub const GST_META_TAG_AUDIO_STR: *const c_char = b"audio\0" as *const u8 as *const c_char; + +// Flags +pub type GstAudioChannelMixerFlags = c_uint; +pub const GST_AUDIO_CHANNEL_MIXER_FLAGS_NONE: GstAudioChannelMixerFlags = 0; +pub const GST_AUDIO_CHANNEL_MIXER_FLAGS_NON_INTERLEAVED_IN: GstAudioChannelMixerFlags = 1; +pub const GST_AUDIO_CHANNEL_MIXER_FLAGS_NON_INTERLEAVED_OUT: GstAudioChannelMixerFlags = 2; +pub const GST_AUDIO_CHANNEL_MIXER_FLAGS_UNPOSITIONED_IN: GstAudioChannelMixerFlags = 4; +pub const GST_AUDIO_CHANNEL_MIXER_FLAGS_UNPOSITIONED_OUT: GstAudioChannelMixerFlags = 8; + +pub type GstAudioConverterFlags = c_uint; +pub const GST_AUDIO_CONVERTER_FLAG_NONE: GstAudioConverterFlags = 0; +pub const GST_AUDIO_CONVERTER_FLAG_IN_WRITABLE: GstAudioConverterFlags = 1; +pub const GST_AUDIO_CONVERTER_FLAG_VARIABLE_RATE: GstAudioConverterFlags = 2; + +pub type GstAudioFlags = c_uint; +pub const GST_AUDIO_FLAG_NONE: GstAudioFlags = 0; +pub const GST_AUDIO_FLAG_UNPOSITIONED: GstAudioFlags = 1; + +pub type GstAudioFormatFlags = c_uint; +pub const GST_AUDIO_FORMAT_FLAG_INTEGER: GstAudioFormatFlags = 1; +pub const GST_AUDIO_FORMAT_FLAG_FLOAT: GstAudioFormatFlags = 2; +pub const GST_AUDIO_FORMAT_FLAG_SIGNED: GstAudioFormatFlags = 4; +pub const GST_AUDIO_FORMAT_FLAG_COMPLEX: GstAudioFormatFlags = 16; +pub const GST_AUDIO_FORMAT_FLAG_UNPACK: GstAudioFormatFlags = 32; + +pub type GstAudioPackFlags = c_uint; +pub const GST_AUDIO_PACK_FLAG_NONE: GstAudioPackFlags = 0; +pub const GST_AUDIO_PACK_FLAG_TRUNCATE_RANGE: GstAudioPackFlags = 1; + +pub type GstAudioQuantizeFlags = c_uint; +pub const GST_AUDIO_QUANTIZE_FLAG_NONE: GstAudioQuantizeFlags = 0; +pub const GST_AUDIO_QUANTIZE_FLAG_NON_INTERLEAVED: GstAudioQuantizeFlags = 1; + +pub type GstAudioResamplerFlags = c_uint; +pub const GST_AUDIO_RESAMPLER_FLAG_NONE: GstAudioResamplerFlags = 0; +pub const GST_AUDIO_RESAMPLER_FLAG_NON_INTERLEAVED_IN: GstAudioResamplerFlags = 1; +pub const GST_AUDIO_RESAMPLER_FLAG_NON_INTERLEAVED_OUT: GstAudioResamplerFlags = 2; +pub const GST_AUDIO_RESAMPLER_FLAG_VARIABLE_RATE: GstAudioResamplerFlags = 4; + +// Callbacks +pub type GstAudioBaseSinkCustomSlavingCallback = Option< + unsafe extern "C" fn( + *mut GstAudioBaseSink, + gst::GstClockTime, + gst::GstClockTime, + *mut gst::GstClockTimeDiff, + GstAudioBaseSinkDiscontReason, + gpointer, + ), +>; +pub type GstAudioClockGetTimeFunc = + Option gst::GstClockTime>; +pub type GstAudioFormatPack = Option< + unsafe extern "C" fn( + *const GstAudioFormatInfo, + GstAudioPackFlags, + gconstpointer, + gpointer, + c_int, + ), +>; +pub type GstAudioFormatUnpack = Option< + unsafe extern "C" fn( + *const GstAudioFormatInfo, + GstAudioPackFlags, + gpointer, + gconstpointer, + c_int, + ), +>; +pub type GstAudioRingBufferCallback = + Option; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioAggregatorClass { + pub parent_class: gst_base::GstAggregatorClass, + pub create_output_buffer: + Option *mut gst::GstBuffer>, + pub aggregate_one_buffer: Option< + unsafe extern "C" fn( + *mut GstAudioAggregator, + *mut GstAudioAggregatorPad, + *mut gst::GstBuffer, + c_uint, + *mut gst::GstBuffer, + c_uint, + c_uint, + ) -> gboolean, + >, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstAudioAggregatorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioAggregatorClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("create_output_buffer", &self.create_output_buffer) + .field("aggregate_one_buffer", &self.aggregate_one_buffer) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioAggregatorConvertPadClass { + pub parent_class: GstAudioAggregatorPadClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioAggregatorConvertPadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstAudioAggregatorConvertPadClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstAudioAggregatorConvertPadPrivate(c_void); + +pub type GstAudioAggregatorConvertPadPrivate = *mut _GstAudioAggregatorConvertPadPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioAggregatorPadClass { + pub parent_class: gst_base::GstAggregatorPadClass, + pub convert_buffer: Option< + unsafe extern "C" fn( + *mut GstAudioAggregatorPad, + *mut GstAudioInfo, + *mut GstAudioInfo, + *mut gst::GstBuffer, + ) -> *mut gst::GstBuffer, + >, + pub update_conversion_info: Option, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstAudioAggregatorPadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstAudioAggregatorPadClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("convert_buffer", &self.convert_buffer) + .field("update_conversion_info", &self.update_conversion_info) + .finish() + } +} + +#[repr(C)] +pub struct _GstAudioAggregatorPadPrivate(c_void); + +pub type GstAudioAggregatorPadPrivate = *mut _GstAudioAggregatorPadPrivate; + +#[repr(C)] +pub struct _GstAudioAggregatorPrivate(c_void); + +pub type GstAudioAggregatorPrivate = *mut _GstAudioAggregatorPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioBaseSinkClass { + pub parent_class: gst_base::GstBaseSinkClass, + pub create_ringbuffer: + Option *mut GstAudioRingBuffer>, + pub payload: Option< + unsafe extern "C" fn(*mut GstAudioBaseSink, *mut gst::GstBuffer) -> *mut gst::GstBuffer, + >, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioBaseSinkClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioBaseSinkClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("create_ringbuffer", &self.create_ringbuffer) + .field("payload", &self.payload) + .finish() + } +} + +#[repr(C)] +pub struct _GstAudioBaseSinkPrivate(c_void); + +pub type GstAudioBaseSinkPrivate = *mut _GstAudioBaseSinkPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioBaseSrcClass { + pub parent_class: gst_base::GstPushSrcClass, + pub create_ringbuffer: + Option *mut GstAudioRingBuffer>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioBaseSrcClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioBaseSrcClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("create_ringbuffer", &self.create_ringbuffer) + .finish() + } +} + +#[repr(C)] +pub struct _GstAudioBaseSrcPrivate(c_void); + +pub type GstAudioBaseSrcPrivate = *mut _GstAudioBaseSrcPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioBuffer { + pub info: GstAudioInfo, + pub n_samples: size_t, + pub n_planes: c_int, + pub planes: *mut gpointer, + pub buffer: *mut gst::GstBuffer, + pub map_infos: *mut gst::GstMapInfo, + pub priv_planes_arr: [gpointer; 8], + pub priv_map_infos_arr: [gst::GstMapInfo; 8], + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioBuffer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioBuffer @ {:?}", self as *const _)) + .field("info", &self.info) + .field("n_samples", &self.n_samples) + .field("n_planes", &self.n_planes) + .field("planes", &self.planes) + .field("buffer", &self.buffer) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioCdSrcClass { + pub pushsrc_class: gst_base::GstPushSrcClass, + pub open: Option gboolean>, + pub close: Option, + pub read_sector: Option *mut gst::GstBuffer>, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstAudioCdSrcClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioCdSrcClass @ {:?}", self as *const _)) + .field("pushsrc_class", &self.pushsrc_class) + .field("open", &self.open) + .field("close", &self.close) + .field("read_sector", &self.read_sector) + .finish() + } +} + +#[repr(C)] +pub struct _GstAudioCdSrcPrivate(c_void); + +pub type GstAudioCdSrcPrivate = *mut _GstAudioCdSrcPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioCdSrcTrack { + pub is_audio: gboolean, + pub num: c_uint, + pub start: c_uint, + pub end: c_uint, + pub tags: *mut gst::GstTagList, + pub _gst_reserved1: [c_uint; 2], + pub _gst_reserved2: [gpointer; 2], +} + +impl ::std::fmt::Debug for GstAudioCdSrcTrack { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioCdSrcTrack @ {:?}", self as *const _)) + .field("is_audio", &self.is_audio) + .field("num", &self.num) + .field("start", &self.start) + .field("end", &self.end) + .field("tags", &self.tags) + .finish() + } +} + +#[repr(C)] +pub struct _GstAudioChannelMixer(c_void); + +pub type GstAudioChannelMixer = *mut _GstAudioChannelMixer; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioClippingMeta { + pub meta: gst::GstMeta, + pub format: gst::GstFormat, + pub start: u64, + pub end: u64, +} + +impl ::std::fmt::Debug for GstAudioClippingMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioClippingMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("format", &self.format) + .field("start", &self.start) + .field("end", &self.end) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioClockClass { + pub parent_class: gst::GstSystemClockClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioClockClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioClockClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct GstAudioConverter(c_void); + +impl ::std::fmt::Debug for GstAudioConverter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioConverter @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioDecoderClass { + pub element_class: gst::GstElementClass, + pub start: Option gboolean>, + pub stop: Option gboolean>, + pub set_format: + Option gboolean>, + pub parse: Option< + unsafe extern "C" fn( + *mut GstAudioDecoder, + *mut gst_base::GstAdapter, + *mut c_int, + *mut c_int, + ) -> gst::GstFlowReturn, + >, + pub handle_frame: Option< + unsafe extern "C" fn(*mut GstAudioDecoder, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, + pub flush: Option, + pub pre_push: Option< + unsafe extern "C" fn(*mut GstAudioDecoder, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, + pub sink_event: + Option gboolean>, + pub src_event: + Option gboolean>, + pub open: Option gboolean>, + pub close: Option gboolean>, + pub negotiate: Option gboolean>, + pub decide_allocation: + Option gboolean>, + pub propose_allocation: + Option gboolean>, + pub sink_query: + Option gboolean>, + pub src_query: + Option gboolean>, + pub getcaps: + Option *mut gst::GstCaps>, + pub transform_meta: Option< + unsafe extern "C" fn( + *mut GstAudioDecoder, + *mut gst::GstBuffer, + *mut gst::GstMeta, + *mut gst::GstBuffer, + ) -> gboolean, + >, + pub _gst_reserved: [gpointer; 16], +} + +impl ::std::fmt::Debug for GstAudioDecoderClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioDecoderClass @ {:?}", self as *const _)) + .field("element_class", &self.element_class) + .field("start", &self.start) + .field("stop", &self.stop) + .field("set_format", &self.set_format) + .field("parse", &self.parse) + .field("handle_frame", &self.handle_frame) + .field("flush", &self.flush) + .field("pre_push", &self.pre_push) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("open", &self.open) + .field("close", &self.close) + .field("negotiate", &self.negotiate) + .field("decide_allocation", &self.decide_allocation) + .field("propose_allocation", &self.propose_allocation) + .field("sink_query", &self.sink_query) + .field("src_query", &self.src_query) + .field("getcaps", &self.getcaps) + .field("transform_meta", &self.transform_meta) + .finish() + } +} + +#[repr(C)] +pub struct _GstAudioDecoderPrivate(c_void); + +pub type GstAudioDecoderPrivate = *mut _GstAudioDecoderPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioDownmixMeta { + pub meta: gst::GstMeta, + pub from_position: *mut GstAudioChannelPosition, + pub to_position: *mut GstAudioChannelPosition, + pub from_channels: c_int, + pub to_channels: c_int, + pub matrix: *mut *mut c_float, +} + +impl ::std::fmt::Debug for GstAudioDownmixMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioDownmixMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("from_position", &self.from_position) + .field("to_position", &self.to_position) + .field("from_channels", &self.from_channels) + .field("to_channels", &self.to_channels) + .field("matrix", &self.matrix) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioEncoderClass { + pub element_class: gst::GstElementClass, + pub start: Option gboolean>, + pub stop: Option gboolean>, + pub set_format: + Option gboolean>, + pub handle_frame: Option< + unsafe extern "C" fn(*mut GstAudioEncoder, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, + pub flush: Option, + pub pre_push: Option< + unsafe extern "C" fn(*mut GstAudioEncoder, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, + pub sink_event: + Option gboolean>, + pub src_event: + Option gboolean>, + pub getcaps: + Option *mut gst::GstCaps>, + pub open: Option gboolean>, + pub close: Option gboolean>, + pub negotiate: Option gboolean>, + pub decide_allocation: + Option gboolean>, + pub propose_allocation: + Option gboolean>, + pub transform_meta: Option< + unsafe extern "C" fn( + *mut GstAudioEncoder, + *mut gst::GstBuffer, + *mut gst::GstMeta, + *mut gst::GstBuffer, + ) -> gboolean, + >, + pub sink_query: + Option gboolean>, + pub src_query: + Option gboolean>, + pub _gst_reserved: [gpointer; 17], +} + +impl ::std::fmt::Debug for GstAudioEncoderClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioEncoderClass @ {:?}", self as *const _)) + .field("element_class", &self.element_class) + .field("start", &self.start) + .field("stop", &self.stop) + .field("set_format", &self.set_format) + .field("handle_frame", &self.handle_frame) + .field("flush", &self.flush) + .field("pre_push", &self.pre_push) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("getcaps", &self.getcaps) + .field("open", &self.open) + .field("close", &self.close) + .field("negotiate", &self.negotiate) + .field("decide_allocation", &self.decide_allocation) + .field("propose_allocation", &self.propose_allocation) + .field("transform_meta", &self.transform_meta) + .field("sink_query", &self.sink_query) + .field("src_query", &self.src_query) + .finish() + } +} + +#[repr(C)] +pub struct _GstAudioEncoderPrivate(c_void); + +pub type GstAudioEncoderPrivate = *mut _GstAudioEncoderPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioFilterClass { + pub basetransformclass: gst_base::GstBaseTransformClass, + pub setup: Option gboolean>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioFilterClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioFilterClass @ {:?}", self as *const _)) + .field("basetransformclass", &self.basetransformclass) + .field("setup", &self.setup) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioFormatInfo { + pub format: GstAudioFormat, + pub name: *const c_char, + pub description: *const c_char, + pub flags: GstAudioFormatFlags, + pub endianness: c_int, + pub width: c_int, + pub depth: c_int, + pub silence: [u8; 8], + pub unpack_format: GstAudioFormat, + pub unpack_func: GstAudioFormatUnpack, + pub pack_func: GstAudioFormatPack, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioFormatInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioFormatInfo @ {:?}", self as *const _)) + .field("format", &self.format) + .field("name", &self.name) + .field("description", &self.description) + .field("flags", &self.flags) + .field("endianness", &self.endianness) + .field("width", &self.width) + .field("depth", &self.depth) + .field("silence", &self.silence) + .field("unpack_format", &self.unpack_format) + .field("unpack_func", &self.unpack_func) + .field("pack_func", &self.pack_func) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioInfo { + pub finfo: *const GstAudioFormatInfo, + pub flags: GstAudioFlags, + pub layout: GstAudioLayout, + pub rate: c_int, + pub channels: c_int, + pub bpf: c_int, + pub position: [GstAudioChannelPosition; 64], + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioInfo @ {:?}", self as *const _)) + .field("finfo", &self.finfo) + .field("flags", &self.flags) + .field("layout", &self.layout) + .field("rate", &self.rate) + .field("channels", &self.channels) + .field("bpf", &self.bpf) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioMeta { + pub meta: gst::GstMeta, + pub info: GstAudioInfo, + pub samples: size_t, + pub offsets: *mut size_t, + pub priv_offsets_arr: [size_t; 8], + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("info", &self.info) + .field("samples", &self.samples) + .field("offsets", &self.offsets) + .finish() + } +} + +#[repr(C)] +pub struct _GstAudioQuantize(c_void); + +pub type GstAudioQuantize = *mut _GstAudioQuantize; + +#[repr(C)] +pub struct _GstAudioResampler(c_void); + +pub type GstAudioResampler = *mut _GstAudioResampler; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioRingBufferClass { + pub parent_class: gst::GstObjectClass, + pub open_device: Option gboolean>, + pub acquire: Option< + unsafe extern "C" fn(*mut GstAudioRingBuffer, *mut GstAudioRingBufferSpec) -> gboolean, + >, + pub release: Option gboolean>, + pub close_device: Option gboolean>, + pub start: Option gboolean>, + pub pause: Option gboolean>, + pub resume: Option gboolean>, + pub stop: Option gboolean>, + pub delay: Option c_uint>, + pub activate: Option gboolean>, + pub commit: Option< + unsafe extern "C" fn( + *mut GstAudioRingBuffer, + *mut u64, + *mut u8, + c_int, + c_int, + *mut c_int, + ) -> c_uint, + >, + pub clear_all: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioRingBufferClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioRingBufferClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("open_device", &self.open_device) + .field("acquire", &self.acquire) + .field("release", &self.release) + .field("close_device", &self.close_device) + .field("start", &self.start) + .field("pause", &self.pause) + .field("resume", &self.resume) + .field("stop", &self.stop) + .field("delay", &self.delay) + .field("activate", &self.activate) + .field("commit", &self.commit) + .field("clear_all", &self.clear_all) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioRingBufferSpec { + pub caps: *mut gst::GstCaps, + pub type_: GstAudioRingBufferFormatType, + pub info: GstAudioInfo, + pub latency_time: u64, + pub buffer_time: u64, + pub segsize: c_int, + pub segtotal: c_int, + pub seglatency: c_int, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioRingBufferSpec { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioRingBufferSpec @ {:?}", self as *const _)) + .field("caps", &self.caps) + .field("type_", &self.type_) + .field("info", &self.info) + .field("latency_time", &self.latency_time) + .field("buffer_time", &self.buffer_time) + .field("segsize", &self.segsize) + .field("segtotal", &self.segtotal) + .field("seglatency", &self.seglatency) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioSinkClass { + pub parent_class: GstAudioBaseSinkClass, + pub open: Option gboolean>, + pub prepare: + Option gboolean>, + pub unprepare: Option gboolean>, + pub close: Option gboolean>, + pub write: Option c_int>, + pub delay: Option c_uint>, + pub reset: Option, + pub pause: Option, + pub resume: Option, + pub stop: Option, + pub extension: *mut GstAudioSinkClassExtension, +} + +impl ::std::fmt::Debug for GstAudioSinkClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioSinkClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("open", &self.open) + .field("prepare", &self.prepare) + .field("unprepare", &self.unprepare) + .field("close", &self.close) + .field("write", &self.write) + .field("delay", &self.delay) + .field("reset", &self.reset) + .field("pause", &self.pause) + .field("resume", &self.resume) + .field("stop", &self.stop) + .field("extension", &self.extension) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioSinkClassExtension { + pub clear_all: Option, +} + +impl ::std::fmt::Debug for GstAudioSinkClassExtension { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstAudioSinkClassExtension @ {:?}", + self as *const _ + )) + .field("clear_all", &self.clear_all) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioSrcClass { + pub parent_class: GstAudioBaseSrcClass, + pub open: Option gboolean>, + pub prepare: + Option gboolean>, + pub unprepare: Option gboolean>, + pub close: Option gboolean>, + pub read: Option< + unsafe extern "C" fn(*mut GstAudioSrc, gpointer, c_uint, *mut gst::GstClockTime) -> c_uint, + >, + pub delay: Option c_uint>, + pub reset: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioSrcClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioSrcClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("open", &self.open) + .field("prepare", &self.prepare) + .field("unprepare", &self.unprepare) + .field("close", &self.close) + .field("read", &self.read) + .field("delay", &self.delay) + .field("reset", &self.reset) + .finish() + } +} + +#[repr(C)] +pub struct GstAudioStreamAlign(c_void); + +impl ::std::fmt::Debug for GstAudioStreamAlign { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioStreamAlign @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstStreamVolumeInterface { + pub iface: gobject::GTypeInterface, +} + +impl ::std::fmt::Debug for GstStreamVolumeInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstStreamVolumeInterface @ {:?}", + self as *const _ + )) + .field("iface", &self.iface) + .finish() + } +} + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioAggregator { + pub parent: gst_base::GstAggregator, + pub current_caps: *mut gst::GstCaps, + pub priv_: *mut GstAudioAggregatorPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioAggregator { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioAggregator @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("current_caps", &self.current_caps) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioAggregatorConvertPad { + pub parent: GstAudioAggregatorPad, + pub priv_: *mut GstAudioAggregatorConvertPadPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioAggregatorConvertPad { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstAudioAggregatorConvertPad @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioAggregatorPad { + pub parent: gst_base::GstAggregatorPad, + pub info: GstAudioInfo, + pub priv_: *mut GstAudioAggregatorPadPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioAggregatorPad { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioAggregatorPad @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("info", &self.info) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioBaseSink { + pub element: gst_base::GstBaseSink, + pub ringbuffer: *mut GstAudioRingBuffer, + pub buffer_time: u64, + pub latency_time: u64, + pub next_sample: u64, + pub provided_clock: *mut gst::GstClock, + pub eos_rendering: gboolean, + pub priv_: *mut GstAudioBaseSinkPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioBaseSink { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioBaseSink @ {:?}", self as *const _)) + .field("element", &self.element) + .field("ringbuffer", &self.ringbuffer) + .field("buffer_time", &self.buffer_time) + .field("latency_time", &self.latency_time) + .field("next_sample", &self.next_sample) + .field("provided_clock", &self.provided_clock) + .field("eos_rendering", &self.eos_rendering) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioBaseSrc { + pub element: gst_base::GstPushSrc, + pub ringbuffer: *mut GstAudioRingBuffer, + pub buffer_time: gst::GstClockTime, + pub latency_time: gst::GstClockTime, + pub next_sample: u64, + pub clock: *mut gst::GstClock, + pub priv_: *mut GstAudioBaseSrcPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioBaseSrc { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioBaseSrc @ {:?}", self as *const _)) + .field("element", &self.element) + .field("ringbuffer", &self.ringbuffer) + .field("buffer_time", &self.buffer_time) + .field("latency_time", &self.latency_time) + .field("next_sample", &self.next_sample) + .field("clock", &self.clock) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioCdSrc { + pub pushsrc: gst_base::GstPushSrc, + pub tags: *mut gst::GstTagList, + pub priv_: *mut GstAudioCdSrcPrivate, + pub _gst_reserved1: [c_uint; 2], + pub _gst_reserved2: [gpointer; 2], +} + +impl ::std::fmt::Debug for GstAudioCdSrc { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioCdSrc @ {:?}", self as *const _)) + .field("pushsrc", &self.pushsrc) + .field("tags", &self.tags) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioClock { + pub clock: gst::GstSystemClock, + pub func: GstAudioClockGetTimeFunc, + pub user_data: gpointer, + pub destroy_notify: glib::GDestroyNotify, + pub last_time: gst::GstClockTime, + pub time_offset: gst::GstClockTimeDiff, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioClock { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioClock @ {:?}", self as *const _)) + .field("clock", &self.clock) + .field("func", &self.func) + .field("user_data", &self.user_data) + .field("destroy_notify", &self.destroy_notify) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioDecoder { + pub element: gst::GstElement, + pub sinkpad: *mut gst::GstPad, + pub srcpad: *mut gst::GstPad, + pub stream_lock: glib::GRecMutex, + pub input_segment: gst::GstSegment, + pub output_segment: gst::GstSegment, + pub priv_: *mut GstAudioDecoderPrivate, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstAudioDecoder { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioDecoder @ {:?}", self as *const _)) + .field("element", &self.element) + .field("sinkpad", &self.sinkpad) + .field("srcpad", &self.srcpad) + .field("stream_lock", &self.stream_lock) + .field("input_segment", &self.input_segment) + .field("output_segment", &self.output_segment) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioEncoder { + pub element: gst::GstElement, + pub sinkpad: *mut gst::GstPad, + pub srcpad: *mut gst::GstPad, + pub stream_lock: glib::GRecMutex, + pub input_segment: gst::GstSegment, + pub output_segment: gst::GstSegment, + pub priv_: *mut GstAudioEncoderPrivate, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstAudioEncoder { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioEncoder @ {:?}", self as *const _)) + .field("element", &self.element) + .field("sinkpad", &self.sinkpad) + .field("srcpad", &self.srcpad) + .field("stream_lock", &self.stream_lock) + .field("input_segment", &self.input_segment) + .field("output_segment", &self.output_segment) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioFilter { + pub basetransform: gst_base::GstBaseTransform, + pub info: GstAudioInfo, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioFilter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioFilter @ {:?}", self as *const _)) + .field("basetransform", &self.basetransform) + .field("info", &self.info) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioRingBuffer { + pub object: gst::GstObject, + pub cond: glib::GCond, + pub open: gboolean, + pub acquired: gboolean, + pub memory: *mut u8, + pub size: size_t, + pub timestamps: *mut gst::GstClockTime, + pub spec: GstAudioRingBufferSpec, + pub samples_per_seg: c_int, + pub empty_seg: *mut u8, + pub state: c_int, + pub segdone: c_int, + pub segbase: c_int, + pub waiting: c_int, + pub callback: GstAudioRingBufferCallback, + pub cb_data: gpointer, + pub need_reorder: gboolean, + pub channel_reorder_map: [c_int; 64], + pub flushing: gboolean, + pub may_start: c_int, + pub active: gboolean, + pub cb_data_notify: glib::GDestroyNotify, + pub _gst_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GstAudioRingBuffer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioRingBuffer @ {:?}", self as *const _)) + .field("object", &self.object) + .field("cond", &self.cond) + .field("open", &self.open) + .field("acquired", &self.acquired) + .field("memory", &self.memory) + .field("size", &self.size) + .field("spec", &self.spec) + .field("samples_per_seg", &self.samples_per_seg) + .field("empty_seg", &self.empty_seg) + .field("state", &self.state) + .field("segdone", &self.segdone) + .field("segbase", &self.segbase) + .field("waiting", &self.waiting) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioSink { + pub element: GstAudioBaseSink, + pub thread: *mut glib::GThread, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioSink { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioSink @ {:?}", self as *const _)) + .field("element", &self.element) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioSrc { + pub element: GstAudioBaseSrc, + pub thread: *mut glib::GThread, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAudioSrc { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioSrc @ {:?}", self as *const _)) + .field("element", &self.element) + .finish() + } +} + +// Interfaces +#[repr(C)] +pub struct GstStreamVolume(c_void); + +impl ::std::fmt::Debug for GstStreamVolume { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstStreamVolume @ {:?}", self as *const _) + } +} + +#[link(name = "gstaudio-1.0")] +extern "C" { + + //========================================================================= + // GstAudioBaseSinkDiscontReason + //========================================================================= + pub fn gst_audio_base_sink_discont_reason_get_type() -> GType; + + //========================================================================= + // GstAudioBaseSinkSlaveMethod + //========================================================================= + pub fn gst_audio_base_sink_slave_method_get_type() -> GType; + + //========================================================================= + // GstAudioBaseSrcSlaveMethod + //========================================================================= + pub fn gst_audio_base_src_slave_method_get_type() -> GType; + + //========================================================================= + // GstAudioCdSrcMode + //========================================================================= + pub fn gst_audio_cd_src_mode_get_type() -> GType; + + //========================================================================= + // GstAudioChannelPosition + //========================================================================= + pub fn gst_audio_channel_position_get_type() -> GType; + + //========================================================================= + // GstAudioDitherMethod + //========================================================================= + pub fn gst_audio_dither_method_get_type() -> GType; + + //========================================================================= + // GstAudioFormat + //========================================================================= + pub fn gst_audio_format_get_type() -> GType; + pub fn gst_audio_format_build_integer( + sign: gboolean, + endianness: c_int, + width: c_int, + depth: c_int, + ) -> GstAudioFormat; + pub fn gst_audio_format_fill_silence( + info: *const GstAudioFormatInfo, + dest: gpointer, + length: size_t, + ); + pub fn gst_audio_format_from_string(format: *const c_char) -> GstAudioFormat; + pub fn gst_audio_format_get_info(format: GstAudioFormat) -> *const GstAudioFormatInfo; + pub fn gst_audio_format_to_string(format: GstAudioFormat) -> *const c_char; + + //========================================================================= + // GstAudioLayout + //========================================================================= + pub fn gst_audio_layout_get_type() -> GType; + + //========================================================================= + // GstAudioNoiseShapingMethod + //========================================================================= + pub fn gst_audio_noise_shaping_method_get_type() -> GType; + + //========================================================================= + // GstAudioResamplerFilterInterpolation + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_filter_interpolation_get_type() -> GType; + + //========================================================================= + // GstAudioResamplerFilterMode + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_filter_mode_get_type() -> GType; + + //========================================================================= + // GstAudioResamplerMethod + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_method_get_type() -> GType; + + //========================================================================= + // GstAudioRingBufferFormatType + //========================================================================= + pub fn gst_audio_ring_buffer_format_type_get_type() -> GType; + + //========================================================================= + // GstAudioRingBufferState + //========================================================================= + pub fn gst_audio_ring_buffer_state_get_type() -> GType; + + //========================================================================= + // GstAudioChannelMixerFlags + //========================================================================= + pub fn gst_audio_channel_mixer_flags_get_type() -> GType; + + //========================================================================= + // GstAudioConverterFlags + //========================================================================= + pub fn gst_audio_converter_flags_get_type() -> GType; + + //========================================================================= + // GstAudioFlags + //========================================================================= + pub fn gst_audio_flags_get_type() -> GType; + + //========================================================================= + // GstAudioFormatFlags + //========================================================================= + pub fn gst_audio_format_flags_get_type() -> GType; + + //========================================================================= + // GstAudioPackFlags + //========================================================================= + pub fn gst_audio_pack_flags_get_type() -> GType; + + //========================================================================= + // GstAudioQuantizeFlags + //========================================================================= + pub fn gst_audio_quantize_flags_get_type() -> GType; + + //========================================================================= + // GstAudioResamplerFlags + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_flags_get_type() -> GType; + + //========================================================================= + // GstAudioBuffer + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_audio_buffer_map( + buffer: *mut GstAudioBuffer, + info: *const GstAudioInfo, + gstbuffer: *mut gst::GstBuffer, + flags: gst::GstMapFlags, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_audio_buffer_unmap(buffer: *mut GstAudioBuffer); + pub fn gst_audio_buffer_clip( + buffer: *mut gst::GstBuffer, + segment: *const gst::GstSegment, + rate: c_int, + bpf: c_int, + ) -> *mut gst::GstBuffer; + pub fn gst_audio_buffer_reorder_channels( + buffer: *mut gst::GstBuffer, + format: GstAudioFormat, + channels: c_int, + from: *const GstAudioChannelPosition, + to: *const GstAudioChannelPosition, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_audio_buffer_truncate( + buffer: *mut gst::GstBuffer, + bpf: c_int, + trim: size_t, + samples: size_t, + ) -> *mut gst::GstBuffer; + + //========================================================================= + // GstAudioChannelMixer + //========================================================================= + pub fn gst_audio_channel_mixer_free(mix: *mut GstAudioChannelMixer); + pub fn gst_audio_channel_mixer_is_passthrough(mix: *mut GstAudioChannelMixer) -> gboolean; + pub fn gst_audio_channel_mixer_samples( + mix: *mut GstAudioChannelMixer, + in_: *const gpointer, + out: *mut gpointer, + samples: c_int, + ); + pub fn gst_audio_channel_mixer_new( + flags: GstAudioChannelMixerFlags, + format: GstAudioFormat, + in_channels: c_int, + in_position: *mut GstAudioChannelPosition, + out_channels: c_int, + out_position: *mut GstAudioChannelPosition, + ) -> *mut GstAudioChannelMixer; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_channel_mixer_new_with_matrix( + flags: GstAudioChannelMixerFlags, + format: GstAudioFormat, + in_channels: c_int, + out_channels: c_int, + matrix: *mut *mut c_float, + ) -> *mut GstAudioChannelMixer; + + //========================================================================= + // GstAudioClippingMeta + //========================================================================= + pub fn gst_audio_clipping_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstAudioConverter + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_converter_get_type() -> GType; + pub fn gst_audio_converter_new( + flags: GstAudioConverterFlags, + in_info: *mut GstAudioInfo, + out_info: *mut GstAudioInfo, + config: *mut gst::GstStructure, + ) -> *mut GstAudioConverter; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_converter_convert( + convert: *mut GstAudioConverter, + flags: GstAudioConverterFlags, + in_: gpointer, + in_size: size_t, + out: *mut u8, + out_size: *mut size_t, + ) -> gboolean; + pub fn gst_audio_converter_free(convert: *mut GstAudioConverter); + pub fn gst_audio_converter_get_config( + convert: *mut GstAudioConverter, + in_rate: *mut c_int, + out_rate: *mut c_int, + ) -> *const gst::GstStructure; + pub fn gst_audio_converter_get_in_frames( + convert: *mut GstAudioConverter, + out_frames: size_t, + ) -> size_t; + pub fn gst_audio_converter_get_max_latency(convert: *mut GstAudioConverter) -> size_t; + pub fn gst_audio_converter_get_out_frames( + convert: *mut GstAudioConverter, + in_frames: size_t, + ) -> size_t; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_audio_converter_is_passthrough(convert: *mut GstAudioConverter) -> gboolean; + pub fn gst_audio_converter_reset(convert: *mut GstAudioConverter); + pub fn gst_audio_converter_samples( + convert: *mut GstAudioConverter, + flags: GstAudioConverterFlags, + in_: *mut gpointer, + in_frames: size_t, + out: *mut gpointer, + out_frames: size_t, + ) -> gboolean; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_audio_converter_supports_inplace(convert: *mut GstAudioConverter) -> gboolean; + pub fn gst_audio_converter_update_config( + convert: *mut GstAudioConverter, + in_rate: c_int, + out_rate: c_int, + config: *mut gst::GstStructure, + ) -> gboolean; + + //========================================================================= + // GstAudioDownmixMeta + //========================================================================= + pub fn gst_audio_downmix_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstAudioFilterClass + //========================================================================= + pub fn gst_audio_filter_class_add_pad_templates( + klass: *mut GstAudioFilterClass, + allowed_caps: *mut gst::GstCaps, + ); + + //========================================================================= + // GstAudioInfo + //========================================================================= + pub fn gst_audio_info_get_type() -> GType; + pub fn gst_audio_info_new() -> *mut GstAudioInfo; + pub fn gst_audio_info_convert( + info: *const GstAudioInfo, + src_fmt: gst::GstFormat, + src_val: i64, + dest_fmt: gst::GstFormat, + dest_val: *mut i64, + ) -> gboolean; + pub fn gst_audio_info_copy(info: *const GstAudioInfo) -> *mut GstAudioInfo; + pub fn gst_audio_info_free(info: *mut GstAudioInfo); + pub fn gst_audio_info_from_caps(info: *mut GstAudioInfo, caps: *const gst::GstCaps) + -> gboolean; + pub fn gst_audio_info_init(info: *mut GstAudioInfo); + pub fn gst_audio_info_is_equal( + info: *const GstAudioInfo, + other: *const GstAudioInfo, + ) -> gboolean; + pub fn gst_audio_info_set_format( + info: *mut GstAudioInfo, + format: GstAudioFormat, + rate: c_int, + channels: c_int, + position: *const [GstAudioChannelPosition; 64], + ); + pub fn gst_audio_info_to_caps(info: *const GstAudioInfo) -> *mut gst::GstCaps; + + //========================================================================= + // GstAudioMeta + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_audio_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstAudioQuantize + //========================================================================= + pub fn gst_audio_quantize_free(quant: *mut GstAudioQuantize); + pub fn gst_audio_quantize_reset(quant: *mut GstAudioQuantize); + pub fn gst_audio_quantize_samples( + quant: *mut GstAudioQuantize, + in_: *const gpointer, + out: *mut gpointer, + samples: c_uint, + ); + pub fn gst_audio_quantize_new( + dither: GstAudioDitherMethod, + ns: GstAudioNoiseShapingMethod, + flags: GstAudioQuantizeFlags, + format: GstAudioFormat, + channels: c_uint, + quantizer: c_uint, + ) -> *mut GstAudioQuantize; + + //========================================================================= + // GstAudioResampler + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_free(resampler: *mut GstAudioResampler); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_get_in_frames( + resampler: *mut GstAudioResampler, + out_frames: size_t, + ) -> size_t; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_get_max_latency(resampler: *mut GstAudioResampler) -> size_t; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_get_out_frames( + resampler: *mut GstAudioResampler, + in_frames: size_t, + ) -> size_t; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_resample( + resampler: *mut GstAudioResampler, + in_: *mut gpointer, + in_frames: size_t, + out: *mut gpointer, + out_frames: size_t, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_reset(resampler: *mut GstAudioResampler); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_update( + resampler: *mut GstAudioResampler, + in_rate: c_int, + out_rate: c_int, + options: *mut gst::GstStructure, + ) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_new( + method: GstAudioResamplerMethod, + flags: GstAudioResamplerFlags, + format: GstAudioFormat, + channels: c_int, + in_rate: c_int, + out_rate: c_int, + options: *mut gst::GstStructure, + ) -> *mut GstAudioResampler; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_resampler_options_set_quality( + method: GstAudioResamplerMethod, + quality: c_uint, + in_rate: c_int, + out_rate: c_int, + options: *mut gst::GstStructure, + ); + + //========================================================================= + // GstAudioStreamAlign + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_get_type() -> GType; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_new( + rate: c_int, + alignment_threshold: gst::GstClockTime, + discont_wait: gst::GstClockTime, + ) -> *mut GstAudioStreamAlign; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_copy( + align: *const GstAudioStreamAlign, + ) -> *mut GstAudioStreamAlign; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_free(align: *mut GstAudioStreamAlign); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_get_alignment_threshold( + align: *mut GstAudioStreamAlign, + ) -> gst::GstClockTime; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_get_discont_wait( + align: *mut GstAudioStreamAlign, + ) -> gst::GstClockTime; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_get_rate(align: *mut GstAudioStreamAlign) -> c_int; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_get_samples_since_discont(align: *mut GstAudioStreamAlign) + -> u64; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_get_timestamp_at_discont( + align: *mut GstAudioStreamAlign, + ) -> gst::GstClockTime; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_mark_discont(align: *mut GstAudioStreamAlign); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_process( + align: *mut GstAudioStreamAlign, + discont: gboolean, + timestamp: gst::GstClockTime, + n_samples: c_uint, + out_timestamp: *mut gst::GstClockTime, + out_duration: *mut gst::GstClockTime, + out_sample_position: *mut u64, + ) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_set_alignment_threshold( + align: *mut GstAudioStreamAlign, + alignment_threshold: gst::GstClockTime, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_set_discont_wait( + align: *mut GstAudioStreamAlign, + discont_wait: gst::GstClockTime, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_stream_align_set_rate(align: *mut GstAudioStreamAlign, rate: c_int); + + //========================================================================= + // GstAudioAggregator + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_aggregator_get_type() -> GType; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_aggregator_set_sink_caps( + aagg: *mut GstAudioAggregator, + pad: *mut GstAudioAggregatorPad, + caps: *mut gst::GstCaps, + ); + + //========================================================================= + // GstAudioAggregatorConvertPad + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_aggregator_convert_pad_get_type() -> GType; + + //========================================================================= + // GstAudioAggregatorPad + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_audio_aggregator_pad_get_type() -> GType; + + //========================================================================= + // GstAudioBaseSink + //========================================================================= + pub fn gst_audio_base_sink_get_type() -> GType; + pub fn gst_audio_base_sink_create_ringbuffer( + sink: *mut GstAudioBaseSink, + ) -> *mut GstAudioRingBuffer; + pub fn gst_audio_base_sink_get_alignment_threshold( + sink: *mut GstAudioBaseSink, + ) -> gst::GstClockTime; + pub fn gst_audio_base_sink_get_discont_wait(sink: *mut GstAudioBaseSink) -> gst::GstClockTime; + pub fn gst_audio_base_sink_get_drift_tolerance(sink: *mut GstAudioBaseSink) -> i64; + pub fn gst_audio_base_sink_get_provide_clock(sink: *mut GstAudioBaseSink) -> gboolean; + pub fn gst_audio_base_sink_get_slave_method( + sink: *mut GstAudioBaseSink, + ) -> GstAudioBaseSinkSlaveMethod; + pub fn gst_audio_base_sink_report_device_failure(sink: *mut GstAudioBaseSink); + pub fn gst_audio_base_sink_set_alignment_threshold( + sink: *mut GstAudioBaseSink, + alignment_threshold: gst::GstClockTime, + ); + pub fn gst_audio_base_sink_set_custom_slaving_callback( + sink: *mut GstAudioBaseSink, + callback: GstAudioBaseSinkCustomSlavingCallback, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_audio_base_sink_set_discont_wait( + sink: *mut GstAudioBaseSink, + discont_wait: gst::GstClockTime, + ); + pub fn gst_audio_base_sink_set_drift_tolerance( + sink: *mut GstAudioBaseSink, + drift_tolerance: i64, + ); + pub fn gst_audio_base_sink_set_provide_clock(sink: *mut GstAudioBaseSink, provide: gboolean); + pub fn gst_audio_base_sink_set_slave_method( + sink: *mut GstAudioBaseSink, + method: GstAudioBaseSinkSlaveMethod, + ); + + //========================================================================= + // GstAudioBaseSrc + //========================================================================= + pub fn gst_audio_base_src_get_type() -> GType; + pub fn gst_audio_base_src_create_ringbuffer( + src: *mut GstAudioBaseSrc, + ) -> *mut GstAudioRingBuffer; + pub fn gst_audio_base_src_get_provide_clock(src: *mut GstAudioBaseSrc) -> gboolean; + pub fn gst_audio_base_src_get_slave_method( + src: *mut GstAudioBaseSrc, + ) -> GstAudioBaseSrcSlaveMethod; + pub fn gst_audio_base_src_set_provide_clock(src: *mut GstAudioBaseSrc, provide: gboolean); + pub fn gst_audio_base_src_set_slave_method( + src: *mut GstAudioBaseSrc, + method: GstAudioBaseSrcSlaveMethod, + ); + + //========================================================================= + // GstAudioCdSrc + //========================================================================= + pub fn gst_audio_cd_src_get_type() -> GType; + pub fn gst_audio_cd_src_add_track( + src: *mut GstAudioCdSrc, + track: *mut GstAudioCdSrcTrack, + ) -> gboolean; + + //========================================================================= + // GstAudioClock + //========================================================================= + pub fn gst_audio_clock_get_type() -> GType; + pub fn gst_audio_clock_new( + name: *const c_char, + func: GstAudioClockGetTimeFunc, + user_data: gpointer, + destroy_notify: glib::GDestroyNotify, + ) -> *mut gst::GstClock; + pub fn gst_audio_clock_adjust( + clock: *mut GstAudioClock, + time: gst::GstClockTime, + ) -> gst::GstClockTime; + pub fn gst_audio_clock_get_time(clock: *mut GstAudioClock) -> gst::GstClockTime; + pub fn gst_audio_clock_invalidate(clock: *mut GstAudioClock); + pub fn gst_audio_clock_reset(clock: *mut GstAudioClock, time: gst::GstClockTime); + + //========================================================================= + // GstAudioDecoder + //========================================================================= + pub fn gst_audio_decoder_get_type() -> GType; + pub fn gst_audio_decoder_allocate_output_buffer( + dec: *mut GstAudioDecoder, + size: size_t, + ) -> *mut gst::GstBuffer; + pub fn gst_audio_decoder_finish_frame( + dec: *mut GstAudioDecoder, + buf: *mut gst::GstBuffer, + frames: c_int, + ) -> gst::GstFlowReturn; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_audio_decoder_finish_subframe( + dec: *mut GstAudioDecoder, + buf: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_audio_decoder_get_allocator( + dec: *mut GstAudioDecoder, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); + pub fn gst_audio_decoder_get_audio_info(dec: *mut GstAudioDecoder) -> *mut GstAudioInfo; + pub fn gst_audio_decoder_get_delay(dec: *mut GstAudioDecoder) -> c_int; + pub fn gst_audio_decoder_get_drainable(dec: *mut GstAudioDecoder) -> gboolean; + pub fn gst_audio_decoder_get_estimate_rate(dec: *mut GstAudioDecoder) -> c_int; + pub fn gst_audio_decoder_get_latency( + dec: *mut GstAudioDecoder, + min: *mut gst::GstClockTime, + max: *mut gst::GstClockTime, + ); + pub fn gst_audio_decoder_get_max_errors(dec: *mut GstAudioDecoder) -> c_int; + pub fn gst_audio_decoder_get_min_latency(dec: *mut GstAudioDecoder) -> gst::GstClockTime; + pub fn gst_audio_decoder_get_needs_format(dec: *mut GstAudioDecoder) -> gboolean; + pub fn gst_audio_decoder_get_parse_state( + dec: *mut GstAudioDecoder, + sync: *mut gboolean, + eos: *mut gboolean, + ); + pub fn gst_audio_decoder_get_plc(dec: *mut GstAudioDecoder) -> gboolean; + pub fn gst_audio_decoder_get_plc_aware(dec: *mut GstAudioDecoder) -> c_int; + pub fn gst_audio_decoder_get_tolerance(dec: *mut GstAudioDecoder) -> gst::GstClockTime; + pub fn gst_audio_decoder_merge_tags( + dec: *mut GstAudioDecoder, + tags: *const gst::GstTagList, + mode: gst::GstTagMergeMode, + ); + pub fn gst_audio_decoder_negotiate(dec: *mut GstAudioDecoder) -> gboolean; + pub fn gst_audio_decoder_proxy_getcaps( + decoder: *mut GstAudioDecoder, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_decoder_set_allocation_caps( + dec: *mut GstAudioDecoder, + allocation_caps: *mut gst::GstCaps, + ); + pub fn gst_audio_decoder_set_drainable(dec: *mut GstAudioDecoder, enabled: gboolean); + pub fn gst_audio_decoder_set_estimate_rate(dec: *mut GstAudioDecoder, enabled: gboolean); + pub fn gst_audio_decoder_set_latency( + dec: *mut GstAudioDecoder, + min: gst::GstClockTime, + max: gst::GstClockTime, + ); + pub fn gst_audio_decoder_set_max_errors(dec: *mut GstAudioDecoder, num: c_int); + pub fn gst_audio_decoder_set_min_latency(dec: *mut GstAudioDecoder, num: gst::GstClockTime); + pub fn gst_audio_decoder_set_needs_format(dec: *mut GstAudioDecoder, enabled: gboolean); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_audio_decoder_set_output_caps( + dec: *mut GstAudioDecoder, + caps: *mut gst::GstCaps, + ) -> gboolean; + pub fn gst_audio_decoder_set_output_format( + dec: *mut GstAudioDecoder, + info: *const GstAudioInfo, + ) -> gboolean; + pub fn gst_audio_decoder_set_plc(dec: *mut GstAudioDecoder, enabled: gboolean); + pub fn gst_audio_decoder_set_plc_aware(dec: *mut GstAudioDecoder, plc: gboolean); + pub fn gst_audio_decoder_set_tolerance(dec: *mut GstAudioDecoder, tolerance: gst::GstClockTime); + pub fn gst_audio_decoder_set_use_default_pad_acceptcaps( + decoder: *mut GstAudioDecoder, + use_: gboolean, + ); + + //========================================================================= + // GstAudioEncoder + //========================================================================= + pub fn gst_audio_encoder_get_type() -> GType; + pub fn gst_audio_encoder_allocate_output_buffer( + enc: *mut GstAudioEncoder, + size: size_t, + ) -> *mut gst::GstBuffer; + pub fn gst_audio_encoder_finish_frame( + enc: *mut GstAudioEncoder, + buffer: *mut gst::GstBuffer, + samples: c_int, + ) -> gst::GstFlowReturn; + pub fn gst_audio_encoder_get_allocator( + enc: *mut GstAudioEncoder, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); + pub fn gst_audio_encoder_get_audio_info(enc: *mut GstAudioEncoder) -> *mut GstAudioInfo; + pub fn gst_audio_encoder_get_drainable(enc: *mut GstAudioEncoder) -> gboolean; + pub fn gst_audio_encoder_get_frame_max(enc: *mut GstAudioEncoder) -> c_int; + pub fn gst_audio_encoder_get_frame_samples_max(enc: *mut GstAudioEncoder) -> c_int; + pub fn gst_audio_encoder_get_frame_samples_min(enc: *mut GstAudioEncoder) -> c_int; + pub fn gst_audio_encoder_get_hard_min(enc: *mut GstAudioEncoder) -> gboolean; + pub fn gst_audio_encoder_get_hard_resync(enc: *mut GstAudioEncoder) -> gboolean; + pub fn gst_audio_encoder_get_latency( + enc: *mut GstAudioEncoder, + min: *mut gst::GstClockTime, + max: *mut gst::GstClockTime, + ); + pub fn gst_audio_encoder_get_lookahead(enc: *mut GstAudioEncoder) -> c_int; + pub fn gst_audio_encoder_get_mark_granule(enc: *mut GstAudioEncoder) -> gboolean; + pub fn gst_audio_encoder_get_perfect_timestamp(enc: *mut GstAudioEncoder) -> gboolean; + pub fn gst_audio_encoder_get_tolerance(enc: *mut GstAudioEncoder) -> gst::GstClockTime; + pub fn gst_audio_encoder_merge_tags( + enc: *mut GstAudioEncoder, + tags: *const gst::GstTagList, + mode: gst::GstTagMergeMode, + ); + pub fn gst_audio_encoder_negotiate(enc: *mut GstAudioEncoder) -> gboolean; + pub fn gst_audio_encoder_proxy_getcaps( + enc: *mut GstAudioEncoder, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_encoder_set_allocation_caps( + enc: *mut GstAudioEncoder, + allocation_caps: *mut gst::GstCaps, + ); + pub fn gst_audio_encoder_set_drainable(enc: *mut GstAudioEncoder, enabled: gboolean); + pub fn gst_audio_encoder_set_frame_max(enc: *mut GstAudioEncoder, num: c_int); + pub fn gst_audio_encoder_set_frame_samples_max(enc: *mut GstAudioEncoder, num: c_int); + pub fn gst_audio_encoder_set_frame_samples_min(enc: *mut GstAudioEncoder, num: c_int); + pub fn gst_audio_encoder_set_hard_min(enc: *mut GstAudioEncoder, enabled: gboolean); + pub fn gst_audio_encoder_set_hard_resync(enc: *mut GstAudioEncoder, enabled: gboolean); + pub fn gst_audio_encoder_set_headers(enc: *mut GstAudioEncoder, headers: *mut glib::GList); + pub fn gst_audio_encoder_set_latency( + enc: *mut GstAudioEncoder, + min: gst::GstClockTime, + max: gst::GstClockTime, + ); + pub fn gst_audio_encoder_set_lookahead(enc: *mut GstAudioEncoder, num: c_int); + pub fn gst_audio_encoder_set_mark_granule(enc: *mut GstAudioEncoder, enabled: gboolean); + pub fn gst_audio_encoder_set_output_format( + enc: *mut GstAudioEncoder, + caps: *mut gst::GstCaps, + ) -> gboolean; + pub fn gst_audio_encoder_set_perfect_timestamp(enc: *mut GstAudioEncoder, enabled: gboolean); + pub fn gst_audio_encoder_set_tolerance(enc: *mut GstAudioEncoder, tolerance: gst::GstClockTime); + + //========================================================================= + // GstAudioFilter + //========================================================================= + pub fn gst_audio_filter_get_type() -> GType; + + //========================================================================= + // GstAudioRingBuffer + //========================================================================= + pub fn gst_audio_ring_buffer_get_type() -> GType; + pub fn gst_audio_ring_buffer_debug_spec_buff(spec: *mut GstAudioRingBufferSpec); + pub fn gst_audio_ring_buffer_debug_spec_caps(spec: *mut GstAudioRingBufferSpec); + pub fn gst_audio_ring_buffer_parse_caps( + spec: *mut GstAudioRingBufferSpec, + caps: *mut gst::GstCaps, + ) -> gboolean; + pub fn gst_audio_ring_buffer_acquire( + buf: *mut GstAudioRingBuffer, + spec: *mut GstAudioRingBufferSpec, + ) -> gboolean; + pub fn gst_audio_ring_buffer_activate( + buf: *mut GstAudioRingBuffer, + active: gboolean, + ) -> gboolean; + pub fn gst_audio_ring_buffer_advance(buf: *mut GstAudioRingBuffer, advance: c_uint); + pub fn gst_audio_ring_buffer_clear(buf: *mut GstAudioRingBuffer, segment: c_int); + pub fn gst_audio_ring_buffer_clear_all(buf: *mut GstAudioRingBuffer); + pub fn gst_audio_ring_buffer_close_device(buf: *mut GstAudioRingBuffer) -> gboolean; + pub fn gst_audio_ring_buffer_commit( + buf: *mut GstAudioRingBuffer, + sample: *mut u64, + data: *mut u8, + in_samples: c_int, + out_samples: c_int, + accum: *mut c_int, + ) -> c_uint; + pub fn gst_audio_ring_buffer_convert( + buf: *mut GstAudioRingBuffer, + src_fmt: gst::GstFormat, + src_val: i64, + dest_fmt: gst::GstFormat, + dest_val: *mut i64, + ) -> gboolean; + pub fn gst_audio_ring_buffer_delay(buf: *mut GstAudioRingBuffer) -> c_uint; + pub fn gst_audio_ring_buffer_device_is_open(buf: *mut GstAudioRingBuffer) -> gboolean; + pub fn gst_audio_ring_buffer_is_acquired(buf: *mut GstAudioRingBuffer) -> gboolean; + pub fn gst_audio_ring_buffer_is_active(buf: *mut GstAudioRingBuffer) -> gboolean; + pub fn gst_audio_ring_buffer_is_flushing(buf: *mut GstAudioRingBuffer) -> gboolean; + pub fn gst_audio_ring_buffer_may_start(buf: *mut GstAudioRingBuffer, allowed: gboolean); + pub fn gst_audio_ring_buffer_open_device(buf: *mut GstAudioRingBuffer) -> gboolean; + pub fn gst_audio_ring_buffer_pause(buf: *mut GstAudioRingBuffer) -> gboolean; + pub fn gst_audio_ring_buffer_prepare_read( + buf: *mut GstAudioRingBuffer, + segment: *mut c_int, + readptr: *mut *mut u8, + len: *mut c_int, + ) -> gboolean; + pub fn gst_audio_ring_buffer_read( + buf: *mut GstAudioRingBuffer, + sample: u64, + data: *mut u8, + len: c_uint, + timestamp: *mut gst::GstClockTime, + ) -> c_uint; + pub fn gst_audio_ring_buffer_release(buf: *mut GstAudioRingBuffer) -> gboolean; + pub fn gst_audio_ring_buffer_samples_done(buf: *mut GstAudioRingBuffer) -> u64; + pub fn gst_audio_ring_buffer_set_callback( + buf: *mut GstAudioRingBuffer, + cb: GstAudioRingBufferCallback, + user_data: gpointer, + ); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_audio_ring_buffer_set_callback_full( + buf: *mut GstAudioRingBuffer, + cb: GstAudioRingBufferCallback, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_audio_ring_buffer_set_channel_positions( + buf: *mut GstAudioRingBuffer, + position: *const GstAudioChannelPosition, + ); + pub fn gst_audio_ring_buffer_set_flushing(buf: *mut GstAudioRingBuffer, flushing: gboolean); + pub fn gst_audio_ring_buffer_set_sample(buf: *mut GstAudioRingBuffer, sample: u64); + pub fn gst_audio_ring_buffer_set_timestamp( + buf: *mut GstAudioRingBuffer, + readseg: c_int, + timestamp: gst::GstClockTime, + ); + pub fn gst_audio_ring_buffer_start(buf: *mut GstAudioRingBuffer) -> gboolean; + pub fn gst_audio_ring_buffer_stop(buf: *mut GstAudioRingBuffer) -> gboolean; + + //========================================================================= + // GstAudioSink + //========================================================================= + pub fn gst_audio_sink_get_type() -> GType; + + //========================================================================= + // GstAudioSrc + //========================================================================= + pub fn gst_audio_src_get_type() -> GType; + + //========================================================================= + // GstStreamVolume + //========================================================================= + pub fn gst_stream_volume_get_type() -> GType; + pub fn gst_stream_volume_convert_volume( + from: GstStreamVolumeFormat, + to: GstStreamVolumeFormat, + val: c_double, + ) -> c_double; + pub fn gst_stream_volume_get_mute(volume: *mut GstStreamVolume) -> gboolean; + pub fn gst_stream_volume_get_volume( + volume: *mut GstStreamVolume, + format: GstStreamVolumeFormat, + ) -> c_double; + pub fn gst_stream_volume_set_mute(volume: *mut GstStreamVolume, mute: gboolean); + pub fn gst_stream_volume_set_volume( + volume: *mut GstStreamVolume, + format: GstStreamVolumeFormat, + val: c_double, + ); + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_audio_channel_get_fallback_mask(channels: c_int) -> u64; + pub fn gst_audio_channel_positions_from_mask( + channels: c_int, + channel_mask: u64, + position: *mut GstAudioChannelPosition, + ) -> gboolean; + pub fn gst_audio_channel_positions_to_mask( + position: *const GstAudioChannelPosition, + channels: c_int, + force_order: gboolean, + channel_mask: *mut u64, + ) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_audio_channel_positions_to_string( + position: *const GstAudioChannelPosition, + channels: c_int, + ) -> *mut c_char; + pub fn gst_audio_channel_positions_to_valid_order( + position: *mut GstAudioChannelPosition, + channels: c_int, + ) -> gboolean; + pub fn gst_audio_check_valid_channel_positions( + position: *const GstAudioChannelPosition, + channels: c_int, + force_order: gboolean, + ) -> gboolean; + pub fn gst_audio_clipping_meta_api_get_type() -> GType; + pub fn gst_audio_downmix_meta_api_get_type() -> GType; + pub fn gst_audio_format_info_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_audio_formats_raw(len: *mut c_uint) -> *const GstAudioFormat; + pub fn gst_audio_get_channel_reorder_map( + channels: c_int, + from: *const GstAudioChannelPosition, + to: *const GstAudioChannelPosition, + reorder_map: *mut c_int, + ) -> gboolean; + pub fn gst_audio_iec61937_frame_size(spec: *const GstAudioRingBufferSpec) -> c_uint; + pub fn gst_audio_iec61937_payload( + src: *const u8, + src_n: c_uint, + dst: *mut u8, + dst_n: c_uint, + spec: *const GstAudioRingBufferSpec, + endianness: c_int, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_audio_make_raw_caps( + formats: *const GstAudioFormat, + len: c_uint, + layout: GstAudioLayout, + ) -> *mut gst::GstCaps; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_audio_meta_api_get_type() -> GType; + pub fn gst_audio_reorder_channels( + data: gpointer, + size: size_t, + format: GstAudioFormat, + channels: c_int, + from: *const GstAudioChannelPosition, + to: *const GstAudioChannelPosition, + ) -> gboolean; + pub fn gst_buffer_add_audio_clipping_meta( + buffer: *mut gst::GstBuffer, + format: gst::GstFormat, + start: u64, + end: u64, + ) -> *mut GstAudioClippingMeta; + pub fn gst_buffer_add_audio_downmix_meta( + buffer: *mut gst::GstBuffer, + from_position: *const GstAudioChannelPosition, + from_channels: c_int, + to_position: *const GstAudioChannelPosition, + to_channels: c_int, + matrix: *mut *const c_float, + ) -> *mut GstAudioDownmixMeta; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_buffer_add_audio_meta( + buffer: *mut gst::GstBuffer, + info: *const GstAudioInfo, + samples: size_t, + offsets: *mut size_t, + ) -> *mut GstAudioMeta; + pub fn gst_buffer_get_audio_downmix_meta_for_channels( + buffer: *mut gst::GstBuffer, + to_position: *const GstAudioChannelPosition, + to_channels: c_int, + ) -> *mut GstAudioDownmixMeta; + +} diff --git a/sys/gstreamer-audio-sys/tests/abi.rs b/sys/gstreamer-audio-sys/tests/abi.rs new file mode 100644 index 000000000..2eb0d5bfe --- /dev/null +++ b/sys/gstreamer-audio-sys/tests/abi.rs @@ -0,0 +1,931 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_audio_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_audio_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-audio-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstAudioAggregator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioAggregatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioAggregatorConvertPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioAggregatorConvertPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioAggregatorPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioAggregatorPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSink", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSinkClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSinkDiscontReason", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSinkSlaveMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBaseSrcSlaveMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioBuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioCdSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioCdSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioCdSrcMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioCdSrcTrack", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioChannelMixerFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioChannelPosition", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioClippingMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioConverterFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioDecoder", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioDecoderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioDitherMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioDownmixMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioEncoder", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioEncoderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFilter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFilterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFormatFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioFormatInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioLayout", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioNoiseShapingMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioPackFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioQuantizeFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioResamplerFilterInterpolation", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioResamplerFilterMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioResamplerFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioResamplerMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioRingBuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioRingBufferClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioRingBufferFormatType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioRingBufferSpec", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioRingBufferState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioSink", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioSinkClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioSinkClassExtension", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamVolumeFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamVolumeInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_ALIGNMENT", "4"), + ( + "(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_DEVICE_FAILURE", + "5", + ), + ("(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_FLUSH", "2"), + ("(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_NEW_CAPS", "1"), + ("(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_NO_DISCONT", "0"), + ( + "(gint) GST_AUDIO_BASE_SINK_DISCONT_REASON_SYNC_LATENCY", + "3", + ), + ("(gint) GST_AUDIO_BASE_SINK_SLAVE_CUSTOM", "3"), + ("(gint) GST_AUDIO_BASE_SINK_SLAVE_NONE", "2"), + ("(gint) GST_AUDIO_BASE_SINK_SLAVE_RESAMPLE", "0"), + ("(gint) GST_AUDIO_BASE_SINK_SLAVE_SKEW", "1"), + ("(gint) GST_AUDIO_BASE_SRC_SLAVE_NONE", "3"), + ("(gint) GST_AUDIO_BASE_SRC_SLAVE_RESAMPLE", "0"), + ("(gint) GST_AUDIO_BASE_SRC_SLAVE_RE_TIMESTAMP", "1"), + ("(gint) GST_AUDIO_BASE_SRC_SLAVE_SKEW", "2"), + ("(gint) GST_AUDIO_CD_SRC_MODE_CONTINUOUS", "1"), + ("(gint) GST_AUDIO_CD_SRC_MODE_NORMAL", "0"), + ("GST_AUDIO_CHANNELS_RANGE", "(int) [ 1, max ]"), + ("(guint) GST_AUDIO_CHANNEL_MIXER_FLAGS_NONE", "0"), + ( + "(guint) GST_AUDIO_CHANNEL_MIXER_FLAGS_NON_INTERLEAVED_IN", + "1", + ), + ( + "(guint) GST_AUDIO_CHANNEL_MIXER_FLAGS_NON_INTERLEAVED_OUT", + "2", + ), + ("(guint) GST_AUDIO_CHANNEL_MIXER_FLAGS_UNPOSITIONED_IN", "4"), + ( + "(guint) GST_AUDIO_CHANNEL_MIXER_FLAGS_UNPOSITIONED_OUT", + "8", + ), + ( + "(gint) GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_CENTER", + "21", + ), + ("(gint) GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_LEFT", "22"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT", "23"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER", "2"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT", "0"), + ( + "(gint) GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER", + "6", + ), + ("(gint) GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT", "1"), + ( + "(gint) GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER", + "7", + ), + ("(gint) GST_AUDIO_CHANNEL_POSITION_INVALID", "-1"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_LFE1", "3"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_LFE2", "9"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_MONO", "-2"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_NONE", "-3"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_REAR_CENTER", "8"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_REAR_LEFT", "4"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT", "5"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT", "10"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT", "11"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT", "26"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT", "27"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_CENTER", "15"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER", "14"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT", "12"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT", "13"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER", "20"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT", "16"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT", "17"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_LEFT", "18"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_RIGHT", "19"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT", "24"), + ("(gint) GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT", "25"), + ("(guint) GST_AUDIO_CONVERTER_FLAG_IN_WRITABLE", "1"), + ("(guint) GST_AUDIO_CONVERTER_FLAG_NONE", "0"), + ("(guint) GST_AUDIO_CONVERTER_FLAG_VARIABLE_RATE", "2"), + ( + "GST_AUDIO_CONVERTER_OPT_DITHER_METHOD", + "GstAudioConverter.dither-method", + ), + ( + "GST_AUDIO_CONVERTER_OPT_MIX_MATRIX", + "GstAudioConverter.mix-matrix", + ), + ( + "GST_AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD", + "GstAudioConverter.noise-shaping-method", + ), + ( + "GST_AUDIO_CONVERTER_OPT_QUANTIZATION", + "GstAudioConverter.quantization", + ), + ( + "GST_AUDIO_CONVERTER_OPT_RESAMPLER_METHOD", + "GstAudioConverter.resampler-method", + ), + ("GST_AUDIO_DECODER_MAX_ERRORS", "10"), + ("GST_AUDIO_DECODER_SINK_NAME", "sink"), + ("GST_AUDIO_DECODER_SRC_NAME", "src"), + ("GST_AUDIO_DEF_CHANNELS", "2"), + ("GST_AUDIO_DEF_FORMAT", "S16LE"), + ("GST_AUDIO_DEF_RATE", "44100"), + ("(gint) GST_AUDIO_DITHER_NONE", "0"), + ("(gint) GST_AUDIO_DITHER_RPDF", "1"), + ("(gint) GST_AUDIO_DITHER_TPDF", "2"), + ("(gint) GST_AUDIO_DITHER_TPDF_HF", "3"), + ("GST_AUDIO_ENCODER_SINK_NAME", "sink"), + ("GST_AUDIO_ENCODER_SRC_NAME", "src"), + ("(guint) GST_AUDIO_FLAG_NONE", "0"), + ("(guint) GST_AUDIO_FLAG_UNPOSITIONED", "1"), + ("(gint) GST_AUDIO_FORMAT_ENCODED", "1"), + ("(gint) GST_AUDIO_FORMAT_F32", "28"), + ("(gint) GST_AUDIO_FORMAT_F32BE", "29"), + ("(gint) GST_AUDIO_FORMAT_F32LE", "28"), + ("(gint) GST_AUDIO_FORMAT_F64", "30"), + ("(gint) GST_AUDIO_FORMAT_F64BE", "31"), + ("(gint) GST_AUDIO_FORMAT_F64LE", "30"), + ("(guint) GST_AUDIO_FORMAT_FLAG_COMPLEX", "16"), + ("(guint) GST_AUDIO_FORMAT_FLAG_FLOAT", "2"), + ("(guint) GST_AUDIO_FORMAT_FLAG_INTEGER", "1"), + ("(guint) GST_AUDIO_FORMAT_FLAG_SIGNED", "4"), + ("(guint) GST_AUDIO_FORMAT_FLAG_UNPACK", "32"), + ("(gint) GST_AUDIO_FORMAT_S16", "4"), + ("(gint) GST_AUDIO_FORMAT_S16BE", "5"), + ("(gint) GST_AUDIO_FORMAT_S16LE", "4"), + ("(gint) GST_AUDIO_FORMAT_S18", "24"), + ("(gint) GST_AUDIO_FORMAT_S18BE", "25"), + ("(gint) GST_AUDIO_FORMAT_S18LE", "24"), + ("(gint) GST_AUDIO_FORMAT_S20", "20"), + ("(gint) GST_AUDIO_FORMAT_S20BE", "21"), + ("(gint) GST_AUDIO_FORMAT_S20LE", "20"), + ("(gint) GST_AUDIO_FORMAT_S24", "16"), + ("(gint) GST_AUDIO_FORMAT_S24BE", "17"), + ("(gint) GST_AUDIO_FORMAT_S24LE", "16"), + ("(gint) GST_AUDIO_FORMAT_S24_32", "8"), + ("(gint) GST_AUDIO_FORMAT_S24_32BE", "9"), + ("(gint) GST_AUDIO_FORMAT_S24_32LE", "8"), + ("(gint) GST_AUDIO_FORMAT_S32", "12"), + ("(gint) GST_AUDIO_FORMAT_S32BE", "13"), + ("(gint) GST_AUDIO_FORMAT_S32LE", "12"), + ("(gint) GST_AUDIO_FORMAT_S8", "2"), + ("(gint) GST_AUDIO_FORMAT_U16", "6"), + ("(gint) GST_AUDIO_FORMAT_U16BE", "7"), + ("(gint) GST_AUDIO_FORMAT_U16LE", "6"), + ("(gint) GST_AUDIO_FORMAT_U18", "26"), + ("(gint) GST_AUDIO_FORMAT_U18BE", "27"), + ("(gint) GST_AUDIO_FORMAT_U18LE", "26"), + ("(gint) GST_AUDIO_FORMAT_U20", "22"), + ("(gint) GST_AUDIO_FORMAT_U20BE", "23"), + ("(gint) GST_AUDIO_FORMAT_U20LE", "22"), + ("(gint) GST_AUDIO_FORMAT_U24", "18"), + ("(gint) GST_AUDIO_FORMAT_U24BE", "19"), + ("(gint) GST_AUDIO_FORMAT_U24LE", "18"), + ("(gint) GST_AUDIO_FORMAT_U24_32", "10"), + ("(gint) GST_AUDIO_FORMAT_U24_32BE", "11"), + ("(gint) GST_AUDIO_FORMAT_U24_32LE", "10"), + ("(gint) GST_AUDIO_FORMAT_U32", "14"), + ("(gint) GST_AUDIO_FORMAT_U32BE", "15"), + ("(gint) GST_AUDIO_FORMAT_U32LE", "14"), + ("(gint) GST_AUDIO_FORMAT_U8", "3"), + ("(gint) GST_AUDIO_FORMAT_UNKNOWN", "0"), + ("(gint) GST_AUDIO_LAYOUT_INTERLEAVED", "0"), + ("(gint) GST_AUDIO_LAYOUT_NON_INTERLEAVED", "1"), + ("(gint) GST_AUDIO_NOISE_SHAPING_ERROR_FEEDBACK", "1"), + ("(gint) GST_AUDIO_NOISE_SHAPING_HIGH", "4"), + ("(gint) GST_AUDIO_NOISE_SHAPING_MEDIUM", "3"), + ("(gint) GST_AUDIO_NOISE_SHAPING_NONE", "0"), + ("(gint) GST_AUDIO_NOISE_SHAPING_SIMPLE", "2"), + ("(guint) GST_AUDIO_PACK_FLAG_NONE", "0"), + ("(guint) GST_AUDIO_PACK_FLAG_TRUNCATE_RANGE", "1"), + ("(guint) GST_AUDIO_QUANTIZE_FLAG_NONE", "0"), + ("(guint) GST_AUDIO_QUANTIZE_FLAG_NON_INTERLEAVED", "1"), + ("GST_AUDIO_RATE_RANGE", "(int) [ 1, max ]"), + ("(gint) GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_CUBIC", "2"), + ( + "(gint) GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_LINEAR", + "1", + ), + ("(gint) GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_NONE", "0"), + ("(gint) GST_AUDIO_RESAMPLER_FILTER_MODE_AUTO", "2"), + ("(gint) GST_AUDIO_RESAMPLER_FILTER_MODE_FULL", "1"), + ("(gint) GST_AUDIO_RESAMPLER_FILTER_MODE_INTERPOLATED", "0"), + ("(guint) GST_AUDIO_RESAMPLER_FLAG_NONE", "0"), + ("(guint) GST_AUDIO_RESAMPLER_FLAG_NON_INTERLEAVED_IN", "1"), + ("(guint) GST_AUDIO_RESAMPLER_FLAG_NON_INTERLEAVED_OUT", "2"), + ("(guint) GST_AUDIO_RESAMPLER_FLAG_VARIABLE_RATE", "4"), + ("(gint) GST_AUDIO_RESAMPLER_METHOD_BLACKMAN_NUTTALL", "3"), + ("(gint) GST_AUDIO_RESAMPLER_METHOD_CUBIC", "2"), + ("(gint) GST_AUDIO_RESAMPLER_METHOD_KAISER", "4"), + ("(gint) GST_AUDIO_RESAMPLER_METHOD_LINEAR", "1"), + ("(gint) GST_AUDIO_RESAMPLER_METHOD_NEAREST", "0"), + ( + "GST_AUDIO_RESAMPLER_OPT_CUBIC_B", + "GstAudioResampler.cubic-b", + ), + ( + "GST_AUDIO_RESAMPLER_OPT_CUBIC_C", + "GstAudioResampler.cubic-c", + ), + ("GST_AUDIO_RESAMPLER_OPT_CUTOFF", "GstAudioResampler.cutoff"), + ( + "GST_AUDIO_RESAMPLER_OPT_FILTER_INTERPOLATION", + "GstAudioResampler.filter-interpolation", + ), + ( + "GST_AUDIO_RESAMPLER_OPT_FILTER_MODE", + "GstAudioResampler.filter-mode", + ), + ( + "GST_AUDIO_RESAMPLER_OPT_FILTER_MODE_THRESHOLD", + "GstAudioResampler.filter-mode-threshold", + ), + ( + "GST_AUDIO_RESAMPLER_OPT_FILTER_OVERSAMPLE", + "GstAudioResampler.filter-oversample", + ), + ( + "GST_AUDIO_RESAMPLER_OPT_MAX_PHASE_ERROR", + "GstAudioResampler.max-phase-error", + ), + ("GST_AUDIO_RESAMPLER_OPT_N_TAPS", "GstAudioResampler.n-taps"), + ( + "GST_AUDIO_RESAMPLER_OPT_STOP_ATTENUATION", + "GstAudioResampler.stop-attenutation", + ), + ( + "GST_AUDIO_RESAMPLER_OPT_TRANSITION_BANDWIDTH", + "GstAudioResampler.transition-bandwidth", + ), + ("GST_AUDIO_RESAMPLER_QUALITY_DEFAULT", "4"), + ("GST_AUDIO_RESAMPLER_QUALITY_MAX", "10"), + ("GST_AUDIO_RESAMPLER_QUALITY_MIN", "0"), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_AC3", "7"), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_A_LAW", "2"), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS", "9"), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_EAC3", "8"), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_FLAC", "14"), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_GSM", "5"), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IEC958", "6"), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_IMA_ADPCM", "3"), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG", "4"), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC", "10"), + ( + "(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC_RAW", + "12", + ), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC", "11"), + ( + "(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC_RAW", + "13", + ), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MU_LAW", "1"), + ("(gint) GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW", "0"), + ("(gint) GST_AUDIO_RING_BUFFER_STATE_ERROR", "3"), + ("(gint) GST_AUDIO_RING_BUFFER_STATE_PAUSED", "1"), + ("(gint) GST_AUDIO_RING_BUFFER_STATE_STARTED", "2"), + ("(gint) GST_AUDIO_RING_BUFFER_STATE_STOPPED", "0"), + ("GST_META_TAG_AUDIO_CHANNELS_STR", "channels"), + ("GST_META_TAG_AUDIO_RATE_STR", "rate"), + ("GST_META_TAG_AUDIO_STR", "audio"), + ("(gint) GST_STREAM_VOLUME_FORMAT_CUBIC", "1"), + ("(gint) GST_STREAM_VOLUME_FORMAT_DB", "2"), + ("(gint) GST_STREAM_VOLUME_FORMAT_LINEAR", "0"), +]; diff --git a/sys/gstreamer-audio-sys/tests/constant.c b/sys/gstreamer-audio-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-audio-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-audio-sys/tests/layout.c b/sys/gstreamer-audio-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-audio-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-audio-sys/tests/manual.h b/sys/gstreamer-audio-sys/tests/manual.h new file mode 100644 index 000000000..6e81b7dfd --- /dev/null +++ b/sys/gstreamer-audio-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-base-sys/CHANGELOG.md b/sys/gstreamer-base-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-base-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-base-sys/Cargo.toml b/sys/gstreamer-base-sys/Cargo.toml new file mode 100644 index 000000000..7c23fe31d --- /dev/null +++ b/sys/gstreamer-base-sys/Cargo.toml @@ -0,0 +1,66 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_0_1 = [] +v1_2 = [] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_12_1 = ["v1_12"] +v1_14 = ["v1_12_1"] +v1_14_1 = ["v1_14"] +v1_14_3 = ["v1_14_1"] +v1_16 = ["v1_14_3"] +v1_18 = ["v1_16"] +dox = [] + +[lib] +name = "gstreamer_base_sys" + +[package] +authors = ["Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstbase-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_base_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstbase-1.0" +name = "gstreamer-base-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_base_1_0] +name = "gstreamer-base-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_base_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_12_1 = "1.12.1" +v1_14 = "1.14" +v1_14_1 = "1.14.1" +v1_14_3 = "1.14.3" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-base-sys/LICENSE b/sys/gstreamer-base-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-base-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-base-sys/README.md b/sys/gstreamer-base-sys/README.md new file mode 100644 index 000000000..6fc32ca7b --- /dev/null +++ b/sys/gstreamer-base-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-base-sys.svg)](https://crates.io/crates/gstreamer-base-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Base library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-base-sys/build.rs b/sys/gstreamer-base-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-base-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-base-sys/src/lib.rs b/sys/gstreamer-base-sys/src/lib.rs new file mode 100644 index 000000000..3f3f4486f --- /dev/null +++ b/sys/gstreamer-base-sys/src/lib.rs @@ -0,0 +1,2223 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstAggregatorStartTimeSelection = c_int; +pub const GST_AGGREGATOR_START_TIME_SELECTION_ZERO: GstAggregatorStartTimeSelection = 0; +pub const GST_AGGREGATOR_START_TIME_SELECTION_FIRST: GstAggregatorStartTimeSelection = 1; +pub const GST_AGGREGATOR_START_TIME_SELECTION_SET: GstAggregatorStartTimeSelection = 2; + +// Constants +pub const GST_BASE_PARSE_FLAG_DRAINING: c_int = 2; +pub const GST_BASE_PARSE_FLAG_LOST_SYNC: c_int = 1; +pub const GST_BASE_TRANSFORM_SINK_NAME: *const c_char = b"sink\0" as *const u8 as *const c_char; +pub const GST_BASE_TRANSFORM_SRC_NAME: *const c_char = b"src\0" as *const u8 as *const c_char; + +// Flags +pub type GstBaseParseFrameFlags = c_uint; +pub const GST_BASE_PARSE_FRAME_FLAG_NONE: GstBaseParseFrameFlags = 0; +pub const GST_BASE_PARSE_FRAME_FLAG_NEW_FRAME: GstBaseParseFrameFlags = 1; +pub const GST_BASE_PARSE_FRAME_FLAG_NO_FRAME: GstBaseParseFrameFlags = 2; +pub const GST_BASE_PARSE_FRAME_FLAG_CLIP: GstBaseParseFrameFlags = 4; +pub const GST_BASE_PARSE_FRAME_FLAG_DROP: GstBaseParseFrameFlags = 8; +pub const GST_BASE_PARSE_FRAME_FLAG_QUEUE: GstBaseParseFrameFlags = 16; + +pub type GstBaseSrcFlags = c_uint; +pub const GST_BASE_SRC_FLAG_STARTING: GstBaseSrcFlags = 16384; +pub const GST_BASE_SRC_FLAG_STARTED: GstBaseSrcFlags = 32768; +pub const GST_BASE_SRC_FLAG_LAST: GstBaseSrcFlags = 1048576; + +pub type GstCollectPadsStateFlags = c_uint; +pub const GST_COLLECT_PADS_STATE_EOS: GstCollectPadsStateFlags = 1; +pub const GST_COLLECT_PADS_STATE_FLUSHING: GstCollectPadsStateFlags = 2; +pub const GST_COLLECT_PADS_STATE_NEW_SEGMENT: GstCollectPadsStateFlags = 4; +pub const GST_COLLECT_PADS_STATE_WAITING: GstCollectPadsStateFlags = 8; +pub const GST_COLLECT_PADS_STATE_LOCKED: GstCollectPadsStateFlags = 16; + +// Unions +#[repr(C)] +#[derive(Copy, Clone)] +pub union GstCollectData_ABI { + pub abi: GstCollectData_ABI_abi, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstCollectData_ABI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstCollectData_ABI @ {:?}", self as *const _)) + .field("abi", unsafe { &self.abi }) + .finish() + } +} + +// Callbacks +pub type GstCollectDataDestroyNotify = Option; +pub type GstCollectPadsBufferFunction = Option< + unsafe extern "C" fn( + *mut GstCollectPads, + *mut GstCollectData, + *mut gst::GstBuffer, + gpointer, + ) -> gst::GstFlowReturn, +>; +pub type GstCollectPadsClipFunction = Option< + unsafe extern "C" fn( + *mut GstCollectPads, + *mut GstCollectData, + *mut gst::GstBuffer, + *mut *mut gst::GstBuffer, + gpointer, + ) -> gst::GstFlowReturn, +>; +pub type GstCollectPadsCompareFunction = Option< + unsafe extern "C" fn( + *mut GstCollectPads, + *mut GstCollectData, + gst::GstClockTime, + *mut GstCollectData, + gst::GstClockTime, + gpointer, + ) -> c_int, +>; +pub type GstCollectPadsEventFunction = Option< + unsafe extern "C" fn( + *mut GstCollectPads, + *mut GstCollectData, + *mut gst::GstEvent, + gpointer, + ) -> gboolean, +>; +pub type GstCollectPadsFlushFunction = Option; +pub type GstCollectPadsFunction = + Option gst::GstFlowReturn>; +pub type GstCollectPadsQueryFunction = Option< + unsafe extern "C" fn( + *mut GstCollectPads, + *mut GstCollectData, + *mut gst::GstQuery, + gpointer, + ) -> gboolean, +>; +pub type GstDataQueueCheckFullFunction = + Option gboolean>; +pub type GstDataQueueEmptyCallback = Option; +pub type GstDataQueueFullCallback = Option; +pub type GstTypeFindHelperGetRangeFunction = Option< + unsafe extern "C" fn( + *mut gst::GstObject, + *mut gst::GstObject, + u64, + c_uint, + *mut *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, +>; + +// Records +#[repr(C)] +pub struct _GstAdapterClass(c_void); + +pub type GstAdapterClass = *mut _GstAdapterClass; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAggregatorClass { + pub parent_class: gst::GstElementClass, + pub flush: Option gst::GstFlowReturn>, + pub clip: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut GstAggregatorPad, + *mut gst::GstBuffer, + ) -> *mut gst::GstBuffer, + >, + pub finish_buffer: + Option gst::GstFlowReturn>, + pub sink_event: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut GstAggregatorPad, + *mut gst::GstEvent, + ) -> gboolean, + >, + pub sink_query: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut GstAggregatorPad, + *mut gst::GstQuery, + ) -> gboolean, + >, + pub src_event: Option gboolean>, + pub src_query: Option gboolean>, + pub src_activate: + Option gboolean>, + pub aggregate: Option gst::GstFlowReturn>, + pub stop: Option gboolean>, + pub start: Option gboolean>, + pub get_next_time: Option gst::GstClockTime>, + pub create_new_pad: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut gst::GstPadTemplate, + *const c_char, + *const gst::GstCaps, + ) -> *mut GstAggregatorPad, + >, + pub update_src_caps: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut gst::GstCaps, + *mut *mut gst::GstCaps, + ) -> gst::GstFlowReturn, + >, + pub fixate_src_caps: + Option *mut gst::GstCaps>, + pub negotiated_src_caps: + Option gboolean>, + pub decide_allocation: + Option gboolean>, + pub propose_allocation: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut GstAggregatorPad, + *mut gst::GstQuery, + *mut gst::GstQuery, + ) -> gboolean, + >, + pub negotiate: Option gboolean>, + pub sink_event_pre_queue: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut GstAggregatorPad, + *mut gst::GstEvent, + ) -> gst::GstFlowReturn, + >, + pub sink_query_pre_queue: Option< + unsafe extern "C" fn( + *mut GstAggregator, + *mut GstAggregatorPad, + *mut gst::GstQuery, + ) -> gboolean, + >, + pub finish_buffer_list: Option< + unsafe extern "C" fn(*mut GstAggregator, *mut gst::GstBufferList) -> gst::GstFlowReturn, + >, + pub peek_next_sample: Option< + unsafe extern "C" fn(*mut GstAggregator, *mut GstAggregatorPad) -> *mut gst::GstSample, + >, + pub _gst_reserved: [gpointer; 15], +} + +impl ::std::fmt::Debug for GstAggregatorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAggregatorClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("flush", &self.flush) + .field("clip", &self.clip) + .field("finish_buffer", &self.finish_buffer) + .field("sink_event", &self.sink_event) + .field("sink_query", &self.sink_query) + .field("src_event", &self.src_event) + .field("src_query", &self.src_query) + .field("src_activate", &self.src_activate) + .field("aggregate", &self.aggregate) + .field("stop", &self.stop) + .field("start", &self.start) + .field("get_next_time", &self.get_next_time) + .field("create_new_pad", &self.create_new_pad) + .field("update_src_caps", &self.update_src_caps) + .field("fixate_src_caps", &self.fixate_src_caps) + .field("negotiated_src_caps", &self.negotiated_src_caps) + .field("decide_allocation", &self.decide_allocation) + .field("propose_allocation", &self.propose_allocation) + .field("negotiate", &self.negotiate) + .field("sink_event_pre_queue", &self.sink_event_pre_queue) + .field("sink_query_pre_queue", &self.sink_query_pre_queue) + .field("finish_buffer_list", &self.finish_buffer_list) + .field("peek_next_sample", &self.peek_next_sample) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAggregatorPadClass { + pub parent_class: gst::GstPadClass, + pub flush: Option< + unsafe extern "C" fn(*mut GstAggregatorPad, *mut GstAggregator) -> gst::GstFlowReturn, + >, + pub skip_buffer: Option< + unsafe extern "C" fn( + *mut GstAggregatorPad, + *mut GstAggregator, + *mut gst::GstBuffer, + ) -> gboolean, + >, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstAggregatorPadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAggregatorPadClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("flush", &self.flush) + .field("skip_buffer", &self.skip_buffer) + .finish() + } +} + +#[repr(C)] +pub struct _GstAggregatorPadPrivate(c_void); + +pub type GstAggregatorPadPrivate = *mut _GstAggregatorPadPrivate; + +#[repr(C)] +pub struct _GstAggregatorPrivate(c_void); + +pub type GstAggregatorPrivate = *mut _GstAggregatorPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBaseParseClass { + pub parent_class: gst::GstElementClass, + pub start: Option gboolean>, + pub stop: Option gboolean>, + pub set_sink_caps: + Option gboolean>, + pub handle_frame: Option< + unsafe extern "C" fn( + *mut GstBaseParse, + *mut GstBaseParseFrame, + *mut c_int, + ) -> gst::GstFlowReturn, + >, + pub pre_push_frame: Option< + unsafe extern "C" fn(*mut GstBaseParse, *mut GstBaseParseFrame) -> gst::GstFlowReturn, + >, + pub convert: Option< + unsafe extern "C" fn( + *mut GstBaseParse, + gst::GstFormat, + i64, + gst::GstFormat, + *mut i64, + ) -> gboolean, + >, + pub sink_event: Option gboolean>, + pub src_event: Option gboolean>, + pub get_sink_caps: + Option *mut gst::GstCaps>, + pub detect: + Option gst::GstFlowReturn>, + pub sink_query: Option gboolean>, + pub src_query: Option gboolean>, + pub _gst_reserved: [gpointer; 18], +} + +impl ::std::fmt::Debug for GstBaseParseClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBaseParseClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("start", &self.start) + .field("stop", &self.stop) + .field("set_sink_caps", &self.set_sink_caps) + .field("handle_frame", &self.handle_frame) + .field("pre_push_frame", &self.pre_push_frame) + .field("convert", &self.convert) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("get_sink_caps", &self.get_sink_caps) + .field("detect", &self.detect) + .field("sink_query", &self.sink_query) + .field("src_query", &self.src_query) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBaseParseFrame { + pub buffer: *mut gst::GstBuffer, + pub out_buffer: *mut gst::GstBuffer, + pub flags: c_uint, + pub offset: u64, + pub overhead: c_int, + pub size: c_int, + pub _gst_reserved_i: [c_uint; 2], + pub _gst_reserved_p: [gpointer; 2], + pub _private_flags: c_uint, +} + +impl ::std::fmt::Debug for GstBaseParseFrame { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBaseParseFrame @ {:?}", self as *const _)) + .field("buffer", &self.buffer) + .field("out_buffer", &self.out_buffer) + .field("flags", &self.flags) + .field("offset", &self.offset) + .field("overhead", &self.overhead) + .finish() + } +} + +#[repr(C)] +pub struct _GstBaseParsePrivate(c_void); + +pub type GstBaseParsePrivate = *mut _GstBaseParsePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBaseSinkClass { + pub parent_class: gst::GstElementClass, + pub get_caps: + Option *mut gst::GstCaps>, + pub set_caps: Option gboolean>, + pub fixate: + Option *mut gst::GstCaps>, + pub activate_pull: Option gboolean>, + pub get_times: Option< + unsafe extern "C" fn( + *mut GstBaseSink, + *mut gst::GstBuffer, + *mut gst::GstClockTime, + *mut gst::GstClockTime, + ), + >, + pub propose_allocation: + Option gboolean>, + pub start: Option gboolean>, + pub stop: Option gboolean>, + pub unlock: Option gboolean>, + pub unlock_stop: Option gboolean>, + pub query: Option gboolean>, + pub event: Option gboolean>, + pub wait_event: + Option gst::GstFlowReturn>, + pub prepare: + Option gst::GstFlowReturn>, + pub prepare_list: Option< + unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstBufferList) -> gst::GstFlowReturn, + >, + pub preroll: + Option gst::GstFlowReturn>, + pub render: + Option gst::GstFlowReturn>, + pub render_list: Option< + unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstBufferList) -> gst::GstFlowReturn, + >, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstBaseSinkClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBaseSinkClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("get_caps", &self.get_caps) + .field("set_caps", &self.set_caps) + .field("fixate", &self.fixate) + .field("activate_pull", &self.activate_pull) + .field("get_times", &self.get_times) + .field("propose_allocation", &self.propose_allocation) + .field("start", &self.start) + .field("stop", &self.stop) + .field("unlock", &self.unlock) + .field("unlock_stop", &self.unlock_stop) + .field("query", &self.query) + .field("event", &self.event) + .field("wait_event", &self.wait_event) + .field("prepare", &self.prepare) + .field("prepare_list", &self.prepare_list) + .field("preroll", &self.preroll) + .field("render", &self.render) + .field("render_list", &self.render_list) + .finish() + } +} + +#[repr(C)] +pub struct _GstBaseSinkPrivate(c_void); + +pub type GstBaseSinkPrivate = *mut _GstBaseSinkPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBaseSrcClass { + pub parent_class: gst::GstElementClass, + pub get_caps: + Option *mut gst::GstCaps>, + pub negotiate: Option gboolean>, + pub fixate: + Option *mut gst::GstCaps>, + pub set_caps: Option gboolean>, + pub decide_allocation: + Option gboolean>, + pub start: Option gboolean>, + pub stop: Option gboolean>, + pub get_times: Option< + unsafe extern "C" fn( + *mut GstBaseSrc, + *mut gst::GstBuffer, + *mut gst::GstClockTime, + *mut gst::GstClockTime, + ), + >, + pub get_size: Option gboolean>, + pub is_seekable: Option gboolean>, + pub prepare_seek_segment: Option< + unsafe extern "C" fn(*mut GstBaseSrc, *mut gst::GstEvent, *mut gst::GstSegment) -> gboolean, + >, + pub do_seek: Option gboolean>, + pub unlock: Option gboolean>, + pub unlock_stop: Option gboolean>, + pub query: Option gboolean>, + pub event: Option gboolean>, + pub create: Option< + unsafe extern "C" fn( + *mut GstBaseSrc, + u64, + c_uint, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub alloc: Option< + unsafe extern "C" fn( + *mut GstBaseSrc, + u64, + c_uint, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub fill: Option< + unsafe extern "C" fn( + *mut GstBaseSrc, + u64, + c_uint, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstBaseSrcClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBaseSrcClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("get_caps", &self.get_caps) + .field("negotiate", &self.negotiate) + .field("fixate", &self.fixate) + .field("set_caps", &self.set_caps) + .field("decide_allocation", &self.decide_allocation) + .field("start", &self.start) + .field("stop", &self.stop) + .field("get_times", &self.get_times) + .field("get_size", &self.get_size) + .field("is_seekable", &self.is_seekable) + .field("prepare_seek_segment", &self.prepare_seek_segment) + .field("do_seek", &self.do_seek) + .field("unlock", &self.unlock) + .field("unlock_stop", &self.unlock_stop) + .field("query", &self.query) + .field("event", &self.event) + .field("create", &self.create) + .field("alloc", &self.alloc) + .field("fill", &self.fill) + .finish() + } +} + +#[repr(C)] +pub struct _GstBaseSrcPrivate(c_void); + +pub type GstBaseSrcPrivate = *mut _GstBaseSrcPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBaseTransformClass { + pub parent_class: gst::GstElementClass, + pub passthrough_on_same_caps: gboolean, + pub transform_ip_on_passthrough: gboolean, + pub transform_caps: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gst::GstPadDirection, + *mut gst::GstCaps, + *mut gst::GstCaps, + ) -> *mut gst::GstCaps, + >, + pub fixate_caps: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gst::GstPadDirection, + *mut gst::GstCaps, + *mut gst::GstCaps, + ) -> *mut gst::GstCaps, + >, + pub accept_caps: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gst::GstPadDirection, + *mut gst::GstCaps, + ) -> gboolean, + >, + pub set_caps: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstCaps, + *mut gst::GstCaps, + ) -> gboolean, + >, + pub query: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gst::GstPadDirection, + *mut gst::GstQuery, + ) -> gboolean, + >, + pub decide_allocation: + Option gboolean>, + pub filter_meta: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstQuery, + GType, + *const gst::GstStructure, + ) -> gboolean, + >, + pub propose_allocation: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstQuery, + *mut gst::GstQuery, + ) -> gboolean, + >, + pub transform_size: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gst::GstPadDirection, + *mut gst::GstCaps, + size_t, + *mut gst::GstCaps, + *mut size_t, + ) -> gboolean, + >, + pub get_unit_size: Option< + unsafe extern "C" fn(*mut GstBaseTransform, *mut gst::GstCaps, *mut size_t) -> gboolean, + >, + pub start: Option gboolean>, + pub stop: Option gboolean>, + pub sink_event: + Option gboolean>, + pub src_event: + Option gboolean>, + pub prepare_output_buffer: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstBuffer, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub copy_metadata: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstBuffer, + *mut gst::GstBuffer, + ) -> gboolean, + >, + pub transform_meta: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstBuffer, + *mut gst::GstMeta, + *mut gst::GstBuffer, + ) -> gboolean, + >, + pub before_transform: Option, + pub transform: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + *mut gst::GstBuffer, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub transform_ip: Option< + unsafe extern "C" fn(*mut GstBaseTransform, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, + pub submit_input_buffer: Option< + unsafe extern "C" fn( + *mut GstBaseTransform, + gboolean, + *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub generate_output: Option< + unsafe extern "C" fn(*mut GstBaseTransform, *mut *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, + pub _gst_reserved: [gpointer; 18], +} + +impl ::std::fmt::Debug for GstBaseTransformClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBaseTransformClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("passthrough_on_same_caps", &self.passthrough_on_same_caps) + .field( + "transform_ip_on_passthrough", + &self.transform_ip_on_passthrough, + ) + .field("transform_caps", &self.transform_caps) + .field("fixate_caps", &self.fixate_caps) + .field("accept_caps", &self.accept_caps) + .field("set_caps", &self.set_caps) + .field("query", &self.query) + .field("decide_allocation", &self.decide_allocation) + .field("filter_meta", &self.filter_meta) + .field("propose_allocation", &self.propose_allocation) + .field("transform_size", &self.transform_size) + .field("get_unit_size", &self.get_unit_size) + .field("start", &self.start) + .field("stop", &self.stop) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("prepare_output_buffer", &self.prepare_output_buffer) + .field("copy_metadata", &self.copy_metadata) + .field("transform_meta", &self.transform_meta) + .field("before_transform", &self.before_transform) + .field("transform", &self.transform) + .field("transform_ip", &self.transform_ip) + .field("submit_input_buffer", &self.submit_input_buffer) + .field("generate_output", &self.generate_output) + .finish() + } +} + +#[repr(C)] +pub struct _GstBaseTransformPrivate(c_void); + +pub type GstBaseTransformPrivate = *mut _GstBaseTransformPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBitReader { + pub data: *const u8, + pub size: c_uint, + pub byte: c_uint, + pub bit: c_uint, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstBitReader { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBitReader @ {:?}", self as *const _)) + .field("data", &self.data) + .field("size", &self.size) + .field("byte", &self.byte) + .field("bit", &self.bit) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBitWriter { + pub data: *mut u8, + pub bit_size: c_uint, + pub bit_capacity: c_uint, + pub auto_grow: gboolean, + pub owned: gboolean, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstBitWriter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBitWriter @ {:?}", self as *const _)) + .field("data", &self.data) + .field("bit_size", &self.bit_size) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstByteReader { + pub data: *const u8, + pub size: c_uint, + pub byte: c_uint, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstByteReader { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstByteReader @ {:?}", self as *const _)) + .field("data", &self.data) + .field("size", &self.size) + .field("byte", &self.byte) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstByteWriter { + pub parent: GstByteReader, + pub alloc_size: c_uint, + pub fixed: gboolean, + pub owned: gboolean, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstByteWriter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstByteWriter @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("alloc_size", &self.alloc_size) + .field("fixed", &self.fixed) + .field("owned", &self.owned) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstCollectData { + pub collect: *mut GstCollectPads, + pub pad: *mut gst::GstPad, + pub buffer: *mut gst::GstBuffer, + pub pos: c_uint, + pub segment: gst::GstSegment, + pub state: GstCollectPadsStateFlags, + pub priv_: *mut GstCollectDataPrivate, + pub ABI: GstCollectData_ABI, +} + +impl ::std::fmt::Debug for GstCollectData { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstCollectData @ {:?}", self as *const _)) + .field("collect", &self.collect) + .field("pad", &self.pad) + .field("buffer", &self.buffer) + .field("pos", &self.pos) + .field("segment", &self.segment) + .field("ABI", &self.ABI) + .finish() + } +} + +#[repr(C)] +pub struct _GstCollectDataPrivate(c_void); + +pub type GstCollectDataPrivate = *mut _GstCollectDataPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstCollectData_ABI_abi { + pub dts: i64, +} + +impl ::std::fmt::Debug for GstCollectData_ABI_abi { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstCollectData_ABI_abi @ {:?}", self as *const _)) + .field("dts", &self.dts) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstCollectPadsClass { + pub parent_class: gst::GstObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstCollectPadsClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstCollectPadsClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstCollectPadsPrivate(c_void); + +pub type GstCollectPadsPrivate = *mut _GstCollectPadsPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDataQueueClass { + pub parent_class: gobject::GObjectClass, + pub empty: Option, + pub full: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDataQueueClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDataQueueClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("empty", &self.empty) + .field("full", &self.full) + .field("_gst_reserved", &self._gst_reserved) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDataQueueItem { + pub object: *mut gst::GstMiniObject, + pub size: c_uint, + pub duration: u64, + pub visible: gboolean, + pub destroy: glib::GDestroyNotify, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDataQueueItem { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDataQueueItem @ {:?}", self as *const _)) + .field("object", &self.object) + .field("size", &self.size) + .field("duration", &self.duration) + .field("visible", &self.visible) + .field("destroy", &self.destroy) + .finish() + } +} + +#[repr(C)] +pub struct _GstDataQueuePrivate(c_void); + +pub type GstDataQueuePrivate = *mut _GstDataQueuePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDataQueueSize { + pub visible: c_uint, + pub bytes: c_uint, + pub time: u64, +} + +impl ::std::fmt::Debug for GstDataQueueSize { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDataQueueSize @ {:?}", self as *const _)) + .field("visible", &self.visible) + .field("bytes", &self.bytes) + .field("time", &self.time) + .finish() + } +} + +#[repr(C)] +pub struct GstFlowCombiner(c_void); + +impl ::std::fmt::Debug for GstFlowCombiner { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstFlowCombiner @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPushSrcClass { + pub parent_class: GstBaseSrcClass, + pub create: + Option gst::GstFlowReturn>, + pub alloc: + Option gst::GstFlowReturn>, + pub fill: + Option gst::GstFlowReturn>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstPushSrcClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPushSrcClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("create", &self.create) + .field("alloc", &self.alloc) + .field("fill", &self.fill) + .finish() + } +} + +#[repr(C)] +pub struct _GstQueueArray(c_void); + +pub type GstQueueArray = *mut _GstQueueArray; + +// Classes +#[repr(C)] +pub struct GstAdapter(c_void); + +impl ::std::fmt::Debug for GstAdapter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAdapter @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAggregator { + pub parent: gst::GstElement, + pub srcpad: *mut gst::GstPad, + pub priv_: *mut GstAggregatorPrivate, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstAggregator { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAggregator @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("srcpad", &self.srcpad) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAggregatorPad { + pub parent: gst::GstPad, + pub segment: gst::GstSegment, + pub priv_: *mut GstAggregatorPadPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAggregatorPad { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAggregatorPad @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("segment", &self.segment) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBaseParse { + pub element: gst::GstElement, + pub sinkpad: *mut gst::GstPad, + pub srcpad: *mut gst::GstPad, + pub flags: c_uint, + pub segment: gst::GstSegment, + pub _gst_reserved: [gpointer; 20], + pub priv_: *mut GstBaseParsePrivate, +} + +impl ::std::fmt::Debug for GstBaseParse { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBaseParse @ {:?}", self as *const _)) + .field("element", &self.element) + .field("sinkpad", &self.sinkpad) + .field("srcpad", &self.srcpad) + .field("flags", &self.flags) + .field("segment", &self.segment) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBaseSink { + pub element: gst::GstElement, + pub sinkpad: *mut gst::GstPad, + pub pad_mode: gst::GstPadMode, + pub offset: u64, + pub can_activate_pull: gboolean, + pub can_activate_push: gboolean, + pub preroll_lock: glib::GMutex, + pub preroll_cond: glib::GCond, + pub eos: gboolean, + pub need_preroll: gboolean, + pub have_preroll: gboolean, + pub playing_async: gboolean, + pub have_newsegment: gboolean, + pub segment: gst::GstSegment, + pub clock_id: gst::GstClockID, + pub sync: gboolean, + pub flushing: gboolean, + pub running: gboolean, + pub max_lateness: i64, + pub priv_: *mut GstBaseSinkPrivate, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstBaseSink { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBaseSink @ {:?}", self as *const _)) + .field("element", &self.element) + .field("sinkpad", &self.sinkpad) + .field("pad_mode", &self.pad_mode) + .field("offset", &self.offset) + .field("can_activate_pull", &self.can_activate_pull) + .field("can_activate_push", &self.can_activate_push) + .field("preroll_lock", &self.preroll_lock) + .field("preroll_cond", &self.preroll_cond) + .field("eos", &self.eos) + .field("need_preroll", &self.need_preroll) + .field("have_preroll", &self.have_preroll) + .field("playing_async", &self.playing_async) + .field("have_newsegment", &self.have_newsegment) + .field("segment", &self.segment) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBaseSrc { + pub element: gst::GstElement, + pub srcpad: *mut gst::GstPad, + pub live_lock: glib::GMutex, + pub live_cond: glib::GCond, + pub is_live: gboolean, + pub live_running: gboolean, + pub blocksize: c_uint, + pub can_activate_push: gboolean, + pub random_access: gboolean, + pub clock_id: gst::GstClockID, + pub segment: gst::GstSegment, + pub need_newsegment: gboolean, + pub num_buffers: c_int, + pub num_buffers_left: c_int, + pub typefind: gboolean, + pub running: gboolean, + pub pending_seek: *mut gst::GstEvent, + pub priv_: *mut GstBaseSrcPrivate, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstBaseSrc { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBaseSrc @ {:?}", self as *const _)) + .field("element", &self.element) + .field("srcpad", &self.srcpad) + .field("live_lock", &self.live_lock) + .field("live_cond", &self.live_cond) + .field("is_live", &self.is_live) + .field("live_running", &self.live_running) + .field("blocksize", &self.blocksize) + .field("can_activate_push", &self.can_activate_push) + .field("random_access", &self.random_access) + .field("clock_id", &self.clock_id) + .field("segment", &self.segment) + .field("need_newsegment", &self.need_newsegment) + .field("num_buffers", &self.num_buffers) + .field("num_buffers_left", &self.num_buffers_left) + .field("typefind", &self.typefind) + .field("running", &self.running) + .field("pending_seek", &self.pending_seek) + .field("priv_", &self.priv_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBaseTransform { + pub element: gst::GstElement, + pub sinkpad: *mut gst::GstPad, + pub srcpad: *mut gst::GstPad, + pub have_segment: gboolean, + pub segment: gst::GstSegment, + pub queued_buf: *mut gst::GstBuffer, + pub priv_: *mut GstBaseTransformPrivate, + pub _gst_reserved: [gpointer; 19], +} + +impl ::std::fmt::Debug for GstBaseTransform { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBaseTransform @ {:?}", self as *const _)) + .field("element", &self.element) + .field("sinkpad", &self.sinkpad) + .field("srcpad", &self.srcpad) + .field("have_segment", &self.have_segment) + .field("segment", &self.segment) + .field("queued_buf", &self.queued_buf) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstCollectPads { + pub object: gst::GstObject, + pub data: *mut glib::GSList, + pub stream_lock: glib::GRecMutex, + pub priv_: *mut GstCollectPadsPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstCollectPads { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstCollectPads @ {:?}", self as *const _)) + .field("object", &self.object) + .field("data", &self.data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDataQueue { + pub object: gobject::GObject, + pub priv_: *mut GstDataQueuePrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDataQueue { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDataQueue @ {:?}", self as *const _)) + .field("object", &self.object) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPushSrc { + pub parent: GstBaseSrc, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstPushSrc { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPushSrc @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[link(name = "gstbase-1.0")] +extern "C" { + + //========================================================================= + // GstAggregatorStartTimeSelection + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_aggregator_start_time_selection_get_type() -> GType; + + //========================================================================= + // GstBaseParseFrame + //========================================================================= + pub fn gst_base_parse_frame_get_type() -> GType; + pub fn gst_base_parse_frame_new( + buffer: *mut gst::GstBuffer, + flags: GstBaseParseFrameFlags, + overhead: c_int, + ) -> *mut GstBaseParseFrame; + #[cfg(any(feature = "v1_12_1", feature = "dox"))] + pub fn gst_base_parse_frame_copy(frame: *mut GstBaseParseFrame) -> *mut GstBaseParseFrame; + pub fn gst_base_parse_frame_free(frame: *mut GstBaseParseFrame); + pub fn gst_base_parse_frame_init(frame: *mut GstBaseParseFrame); + + //========================================================================= + // GstBitReader + //========================================================================= + pub fn gst_bit_reader_free(reader: *mut GstBitReader); + pub fn gst_bit_reader_get_bits_uint16( + reader: *mut GstBitReader, + val: *mut u16, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_get_bits_uint32( + reader: *mut GstBitReader, + val: *mut u32, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_get_bits_uint64( + reader: *mut GstBitReader, + val: *mut u64, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_get_bits_uint8( + reader: *mut GstBitReader, + val: *mut u8, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_get_pos(reader: *const GstBitReader) -> c_uint; + pub fn gst_bit_reader_get_remaining(reader: *const GstBitReader) -> c_uint; + pub fn gst_bit_reader_get_size(reader: *const GstBitReader) -> c_uint; + pub fn gst_bit_reader_init(reader: *mut GstBitReader, data: *const u8, size: c_uint); + pub fn gst_bit_reader_peek_bits_uint16( + reader: *const GstBitReader, + val: *mut u16, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_peek_bits_uint32( + reader: *const GstBitReader, + val: *mut u32, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_peek_bits_uint64( + reader: *const GstBitReader, + val: *mut u64, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_peek_bits_uint8( + reader: *const GstBitReader, + val: *mut u8, + nbits: c_uint, + ) -> gboolean; + pub fn gst_bit_reader_set_pos(reader: *mut GstBitReader, pos: c_uint) -> gboolean; + pub fn gst_bit_reader_skip(reader: *mut GstBitReader, nbits: c_uint) -> gboolean; + pub fn gst_bit_reader_skip_to_byte(reader: *mut GstBitReader) -> gboolean; + pub fn gst_bit_reader_new(data: *const u8, size: c_uint) -> *mut GstBitReader; + + //========================================================================= + // GstBitWriter + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_align_bytes(bitwriter: *mut GstBitWriter, trailing_bit: u8) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_free(bitwriter: *mut GstBitWriter); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_free_and_get_buffer(bitwriter: *mut GstBitWriter) -> *mut gst::GstBuffer; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_free_and_get_data(bitwriter: *mut GstBitWriter) -> *mut u8; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_get_data(bitwriter: *const GstBitWriter) -> *mut u8; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_get_remaining(bitwriter: *const GstBitWriter) -> c_uint; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_get_size(bitwriter: *const GstBitWriter) -> c_uint; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_init(bitwriter: *mut GstBitWriter); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_init_with_data( + bitwriter: *mut GstBitWriter, + data: *mut u8, + size: c_uint, + initialized: gboolean, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_init_with_size(bitwriter: *mut GstBitWriter, size: u32, fixed: gboolean); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_put_bits_uint16( + bitwriter: *mut GstBitWriter, + value: u16, + nbits: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_put_bits_uint32( + bitwriter: *mut GstBitWriter, + value: u32, + nbits: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_put_bits_uint64( + bitwriter: *mut GstBitWriter, + value: u64, + nbits: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_put_bits_uint8( + bitwriter: *mut GstBitWriter, + value: u8, + nbits: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_put_bytes( + bitwriter: *mut GstBitWriter, + data: *const u8, + nbytes: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_reset(bitwriter: *mut GstBitWriter); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_reset_and_get_buffer(bitwriter: *mut GstBitWriter) + -> *mut gst::GstBuffer; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_reset_and_get_data(bitwriter: *mut GstBitWriter) -> *mut u8; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_set_pos(bitwriter: *mut GstBitWriter, pos: c_uint) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_new() -> *mut GstBitWriter; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_new_with_data( + data: *mut u8, + size: c_uint, + initialized: gboolean, + ) -> *mut GstBitWriter; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_bit_writer_new_with_size(size: u32, fixed: gboolean) -> *mut GstBitWriter; + + //========================================================================= + // GstByteReader + //========================================================================= + pub fn gst_byte_reader_dup_data( + reader: *mut GstByteReader, + size: c_uint, + val: *mut *mut u8, + ) -> gboolean; + pub fn gst_byte_reader_dup_string_utf16( + reader: *mut GstByteReader, + str: *mut *mut u16, + ) -> gboolean; + pub fn gst_byte_reader_dup_string_utf32( + reader: *mut GstByteReader, + str: *mut *mut u32, + ) -> gboolean; + pub fn gst_byte_reader_dup_string_utf8( + reader: *mut GstByteReader, + str: *mut *mut c_char, + ) -> gboolean; + pub fn gst_byte_reader_free(reader: *mut GstByteReader); + pub fn gst_byte_reader_get_data( + reader: *mut GstByteReader, + size: c_uint, + val: *mut *const u8, + ) -> gboolean; + pub fn gst_byte_reader_get_float32_be( + reader: *mut GstByteReader, + val: *mut c_float, + ) -> gboolean; + pub fn gst_byte_reader_get_float32_le( + reader: *mut GstByteReader, + val: *mut c_float, + ) -> gboolean; + pub fn gst_byte_reader_get_float64_be( + reader: *mut GstByteReader, + val: *mut c_double, + ) -> gboolean; + pub fn gst_byte_reader_get_float64_le( + reader: *mut GstByteReader, + val: *mut c_double, + ) -> gboolean; + pub fn gst_byte_reader_get_int16_be(reader: *mut GstByteReader, val: *mut i16) -> gboolean; + pub fn gst_byte_reader_get_int16_le(reader: *mut GstByteReader, val: *mut i16) -> gboolean; + pub fn gst_byte_reader_get_int24_be(reader: *mut GstByteReader, val: *mut i32) -> gboolean; + pub fn gst_byte_reader_get_int24_le(reader: *mut GstByteReader, val: *mut i32) -> gboolean; + pub fn gst_byte_reader_get_int32_be(reader: *mut GstByteReader, val: *mut i32) -> gboolean; + pub fn gst_byte_reader_get_int32_le(reader: *mut GstByteReader, val: *mut i32) -> gboolean; + pub fn gst_byte_reader_get_int64_be(reader: *mut GstByteReader, val: *mut i64) -> gboolean; + pub fn gst_byte_reader_get_int64_le(reader: *mut GstByteReader, val: *mut i64) -> gboolean; + pub fn gst_byte_reader_get_int8(reader: *mut GstByteReader, val: *mut i8) -> gboolean; + pub fn gst_byte_reader_get_pos(reader: *const GstByteReader) -> c_uint; + pub fn gst_byte_reader_get_remaining(reader: *const GstByteReader) -> c_uint; + pub fn gst_byte_reader_get_size(reader: *const GstByteReader) -> c_uint; + pub fn gst_byte_reader_get_string_utf8( + reader: *mut GstByteReader, + str: *mut *const c_char, + ) -> gboolean; + pub fn gst_byte_reader_get_sub_reader( + reader: *mut GstByteReader, + sub_reader: *mut GstByteReader, + size: c_uint, + ) -> gboolean; + pub fn gst_byte_reader_get_uint16_be(reader: *mut GstByteReader, val: *mut u16) -> gboolean; + pub fn gst_byte_reader_get_uint16_le(reader: *mut GstByteReader, val: *mut u16) -> gboolean; + pub fn gst_byte_reader_get_uint24_be(reader: *mut GstByteReader, val: *mut u32) -> gboolean; + pub fn gst_byte_reader_get_uint24_le(reader: *mut GstByteReader, val: *mut u32) -> gboolean; + pub fn gst_byte_reader_get_uint32_be(reader: *mut GstByteReader, val: *mut u32) -> gboolean; + pub fn gst_byte_reader_get_uint32_le(reader: *mut GstByteReader, val: *mut u32) -> gboolean; + pub fn gst_byte_reader_get_uint64_be(reader: *mut GstByteReader, val: *mut u64) -> gboolean; + pub fn gst_byte_reader_get_uint64_le(reader: *mut GstByteReader, val: *mut u64) -> gboolean; + pub fn gst_byte_reader_get_uint8(reader: *mut GstByteReader, val: *mut u8) -> gboolean; + pub fn gst_byte_reader_init(reader: *mut GstByteReader, data: *const u8, size: c_uint); + pub fn gst_byte_reader_masked_scan_uint32( + reader: *const GstByteReader, + mask: u32, + pattern: u32, + offset: c_uint, + size: c_uint, + ) -> c_uint; + pub fn gst_byte_reader_masked_scan_uint32_peek( + reader: *const GstByteReader, + mask: u32, + pattern: u32, + offset: c_uint, + size: c_uint, + value: *mut u32, + ) -> c_uint; + pub fn gst_byte_reader_peek_data( + reader: *const GstByteReader, + size: c_uint, + val: *mut *const u8, + ) -> gboolean; + pub fn gst_byte_reader_peek_float32_be( + reader: *const GstByteReader, + val: *mut c_float, + ) -> gboolean; + pub fn gst_byte_reader_peek_float32_le( + reader: *const GstByteReader, + val: *mut c_float, + ) -> gboolean; + pub fn gst_byte_reader_peek_float64_be( + reader: *const GstByteReader, + val: *mut c_double, + ) -> gboolean; + pub fn gst_byte_reader_peek_float64_le( + reader: *const GstByteReader, + val: *mut c_double, + ) -> gboolean; + pub fn gst_byte_reader_peek_int16_be(reader: *const GstByteReader, val: *mut i16) -> gboolean; + pub fn gst_byte_reader_peek_int16_le(reader: *const GstByteReader, val: *mut i16) -> gboolean; + pub fn gst_byte_reader_peek_int24_be(reader: *const GstByteReader, val: *mut i32) -> gboolean; + pub fn gst_byte_reader_peek_int24_le(reader: *const GstByteReader, val: *mut i32) -> gboolean; + pub fn gst_byte_reader_peek_int32_be(reader: *const GstByteReader, val: *mut i32) -> gboolean; + pub fn gst_byte_reader_peek_int32_le(reader: *const GstByteReader, val: *mut i32) -> gboolean; + pub fn gst_byte_reader_peek_int64_be(reader: *const GstByteReader, val: *mut i64) -> gboolean; + pub fn gst_byte_reader_peek_int64_le(reader: *const GstByteReader, val: *mut i64) -> gboolean; + pub fn gst_byte_reader_peek_int8(reader: *const GstByteReader, val: *mut i8) -> gboolean; + pub fn gst_byte_reader_peek_string_utf8( + reader: *const GstByteReader, + str: *mut *const c_char, + ) -> gboolean; + pub fn gst_byte_reader_peek_sub_reader( + reader: *mut GstByteReader, + sub_reader: *mut GstByteReader, + size: c_uint, + ) -> gboolean; + pub fn gst_byte_reader_peek_uint16_be(reader: *const GstByteReader, val: *mut u16) -> gboolean; + pub fn gst_byte_reader_peek_uint16_le(reader: *const GstByteReader, val: *mut u16) -> gboolean; + pub fn gst_byte_reader_peek_uint24_be(reader: *const GstByteReader, val: *mut u32) -> gboolean; + pub fn gst_byte_reader_peek_uint24_le(reader: *const GstByteReader, val: *mut u32) -> gboolean; + pub fn gst_byte_reader_peek_uint32_be(reader: *const GstByteReader, val: *mut u32) -> gboolean; + pub fn gst_byte_reader_peek_uint32_le(reader: *const GstByteReader, val: *mut u32) -> gboolean; + pub fn gst_byte_reader_peek_uint64_be(reader: *const GstByteReader, val: *mut u64) -> gboolean; + pub fn gst_byte_reader_peek_uint64_le(reader: *const GstByteReader, val: *mut u64) -> gboolean; + pub fn gst_byte_reader_peek_uint8(reader: *const GstByteReader, val: *mut u8) -> gboolean; + pub fn gst_byte_reader_set_pos(reader: *mut GstByteReader, pos: c_uint) -> gboolean; + pub fn gst_byte_reader_skip(reader: *mut GstByteReader, nbytes: c_uint) -> gboolean; + pub fn gst_byte_reader_skip_string_utf16(reader: *mut GstByteReader) -> gboolean; + pub fn gst_byte_reader_skip_string_utf32(reader: *mut GstByteReader) -> gboolean; + pub fn gst_byte_reader_skip_string_utf8(reader: *mut GstByteReader) -> gboolean; + pub fn gst_byte_reader_new(data: *const u8, size: c_uint) -> *mut GstByteReader; + + //========================================================================= + // GstByteWriter + //========================================================================= + pub fn gst_byte_writer_ensure_free_space(writer: *mut GstByteWriter, size: c_uint) -> gboolean; + pub fn gst_byte_writer_fill(writer: *mut GstByteWriter, value: u8, size: c_uint) -> gboolean; + pub fn gst_byte_writer_free(writer: *mut GstByteWriter); + pub fn gst_byte_writer_free_and_get_buffer(writer: *mut GstByteWriter) -> *mut gst::GstBuffer; + pub fn gst_byte_writer_free_and_get_data(writer: *mut GstByteWriter) -> *mut u8; + pub fn gst_byte_writer_get_remaining(writer: *const GstByteWriter) -> c_uint; + pub fn gst_byte_writer_init(writer: *mut GstByteWriter); + pub fn gst_byte_writer_init_with_data( + writer: *mut GstByteWriter, + data: *mut u8, + size: c_uint, + initialized: gboolean, + ); + pub fn gst_byte_writer_init_with_size( + writer: *mut GstByteWriter, + size: c_uint, + fixed: gboolean, + ); + pub fn gst_byte_writer_put_buffer( + writer: *mut GstByteWriter, + buffer: *mut gst::GstBuffer, + offset: size_t, + size: ssize_t, + ) -> gboolean; + pub fn gst_byte_writer_put_data( + writer: *mut GstByteWriter, + data: *const u8, + size: c_uint, + ) -> gboolean; + pub fn gst_byte_writer_put_float32_be(writer: *mut GstByteWriter, val: c_float) -> gboolean; + pub fn gst_byte_writer_put_float32_le(writer: *mut GstByteWriter, val: c_float) -> gboolean; + pub fn gst_byte_writer_put_float64_be(writer: *mut GstByteWriter, val: c_double) -> gboolean; + pub fn gst_byte_writer_put_float64_le(writer: *mut GstByteWriter, val: c_double) -> gboolean; + pub fn gst_byte_writer_put_int16_be(writer: *mut GstByteWriter, val: i16) -> gboolean; + pub fn gst_byte_writer_put_int16_le(writer: *mut GstByteWriter, val: i16) -> gboolean; + pub fn gst_byte_writer_put_int24_be(writer: *mut GstByteWriter, val: i32) -> gboolean; + pub fn gst_byte_writer_put_int24_le(writer: *mut GstByteWriter, val: i32) -> gboolean; + pub fn gst_byte_writer_put_int32_be(writer: *mut GstByteWriter, val: i32) -> gboolean; + pub fn gst_byte_writer_put_int32_le(writer: *mut GstByteWriter, val: i32) -> gboolean; + pub fn gst_byte_writer_put_int64_be(writer: *mut GstByteWriter, val: i64) -> gboolean; + pub fn gst_byte_writer_put_int64_le(writer: *mut GstByteWriter, val: i64) -> gboolean; + pub fn gst_byte_writer_put_int8(writer: *mut GstByteWriter, val: i8) -> gboolean; + pub fn gst_byte_writer_put_string_utf16( + writer: *mut GstByteWriter, + data: *const u16, + ) -> gboolean; + pub fn gst_byte_writer_put_string_utf32( + writer: *mut GstByteWriter, + data: *const u32, + ) -> gboolean; + pub fn gst_byte_writer_put_string_utf8( + writer: *mut GstByteWriter, + data: *const c_char, + ) -> gboolean; + pub fn gst_byte_writer_put_uint16_be(writer: *mut GstByteWriter, val: u16) -> gboolean; + pub fn gst_byte_writer_put_uint16_le(writer: *mut GstByteWriter, val: u16) -> gboolean; + pub fn gst_byte_writer_put_uint24_be(writer: *mut GstByteWriter, val: u32) -> gboolean; + pub fn gst_byte_writer_put_uint24_le(writer: *mut GstByteWriter, val: u32) -> gboolean; + pub fn gst_byte_writer_put_uint32_be(writer: *mut GstByteWriter, val: u32) -> gboolean; + pub fn gst_byte_writer_put_uint32_le(writer: *mut GstByteWriter, val: u32) -> gboolean; + pub fn gst_byte_writer_put_uint64_be(writer: *mut GstByteWriter, val: u64) -> gboolean; + pub fn gst_byte_writer_put_uint64_le(writer: *mut GstByteWriter, val: u64) -> gboolean; + pub fn gst_byte_writer_put_uint8(writer: *mut GstByteWriter, val: u8) -> gboolean; + pub fn gst_byte_writer_reset(writer: *mut GstByteWriter); + pub fn gst_byte_writer_reset_and_get_buffer(writer: *mut GstByteWriter) -> *mut gst::GstBuffer; + pub fn gst_byte_writer_reset_and_get_data(writer: *mut GstByteWriter) -> *mut u8; + pub fn gst_byte_writer_new() -> *mut GstByteWriter; + pub fn gst_byte_writer_new_with_data( + data: *mut u8, + size: c_uint, + initialized: gboolean, + ) -> *mut GstByteWriter; + pub fn gst_byte_writer_new_with_size(size: c_uint, fixed: gboolean) -> *mut GstByteWriter; + + //========================================================================= + // GstFlowCombiner + //========================================================================= + pub fn gst_flow_combiner_get_type() -> GType; + pub fn gst_flow_combiner_new() -> *mut GstFlowCombiner; + pub fn gst_flow_combiner_add_pad(combiner: *mut GstFlowCombiner, pad: *mut gst::GstPad); + pub fn gst_flow_combiner_clear(combiner: *mut GstFlowCombiner); + pub fn gst_flow_combiner_free(combiner: *mut GstFlowCombiner); + #[cfg(any(feature = "v1_12_1", feature = "dox"))] + pub fn gst_flow_combiner_ref(combiner: *mut GstFlowCombiner) -> *mut GstFlowCombiner; + pub fn gst_flow_combiner_remove_pad(combiner: *mut GstFlowCombiner, pad: *mut gst::GstPad); + pub fn gst_flow_combiner_reset(combiner: *mut GstFlowCombiner); + #[cfg(any(feature = "v1_12_1", feature = "dox"))] + pub fn gst_flow_combiner_unref(combiner: *mut GstFlowCombiner); + pub fn gst_flow_combiner_update_flow( + combiner: *mut GstFlowCombiner, + fret: gst::GstFlowReturn, + ) -> gst::GstFlowReturn; + pub fn gst_flow_combiner_update_pad_flow( + combiner: *mut GstFlowCombiner, + pad: *mut gst::GstPad, + fret: gst::GstFlowReturn, + ) -> gst::GstFlowReturn; + + //========================================================================= + // GstQueueArray + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_queue_array_clear(array: *mut GstQueueArray); + pub fn gst_queue_array_drop_element(array: *mut GstQueueArray, idx: c_uint) -> gpointer; + pub fn gst_queue_array_drop_struct( + array: *mut GstQueueArray, + idx: c_uint, + p_struct: gpointer, + ) -> gboolean; + pub fn gst_queue_array_find( + array: *mut GstQueueArray, + func: glib::GCompareFunc, + data: gpointer, + ) -> c_uint; + pub fn gst_queue_array_free(array: *mut GstQueueArray); + pub fn gst_queue_array_get_length(array: *mut GstQueueArray) -> c_uint; + pub fn gst_queue_array_is_empty(array: *mut GstQueueArray) -> gboolean; + pub fn gst_queue_array_peek_head(array: *mut GstQueueArray) -> gpointer; + pub fn gst_queue_array_peek_head_struct(array: *mut GstQueueArray) -> gpointer; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_queue_array_peek_nth(array: *mut GstQueueArray, idx: c_uint) -> gpointer; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_queue_array_peek_nth_struct(array: *mut GstQueueArray, idx: c_uint) -> gpointer; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_queue_array_peek_tail(array: *mut GstQueueArray) -> gpointer; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_queue_array_peek_tail_struct(array: *mut GstQueueArray) -> gpointer; + pub fn gst_queue_array_pop_head(array: *mut GstQueueArray) -> gpointer; + pub fn gst_queue_array_pop_head_struct(array: *mut GstQueueArray) -> gpointer; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_queue_array_pop_tail(array: *mut GstQueueArray) -> gpointer; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_queue_array_pop_tail_struct(array: *mut GstQueueArray) -> gpointer; + pub fn gst_queue_array_push_tail(array: *mut GstQueueArray, data: gpointer); + pub fn gst_queue_array_push_tail_struct(array: *mut GstQueueArray, p_struct: gpointer); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_queue_array_set_clear_func( + array: *mut GstQueueArray, + clear_func: glib::GDestroyNotify, + ); + pub fn gst_queue_array_new(initial_size: c_uint) -> *mut GstQueueArray; + pub fn gst_queue_array_new_for_struct( + struct_size: size_t, + initial_size: c_uint, + ) -> *mut GstQueueArray; + + //========================================================================= + // GstAdapter + //========================================================================= + pub fn gst_adapter_get_type() -> GType; + pub fn gst_adapter_new() -> *mut GstAdapter; + pub fn gst_adapter_available(adapter: *mut GstAdapter) -> size_t; + pub fn gst_adapter_available_fast(adapter: *mut GstAdapter) -> size_t; + pub fn gst_adapter_clear(adapter: *mut GstAdapter); + pub fn gst_adapter_copy(adapter: *mut GstAdapter, dest: gpointer, offset: size_t, size: size_t); + pub fn gst_adapter_copy_bytes( + adapter: *mut GstAdapter, + offset: size_t, + size: size_t, + ) -> *mut glib::GBytes; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_adapter_distance_from_discont(adapter: *mut GstAdapter) -> u64; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_adapter_dts_at_discont(adapter: *mut GstAdapter) -> gst::GstClockTime; + pub fn gst_adapter_flush(adapter: *mut GstAdapter, flush: size_t); + pub fn gst_adapter_get_buffer(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBuffer; + pub fn gst_adapter_get_buffer_fast( + adapter: *mut GstAdapter, + nbytes: size_t, + ) -> *mut gst::GstBuffer; + pub fn gst_adapter_get_buffer_list( + adapter: *mut GstAdapter, + nbytes: size_t, + ) -> *mut gst::GstBufferList; + pub fn gst_adapter_get_list(adapter: *mut GstAdapter, nbytes: size_t) -> *mut glib::GList; + pub fn gst_adapter_map(adapter: *mut GstAdapter, size: size_t) -> gconstpointer; + pub fn gst_adapter_masked_scan_uint32( + adapter: *mut GstAdapter, + mask: u32, + pattern: u32, + offset: size_t, + size: size_t, + ) -> ssize_t; + pub fn gst_adapter_masked_scan_uint32_peek( + adapter: *mut GstAdapter, + mask: u32, + pattern: u32, + offset: size_t, + size: size_t, + value: *mut u32, + ) -> ssize_t; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_adapter_offset_at_discont(adapter: *mut GstAdapter) -> u64; + pub fn gst_adapter_prev_dts(adapter: *mut GstAdapter, distance: *mut u64) -> gst::GstClockTime; + pub fn gst_adapter_prev_dts_at_offset( + adapter: *mut GstAdapter, + offset: size_t, + distance: *mut u64, + ) -> gst::GstClockTime; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_adapter_prev_offset(adapter: *mut GstAdapter, distance: *mut u64) -> u64; + pub fn gst_adapter_prev_pts(adapter: *mut GstAdapter, distance: *mut u64) -> gst::GstClockTime; + pub fn gst_adapter_prev_pts_at_offset( + adapter: *mut GstAdapter, + offset: size_t, + distance: *mut u64, + ) -> gst::GstClockTime; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_adapter_pts_at_discont(adapter: *mut GstAdapter) -> gst::GstClockTime; + pub fn gst_adapter_push(adapter: *mut GstAdapter, buf: *mut gst::GstBuffer); + pub fn gst_adapter_take(adapter: *mut GstAdapter, nbytes: size_t) -> gpointer; + pub fn gst_adapter_take_buffer(adapter: *mut GstAdapter, nbytes: size_t) + -> *mut gst::GstBuffer; + pub fn gst_adapter_take_buffer_fast( + adapter: *mut GstAdapter, + nbytes: size_t, + ) -> *mut gst::GstBuffer; + pub fn gst_adapter_take_buffer_list( + adapter: *mut GstAdapter, + nbytes: size_t, + ) -> *mut gst::GstBufferList; + pub fn gst_adapter_take_list(adapter: *mut GstAdapter, nbytes: size_t) -> *mut glib::GList; + pub fn gst_adapter_unmap(adapter: *mut GstAdapter); + + //========================================================================= + // GstAggregator + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_get_type() -> GType; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_finish_buffer( + aggregator: *mut GstAggregator, + buffer: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_aggregator_finish_buffer_list( + aggregator: *mut GstAggregator, + bufferlist: *mut gst::GstBufferList, + ) -> gst::GstFlowReturn; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_get_allocator( + self_: *mut GstAggregator, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_get_buffer_pool(self_: *mut GstAggregator) -> *mut gst::GstBufferPool; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_get_latency(self_: *mut GstAggregator) -> gst::GstClockTime; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_aggregator_negotiate(self_: *mut GstAggregator) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_aggregator_peek_next_sample( + self_: *mut GstAggregator, + pad: *mut GstAggregatorPad, + ) -> *mut gst::GstSample; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_aggregator_selected_samples( + self_: *mut GstAggregator, + pts: gst::GstClockTime, + dts: gst::GstClockTime, + duration: gst::GstClockTime, + info: *mut gst::GstStructure, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_set_latency( + self_: *mut GstAggregator, + min_latency: gst::GstClockTime, + max_latency: gst::GstClockTime, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_set_src_caps(self_: *mut GstAggregator, caps: *mut gst::GstCaps); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_aggregator_simple_get_next_time(self_: *mut GstAggregator) -> gst::GstClockTime; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_aggregator_update_segment( + self_: *mut GstAggregator, + segment: *const gst::GstSegment, + ); + + //========================================================================= + // GstAggregatorPad + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_pad_get_type() -> GType; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_pad_drop_buffer(pad: *mut GstAggregatorPad) -> gboolean; + #[cfg(any(feature = "v1_14_1", feature = "dox"))] + pub fn gst_aggregator_pad_has_buffer(pad: *mut GstAggregatorPad) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_pad_is_eos(pad: *mut GstAggregatorPad) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_pad_peek_buffer(pad: *mut GstAggregatorPad) -> *mut gst::GstBuffer; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_aggregator_pad_pop_buffer(pad: *mut GstAggregatorPad) -> *mut gst::GstBuffer; + + //========================================================================= + // GstBaseParse + //========================================================================= + pub fn gst_base_parse_get_type() -> GType; + pub fn gst_base_parse_add_index_entry( + parse: *mut GstBaseParse, + offset: u64, + ts: gst::GstClockTime, + key: gboolean, + force: gboolean, + ) -> gboolean; + pub fn gst_base_parse_convert_default( + parse: *mut GstBaseParse, + src_format: gst::GstFormat, + src_value: i64, + dest_format: gst::GstFormat, + dest_value: *mut i64, + ) -> gboolean; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_base_parse_drain(parse: *mut GstBaseParse); + pub fn gst_base_parse_finish_frame( + parse: *mut GstBaseParse, + frame: *mut GstBaseParseFrame, + size: c_int, + ) -> gst::GstFlowReturn; + pub fn gst_base_parse_merge_tags( + parse: *mut GstBaseParse, + tags: *mut gst::GstTagList, + mode: gst::GstTagMergeMode, + ); + pub fn gst_base_parse_push_frame( + parse: *mut GstBaseParse, + frame: *mut GstBaseParseFrame, + ) -> gst::GstFlowReturn; + pub fn gst_base_parse_set_average_bitrate(parse: *mut GstBaseParse, bitrate: c_uint); + pub fn gst_base_parse_set_duration( + parse: *mut GstBaseParse, + fmt: gst::GstFormat, + duration: i64, + interval: c_int, + ); + pub fn gst_base_parse_set_frame_rate( + parse: *mut GstBaseParse, + fps_num: c_uint, + fps_den: c_uint, + lead_in: c_uint, + lead_out: c_uint, + ); + pub fn gst_base_parse_set_has_timing_info(parse: *mut GstBaseParse, has_timing: gboolean); + pub fn gst_base_parse_set_infer_ts(parse: *mut GstBaseParse, infer_ts: gboolean); + pub fn gst_base_parse_set_latency( + parse: *mut GstBaseParse, + min_latency: gst::GstClockTime, + max_latency: gst::GstClockTime, + ); + pub fn gst_base_parse_set_min_frame_size(parse: *mut GstBaseParse, min_size: c_uint); + pub fn gst_base_parse_set_passthrough(parse: *mut GstBaseParse, passthrough: gboolean); + pub fn gst_base_parse_set_pts_interpolation( + parse: *mut GstBaseParse, + pts_interpolate: gboolean, + ); + pub fn gst_base_parse_set_syncable(parse: *mut GstBaseParse, syncable: gboolean); + pub fn gst_base_parse_set_ts_at_offset(parse: *mut GstBaseParse, offset: size_t); + + //========================================================================= + // GstBaseSink + //========================================================================= + pub fn gst_base_sink_get_type() -> GType; + pub fn gst_base_sink_do_preroll( + sink: *mut GstBaseSink, + obj: *mut gst::GstMiniObject, + ) -> gst::GstFlowReturn; + pub fn gst_base_sink_get_blocksize(sink: *mut GstBaseSink) -> c_uint; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_base_sink_get_drop_out_of_segment(sink: *mut GstBaseSink) -> gboolean; + pub fn gst_base_sink_get_last_sample(sink: *mut GstBaseSink) -> *mut gst::GstSample; + pub fn gst_base_sink_get_latency(sink: *mut GstBaseSink) -> gst::GstClockTime; + pub fn gst_base_sink_get_max_bitrate(sink: *mut GstBaseSink) -> u64; + pub fn gst_base_sink_get_max_lateness(sink: *mut GstBaseSink) -> i64; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_base_sink_get_processing_deadline(sink: *mut GstBaseSink) -> gst::GstClockTime; + pub fn gst_base_sink_get_render_delay(sink: *mut GstBaseSink) -> gst::GstClockTime; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_base_sink_get_stats(sink: *mut GstBaseSink) -> *mut gst::GstStructure; + pub fn gst_base_sink_get_sync(sink: *mut GstBaseSink) -> gboolean; + pub fn gst_base_sink_get_throttle_time(sink: *mut GstBaseSink) -> u64; + pub fn gst_base_sink_get_ts_offset(sink: *mut GstBaseSink) -> gst::GstClockTimeDiff; + pub fn gst_base_sink_is_async_enabled(sink: *mut GstBaseSink) -> gboolean; + pub fn gst_base_sink_is_last_sample_enabled(sink: *mut GstBaseSink) -> gboolean; + pub fn gst_base_sink_is_qos_enabled(sink: *mut GstBaseSink) -> gboolean; + pub fn gst_base_sink_query_latency( + sink: *mut GstBaseSink, + live: *mut gboolean, + upstream_live: *mut gboolean, + min_latency: *mut gst::GstClockTime, + max_latency: *mut gst::GstClockTime, + ) -> gboolean; + pub fn gst_base_sink_set_async_enabled(sink: *mut GstBaseSink, enabled: gboolean); + pub fn gst_base_sink_set_blocksize(sink: *mut GstBaseSink, blocksize: c_uint); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_base_sink_set_drop_out_of_segment( + sink: *mut GstBaseSink, + drop_out_of_segment: gboolean, + ); + pub fn gst_base_sink_set_last_sample_enabled(sink: *mut GstBaseSink, enabled: gboolean); + pub fn gst_base_sink_set_max_bitrate(sink: *mut GstBaseSink, max_bitrate: u64); + pub fn gst_base_sink_set_max_lateness(sink: *mut GstBaseSink, max_lateness: i64); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_base_sink_set_processing_deadline( + sink: *mut GstBaseSink, + processing_deadline: gst::GstClockTime, + ); + pub fn gst_base_sink_set_qos_enabled(sink: *mut GstBaseSink, enabled: gboolean); + pub fn gst_base_sink_set_render_delay(sink: *mut GstBaseSink, delay: gst::GstClockTime); + pub fn gst_base_sink_set_sync(sink: *mut GstBaseSink, sync: gboolean); + pub fn gst_base_sink_set_throttle_time(sink: *mut GstBaseSink, throttle: u64); + pub fn gst_base_sink_set_ts_offset(sink: *mut GstBaseSink, offset: gst::GstClockTimeDiff); + pub fn gst_base_sink_wait( + sink: *mut GstBaseSink, + time: gst::GstClockTime, + jitter: *mut gst::GstClockTimeDiff, + ) -> gst::GstFlowReturn; + pub fn gst_base_sink_wait_clock( + sink: *mut GstBaseSink, + time: gst::GstClockTime, + jitter: *mut gst::GstClockTimeDiff, + ) -> gst::GstClockReturn; + pub fn gst_base_sink_wait_preroll(sink: *mut GstBaseSink) -> gst::GstFlowReturn; + + //========================================================================= + // GstBaseSrc + //========================================================================= + pub fn gst_base_src_get_type() -> GType; + pub fn gst_base_src_get_allocator( + src: *mut GstBaseSrc, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); + pub fn gst_base_src_get_blocksize(src: *mut GstBaseSrc) -> c_uint; + pub fn gst_base_src_get_buffer_pool(src: *mut GstBaseSrc) -> *mut gst::GstBufferPool; + pub fn gst_base_src_get_do_timestamp(src: *mut GstBaseSrc) -> gboolean; + pub fn gst_base_src_is_async(src: *mut GstBaseSrc) -> gboolean; + pub fn gst_base_src_is_live(src: *mut GstBaseSrc) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_base_src_negotiate(src: *mut GstBaseSrc) -> gboolean; + pub fn gst_base_src_new_seamless_segment( + src: *mut GstBaseSrc, + start: i64, + stop: i64, + time: i64, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_base_src_new_segment( + src: *mut GstBaseSrc, + segment: *const gst::GstSegment, + ) -> gboolean; + pub fn gst_base_src_query_latency( + src: *mut GstBaseSrc, + live: *mut gboolean, + min_latency: *mut gst::GstClockTime, + max_latency: *mut gst::GstClockTime, + ) -> gboolean; + pub fn gst_base_src_set_async(src: *mut GstBaseSrc, async: gboolean); + pub fn gst_base_src_set_automatic_eos(src: *mut GstBaseSrc, automatic_eos: gboolean); + pub fn gst_base_src_set_blocksize(src: *mut GstBaseSrc, blocksize: c_uint); + pub fn gst_base_src_set_caps(src: *mut GstBaseSrc, caps: *mut gst::GstCaps) -> gboolean; + pub fn gst_base_src_set_do_timestamp(src: *mut GstBaseSrc, timestamp: gboolean); + pub fn gst_base_src_set_dynamic_size(src: *mut GstBaseSrc, dynamic: gboolean); + pub fn gst_base_src_set_format(src: *mut GstBaseSrc, format: gst::GstFormat); + pub fn gst_base_src_set_live(src: *mut GstBaseSrc, live: gboolean); + pub fn gst_base_src_start_complete(basesrc: *mut GstBaseSrc, ret: gst::GstFlowReturn); + pub fn gst_base_src_start_wait(basesrc: *mut GstBaseSrc) -> gst::GstFlowReturn; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_base_src_submit_buffer_list( + src: *mut GstBaseSrc, + buffer_list: *mut gst::GstBufferList, + ); + pub fn gst_base_src_wait_playing(src: *mut GstBaseSrc) -> gst::GstFlowReturn; + + //========================================================================= + // GstBaseTransform + //========================================================================= + pub fn gst_base_transform_get_type() -> GType; + pub fn gst_base_transform_get_allocator( + trans: *mut GstBaseTransform, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); + pub fn gst_base_transform_get_buffer_pool( + trans: *mut GstBaseTransform, + ) -> *mut gst::GstBufferPool; + pub fn gst_base_transform_is_in_place(trans: *mut GstBaseTransform) -> gboolean; + pub fn gst_base_transform_is_passthrough(trans: *mut GstBaseTransform) -> gboolean; + pub fn gst_base_transform_is_qos_enabled(trans: *mut GstBaseTransform) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_base_transform_reconfigure(trans: *mut GstBaseTransform) -> gboolean; + pub fn gst_base_transform_reconfigure_sink(trans: *mut GstBaseTransform); + pub fn gst_base_transform_reconfigure_src(trans: *mut GstBaseTransform); + pub fn gst_base_transform_set_gap_aware(trans: *mut GstBaseTransform, gap_aware: gboolean); + pub fn gst_base_transform_set_in_place(trans: *mut GstBaseTransform, in_place: gboolean); + pub fn gst_base_transform_set_passthrough(trans: *mut GstBaseTransform, passthrough: gboolean); + pub fn gst_base_transform_set_prefer_passthrough( + trans: *mut GstBaseTransform, + prefer_passthrough: gboolean, + ); + pub fn gst_base_transform_set_qos_enabled(trans: *mut GstBaseTransform, enabled: gboolean); + pub fn gst_base_transform_update_qos( + trans: *mut GstBaseTransform, + proportion: c_double, + diff: gst::GstClockTimeDiff, + timestamp: gst::GstClockTime, + ); + pub fn gst_base_transform_update_src_caps( + trans: *mut GstBaseTransform, + updated_caps: *mut gst::GstCaps, + ) -> gboolean; + + //========================================================================= + // GstCollectPads + //========================================================================= + pub fn gst_collect_pads_get_type() -> GType; + pub fn gst_collect_pads_new() -> *mut GstCollectPads; + pub fn gst_collect_pads_add_pad( + pads: *mut GstCollectPads, + pad: *mut gst::GstPad, + size: c_uint, + destroy_notify: GstCollectDataDestroyNotify, + lock: gboolean, + ) -> *mut GstCollectData; + pub fn gst_collect_pads_available(pads: *mut GstCollectPads) -> c_uint; + pub fn gst_collect_pads_clip_running_time( + pads: *mut GstCollectPads, + cdata: *mut GstCollectData, + buf: *mut gst::GstBuffer, + outbuf: *mut *mut gst::GstBuffer, + user_data: gpointer, + ) -> gst::GstFlowReturn; + pub fn gst_collect_pads_event_default( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + event: *mut gst::GstEvent, + discard: gboolean, + ) -> gboolean; + pub fn gst_collect_pads_flush( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + size: c_uint, + ) -> c_uint; + pub fn gst_collect_pads_peek( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + ) -> *mut gst::GstBuffer; + pub fn gst_collect_pads_pop( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + ) -> *mut gst::GstBuffer; + pub fn gst_collect_pads_query_default( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + query: *mut gst::GstQuery, + discard: gboolean, + ) -> gboolean; + pub fn gst_collect_pads_read_buffer( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + size: c_uint, + ) -> *mut gst::GstBuffer; + pub fn gst_collect_pads_remove_pad( + pads: *mut GstCollectPads, + pad: *mut gst::GstPad, + ) -> gboolean; + pub fn gst_collect_pads_set_buffer_function( + pads: *mut GstCollectPads, + func: GstCollectPadsBufferFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_clip_function( + pads: *mut GstCollectPads, + clipfunc: GstCollectPadsClipFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_compare_function( + pads: *mut GstCollectPads, + func: GstCollectPadsCompareFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_event_function( + pads: *mut GstCollectPads, + func: GstCollectPadsEventFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_flush_function( + pads: *mut GstCollectPads, + func: GstCollectPadsFlushFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_flushing(pads: *mut GstCollectPads, flushing: gboolean); + pub fn gst_collect_pads_set_function( + pads: *mut GstCollectPads, + func: GstCollectPadsFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_query_function( + pads: *mut GstCollectPads, + func: GstCollectPadsQueryFunction, + user_data: gpointer, + ); + pub fn gst_collect_pads_set_waiting( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + waiting: gboolean, + ); + pub fn gst_collect_pads_src_event_default( + pads: *mut GstCollectPads, + pad: *mut gst::GstPad, + event: *mut gst::GstEvent, + ) -> gboolean; + pub fn gst_collect_pads_start(pads: *mut GstCollectPads); + pub fn gst_collect_pads_stop(pads: *mut GstCollectPads); + pub fn gst_collect_pads_take_buffer( + pads: *mut GstCollectPads, + data: *mut GstCollectData, + size: c_uint, + ) -> *mut gst::GstBuffer; + + //========================================================================= + // GstDataQueue + //========================================================================= + pub fn gst_data_queue_get_type() -> GType; + pub fn gst_data_queue_new( + checkfull: GstDataQueueCheckFullFunction, + fullcallback: GstDataQueueFullCallback, + emptycallback: GstDataQueueEmptyCallback, + checkdata: gpointer, + ) -> *mut GstDataQueue; + pub fn gst_data_queue_drop_head(queue: *mut GstDataQueue, type_: GType) -> gboolean; + pub fn gst_data_queue_flush(queue: *mut GstDataQueue); + pub fn gst_data_queue_get_level(queue: *mut GstDataQueue, level: *mut GstDataQueueSize); + pub fn gst_data_queue_is_empty(queue: *mut GstDataQueue) -> gboolean; + pub fn gst_data_queue_is_full(queue: *mut GstDataQueue) -> gboolean; + pub fn gst_data_queue_limits_changed(queue: *mut GstDataQueue); + pub fn gst_data_queue_peek( + queue: *mut GstDataQueue, + item: *mut *mut GstDataQueueItem, + ) -> gboolean; + pub fn gst_data_queue_pop( + queue: *mut GstDataQueue, + item: *mut *mut GstDataQueueItem, + ) -> gboolean; + pub fn gst_data_queue_push(queue: *mut GstDataQueue, item: *mut GstDataQueueItem) -> gboolean; + pub fn gst_data_queue_push_force( + queue: *mut GstDataQueue, + item: *mut GstDataQueueItem, + ) -> gboolean; + pub fn gst_data_queue_set_flushing(queue: *mut GstDataQueue, flushing: gboolean); + + //========================================================================= + // GstPushSrc + //========================================================================= + pub fn gst_push_src_get_type() -> GType; + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_type_find_helper(src: *mut gst::GstPad, size: u64) -> *mut gst::GstCaps; + pub fn gst_type_find_helper_for_buffer( + obj: *mut gst::GstObject, + buf: *mut gst::GstBuffer, + prob: *mut gst::GstTypeFindProbability, + ) -> *mut gst::GstCaps; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_type_find_helper_for_buffer_with_extension( + obj: *mut gst::GstObject, + buf: *mut gst::GstBuffer, + extension: *const c_char, + prob: *mut gst::GstTypeFindProbability, + ) -> *mut gst::GstCaps; + pub fn gst_type_find_helper_for_data( + obj: *mut gst::GstObject, + data: *const u8, + size: size_t, + prob: *mut gst::GstTypeFindProbability, + ) -> *mut gst::GstCaps; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_type_find_helper_for_data_with_extension( + obj: *mut gst::GstObject, + data: *const u8, + size: size_t, + extension: *const c_char, + prob: *mut gst::GstTypeFindProbability, + ) -> *mut gst::GstCaps; + pub fn gst_type_find_helper_for_extension( + obj: *mut gst::GstObject, + extension: *const c_char, + ) -> *mut gst::GstCaps; + pub fn gst_type_find_helper_get_range( + obj: *mut gst::GstObject, + parent: *mut gst::GstObject, + func: GstTypeFindHelperGetRangeFunction, + size: u64, + extension: *const c_char, + prob: *mut gst::GstTypeFindProbability, + ) -> *mut gst::GstCaps; + #[cfg(any(feature = "v1_14_3", feature = "dox"))] + pub fn gst_type_find_helper_get_range_full( + obj: *mut gst::GstObject, + parent: *mut gst::GstObject, + func: GstTypeFindHelperGetRangeFunction, + size: u64, + extension: *const c_char, + caps: *mut *mut gst::GstCaps, + prob: *mut gst::GstTypeFindProbability, + ) -> gst::GstFlowReturn; + +} diff --git a/sys/gstreamer-base-sys/tests/abi.rs b/sys/gstreamer-base-sys/tests/abi.rs new file mode 100644 index 000000000..05b689e59 --- /dev/null +++ b/sys/gstreamer-base-sys/tests/abi.rs @@ -0,0 +1,489 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_base_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_base_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-base-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstAggregator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAggregatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAggregatorPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAggregatorPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAggregatorStartTimeSelection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseParse", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseParseClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseParseFrame", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseParseFrameFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseSink", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseSinkClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseSrcFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseTransform", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBaseTransformClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBitReader", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBitWriter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstByteReader", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstByteWriter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCollectData", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCollectPads", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCollectPadsClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCollectPadsStateFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDataQueue", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDataQueueClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDataQueueItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDataQueueSize", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPushSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPushSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(gint) GST_AGGREGATOR_START_TIME_SELECTION_FIRST", "1"), + ("(gint) GST_AGGREGATOR_START_TIME_SELECTION_SET", "2"), + ("(gint) GST_AGGREGATOR_START_TIME_SELECTION_ZERO", "0"), + ("GST_BASE_PARSE_FLAG_DRAINING", "2"), + ("GST_BASE_PARSE_FLAG_LOST_SYNC", "1"), + ("(guint) GST_BASE_PARSE_FRAME_FLAG_CLIP", "4"), + ("(guint) GST_BASE_PARSE_FRAME_FLAG_DROP", "8"), + ("(guint) GST_BASE_PARSE_FRAME_FLAG_NEW_FRAME", "1"), + ("(guint) GST_BASE_PARSE_FRAME_FLAG_NONE", "0"), + ("(guint) GST_BASE_PARSE_FRAME_FLAG_NO_FRAME", "2"), + ("(guint) GST_BASE_PARSE_FRAME_FLAG_QUEUE", "16"), + ("(guint) GST_BASE_SRC_FLAG_LAST", "1048576"), + ("(guint) GST_BASE_SRC_FLAG_STARTED", "32768"), + ("(guint) GST_BASE_SRC_FLAG_STARTING", "16384"), + ("GST_BASE_TRANSFORM_SINK_NAME", "sink"), + ("GST_BASE_TRANSFORM_SRC_NAME", "src"), + ("(guint) GST_COLLECT_PADS_STATE_EOS", "1"), + ("(guint) GST_COLLECT_PADS_STATE_FLUSHING", "2"), + ("(guint) GST_COLLECT_PADS_STATE_LOCKED", "16"), + ("(guint) GST_COLLECT_PADS_STATE_NEW_SEGMENT", "4"), + ("(guint) GST_COLLECT_PADS_STATE_WAITING", "8"), +]; diff --git a/sys/gstreamer-base-sys/tests/constant.c b/sys/gstreamer-base-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-base-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-base-sys/tests/layout.c b/sys/gstreamer-base-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-base-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-base-sys/tests/manual.h b/sys/gstreamer-base-sys/tests/manual.h new file mode 100644 index 000000000..144bbeeed --- /dev/null +++ b/sys/gstreamer-base-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-check-sys/CHANGELOG.md b/sys/gstreamer-check-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-check-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-check-sys/Cargo.toml b/sys/gstreamer-check-sys/Cargo.toml new file mode 100644 index 000000000..78632699b --- /dev/null +++ b/sys/gstreamer-check-sys/Cargo.toml @@ -0,0 +1,59 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +dox = [] +v1_2 = [] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] + +[lib] +name = "gstreamer_check_sys" + +[package] +authors = ["Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstcheck-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_check_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstcheck-1.0" +name = "gstreamer-check-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_check_1_0] +name = "gstreamer-check-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_check_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-check-sys/LICENSE b/sys/gstreamer-check-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-check-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-check-sys/README.md b/sys/gstreamer-check-sys/README.md new file mode 100644 index 000000000..629872b39 --- /dev/null +++ b/sys/gstreamer-check-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-check-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-check-sys.svg)](https://crates.io/crates/gstreamer-check-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Check library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-check-sys/build.rs b/sys/gstreamer-check-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-check-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-check-sys/src/lib.rs b/sys/gstreamer-check-sys/src/lib.rs new file mode 100644 index 000000000..1333988a8 --- /dev/null +++ b/sys/gstreamer-check-sys/src/lib.rs @@ -0,0 +1,401 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Callbacks +pub type GstHarnessPrepareBufferFunc = + Option *mut gst::GstBuffer>; +pub type GstHarnessPrepareEventFunc = + Option *mut gst::GstEvent>; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstHarness { + pub element: *mut gst::GstElement, + pub srcpad: *mut gst::GstPad, + pub sinkpad: *mut gst::GstPad, + pub src_harness: *mut GstHarness, + pub sink_harness: *mut GstHarness, + pub priv_: *mut GstHarnessPrivate, +} + +impl ::std::fmt::Debug for GstHarness { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstHarness @ {:?}", self as *const _)) + .field("element", &self.element) + .field("srcpad", &self.srcpad) + .field("sinkpad", &self.sinkpad) + .field("src_harness", &self.src_harness) + .field("sink_harness", &self.sink_harness) + .finish() + } +} + +#[repr(C)] +pub struct _GstHarnessPrivate(c_void); + +pub type GstHarnessPrivate = *mut _GstHarnessPrivate; + +#[repr(C)] +pub struct _GstHarnessThread(c_void); + +pub type GstHarnessThread = *mut _GstHarnessThread; + +#[repr(C)] +pub struct _GstStreamConsistency(c_void); + +pub type GstStreamConsistency = *mut _GstStreamConsistency; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTestClockClass { + pub parent_class: gst::GstClockClass, +} + +impl ::std::fmt::Debug for GstTestClockClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTestClockClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstTestClockPrivate(c_void); + +pub type GstTestClockPrivate = *mut _GstTestClockPrivate; + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTestClock { + pub parent: gst::GstClock, + pub priv_: *mut GstTestClockPrivate, +} + +impl ::std::fmt::Debug for GstTestClock { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTestClock @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[link(name = "gstcheck-1.0")] +extern "C" { + + //========================================================================= + // GstHarness + //========================================================================= + pub fn gst_harness_add_element_full( + h: *mut GstHarness, + element: *mut gst::GstElement, + hsrc: *mut gst::GstStaticPadTemplate, + element_sinkpad_name: *const c_char, + hsink: *mut gst::GstStaticPadTemplate, + element_srcpad_name: *const c_char, + ); + pub fn gst_harness_add_element_sink_pad(h: *mut GstHarness, sinkpad: *mut gst::GstPad); + pub fn gst_harness_add_element_src_pad(h: *mut GstHarness, srcpad: *mut gst::GstPad); + pub fn gst_harness_add_parse(h: *mut GstHarness, launchline: *const c_char); + pub fn gst_harness_add_probe( + h: *mut GstHarness, + element_name: *const c_char, + pad_name: *const c_char, + mask: gst::GstPadProbeType, + callback: gst::GstPadProbeCallback, + user_data: gpointer, + destroy_data: glib::GDestroyNotify, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_harness_add_propose_allocation_meta( + h: *mut GstHarness, + api: GType, + params: *const gst::GstStructure, + ); + pub fn gst_harness_add_sink(h: *mut GstHarness, sink_element_name: *const c_char); + pub fn gst_harness_add_sink_harness(h: *mut GstHarness, sink_harness: *mut GstHarness); + pub fn gst_harness_add_sink_parse(h: *mut GstHarness, launchline: *const c_char); + pub fn gst_harness_add_src( + h: *mut GstHarness, + src_element_name: *const c_char, + has_clock_wait: gboolean, + ); + pub fn gst_harness_add_src_harness( + h: *mut GstHarness, + src_harness: *mut GstHarness, + has_clock_wait: gboolean, + ); + pub fn gst_harness_add_src_parse( + h: *mut GstHarness, + launchline: *const c_char, + has_clock_wait: gboolean, + ); + pub fn gst_harness_buffers_in_queue(h: *mut GstHarness) -> c_uint; + pub fn gst_harness_buffers_received(h: *mut GstHarness) -> c_uint; + pub fn gst_harness_crank_multiple_clock_waits(h: *mut GstHarness, waits: c_uint) -> gboolean; + pub fn gst_harness_crank_single_clock_wait(h: *mut GstHarness) -> gboolean; + pub fn gst_harness_create_buffer(h: *mut GstHarness, size: size_t) -> *mut gst::GstBuffer; + pub fn gst_harness_dump_to_file(h: *mut GstHarness, filename: *const c_char); + pub fn gst_harness_events_in_queue(h: *mut GstHarness) -> c_uint; + pub fn gst_harness_events_received(h: *mut GstHarness) -> c_uint; + pub fn gst_harness_find_element( + h: *mut GstHarness, + element_name: *const c_char, + ) -> *mut gst::GstElement; + pub fn gst_harness_get( + h: *mut GstHarness, + element_name: *const c_char, + first_property_name: *const c_char, + ... + ); + pub fn gst_harness_get_allocator( + h: *mut GstHarness, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); + pub fn gst_harness_get_last_pushed_timestamp(h: *mut GstHarness) -> gst::GstClockTime; + pub fn gst_harness_get_testclock(h: *mut GstHarness) -> *mut GstTestClock; + pub fn gst_harness_play(h: *mut GstHarness); + pub fn gst_harness_pull(h: *mut GstHarness) -> *mut gst::GstBuffer; + pub fn gst_harness_pull_event(h: *mut GstHarness) -> *mut gst::GstEvent; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_harness_pull_until_eos( + h: *mut GstHarness, + buf: *mut *mut gst::GstBuffer, + ) -> gboolean; + pub fn gst_harness_pull_upstream_event(h: *mut GstHarness) -> *mut gst::GstEvent; + pub fn gst_harness_push(h: *mut GstHarness, buffer: *mut gst::GstBuffer) -> gst::GstFlowReturn; + pub fn gst_harness_push_and_pull( + h: *mut GstHarness, + buffer: *mut gst::GstBuffer, + ) -> *mut gst::GstBuffer; + pub fn gst_harness_push_event(h: *mut GstHarness, event: *mut gst::GstEvent) -> gboolean; + pub fn gst_harness_push_from_src(h: *mut GstHarness) -> gst::GstFlowReturn; + pub fn gst_harness_push_to_sink(h: *mut GstHarness) -> gst::GstFlowReturn; + pub fn gst_harness_push_upstream_event( + h: *mut GstHarness, + event: *mut gst::GstEvent, + ) -> gboolean; + pub fn gst_harness_query_latency(h: *mut GstHarness) -> gst::GstClockTime; + pub fn gst_harness_set( + h: *mut GstHarness, + element_name: *const c_char, + first_property_name: *const c_char, + ... + ); + pub fn gst_harness_set_blocking_push_mode(h: *mut GstHarness); + pub fn gst_harness_set_caps(h: *mut GstHarness, in_: *mut gst::GstCaps, out: *mut gst::GstCaps); + pub fn gst_harness_set_caps_str(h: *mut GstHarness, in_: *const c_char, out: *const c_char); + pub fn gst_harness_set_drop_buffers(h: *mut GstHarness, drop_buffers: gboolean); + pub fn gst_harness_set_forwarding(h: *mut GstHarness, forwarding: gboolean); + pub fn gst_harness_set_propose_allocator( + h: *mut GstHarness, + allocator: *mut gst::GstAllocator, + params: *const gst::GstAllocationParams, + ); + pub fn gst_harness_set_sink_caps(h: *mut GstHarness, caps: *mut gst::GstCaps); + pub fn gst_harness_set_sink_caps_str(h: *mut GstHarness, str: *const c_char); + pub fn gst_harness_set_src_caps(h: *mut GstHarness, caps: *mut gst::GstCaps); + pub fn gst_harness_set_src_caps_str(h: *mut GstHarness, str: *const c_char); + pub fn gst_harness_set_time(h: *mut GstHarness, time: gst::GstClockTime) -> gboolean; + pub fn gst_harness_set_upstream_latency(h: *mut GstHarness, latency: gst::GstClockTime); + pub fn gst_harness_sink_push_many(h: *mut GstHarness, pushes: c_int) -> gst::GstFlowReturn; + pub fn gst_harness_src_crank_and_push_many( + h: *mut GstHarness, + cranks: c_int, + pushes: c_int, + ) -> gst::GstFlowReturn; + pub fn gst_harness_src_push_event(h: *mut GstHarness) -> gboolean; + pub fn gst_harness_stress_custom_start( + h: *mut GstHarness, + init: glib::GFunc, + callback: glib::GFunc, + data: gpointer, + sleep: c_ulong, + ) -> *mut GstHarnessThread; + pub fn gst_harness_stress_property_start_full( + h: *mut GstHarness, + name: *const c_char, + value: *const gobject::GValue, + sleep: c_ulong, + ) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_buffer_start_full( + h: *mut GstHarness, + caps: *mut gst::GstCaps, + segment: *const gst::GstSegment, + buf: *mut gst::GstBuffer, + sleep: c_ulong, + ) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_buffer_with_cb_start_full( + h: *mut GstHarness, + caps: *mut gst::GstCaps, + segment: *const gst::GstSegment, + func: GstHarnessPrepareBufferFunc, + data: gpointer, + notify: glib::GDestroyNotify, + sleep: c_ulong, + ) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_event_start_full( + h: *mut GstHarness, + event: *mut gst::GstEvent, + sleep: c_ulong, + ) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_event_with_cb_start_full( + h: *mut GstHarness, + func: GstHarnessPrepareEventFunc, + data: gpointer, + notify: glib::GDestroyNotify, + sleep: c_ulong, + ) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_upstream_event_start_full( + h: *mut GstHarness, + event: *mut gst::GstEvent, + sleep: c_ulong, + ) -> *mut GstHarnessThread; + pub fn gst_harness_stress_push_upstream_event_with_cb_start_full( + h: *mut GstHarness, + func: GstHarnessPrepareEventFunc, + data: gpointer, + notify: glib::GDestroyNotify, + sleep: c_ulong, + ) -> *mut GstHarnessThread; + pub fn gst_harness_stress_requestpad_start_full( + h: *mut GstHarness, + templ: *mut gst::GstPadTemplate, + name: *const c_char, + caps: *mut gst::GstCaps, + release: gboolean, + sleep: c_ulong, + ) -> *mut GstHarnessThread; + pub fn gst_harness_stress_statechange_start_full( + h: *mut GstHarness, + sleep: c_ulong, + ) -> *mut GstHarnessThread; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_harness_take_all_data(h: *mut GstHarness, size: *mut size_t) -> *mut u8; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_harness_take_all_data_as_buffer(h: *mut GstHarness) -> *mut gst::GstBuffer; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_harness_take_all_data_as_bytes(h: *mut GstHarness) -> *mut glib::GBytes; + pub fn gst_harness_teardown(h: *mut GstHarness); + pub fn gst_harness_try_pull(h: *mut GstHarness) -> *mut gst::GstBuffer; + pub fn gst_harness_try_pull_event(h: *mut GstHarness) -> *mut gst::GstEvent; + pub fn gst_harness_try_pull_upstream_event(h: *mut GstHarness) -> *mut gst::GstEvent; + pub fn gst_harness_upstream_events_in_queue(h: *mut GstHarness) -> c_uint; + pub fn gst_harness_upstream_events_received(h: *mut GstHarness) -> c_uint; + pub fn gst_harness_use_systemclock(h: *mut GstHarness); + pub fn gst_harness_use_testclock(h: *mut GstHarness); + pub fn gst_harness_wait_for_clock_id_waits( + h: *mut GstHarness, + waits: c_uint, + timeout: c_uint, + ) -> gboolean; + pub fn gst_harness_new(element_name: *const c_char) -> *mut GstHarness; + pub fn gst_harness_new_empty() -> *mut GstHarness; + pub fn gst_harness_new_full( + element: *mut gst::GstElement, + hsrc: *mut gst::GstStaticPadTemplate, + element_sinkpad_name: *const c_char, + hsink: *mut gst::GstStaticPadTemplate, + element_srcpad_name: *const c_char, + ) -> *mut GstHarness; + pub fn gst_harness_new_parse(launchline: *const c_char) -> *mut GstHarness; + pub fn gst_harness_new_with_element( + element: *mut gst::GstElement, + element_sinkpad_name: *const c_char, + element_srcpad_name: *const c_char, + ) -> *mut GstHarness; + pub fn gst_harness_new_with_padnames( + element_name: *const c_char, + element_sinkpad_name: *const c_char, + element_srcpad_name: *const c_char, + ) -> *mut GstHarness; + pub fn gst_harness_new_with_templates( + element_name: *const c_char, + hsrc: *mut gst::GstStaticPadTemplate, + hsink: *mut gst::GstStaticPadTemplate, + ) -> *mut GstHarness; + pub fn gst_harness_stress_thread_stop(t: *mut GstHarnessThread) -> c_uint; + + //========================================================================= + // GstTestClock + //========================================================================= + pub fn gst_test_clock_get_type() -> GType; + pub fn gst_test_clock_new() -> *mut gst::GstClock; + pub fn gst_test_clock_new_with_start_time(start_time: gst::GstClockTime) -> *mut gst::GstClock; + pub fn gst_test_clock_id_list_get_latest_time( + pending_list: *const glib::GList, + ) -> gst::GstClockTime; + pub fn gst_test_clock_advance_time(test_clock: *mut GstTestClock, delta: gst::GstClockTimeDiff); + pub fn gst_test_clock_crank(test_clock: *mut GstTestClock) -> gboolean; + pub fn gst_test_clock_get_next_entry_time(test_clock: *mut GstTestClock) -> gst::GstClockTime; + pub fn gst_test_clock_has_id(test_clock: *mut GstTestClock, id: gst::GstClockID) -> gboolean; + pub fn gst_test_clock_peek_id_count(test_clock: *mut GstTestClock) -> c_uint; + pub fn gst_test_clock_peek_next_pending_id( + test_clock: *mut GstTestClock, + pending_id: *mut gst::GstClockID, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_test_clock_process_id( + test_clock: *mut GstTestClock, + pending_id: gst::GstClockID, + ) -> gboolean; + pub fn gst_test_clock_process_id_list( + test_clock: *mut GstTestClock, + pending_list: *const glib::GList, + ) -> c_uint; + pub fn gst_test_clock_process_next_clock_id(test_clock: *mut GstTestClock) -> gst::GstClockID; + pub fn gst_test_clock_set_time(test_clock: *mut GstTestClock, new_time: gst::GstClockTime); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_test_clock_timed_wait_for_multiple_pending_ids( + test_clock: *mut GstTestClock, + count: c_uint, + timeout_ms: c_uint, + pending_list: *mut *mut glib::GList, + ) -> gboolean; + pub fn gst_test_clock_wait_for_multiple_pending_ids( + test_clock: *mut GstTestClock, + count: c_uint, + pending_list: *mut *mut glib::GList, + ); + pub fn gst_test_clock_wait_for_next_pending_id( + test_clock: *mut GstTestClock, + pending_id: *mut gst::GstClockID, + ); + pub fn gst_test_clock_wait_for_pending_id_count(test_clock: *mut GstTestClock, count: c_uint); + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_consistency_checker_add_pad( + consist: *mut GstStreamConsistency, + pad: *mut gst::GstPad, + ) -> gboolean; + pub fn gst_consistency_checker_free(consist: *mut GstStreamConsistency); + pub fn gst_consistency_checker_new(pad: *mut gst::GstPad) -> *mut GstStreamConsistency; + pub fn gst_consistency_checker_reset(consist: *mut GstStreamConsistency); + +} diff --git a/sys/gstreamer-check-sys/tests/abi.rs b/sys/gstreamer-check-sys/tests/abi.rs new file mode 100644 index 000000000..f0bc8bf7f --- /dev/null +++ b/sys/gstreamer-check-sys/tests/abi.rs @@ -0,0 +1,278 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_check_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_check_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-check-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstHarness", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTestClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTestClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[]; diff --git a/sys/gstreamer-check-sys/tests/constant.c b/sys/gstreamer-check-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-check-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-check-sys/tests/layout.c b/sys/gstreamer-check-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-check-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-check-sys/tests/manual.h b/sys/gstreamer-check-sys/tests/manual.h new file mode 100644 index 000000000..d1407d72b --- /dev/null +++ b/sys/gstreamer-check-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-controller-sys/CHANGELOG.md b/sys/gstreamer-controller-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-controller-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-controller-sys/Cargo.toml b/sys/gstreamer-controller-sys/Cargo.toml new file mode 100644 index 000000000..e79b03e94 --- /dev/null +++ b/sys/gstreamer-controller-sys/Cargo.toml @@ -0,0 +1,63 @@ +[build-dependencies] +pkg-config = "0.3.7" +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-base-sys] +path = "../gstreamer-base-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_2 = [] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = [] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] + +[lib] +name = "gstreamer_controller_sys" + +[package] +authors = ["Alexey Galakhov "] +build = "build.rs" +description = "FFI bindings to libgstcontroller-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_app_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstcontroller-1.0" +name = "gstreamer-controller-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_controller_1_0] +name = "gstreamer-controller-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_controller_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-controller-sys/README.md b/sys/gstreamer-controller-sys/README.md new file mode 100644 index 000000000..45e2e7977 --- /dev/null +++ b/sys/gstreamer-controller-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-audio-sys.svg)](https://crates.io/crates/gstreamer-audio-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Audio library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-controller-sys/build.rs b/sys/gstreamer-controller-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-controller-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-controller-sys/src/lib.rs b/sys/gstreamer-controller-sys/src/lib.rs new file mode 100644 index 000000000..87d50dadb --- /dev/null +++ b/sys/gstreamer-controller-sys/src/lib.rs @@ -0,0 +1,556 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstInterpolationMode = c_int; +pub const GST_INTERPOLATION_MODE_NONE: GstInterpolationMode = 0; +pub const GST_INTERPOLATION_MODE_LINEAR: GstInterpolationMode = 1; +pub const GST_INTERPOLATION_MODE_CUBIC: GstInterpolationMode = 2; +pub const GST_INTERPOLATION_MODE_CUBIC_MONOTONIC: GstInterpolationMode = 3; + +pub type GstLFOWaveform = c_int; +pub const GST_LFO_WAVEFORM_SINE: GstLFOWaveform = 0; +pub const GST_LFO_WAVEFORM_SQUARE: GstLFOWaveform = 1; +pub const GST_LFO_WAVEFORM_SAW: GstLFOWaveform = 2; +pub const GST_LFO_WAVEFORM_REVERSE_SAW: GstLFOWaveform = 3; +pub const GST_LFO_WAVEFORM_TRIANGLE: GstLFOWaveform = 4; + +// Unions +#[repr(C)] +#[derive(Copy, Clone)] +pub union GstControlPoint_cache { + pub cubic: GstControlPoint_cache_cubic, + pub cubic_monotonic: GstControlPoint_cache_cubic_monotonic, + pub _gst_reserved: [u8; 64], +} + +impl ::std::fmt::Debug for GstControlPoint_cache { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstControlPoint_cache @ {:?}", self as *const _)) + .field("cubic", unsafe { &self.cubic }) + .field("cubic_monotonic", unsafe { &self.cubic_monotonic }) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub union GstDirectControlBinding_ABI { + pub _gst_reserved: [gpointer; 4], + pub abi: GstDirectControlBinding_ABI_abi, +} + +impl ::std::fmt::Debug for GstDirectControlBinding_ABI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstDirectControlBinding_ABI @ {:?}", + self as *const _ + )) + .field("_gst_reserved", unsafe { &self._gst_reserved }) + .field("abi", unsafe { &self.abi }) + .finish() + } +} + +// Callbacks +pub type GstDirectControlBindingConvertGValue = + Option; +pub type GstDirectControlBindingConvertValue = + Option; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstARGBControlBindingClass { + pub parent_class: gst::GstControlBindingClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstARGBControlBindingClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstARGBControlBindingClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstControlPoint { + pub timestamp: gst::GstClockTime, + pub value: c_double, + pub cache: GstControlPoint_cache, +} + +impl ::std::fmt::Debug for GstControlPoint { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstControlPoint @ {:?}", self as *const _)) + .field("timestamp", &self.timestamp) + .field("value", &self.value) + .field("cache", &self.cache) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstControlPoint_cache_cubic { + pub h: c_double, + pub z: c_double, +} + +impl ::std::fmt::Debug for GstControlPoint_cache_cubic { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstControlPoint_cache_cubic @ {:?}", + self as *const _ + )) + .field("h", &self.h) + .field("z", &self.z) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstControlPoint_cache_cubic_monotonic { + pub c1s: c_double, + pub c2s: c_double, + pub c3s: c_double, +} + +impl ::std::fmt::Debug for GstControlPoint_cache_cubic_monotonic { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstControlPoint_cache_cubic_monotonic @ {:?}", + self as *const _ + )) + .field("c1s", &self.c1s) + .field("c2s", &self.c2s) + .field("c3s", &self.c3s) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDirectControlBindingClass { + pub parent_class: gst::GstControlBindingClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDirectControlBindingClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstDirectControlBindingClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDirectControlBinding_ABI_abi { + pub want_absolute: gboolean, +} + +impl ::std::fmt::Debug for GstDirectControlBinding_ABI_abi { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstDirectControlBinding_ABI_abi @ {:?}", + self as *const _ + )) + .field("want_absolute", &self.want_absolute) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstInterpolationControlSourceClass { + pub parent_class: GstTimedValueControlSourceClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstInterpolationControlSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstInterpolationControlSourceClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstInterpolationControlSourcePrivate(c_void); + +pub type GstInterpolationControlSourcePrivate = *mut _GstInterpolationControlSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstLFOControlSourceClass { + pub parent_class: gst::GstControlSourceClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstLFOControlSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstLFOControlSourceClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstLFOControlSourcePrivate(c_void); + +pub type GstLFOControlSourcePrivate = *mut _GstLFOControlSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstProxyControlBindingClass { + pub parent_class: gst::GstControlBindingClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstProxyControlBindingClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstProxyControlBindingClass @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTimedValueControlSourceClass { + pub parent_class: gst::GstControlSourceClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTimedValueControlSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstTimedValueControlSourceClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstTimedValueControlSourcePrivate(c_void); + +pub type GstTimedValueControlSourcePrivate = *mut _GstTimedValueControlSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTriggerControlSourceClass { + pub parent_class: GstTimedValueControlSourceClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTriggerControlSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstTriggerControlSourceClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstTriggerControlSourcePrivate(c_void); + +pub type GstTriggerControlSourcePrivate = *mut _GstTriggerControlSourcePrivate; + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstARGBControlBinding { + pub parent: gst::GstControlBinding, + pub cs_a: *mut gst::GstControlSource, + pub cs_r: *mut gst::GstControlSource, + pub cs_g: *mut gst::GstControlSource, + pub cs_b: *mut gst::GstControlSource, + pub cur_value: gobject::GValue, + pub last_value: u32, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstARGBControlBinding { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstARGBControlBinding @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDirectControlBinding { + pub parent: gst::GstControlBinding, + pub cs: *mut gst::GstControlSource, + pub cur_value: gobject::GValue, + pub last_value: c_double, + pub byte_size: c_int, + pub convert_value: GstDirectControlBindingConvertValue, + pub convert_g_value: GstDirectControlBindingConvertGValue, + pub ABI: GstDirectControlBinding_ABI, +} + +impl ::std::fmt::Debug for GstDirectControlBinding { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDirectControlBinding @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("ABI", &self.ABI) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstInterpolationControlSource { + pub parent: GstTimedValueControlSource, + pub priv_: *mut GstInterpolationControlSourcePrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstInterpolationControlSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstInterpolationControlSource @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstLFOControlSource { + pub parent: gst::GstControlSource, + pub priv_: *mut GstLFOControlSourcePrivate, + pub lock: glib::GMutex, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstLFOControlSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstLFOControlSource @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstProxyControlBinding { + pub parent: gst::GstControlBinding, + pub ref_object: gobject::GWeakRef, + pub property_name: *mut c_char, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstProxyControlBinding { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstProxyControlBinding @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTimedValueControlSource { + pub parent: gst::GstControlSource, + pub lock: glib::GMutex, + pub values: *mut glib::GSequence, + pub nvalues: c_int, + pub valid_cache: gboolean, + pub priv_: *mut GstTimedValueControlSourcePrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTimedValueControlSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstTimedValueControlSource @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("lock", &self.lock) + .field("values", &self.values) + .field("nvalues", &self.nvalues) + .field("valid_cache", &self.valid_cache) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTriggerControlSource { + pub parent: GstTimedValueControlSource, + pub priv_: *mut GstTriggerControlSourcePrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTriggerControlSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTriggerControlSource @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[link(name = "gstcontroller-1.0")] +extern "C" { + + //========================================================================= + // GstInterpolationMode + //========================================================================= + pub fn gst_interpolation_mode_get_type() -> GType; + + //========================================================================= + // GstLFOWaveform + //========================================================================= + pub fn gst_lfo_waveform_get_type() -> GType; + + //========================================================================= + // GstControlPoint + //========================================================================= + pub fn gst_control_point_get_type() -> GType; + pub fn gst_control_point_copy(cp: *mut GstControlPoint) -> *mut GstControlPoint; + pub fn gst_control_point_free(cp: *mut GstControlPoint); + + //========================================================================= + // GstARGBControlBinding + //========================================================================= + pub fn gst_argb_control_binding_get_type() -> GType; + pub fn gst_argb_control_binding_new( + object: *mut gst::GstObject, + property_name: *const c_char, + cs_a: *mut gst::GstControlSource, + cs_r: *mut gst::GstControlSource, + cs_g: *mut gst::GstControlSource, + cs_b: *mut gst::GstControlSource, + ) -> *mut gst::GstControlBinding; + + //========================================================================= + // GstDirectControlBinding + //========================================================================= + pub fn gst_direct_control_binding_get_type() -> GType; + pub fn gst_direct_control_binding_new( + object: *mut gst::GstObject, + property_name: *const c_char, + cs: *mut gst::GstControlSource, + ) -> *mut gst::GstControlBinding; + pub fn gst_direct_control_binding_new_absolute( + object: *mut gst::GstObject, + property_name: *const c_char, + cs: *mut gst::GstControlSource, + ) -> *mut gst::GstControlBinding; + + //========================================================================= + // GstInterpolationControlSource + //========================================================================= + pub fn gst_interpolation_control_source_get_type() -> GType; + pub fn gst_interpolation_control_source_new() -> *mut gst::GstControlSource; + + //========================================================================= + // GstLFOControlSource + //========================================================================= + pub fn gst_lfo_control_source_get_type() -> GType; + pub fn gst_lfo_control_source_new() -> *mut gst::GstControlSource; + + //========================================================================= + // GstProxyControlBinding + //========================================================================= + pub fn gst_proxy_control_binding_get_type() -> GType; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_proxy_control_binding_new( + object: *mut gst::GstObject, + property_name: *const c_char, + ref_object: *mut gst::GstObject, + ref_property_name: *const c_char, + ) -> *mut gst::GstControlBinding; + + //========================================================================= + // GstTimedValueControlSource + //========================================================================= + pub fn gst_timed_value_control_source_get_type() -> GType; + pub fn gst_timed_value_control_source_find_control_point_iter( + self_: *mut GstTimedValueControlSource, + timestamp: gst::GstClockTime, + ) -> *mut glib::GSequenceIter; + pub fn gst_timed_value_control_source_get_all( + self_: *mut GstTimedValueControlSource, + ) -> *mut glib::GList; + pub fn gst_timed_value_control_source_get_count( + self_: *mut GstTimedValueControlSource, + ) -> c_int; + pub fn gst_timed_value_control_source_set( + self_: *mut GstTimedValueControlSource, + timestamp: gst::GstClockTime, + value: c_double, + ) -> gboolean; + pub fn gst_timed_value_control_source_set_from_list( + self_: *mut GstTimedValueControlSource, + timedvalues: *const glib::GSList, + ) -> gboolean; + pub fn gst_timed_value_control_source_unset( + self_: *mut GstTimedValueControlSource, + timestamp: gst::GstClockTime, + ) -> gboolean; + pub fn gst_timed_value_control_source_unset_all(self_: *mut GstTimedValueControlSource); + + //========================================================================= + // GstTriggerControlSource + //========================================================================= + pub fn gst_trigger_control_source_get_type() -> GType; + pub fn gst_trigger_control_source_new() -> *mut gst::GstControlSource; + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_timed_value_control_invalidate_cache(self_: *mut GstTimedValueControlSource); + +} diff --git a/sys/gstreamer-controller-sys/tests/abi.rs b/sys/gstreamer-controller-sys/tests/abi.rs new file mode 100644 index 000000000..9038ddbf6 --- /dev/null +++ b/sys/gstreamer-controller-sys/tests/abi.rs @@ -0,0 +1,386 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_controller_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_controller_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-controller-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstARGBControlBinding", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstARGBControlBindingClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstControlPoint", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDirectControlBinding", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDirectControlBindingClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstInterpolationControlSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstInterpolationControlSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstInterpolationMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstLFOControlSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstLFOControlSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstLFOWaveform", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstProxyControlBinding", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstProxyControlBindingClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTimedValueControlSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTimedValueControlSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTriggerControlSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTriggerControlSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(gint) GST_INTERPOLATION_MODE_CUBIC", "2"), + ("(gint) GST_INTERPOLATION_MODE_CUBIC_MONOTONIC", "3"), + ("(gint) GST_INTERPOLATION_MODE_LINEAR", "1"), + ("(gint) GST_INTERPOLATION_MODE_NONE", "0"), + ("(gint) GST_LFO_WAVEFORM_REVERSE_SAW", "3"), + ("(gint) GST_LFO_WAVEFORM_SAW", "2"), + ("(gint) GST_LFO_WAVEFORM_SINE", "0"), + ("(gint) GST_LFO_WAVEFORM_SQUARE", "1"), + ("(gint) GST_LFO_WAVEFORM_TRIANGLE", "4"), +]; diff --git a/sys/gstreamer-controller-sys/tests/constant.c b/sys/gstreamer-controller-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-controller-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-controller-sys/tests/layout.c b/sys/gstreamer-controller-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-controller-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-controller-sys/tests/manual.h b/sys/gstreamer-controller-sys/tests/manual.h new file mode 100644 index 000000000..19378716e --- /dev/null +++ b/sys/gstreamer-controller-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-editing-services-sys/CHANGELOG.md b/sys/gstreamer-editing-services-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-editing-services-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-editing-services-sys/Cargo.toml b/sys/gstreamer-editing-services-sys/Cargo.toml new file mode 100644 index 000000000..2b3d1a065 --- /dev/null +++ b/sys/gstreamer-editing-services-sys/Cargo.toml @@ -0,0 +1,68 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.gio-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-base-sys] +path = "../gstreamer-base-sys" + +[dependencies.gstreamer-pbutils-sys] +path = "../gstreamer-pbutils-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +dox = [] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +v1_2 = [] +v1_4 = ["v1_2"] + +[lib] +name = "gstreamer_editing_services_sys" + +[package] +authors = ["Thibault Saunier ", "Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libges-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_editing_services_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia", "nle"] +license = "MIT" +links = "ges-1.0" +name = "gstreamer-editing-services-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gst_editing_services_1_0] +name = "gst-editing-services-1.0" +version = "1.8" + +[package.metadata.system-deps.gst_editing_services_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-editing-services-sys/README.md b/sys/gstreamer-editing-services-sys/README.md new file mode 100644 index 000000000..936025767 --- /dev/null +++ b/sys/gstreamer-editing-services-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-editing-services-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-editing-services-sys.svg)](https://crates.io/crates/gstreamer-editing-services-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Editing Services) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-editing-services-sys/build.rs b/sys/gstreamer-editing-services-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-editing-services-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-editing-services-sys/src/lib.rs b/sys/gstreamer-editing-services-sys/src/lib.rs new file mode 100644 index 000000000..f92f8450e --- /dev/null +++ b/sys/gstreamer-editing-services-sys/src/lib.rs @@ -0,0 +1,4144 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate gio_sys as gio; +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_pbutils_sys as gst_pbutils; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Aliases +pub type GESFrameNumber = i64; + +// Enums +pub type GESAssetLoadingReturn = c_int; +pub const GES_ASSET_LOADING_ERROR: GESAssetLoadingReturn = 0; +pub const GES_ASSET_LOADING_ASYNC: GESAssetLoadingReturn = 1; +pub const GES_ASSET_LOADING_OK: GESAssetLoadingReturn = 2; + +pub type GESChildrenControlMode = c_int; +pub const GES_CHILDREN_UPDATE: GESChildrenControlMode = 0; +pub const GES_CHILDREN_IGNORE_NOTIFIES: GESChildrenControlMode = 1; +pub const GES_CHILDREN_UPDATE_OFFSETS: GESChildrenControlMode = 2; +pub const GES_CHILDREN_UPDATE_ALL_VALUES: GESChildrenControlMode = 3; +pub const GES_CHILDREN_LAST: GESChildrenControlMode = 4; + +pub type GESEdge = c_int; +pub const GES_EDGE_START: GESEdge = 0; +pub const GES_EDGE_END: GESEdge = 1; +pub const GES_EDGE_NONE: GESEdge = 2; + +pub type GESEditMode = c_int; +pub const GES_EDIT_MODE_NORMAL: GESEditMode = 0; +pub const GES_EDIT_MODE_RIPPLE: GESEditMode = 1; +pub const GES_EDIT_MODE_ROLL: GESEditMode = 2; +pub const GES_EDIT_MODE_TRIM: GESEditMode = 3; +pub const GES_EDIT_MODE_SLIDE: GESEditMode = 4; + +pub type GESError = c_int; +pub const GES_ERROR_ASSET_WRONG_ID: GESError = 0; +pub const GES_ERROR_ASSET_LOADING: GESError = 1; +pub const GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE: GESError = 2; +pub const GES_ERROR_INVALID_FRAME_NUMBER: GESError = 3; +pub const GES_ERROR_NEGATIVE_LAYER: GESError = 4; +pub const GES_ERROR_NEGATIVE_TIME: GESError = 5; +pub const GES_ERROR_NOT_ENOUGH_INTERNAL_CONTENT: GESError = 6; +pub const GES_ERROR_INVALID_OVERLAP_IN_TRACK: GESError = 7; +pub const GES_ERROR_INVALID_EFFECT_BIN_DESCRIPTION: GESError = 8; + +pub type GESTextHAlign = c_int; +pub const GES_TEXT_HALIGN_LEFT: GESTextHAlign = 0; +pub const GES_TEXT_HALIGN_CENTER: GESTextHAlign = 1; +pub const GES_TEXT_HALIGN_RIGHT: GESTextHAlign = 2; +pub const GES_TEXT_HALIGN_POSITION: GESTextHAlign = 4; +pub const GES_TEXT_HALIGN_ABSOLUTE: GESTextHAlign = 5; + +pub type GESTextVAlign = c_int; +pub const GES_TEXT_VALIGN_BASELINE: GESTextVAlign = 0; +pub const GES_TEXT_VALIGN_BOTTOM: GESTextVAlign = 1; +pub const GES_TEXT_VALIGN_TOP: GESTextVAlign = 2; +pub const GES_TEXT_VALIGN_POSITION: GESTextVAlign = 3; +pub const GES_TEXT_VALIGN_CENTER: GESTextVAlign = 4; +pub const GES_TEXT_VALIGN_ABSOLUTE: GESTextVAlign = 5; + +pub type GESVideoStandardTransitionType = c_int; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE: GESVideoStandardTransitionType = 0; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR: GESVideoStandardTransitionType = 1; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB: GESVideoStandardTransitionType = 2; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL: GESVideoStandardTransitionType = 3; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR: GESVideoStandardTransitionType = 4; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR: GESVideoStandardTransitionType = 5; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL: GESVideoStandardTransitionType = 6; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI: GESVideoStandardTransitionType = 7; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO: GESVideoStandardTransitionType = 8; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V: GESVideoStandardTransitionType = 21; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H: GESVideoStandardTransitionType = 22; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC: GESVideoStandardTransitionType = 23; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC: GESVideoStandardTransitionType = 24; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC: GESVideoStandardTransitionType = 25; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC: GESVideoStandardTransitionType = 26; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL: GESVideoStandardTransitionType = 41; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR: GESVideoStandardTransitionType = 42; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V: GESVideoStandardTransitionType = 43; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H: GESVideoStandardTransitionType = 44; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL: GESVideoStandardTransitionType = 45; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL: GESVideoStandardTransitionType = 46; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD: GESVideoStandardTransitionType = 47; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD: GESVideoStandardTransitionType = 48; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D: GESVideoStandardTransitionType = 61; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L: GESVideoStandardTransitionType = 62; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U: GESVideoStandardTransitionType = 63; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R: GESVideoStandardTransitionType = 64; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D: GESVideoStandardTransitionType = 65; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L: GESVideoStandardTransitionType = 66; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U: GESVideoStandardTransitionType = 67; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R: GESVideoStandardTransitionType = 68; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT: GESVideoStandardTransitionType = 101; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12: GESVideoStandardTransitionType = 201; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3: GESVideoStandardTransitionType = 202; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6: GESVideoStandardTransitionType = 203; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9: GESVideoStandardTransitionType = 204; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV: GESVideoStandardTransitionType = 205; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH: GESVideoStandardTransitionType = 206; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB: GESVideoStandardTransitionType = 207; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT: GESVideoStandardTransitionType = 211; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR: GESVideoStandardTransitionType = 212; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV: GESVideoStandardTransitionType = 213; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH: GESVideoStandardTransitionType = 214; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT: GESVideoStandardTransitionType = 221; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR: GESVideoStandardTransitionType = 222; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB: GESVideoStandardTransitionType = 223; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL: GESVideoStandardTransitionType = 224; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV: GESVideoStandardTransitionType = 225; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD: GESVideoStandardTransitionType = 226; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV: GESVideoStandardTransitionType = 227; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH: GESVideoStandardTransitionType = 228; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T: GESVideoStandardTransitionType = 231; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R: GESVideoStandardTransitionType = 232; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B: GESVideoStandardTransitionType = 233; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L: GESVideoStandardTransitionType = 234; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV: GESVideoStandardTransitionType = 235; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH: GESVideoStandardTransitionType = 236; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL: GESVideoStandardTransitionType = 241; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL: GESVideoStandardTransitionType = 242; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR: GESVideoStandardTransitionType = 243; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR: GESVideoStandardTransitionType = 244; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL: GESVideoStandardTransitionType = 245; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL: GESVideoStandardTransitionType = 246; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T: GESVideoStandardTransitionType = 251; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L: GESVideoStandardTransitionType = 252; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B: GESVideoStandardTransitionType = 253; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R: GESVideoStandardTransitionType = 254; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R: GESVideoStandardTransitionType = 261; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U: GESVideoStandardTransitionType = 262; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V: GESVideoStandardTransitionType = 263; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H: GESVideoStandardTransitionType = 264; +pub const GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE: GESVideoStandardTransitionType = 512; + +pub type GESVideoTestPattern = c_int; +pub const GES_VIDEO_TEST_PATTERN_SMPTE: GESVideoTestPattern = 0; +pub const GES_VIDEO_TEST_PATTERN_SNOW: GESVideoTestPattern = 1; +pub const GES_VIDEO_TEST_PATTERN_BLACK: GESVideoTestPattern = 2; +pub const GES_VIDEO_TEST_PATTERN_WHITE: GESVideoTestPattern = 3; +pub const GES_VIDEO_TEST_PATTERN_RED: GESVideoTestPattern = 4; +pub const GES_VIDEO_TEST_PATTERN_GREEN: GESVideoTestPattern = 5; +pub const GES_VIDEO_TEST_PATTERN_BLUE: GESVideoTestPattern = 6; +pub const GES_VIDEO_TEST_PATTERN_CHECKERS1: GESVideoTestPattern = 7; +pub const GES_VIDEO_TEST_PATTERN_CHECKERS2: GESVideoTestPattern = 8; +pub const GES_VIDEO_TEST_PATTERN_CHECKERS4: GESVideoTestPattern = 9; +pub const GES_VIDEO_TEST_PATTERN_CHECKERS8: GESVideoTestPattern = 10; +pub const GES_VIDEO_TEST_PATTERN_CIRCULAR: GESVideoTestPattern = 11; +pub const GES_VIDEO_TEST_PATTERN_BLINK: GESVideoTestPattern = 12; +pub const GES_VIDEO_TEST_PATTERN_SMPTE75: GESVideoTestPattern = 13; +pub const GES_VIDEO_TEST_ZONE_PLATE: GESVideoTestPattern = 14; +pub const GES_VIDEO_TEST_GAMUT: GESVideoTestPattern = 15; +pub const GES_VIDEO_TEST_CHROMA_ZONE_PLATE: GESVideoTestPattern = 16; +pub const GES_VIDEO_TEST_PATTERN_SOLID: GESVideoTestPattern = 17; + +// Constants +pub const GES_FRAME_NUMBER_NONE: i64 = 9223372036854775807; +pub const GES_META_DESCRIPTION: *const c_char = b"description\0" as *const u8 as *const c_char; +pub const GES_META_FORMATTER_EXTENSION: *const c_char = + b"extension\0" as *const u8 as *const c_char; +pub const GES_META_FORMATTER_MIMETYPE: *const c_char = b"mimetype\0" as *const u8 as *const c_char; +pub const GES_META_FORMATTER_NAME: *const c_char = b"name\0" as *const u8 as *const c_char; +pub const GES_META_FORMATTER_RANK: *const c_char = b"rank\0" as *const u8 as *const c_char; +pub const GES_META_FORMATTER_VERSION: *const c_char = b"version\0" as *const u8 as *const c_char; +pub const GES_META_FORMAT_VERSION: *const c_char = + b"format-version\0" as *const u8 as *const c_char; +pub const GES_META_MARKER_COLOR: *const c_char = b"marker-color\0" as *const u8 as *const c_char; +pub const GES_META_VOLUME: *const c_char = b"volume\0" as *const u8 as *const c_char; +pub const GES_META_VOLUME_DEFAULT: c_double = 1.000000; +pub const GES_MULTI_FILE_URI_PREFIX: *const c_char = + b"multifile://\0" as *const u8 as *const c_char; +pub const GES_PADDING: c_int = 4; +pub const GES_PADDING_LARGE: c_int = 20; +pub const GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY: u32 = 4294967295; +pub const GES_VERSION_MAJOR: c_int = 1; +pub const GES_VERSION_MICRO: c_int = 0; +pub const GES_VERSION_MINOR: c_int = 18; +pub const GES_VERSION_NANO: c_int = 0; + +// Flags +pub type GESMetaFlag = c_uint; +pub const GES_META_READABLE: GESMetaFlag = 1; +pub const GES_META_WRITABLE: GESMetaFlag = 2; +pub const GES_META_READ_WRITE: GESMetaFlag = 3; + +pub type GESPipelineFlags = c_uint; +pub const GES_PIPELINE_MODE_PREVIEW_AUDIO: GESPipelineFlags = 1; +pub const GES_PIPELINE_MODE_PREVIEW_VIDEO: GESPipelineFlags = 2; +pub const GES_PIPELINE_MODE_PREVIEW: GESPipelineFlags = 3; +pub const GES_PIPELINE_MODE_RENDER: GESPipelineFlags = 4; +pub const GES_PIPELINE_MODE_SMART_RENDER: GESPipelineFlags = 8; + +pub type GESTrackType = c_uint; +pub const GES_TRACK_TYPE_UNKNOWN: GESTrackType = 1; +pub const GES_TRACK_TYPE_AUDIO: GESTrackType = 2; +pub const GES_TRACK_TYPE_VIDEO: GESTrackType = 4; +pub const GES_TRACK_TYPE_TEXT: GESTrackType = 8; +pub const GES_TRACK_TYPE_CUSTOM: GESTrackType = 16; + +// Unions +#[repr(C)] +#[derive(Copy, Clone)] +pub union GESClipClass_ABI { + pub _ges_reserved: [gpointer; 20], + pub abi: GESClipClass_ABI_abi, +} + +impl ::std::fmt::Debug for GESClipClass_ABI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESClipClass_ABI @ {:?}", self as *const _)) + .field("_ges_reserved", unsafe { &self._ges_reserved }) + .field("abi", unsafe { &self.abi }) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub union GESTrackElementClass_ABI { + pub _ges_reserved: [gpointer; 20], + pub abi: GESTrackElementClass_ABI_abi, +} + +impl ::std::fmt::Debug for GESTrackElementClass_ABI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GESTrackElementClass_ABI @ {:?}", + self as *const _ + )) + .field("_ges_reserved", unsafe { &self._ges_reserved }) + .field("abi", unsafe { &self.abi }) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub union GESVideoSourceClass_ABI { + pub _ges_reserved: [gpointer; 4], + pub abi: GESVideoSourceClass_ABI_abi, +} + +impl ::std::fmt::Debug for GESVideoSourceClass_ABI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESVideoSourceClass_ABI @ {:?}", self as *const _)) + .field("_ges_reserved", unsafe { &self._ges_reserved }) + .field("abi", unsafe { &self.abi }) + .finish() + } +} + +// Callbacks +pub type GESBaseEffectTimeTranslationFunc = Option< + unsafe extern "C" fn( + *mut GESBaseEffect, + gst::GstClockTime, + *mut glib::GHashTable, + gpointer, + ) -> gst::GstClockTime, +>; +pub type GESCreateElementForGapFunc = + Option *mut gst::GstElement>; +pub type GESCreateTrackElementFunc = + Option *mut GESTrackElement>; +pub type GESCreateTrackElementsFunc = + Option *mut glib::GList>; +pub type GESExtractableCheckId = + Option *mut c_char>; +pub type GESFillTrackElementFunc = Option< + unsafe extern "C" fn(*mut GESClip, *mut GESTrackElement, *mut gst::GstElement) -> gboolean, +>; +pub type GESFormatterCanLoadURIMethod = Option< + unsafe extern "C" fn(*mut GESFormatter, *const c_char, *mut *mut glib::GError) -> gboolean, +>; +pub type GESFormatterLoadFromURIMethod = Option< + unsafe extern "C" fn( + *mut GESFormatter, + *mut GESTimeline, + *const c_char, + *mut *mut glib::GError, + ) -> gboolean, +>; +pub type GESFormatterSaveToURIMethod = Option< + unsafe extern "C" fn( + *mut GESFormatter, + *mut GESTimeline, + *const c_char, + gboolean, + *mut *mut glib::GError, + ) -> gboolean, +>; +pub type GESMetaForeachFunc = Option< + unsafe extern "C" fn(*const GESMetaContainer, *const c_char, *const gobject::GValue, gpointer), +>; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAssetClass { + pub parent: gobject::GObjectClass, + pub start_loading: Option< + unsafe extern "C" fn(*mut GESAsset, *mut *mut glib::GError) -> GESAssetLoadingReturn, + >, + pub extract: + Option *mut GESExtractable>, + pub inform_proxy: Option, + pub proxied: Option, + pub request_id_update: Option< + unsafe extern "C" fn(*mut GESAsset, *mut *mut c_char, *mut glib::GError) -> gboolean, + >, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAssetClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAssetClass @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("start_loading", &self.start_loading) + .field("extract", &self.extract) + .field("inform_proxy", &self.inform_proxy) + .field("proxied", &self.proxied) + .field("request_id_update", &self.request_id_update) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESAssetPrivate(c_void); + +pub type GESAssetPrivate = *mut _GESAssetPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAudioSourceClass { + pub parent_class: GESSourceClass, + pub create_source: Option *mut gst::GstElement>, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAudioSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAudioSourceClass @ {:?}", self as *const _)) + .field("create_source", &self.create_source) + .finish() + } +} + +#[repr(C)] +pub struct _GESAudioSourcePrivate(c_void); + +pub type GESAudioSourcePrivate = *mut _GESAudioSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAudioTestSourceClass { + pub parent_class: GESAudioSourceClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAudioTestSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAudioTestSourceClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESAudioTestSourcePrivate(c_void); + +pub type GESAudioTestSourcePrivate = *mut _GESAudioTestSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAudioTrackClass { + pub parent_class: GESTrackClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAudioTrackClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAudioTrackClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESAudioTrackPrivate(c_void); + +pub type GESAudioTrackPrivate = *mut _GESAudioTrackPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAudioTransitionClass { + pub parent_class: GESTransitionClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAudioTransitionClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAudioTransitionClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESAudioTransitionPrivate(c_void); + +pub type GESAudioTransitionPrivate = *mut _GESAudioTransitionPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAudioUriSourceClass { + pub parent_class: GESAudioSourceClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAudioUriSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAudioUriSourceClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESAudioUriSourcePrivate(c_void); + +pub type GESAudioUriSourcePrivate = *mut _GESAudioUriSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESBaseEffectClass { + pub parent_class: GESOperationClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESBaseEffectClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESBaseEffectClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESBaseEffectClipClass { + pub parent_class: GESOperationClipClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESBaseEffectClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESBaseEffectClipClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESBaseEffectClipPrivate(c_void); + +pub type GESBaseEffectClipPrivate = *mut _GESBaseEffectClipPrivate; + +#[repr(C)] +pub struct _GESBaseEffectPrivate(c_void); + +pub type GESBaseEffectPrivate = *mut _GESBaseEffectPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESBaseTransitionClipClass { + pub parent_class: GESOperationClipClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESBaseTransitionClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GESBaseTransitionClipClass @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +pub struct _GESBaseTransitionClipPrivate(c_void); + +pub type GESBaseTransitionClipPrivate = *mut _GESBaseTransitionClipPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESBaseXmlFormatterClass { + pub parent: GESFormatterClass, + pub content_parser: glib::GMarkupParser, + pub save: Option< + unsafe extern "C" fn( + *mut GESFormatter, + *mut GESTimeline, + *mut *mut glib::GError, + ) -> *mut glib::GString, + >, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESBaseXmlFormatterClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GESBaseXmlFormatterClass @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("content_parser", &self.content_parser) + .field("save", &self.save) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESBaseXmlFormatterPrivate(c_void); + +pub type GESBaseXmlFormatterPrivate = *mut _GESBaseXmlFormatterPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESClipAssetClass { + pub parent: GESAssetClass, + pub get_natural_framerate: + Option gboolean>, + pub _ges_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GESClipAssetClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESClipAssetClass @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("get_natural_framerate", &self.get_natural_framerate) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESClipAssetPrivate(c_void); + +pub type GESClipAssetPrivate = *mut _GESClipAssetPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESClipClass { + pub parent_class: GESContainerClass, + pub create_track_element: GESCreateTrackElementFunc, + pub create_track_elements: GESCreateTrackElementsFunc, + pub ABI: GESClipClass_ABI, +} + +impl ::std::fmt::Debug for GESClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESClipClass @ {:?}", self as *const _)) + .field("create_track_element", &self.create_track_element) + .field("create_track_elements", &self.create_track_elements) + .field("ABI", &self.ABI) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESClipClass_ABI_abi { + pub can_add_effects: gboolean, +} + +impl ::std::fmt::Debug for GESClipClass_ABI_abi { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESClipClass_ABI_abi @ {:?}", self as *const _)) + .field("can_add_effects", &self.can_add_effects) + .finish() + } +} + +#[repr(C)] +pub struct _GESClipPrivate(c_void); + +pub type GESClipPrivate = *mut _GESClipPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESCommandLineFormatterClass { + pub parent_class: GESFormatterClass, +} + +impl ::std::fmt::Debug for GESCommandLineFormatterClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GESCommandLineFormatterClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GESCommandLineFormatterPrivate(c_void); + +pub type GESCommandLineFormatterPrivate = *mut _GESCommandLineFormatterPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESContainerClass { + pub parent_class: GESTimelineElementClass, + pub child_added: Option, + pub child_removed: Option, + pub add_child: + Option gboolean>, + pub remove_child: + Option gboolean>, + pub ungroup: Option *mut glib::GList>, + pub group: Option *mut GESContainer>, + pub edit: Option< + unsafe extern "C" fn( + *mut GESContainer, + *mut glib::GList, + c_int, + GESEditMode, + GESEdge, + u64, + ) -> gboolean, + >, + pub grouping_priority: c_uint, + pub _ges_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GESContainerClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESContainerClass @ {:?}", self as *const _)) + .field("child_added", &self.child_added) + .field("child_removed", &self.child_removed) + .field("add_child", &self.add_child) + .field("remove_child", &self.remove_child) + .field("ungroup", &self.ungroup) + .field("group", &self.group) + .field("edit", &self.edit) + .finish() + } +} + +#[repr(C)] +pub struct _GESContainerPrivate(c_void); + +pub type GESContainerPrivate = *mut _GESContainerPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESEffectAssetClass { + pub parent_class: GESTrackElementAssetClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESEffectAssetClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESEffectAssetClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESEffectAssetPrivate(c_void); + +pub type GESEffectAssetPrivate = *mut _GESEffectAssetPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESEffectClass { + pub parent_class: GESBaseEffectClass, + pub rate_properties: *mut glib::GList, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESEffectClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESEffectClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESEffectClipClass { + pub parent_class: GESBaseEffectClipClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESEffectClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESEffectClipClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESEffectClipPrivate(c_void); + +pub type GESEffectClipPrivate = *mut _GESEffectClipPrivate; + +#[repr(C)] +pub struct _GESEffectPrivate(c_void); + +pub type GESEffectPrivate = *mut _GESEffectPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESExtractableInterface { + pub parent: gobject::GTypeInterface, + pub asset_type: GType, + pub check_id: GESExtractableCheckId, + pub can_update_asset: gboolean, + pub set_asset: Option, + pub set_asset_full: + Option gboolean>, + pub get_parameters_from_id: + Option *mut gobject::GParameter>, + pub get_id: Option *mut c_char>, + pub get_real_extractable_type: Option GType>, + pub register_metas: Option< + unsafe extern "C" fn( + *mut GESExtractableInterface, + *mut gobject::GObjectClass, + *mut GESAsset, + ) -> gboolean, + >, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESExtractableInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESExtractableInterface @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("asset_type", &self.asset_type) + .field("check_id", &self.check_id) + .field("can_update_asset", &self.can_update_asset) + .field("set_asset", &self.set_asset) + .field("set_asset_full", &self.set_asset_full) + .field("get_parameters_from_id", &self.get_parameters_from_id) + .field("get_id", &self.get_id) + .field("get_real_extractable_type", &self.get_real_extractable_type) + .field("register_metas", &self.register_metas) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESFormatterClass { + pub parent_class: gobject::GInitiallyUnownedClass, + pub can_load_uri: GESFormatterCanLoadURIMethod, + pub load_from_uri: GESFormatterLoadFromURIMethod, + pub save_to_uri: GESFormatterSaveToURIMethod, + pub name: *mut c_char, + pub description: *mut c_char, + pub extension: *mut c_char, + pub mimetype: *mut c_char, + pub version: c_double, + pub rank: gst::GstRank, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESFormatterClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESFormatterClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("can_load_uri", &self.can_load_uri) + .field("load_from_uri", &self.load_from_uri) + .field("save_to_uri", &self.save_to_uri) + .finish() + } +} + +#[repr(C)] +pub struct _GESFormatterPrivate(c_void); + +pub type GESFormatterPrivate = *mut _GESFormatterPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESGroupClass { + pub parent_class: GESContainerClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESGroupClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESGroupClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESGroupPrivate(c_void); + +pub type GESGroupPrivate = *mut _GESGroupPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESImageSourceClass { + pub parent_class: GESVideoSourceClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESImageSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESImageSourceClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESImageSourcePrivate(c_void); + +pub type GESImageSourcePrivate = *mut _GESImageSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESLayerClass { + pub parent_class: gobject::GInitiallyUnownedClass, + pub get_objects: Option *mut glib::GList>, + pub object_added: Option, + pub object_removed: Option, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESLayerClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESLayerClass @ {:?}", self as *const _)) + .field("get_objects", &self.get_objects) + .field("object_added", &self.object_added) + .field("object_removed", &self.object_removed) + .finish() + } +} + +#[repr(C)] +pub struct _GESLayerPrivate(c_void); + +pub type GESLayerPrivate = *mut _GESLayerPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESMarkerClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for GESMarkerClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESMarkerClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESMarkerListClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for GESMarkerListClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESMarkerListClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESMetaContainerInterface { + pub parent_iface: gobject::GTypeInterface, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESMetaContainerInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GESMetaContainerInterface @ {:?}", + self as *const _ + )) + .field("parent_iface", &self.parent_iface) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESMultiFileSourceClass { + pub parent_class: GESVideoSourceClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESMultiFileSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESMultiFileSourceClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESMultiFileSourcePrivate(c_void); + +pub type GESMultiFileSourcePrivate = *mut _GESMultiFileSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESOperationClass { + pub parent_class: GESTrackElementClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESOperationClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESOperationClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESOperationClipClass { + pub parent_class: GESClipClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESOperationClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESOperationClipClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESOperationClipPrivate(c_void); + +pub type GESOperationClipPrivate = *mut _GESOperationClipPrivate; + +#[repr(C)] +pub struct _GESOperationPrivate(c_void); + +pub type GESOperationPrivate = *mut _GESOperationPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESOverlayClipClass { + pub parent_class: GESOperationClipClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESOverlayClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESOverlayClipClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GESOverlayClipPrivate(c_void); + +pub type GESOverlayClipPrivate = *mut _GESOverlayClipPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESPipelineClass { + pub parent_class: gst::GstPipelineClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESPipelineClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESPipelineClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESPipelinePrivate(c_void); + +pub type GESPipelinePrivate = *mut _GESPipelinePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESPitiviFormatterClass { + pub parent_class: GESFormatterClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESPitiviFormatterClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESPitiviFormatterClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESPitiviFormatterPrivate(c_void); + +pub type GESPitiviFormatterPrivate = *mut _GESPitiviFormatterPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESProjectClass { + pub parent_class: GESAssetClass, + pub asset_added: Option, + pub asset_loading: Option, + pub asset_removed: Option, + pub missing_uri: Option< + unsafe extern "C" fn(*mut GESProject, *mut glib::GError, *mut GESAsset) -> *mut c_char, + >, + pub loading_error: Option< + unsafe extern "C" fn(*mut GESProject, *mut glib::GError, *mut c_char, GType) -> gboolean, + >, + pub loaded: Option gboolean>, + pub loading: Option, + pub _ges_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GESProjectClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESProjectClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("asset_added", &self.asset_added) + .field("asset_loading", &self.asset_loading) + .field("asset_removed", &self.asset_removed) + .field("missing_uri", &self.missing_uri) + .field("loading_error", &self.loading_error) + .field("loaded", &self.loaded) + .field("loading", &self.loading) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESProjectPrivate(c_void); + +pub type GESProjectPrivate = *mut _GESProjectPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESSourceClass { + pub parent_class: GESTrackElementClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESSourceClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESSourceClipAssetClass { + pub parent_class: GESClipAssetClass, +} + +impl ::std::fmt::Debug for GESSourceClipAssetClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESSourceClipAssetClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESSourceClipClass { + pub parent_class: GESClipClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESSourceClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESSourceClipClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESSourceClipPrivate(c_void); + +pub type GESSourceClipPrivate = *mut _GESSourceClipPrivate; + +#[repr(C)] +pub struct _GESSourcePrivate(c_void); + +pub type GESSourcePrivate = *mut _GESSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTestClipClass { + pub parent_class: GESSourceClipClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTestClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTestClipClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESTestClipPrivate(c_void); + +pub type GESTestClipPrivate = *mut _GESTestClipPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTextOverlayClass { + pub parent_class: GESOperationClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTextOverlayClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTextOverlayClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTextOverlayClipClass { + pub parent_class: GESOverlayClipClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTextOverlayClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTextOverlayClipClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESTextOverlayClipPrivate(c_void); + +pub type GESTextOverlayClipPrivate = *mut _GESTextOverlayClipPrivate; + +#[repr(C)] +pub struct _GESTextOverlayPrivate(c_void); + +pub type GESTextOverlayPrivate = *mut _GESTextOverlayPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTimelineClass { + pub parent_class: gst::GstBinClass, + pub track_added: Option, + pub track_removed: Option, + pub layer_added: Option, + pub layer_removed: Option, + pub group_added: Option, + pub group_removed: + Option, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTimelineClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTimelineClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("track_added", &self.track_added) + .field("track_removed", &self.track_removed) + .field("layer_added", &self.layer_added) + .field("layer_removed", &self.layer_removed) + .field("group_added", &self.group_added) + .field("group_removed", &self.group_removed) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTimelineElementClass { + pub parent_class: gobject::GInitiallyUnownedClass, + pub set_parent: + Option gboolean>, + pub set_start: + Option gboolean>, + pub set_inpoint: + Option gboolean>, + pub set_duration: + Option gboolean>, + pub set_max_duration: + Option gboolean>, + pub set_priority: Option gboolean>, + pub ripple: Option gboolean>, + pub ripple_end: Option gboolean>, + pub roll_start: Option gboolean>, + pub roll_end: Option gboolean>, + pub trim: Option gboolean>, + pub deep_copy: Option, + pub paste: Option< + unsafe extern "C" fn( + *mut GESTimelineElement, + *mut GESTimelineElement, + gst::GstClockTime, + ) -> *mut GESTimelineElement, + >, + pub list_children_properties: Option< + unsafe extern "C" fn(*mut GESTimelineElement, *mut c_uint) -> *mut *mut gobject::GParamSpec, + >, + pub lookup_child: Option< + unsafe extern "C" fn( + *mut GESTimelineElement, + *const c_char, + *mut *mut gobject::GObject, + *mut *mut gobject::GParamSpec, + ) -> gboolean, + >, + pub get_track_types: Option GESTrackType>, + pub set_child_property: Option< + unsafe extern "C" fn( + *mut GESTimelineElement, + *mut gobject::GObject, + *mut gobject::GParamSpec, + *mut gobject::GValue, + ), + >, + pub get_layer_priority: Option u32>, + pub get_natural_framerate: + Option gboolean>, + pub set_child_property_full: Option< + unsafe extern "C" fn( + *mut GESTimelineElement, + *mut gobject::GObject, + *mut gobject::GParamSpec, + *const gobject::GValue, + *mut *mut glib::GError, + ) -> gboolean, + >, + pub _ges_reserved: [gpointer; 14], +} + +impl ::std::fmt::Debug for GESTimelineElementClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTimelineElementClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("set_parent", &self.set_parent) + .field("set_start", &self.set_start) + .field("set_inpoint", &self.set_inpoint) + .field("set_duration", &self.set_duration) + .field("set_max_duration", &self.set_max_duration) + .field("set_priority", &self.set_priority) + .field("ripple", &self.ripple) + .field("ripple_end", &self.ripple_end) + .field("roll_start", &self.roll_start) + .field("roll_end", &self.roll_end) + .field("trim", &self.trim) + .field("deep_copy", &self.deep_copy) + .field("paste", &self.paste) + .field("list_children_properties", &self.list_children_properties) + .field("lookup_child", &self.lookup_child) + .field("get_track_types", &self.get_track_types) + .field("set_child_property", &self.set_child_property) + .field("get_layer_priority", &self.get_layer_priority) + .field("get_natural_framerate", &self.get_natural_framerate) + .field("set_child_property_full", &self.set_child_property_full) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESTimelineElementPrivate(c_void); + +pub type GESTimelineElementPrivate = *mut _GESTimelineElementPrivate; + +#[repr(C)] +pub struct _GESTimelinePrivate(c_void); + +pub type GESTimelinePrivate = *mut _GESTimelinePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTitleClipClass { + pub parent_class: GESSourceClipClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTitleClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTitleClipClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESTitleClipPrivate(c_void); + +pub type GESTitleClipPrivate = *mut _GESTitleClipPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTitleSourceClass { + pub parent_class: GESVideoSourceClass, + pub _ges_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GESTitleSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTitleSourceClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GESTitleSourcePrivate(c_void); + +pub type GESTitleSourcePrivate = *mut _GESTitleSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTrackClass { + pub parent_class: gst::GstBinClass, + pub get_mixing_element: Option *mut gst::GstElement>, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTrackClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTrackClass @ {:?}", self as *const _)) + .field("get_mixing_element", &self.get_mixing_element) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTrackElementAssetClass { + pub parent_class: GESAssetClass, + pub get_natural_framerate: + Option gboolean>, + pub _ges_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GESTrackElementAssetClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GESTrackElementAssetClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("get_natural_framerate", &self.get_natural_framerate) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESTrackElementAssetPrivate(c_void); + +pub type GESTrackElementAssetPrivate = *mut _GESTrackElementAssetPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTrackElementClass { + pub parent_class: GESTimelineElementClass, + pub nleobject_factorytype: *const c_char, + pub create_gnl_object: + Option *mut gst::GstElement>, + pub create_element: Option *mut gst::GstElement>, + pub active_changed: Option, + pub changed: Option, + pub list_children_properties: Option< + unsafe extern "C" fn(*mut GESTrackElement, *mut c_uint) -> *mut *mut gobject::GParamSpec, + >, + pub lookup_child: Option< + unsafe extern "C" fn( + *mut GESTrackElement, + *const c_char, + *mut *mut gst::GstElement, + *mut *mut gobject::GParamSpec, + ) -> gboolean, + >, + pub ABI: GESTrackElementClass_ABI, +} + +impl ::std::fmt::Debug for GESTrackElementClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTrackElementClass @ {:?}", self as *const _)) + .field("nleobject_factorytype", &self.nleobject_factorytype) + .field("create_gnl_object", &self.create_gnl_object) + .field("create_element", &self.create_element) + .field("active_changed", &self.active_changed) + .field("changed", &self.changed) + .field("list_children_properties", &self.list_children_properties) + .field("lookup_child", &self.lookup_child) + .field("ABI", &self.ABI) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTrackElementClass_ABI_abi { + pub default_has_internal_source: gboolean, + pub default_track_type: GESTrackType, +} + +impl ::std::fmt::Debug for GESTrackElementClass_ABI_abi { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GESTrackElementClass_ABI_abi @ {:?}", + self as *const _ + )) + .field( + "default_has_internal_source", + &self.default_has_internal_source, + ) + .field("default_track_type", &self.default_track_type) + .finish() + } +} + +#[repr(C)] +pub struct _GESTrackElementPrivate(c_void); + +pub type GESTrackElementPrivate = *mut _GESTrackElementPrivate; + +#[repr(C)] +pub struct _GESTrackPrivate(c_void); + +pub type GESTrackPrivate = *mut _GESTrackPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTransitionClass { + pub parent_class: GESOperationClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTransitionClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTransitionClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTransitionClipClass { + pub parent_class: GESBaseTransitionClipClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTransitionClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTransitionClipClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESTransitionClipPrivate(c_void); + +pub type GESTransitionClipPrivate = *mut _GESTransitionClipPrivate; + +#[repr(C)] +pub struct _GESTransitionPrivate(c_void); + +pub type GESTransitionPrivate = *mut _GESTransitionPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESUriClipAssetClass { + pub parent_class: GESSourceClipAssetClass, + pub discoverer: *mut gst_pbutils::GstDiscoverer, + pub sync_discoverer: *mut gst_pbutils::GstDiscoverer, + pub discovered: Option< + unsafe extern "C" fn( + *mut gst_pbutils::GstDiscoverer, + *mut gst_pbutils::GstDiscovererInfo, + *mut glib::GError, + gpointer, + ), + >, + pub _ges_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GESUriClipAssetClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESUriClipAssetClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("discovered", &self.discovered) + .finish() + } +} + +#[repr(C)] +pub struct _GESUriClipAssetPrivate(c_void); + +pub type GESUriClipAssetPrivate = *mut _GESUriClipAssetPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESUriClipClass { + pub parent_class: GESSourceClipClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESUriClipClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESUriClipClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESUriClipPrivate(c_void); + +pub type GESUriClipPrivate = *mut _GESUriClipPrivate; + +#[repr(C)] +pub struct _GESUriSource(c_void); + +pub type GESUriSource = *mut _GESUriSource; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESUriSourceAssetClass { + pub parent_class: GESTrackElementAssetClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESUriSourceAssetClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESUriSourceAssetClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESUriSourceAssetPrivate(c_void); + +pub type GESUriSourceAssetPrivate = *mut _GESUriSourceAssetPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESVideoSourceClass { + pub parent_class: GESSourceClass, + pub create_source: Option *mut gst::GstElement>, + pub ABI: GESVideoSourceClass_ABI, +} + +impl ::std::fmt::Debug for GESVideoSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESVideoSourceClass @ {:?}", self as *const _)) + .field("create_source", &self.create_source) + .field("ABI", &self.ABI) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESVideoSourceClass_ABI_abi { + pub disable_scale_in_compositor: gboolean, + pub needs_converters: Option gboolean>, + pub get_natural_size: + Option gboolean>, + pub create_filters: Option< + unsafe extern "C" fn(*mut GESVideoSource, *mut glib::GPtrArray, gboolean) -> gboolean, + >, +} + +impl ::std::fmt::Debug for GESVideoSourceClass_ABI_abi { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GESVideoSourceClass_ABI_abi @ {:?}", + self as *const _ + )) + .field( + "disable_scale_in_compositor", + &self.disable_scale_in_compositor, + ) + .field("needs_converters", &self.needs_converters) + .field("get_natural_size", &self.get_natural_size) + .field("create_filters", &self.create_filters) + .finish() + } +} + +#[repr(C)] +pub struct _GESVideoSourcePrivate(c_void); + +pub type GESVideoSourcePrivate = *mut _GESVideoSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESVideoTestSourceClass { + pub parent_class: GESVideoSourceClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESVideoTestSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESVideoTestSourceClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESVideoTestSourcePrivate(c_void); + +pub type GESVideoTestSourcePrivate = *mut _GESVideoTestSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESVideoTrackClass { + pub parent_class: GESTrackClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESVideoTrackClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESVideoTrackClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESVideoTrackPrivate(c_void); + +pub type GESVideoTrackPrivate = *mut _GESVideoTrackPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESVideoTransitionClass { + pub parent_class: GESTransitionClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESVideoTransitionClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESVideoTransitionClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GESVideoTransitionPrivate(c_void); + +pub type GESVideoTransitionPrivate = *mut _GESVideoTransitionPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESVideoUriSourceClass { + pub parent_class: GESVideoSourceClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESVideoUriSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESVideoUriSourceClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GESVideoUriSourcePrivate(c_void); + +pub type GESVideoUriSourcePrivate = *mut _GESVideoUriSourcePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESXmlFormatterClass { + pub parent: GESBaseXmlFormatterClass, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESXmlFormatterClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESXmlFormatterClass @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GESXmlFormatterPrivate(c_void); + +pub type GESXmlFormatterPrivate = *mut _GESXmlFormatterPrivate; + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAsset { + pub parent: gobject::GObject, + pub priv_: *mut GESAssetPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAsset { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAsset @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAudioSource { + pub parent: GESSource, + pub priv_: *mut GESAudioSourcePrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAudioSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAudioSource @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAudioTestSource { + pub parent: GESAudioSource, + pub priv_: *mut GESAudioTestSourcePrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAudioTestSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAudioTestSource @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAudioTrack { + pub parent_instance: GESTrack, + pub priv_: *mut GESAudioTrackPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAudioTrack { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAudioTrack @ {:?}", self as *const _)) + .field("parent_instance", &self.parent_instance) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAudioTransition { + pub parent: GESTransition, + pub priv_: *mut GESAudioTransitionPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAudioTransition { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAudioTransition @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESAudioUriSource { + pub parent: GESAudioSource, + pub uri: *mut c_char, + pub priv_: *mut GESUriSource, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESAudioUriSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESAudioUriSource @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESBaseEffect { + pub parent: GESOperation, + pub priv_: *mut GESBaseEffectPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESBaseEffect { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESBaseEffect @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESBaseEffectClip { + pub parent: GESOperationClip, + pub priv_: *mut GESBaseEffectClipPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESBaseEffectClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESBaseEffectClip @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESBaseTransitionClip { + pub parent: GESOperationClip, + pub priv_: *mut GESBaseTransitionClipPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESBaseTransitionClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESBaseTransitionClip @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESBaseXmlFormatter { + pub parent: GESFormatter, + pub priv_: *mut GESBaseXmlFormatterPrivate, + pub xmlcontent: *mut c_char, + pub _ges_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GESBaseXmlFormatter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESBaseXmlFormatter @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESClip { + pub parent: GESContainer, + pub priv_: *mut GESClipPrivate, + pub _ges_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GESClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESClip @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESClipAsset { + pub parent: GESAsset, + pub priv_: *mut GESClipAssetPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESClipAsset { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESClipAsset @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESCommandLineFormatter { + pub parent_instance: GESFormatter, + pub priv_: *mut GESCommandLineFormatterPrivate, +} + +impl ::std::fmt::Debug for GESCommandLineFormatter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESCommandLineFormatter @ {:?}", self as *const _)) + .field("parent_instance", &self.parent_instance) + .field("priv_", &self.priv_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESContainer { + pub parent: GESTimelineElement, + pub children: *mut glib::GList, + pub height: u32, + pub children_control_mode: GESChildrenControlMode, + pub initiated_move: *mut GESTimelineElement, + pub priv_: *mut GESContainerPrivate, + pub _ges_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GESContainer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESContainer @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("children", &self.children) + .field("height", &self.height) + .field("children_control_mode", &self.children_control_mode) + .field("initiated_move", &self.initiated_move) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESEffect { + pub parent: GESBaseEffect, + pub priv_: *mut GESEffectPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESEffect { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESEffect @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESEffectAsset { + pub parent_instance: GESTrackElementAsset, + pub priv_: *mut GESEffectAssetPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESEffectAsset { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESEffectAsset @ {:?}", self as *const _)) + .field("parent_instance", &self.parent_instance) + .field("priv_", &self.priv_) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESEffectClip { + pub parent: GESBaseEffectClip, + pub priv_: *mut GESEffectClipPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESEffectClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESEffectClip @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESFormatter { + pub parent: gobject::GInitiallyUnowned, + pub priv_: *mut GESFormatterPrivate, + pub project: *mut GESProject, + pub timeline: *mut GESTimeline, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESFormatter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESFormatter @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESGroup { + pub parent: GESContainer, + pub priv_: *mut GESGroupPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESGroup { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESGroup @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESImageSource { + pub parent: GESVideoSource, + pub uri: *mut c_char, + pub priv_: *mut GESImageSourcePrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESImageSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESImageSource @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESLayer { + pub parent: gobject::GInitiallyUnowned, + pub timeline: *mut GESTimeline, + pub min_nle_priority: u32, + pub max_nle_priority: u32, + pub priv_: *mut GESLayerPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESLayer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESLayer @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("timeline", &self.timeline) + .field("min_nle_priority", &self.min_nle_priority) + .field("max_nle_priority", &self.max_nle_priority) + .field("priv_", &self.priv_) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +#[repr(C)] +pub struct GESMarker(c_void); + +impl ::std::fmt::Debug for GESMarker { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESMarker @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GESMarkerList(c_void); + +impl ::std::fmt::Debug for GESMarkerList { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESMarkerList @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESMultiFileSource { + pub parent: GESVideoSource, + pub uri: *mut c_char, + pub priv_: *mut GESMultiFileSourcePrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESMultiFileSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESMultiFileSource @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESOperation { + pub parent: GESTrackElement, + pub priv_: *mut GESOperationPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESOperation { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESOperation @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESOperationClip { + pub parent: GESClip, + pub priv_: *mut GESOperationClipPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESOperationClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESOperationClip @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESOverlayClip { + pub parent: GESOperationClip, + pub priv_: *mut GESOverlayClipPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESOverlayClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESOverlayClip @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESPipeline { + pub parent: gst::GstPipeline, + pub priv_: *mut GESPipelinePrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESPipeline { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESPipeline @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESPitiviFormatter { + pub parent: GESFormatter, + pub priv_: *mut GESPitiviFormatterPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESPitiviFormatter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESPitiviFormatter @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESProject { + pub parent: GESAsset, + pub priv_: *mut GESProjectPrivate, + pub __ges_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GESProject { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESProject @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESSource { + pub parent: GESTrackElement, + pub priv_: *mut GESSourcePrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESSource @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESSourceClip { + pub parent: GESClip, + pub priv_: *mut GESSourceClipPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESSourceClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESSourceClip @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESSourceClipAsset { + pub parent_instance: GESClipAsset, +} + +impl ::std::fmt::Debug for GESSourceClipAsset { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESSourceClipAsset @ {:?}", self as *const _)) + .field("parent_instance", &self.parent_instance) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTestClip { + pub parent: GESSourceClip, + pub priv_: *mut GESTestClipPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTestClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTestClip @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTextOverlay { + pub parent: GESOperation, + pub priv_: *mut GESTextOverlayPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTextOverlay { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTextOverlay @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTextOverlayClip { + pub parent: GESOverlayClip, + pub priv_: *mut GESTextOverlayClipPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTextOverlayClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTextOverlayClip @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTimeline { + pub parent: gst::GstBin, + pub layers: *mut glib::GList, + pub tracks: *mut glib::GList, + pub priv_: *mut GESTimelinePrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTimeline { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTimeline @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("layers", &self.layers) + .field("tracks", &self.tracks) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTimelineElement { + pub parent_instance: gobject::GInitiallyUnowned, + pub parent: *mut GESTimelineElement, + pub asset: *mut GESAsset, + pub start: gst::GstClockTime, + pub inpoint: gst::GstClockTime, + pub duration: gst::GstClockTime, + pub maxduration: gst::GstClockTime, + pub priority: u32, + pub timeline: *mut GESTimeline, + pub name: *mut c_char, + pub priv_: *mut GESTimelineElementPrivate, + pub _ges_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GESTimelineElement { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTimelineElement @ {:?}", self as *const _)) + .field("parent_instance", &self.parent_instance) + .field("parent", &self.parent) + .field("asset", &self.asset) + .field("start", &self.start) + .field("inpoint", &self.inpoint) + .field("duration", &self.duration) + .field("maxduration", &self.maxduration) + .field("priority", &self.priority) + .field("timeline", &self.timeline) + .field("name", &self.name) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTitleClip { + pub parent: GESSourceClip, + pub priv_: *mut GESTitleClipPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTitleClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTitleClip @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTitleSource { + pub parent: GESVideoSource, + pub priv_: *mut GESTitleSourcePrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTitleSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTitleSource @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTrack { + pub parent: gst::GstBin, + pub type_: GESTrackType, + pub priv_: *mut GESTrackPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTrack { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTrack @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("type_", &self.type_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTrackElement { + pub parent: GESTimelineElement, + pub active: gboolean, + pub priv_: *mut GESTrackElementPrivate, + pub asset: *mut GESAsset, + pub _ges_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GESTrackElement { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTrackElement @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTrackElementAsset { + pub parent: GESAsset, + pub priv_: *mut GESTrackElementAssetPrivate, + pub __ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTrackElementAsset { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTrackElementAsset @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTransition { + pub parent: GESOperation, + pub priv_: *mut GESTransitionPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTransition { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTransition @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESTransitionClip { + pub parent: GESBaseTransitionClip, + pub vtype: GESVideoStandardTransitionType, + pub priv_: *mut GESTransitionClipPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESTransitionClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESTransitionClip @ {:?}", self as *const _)) + .field("vtype", &self.vtype) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESUriClip { + pub parent: GESSourceClip, + pub priv_: *mut GESUriClipPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESUriClip { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESUriClip @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESUriClipAsset { + pub parent: GESSourceClipAsset, + pub priv_: *mut GESUriClipAssetPrivate, + pub __ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESUriClipAsset { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESUriClipAsset @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESUriSourceAsset { + pub parent: GESTrackElementAsset, + pub priv_: *mut GESUriSourceAssetPrivate, + pub __ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESUriSourceAsset { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESUriSourceAsset @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESVideoSource { + pub parent: GESSource, + pub priv_: *mut GESVideoSourcePrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESVideoSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESVideoSource @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESVideoTestSource { + pub parent: GESVideoSource, + pub priv_: *mut GESVideoTestSourcePrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESVideoTestSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESVideoTestSource @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESVideoTrack { + pub parent_instance: GESTrack, + pub priv_: *mut GESVideoTrackPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESVideoTrack { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESVideoTrack @ {:?}", self as *const _)) + .field("parent_instance", &self.parent_instance) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESVideoTransition { + pub parent: GESTransition, + pub priv_: *mut GESVideoTransitionPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESVideoTransition { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESVideoTransition @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESVideoUriSource { + pub parent: GESVideoSource, + pub uri: *mut c_char, + pub priv_: *mut GESUriSource, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESVideoUriSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESVideoUriSource @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GESXmlFormatter { + pub parent: GESBaseXmlFormatter, + pub priv_: *mut GESXmlFormatterPrivate, + pub _ges_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GESXmlFormatter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GESXmlFormatter @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("priv_", &self.priv_) + .field("_ges_reserved", &self._ges_reserved) + .finish() + } +} + +// Interfaces +#[repr(C)] +pub struct GESExtractable(c_void); + +impl ::std::fmt::Debug for GESExtractable { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GESExtractable @ {:?}", self as *const _) + } +} + +#[repr(C)] +pub struct GESMetaContainer(c_void); + +impl ::std::fmt::Debug for GESMetaContainer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GESMetaContainer @ {:?}", self as *const _) + } +} + +#[link(name = "ges-1.0")] +extern "C" { + + //========================================================================= + // GESEdge + //========================================================================= + pub fn ges_edge_get_type() -> GType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn ges_edge_name(edge: GESEdge) -> *const c_char; + + //========================================================================= + // GESEditMode + //========================================================================= + pub fn ges_edit_mode_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_edit_mode_name(mode: GESEditMode) -> *const c_char; + + //========================================================================= + // GESTextHAlign + //========================================================================= + pub fn ges_text_halign_get_type() -> GType; + + //========================================================================= + // GESTextVAlign + //========================================================================= + pub fn ges_text_valign_get_type() -> GType; + + //========================================================================= + // GESVideoStandardTransitionType + //========================================================================= + pub fn ges_video_standard_transition_type_get_type() -> GType; + + //========================================================================= + // GESVideoTestPattern + //========================================================================= + pub fn ges_video_test_pattern_get_type() -> GType; + + //========================================================================= + // GESMetaFlag + //========================================================================= + pub fn ges_meta_flag_get_type() -> GType; + + //========================================================================= + // GESPipelineFlags + //========================================================================= + pub fn ges_pipeline_flags_get_type() -> GType; + + //========================================================================= + // GESTrackType + //========================================================================= + pub fn ges_track_type_get_type() -> GType; + pub fn ges_track_type_name(type_: GESTrackType) -> *const c_char; + + //========================================================================= + // GESEffectClass + //========================================================================= + pub fn ges_effect_class_register_rate_property( + klass: *mut GESEffectClass, + element_name: *const c_char, + property_name: *const c_char, + ) -> gboolean; + + //========================================================================= + // GESFormatterClass + //========================================================================= + pub fn ges_formatter_class_register_metas( + klass: *mut GESFormatterClass, + name: *const c_char, + description: *const c_char, + extensions: *const c_char, + caps: *const c_char, + version: c_double, + rank: gst::GstRank, + ); + + //========================================================================= + // GESUriClipAssetClass + //========================================================================= + pub fn ges_uri_clip_asset_class_set_timeout( + klass: *mut GESUriClipAssetClass, + timeout: gst::GstClockTime, + ); + + //========================================================================= + // GESAsset + //========================================================================= + pub fn ges_asset_get_type() -> GType; + pub fn ges_asset_needs_reload(extractable_type: GType, id: *const c_char) -> gboolean; + pub fn ges_asset_request( + extractable_type: GType, + id: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GESAsset; + pub fn ges_asset_request_async( + extractable_type: GType, + id: *const c_char, + cancellable: *mut gio::GCancellable, + callback: gio::GAsyncReadyCallback, + user_data: gpointer, + ); + pub fn ges_asset_request_finish( + res: *mut gio::GAsyncResult, + error: *mut *mut glib::GError, + ) -> *mut GESAsset; + pub fn ges_asset_extract( + self_: *mut GESAsset, + error: *mut *mut glib::GError, + ) -> *mut GESExtractable; + pub fn ges_asset_get_error(self_: *mut GESAsset) -> *mut glib::GError; + pub fn ges_asset_get_extractable_type(self_: *mut GESAsset) -> GType; + pub fn ges_asset_get_id(self_: *mut GESAsset) -> *const c_char; + pub fn ges_asset_get_proxy(asset: *mut GESAsset) -> *mut GESAsset; + pub fn ges_asset_get_proxy_target(proxy: *mut GESAsset) -> *mut GESAsset; + pub fn ges_asset_list_proxies(asset: *mut GESAsset) -> *mut glib::GList; + pub fn ges_asset_set_proxy(asset: *mut GESAsset, proxy: *mut GESAsset) -> gboolean; + pub fn ges_asset_unproxy(asset: *mut GESAsset, proxy: *mut GESAsset) -> gboolean; + + //========================================================================= + // GESAudioSource + //========================================================================= + pub fn ges_audio_source_get_type() -> GType; + + //========================================================================= + // GESAudioTestSource + //========================================================================= + pub fn ges_audio_test_source_get_type() -> GType; + pub fn ges_audio_test_source_get_freq(self_: *mut GESAudioTestSource) -> c_double; + pub fn ges_audio_test_source_get_volume(self_: *mut GESAudioTestSource) -> c_double; + pub fn ges_audio_test_source_set_freq(self_: *mut GESAudioTestSource, freq: c_double); + pub fn ges_audio_test_source_set_volume(self_: *mut GESAudioTestSource, volume: c_double); + + //========================================================================= + // GESAudioTrack + //========================================================================= + pub fn ges_audio_track_get_type() -> GType; + pub fn ges_audio_track_new() -> *mut GESAudioTrack; + + //========================================================================= + // GESAudioTransition + //========================================================================= + pub fn ges_audio_transition_get_type() -> GType; + pub fn ges_audio_transition_new() -> *mut GESAudioTransition; + + //========================================================================= + // GESAudioUriSource + //========================================================================= + pub fn ges_audio_uri_source_get_type() -> GType; + + //========================================================================= + // GESBaseEffect + //========================================================================= + pub fn ges_base_effect_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_base_effect_is_time_effect(effect: *mut GESBaseEffect) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_base_effect_register_time_property( + effect: *mut GESBaseEffect, + child_property_name: *const c_char, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_base_effect_set_time_translation_funcs( + effect: *mut GESBaseEffect, + source_to_sink_func: GESBaseEffectTimeTranslationFunc, + sink_to_source_func: GESBaseEffectTimeTranslationFunc, + user_data: gpointer, + destroy: glib::GDestroyNotify, + ) -> gboolean; + + //========================================================================= + // GESBaseEffectClip + //========================================================================= + pub fn ges_base_effect_clip_get_type() -> GType; + + //========================================================================= + // GESBaseTransitionClip + //========================================================================= + pub fn ges_base_transition_clip_get_type() -> GType; + + //========================================================================= + // GESBaseXmlFormatter + //========================================================================= + pub fn ges_base_xml_formatter_get_type() -> GType; + + //========================================================================= + // GESClip + //========================================================================= + pub fn ges_clip_get_type() -> GType; + pub fn ges_clip_add_asset(clip: *mut GESClip, asset: *mut GESAsset) -> *mut GESTrackElement; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_add_child_to_track( + clip: *mut GESClip, + child: *mut GESTrackElement, + track: *mut GESTrack, + error: *mut *mut glib::GError, + ) -> *mut GESTrackElement; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_add_top_effect( + clip: *mut GESClip, + effect: *mut GESBaseEffect, + index: c_int, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_clip_find_track_element( + clip: *mut GESClip, + track: *mut GESTrack, + type_: GType, + ) -> *mut GESTrackElement; + pub fn ges_clip_find_track_elements( + clip: *mut GESClip, + track: *mut GESTrack, + track_type: GESTrackType, + type_: GType, + ) -> *mut glib::GList; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_get_duration_limit(clip: *mut GESClip) -> gst::GstClockTime; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_get_internal_time_from_timeline_time( + clip: *mut GESClip, + child: *mut GESTrackElement, + timeline_time: gst::GstClockTime, + error: *mut *mut glib::GError, + ) -> gst::GstClockTime; + pub fn ges_clip_get_layer(clip: *mut GESClip) -> *mut GESLayer; + pub fn ges_clip_get_supported_formats(clip: *mut GESClip) -> GESTrackType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_get_timeline_time_from_internal_time( + clip: *mut GESClip, + child: *mut GESTrackElement, + internal_time: gst::GstClockTime, + error: *mut *mut glib::GError, + ) -> gst::GstClockTime; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_get_timeline_time_from_source_frame( + clip: *mut GESClip, + frame_number: GESFrameNumber, + error: *mut *mut glib::GError, + ) -> gst::GstClockTime; + pub fn ges_clip_get_top_effect_index(clip: *mut GESClip, effect: *mut GESBaseEffect) -> c_int; + pub fn ges_clip_get_top_effect_position( + clip: *mut GESClip, + effect: *mut GESBaseEffect, + ) -> c_int; + pub fn ges_clip_get_top_effects(clip: *mut GESClip) -> *mut glib::GList; + pub fn ges_clip_move_to_layer(clip: *mut GESClip, layer: *mut GESLayer) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_move_to_layer_full( + clip: *mut GESClip, + layer: *mut GESLayer, + error: *mut *mut glib::GError, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_remove_top_effect( + clip: *mut GESClip, + effect: *mut GESBaseEffect, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_clip_set_supported_formats(clip: *mut GESClip, supportedformats: GESTrackType); + pub fn ges_clip_set_top_effect_index( + clip: *mut GESClip, + effect: *mut GESBaseEffect, + newindex: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_set_top_effect_index_full( + clip: *mut GESClip, + effect: *mut GESBaseEffect, + newindex: c_uint, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_clip_set_top_effect_priority( + clip: *mut GESClip, + effect: *mut GESBaseEffect, + newpriority: c_uint, + ) -> gboolean; + pub fn ges_clip_split(clip: *mut GESClip, position: u64) -> *mut GESClip; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_split_full( + clip: *mut GESClip, + position: u64, + error: *mut *mut glib::GError, + ) -> *mut GESClip; + + //========================================================================= + // GESClipAsset + //========================================================================= + pub fn ges_clip_asset_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_asset_get_frame_time( + self_: *mut GESClipAsset, + frame_number: GESFrameNumber, + ) -> gst::GstClockTime; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_clip_asset_get_natural_framerate( + self_: *mut GESClipAsset, + framerate_n: *mut c_int, + framerate_d: *mut c_int, + ) -> gboolean; + pub fn ges_clip_asset_get_supported_formats(self_: *mut GESClipAsset) -> GESTrackType; + pub fn ges_clip_asset_set_supported_formats( + self_: *mut GESClipAsset, + supportedformats: GESTrackType, + ); + + //========================================================================= + // GESCommandLineFormatter + //========================================================================= + pub fn ges_command_line_formatter_get_type() -> GType; + pub fn ges_command_line_formatter_get_help( + nargs: c_int, + commands: *mut *mut c_char, + ) -> *mut c_char; + + //========================================================================= + // GESContainer + //========================================================================= + pub fn ges_container_get_type() -> GType; + pub fn ges_container_group(containers: *mut glib::GList) -> *mut GESContainer; + pub fn ges_container_add( + container: *mut GESContainer, + child: *mut GESTimelineElement, + ) -> gboolean; + pub fn ges_container_edit( + container: *mut GESContainer, + layers: *mut glib::GList, + new_layer_priority: c_int, + mode: GESEditMode, + edge: GESEdge, + position: u64, + ) -> gboolean; + pub fn ges_container_get_children( + container: *mut GESContainer, + recursive: gboolean, + ) -> *mut glib::GList; + pub fn ges_container_remove( + container: *mut GESContainer, + child: *mut GESTimelineElement, + ) -> gboolean; + pub fn ges_container_ungroup( + container: *mut GESContainer, + recursive: gboolean, + ) -> *mut glib::GList; + + //========================================================================= + // GESEffect + //========================================================================= + pub fn ges_effect_get_type() -> GType; + pub fn ges_effect_new(bin_description: *const c_char) -> *mut GESEffect; + + //========================================================================= + // GESEffectAsset + //========================================================================= + pub fn ges_effect_asset_get_type() -> GType; + + //========================================================================= + // GESEffectClip + //========================================================================= + pub fn ges_effect_clip_get_type() -> GType; + pub fn ges_effect_clip_new( + video_bin_description: *const c_char, + audio_bin_description: *const c_char, + ) -> *mut GESEffectClip; + + //========================================================================= + // GESFormatter + //========================================================================= + pub fn ges_formatter_get_type() -> GType; + pub fn ges_formatter_can_load_uri( + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_formatter_can_save_uri( + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_formatter_get_default() -> *mut GESAsset; + pub fn ges_formatter_load_from_uri( + formatter: *mut GESFormatter, + timeline: *mut GESTimeline, + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_formatter_save_to_uri( + formatter: *mut GESFormatter, + timeline: *mut GESTimeline, + uri: *const c_char, + overwrite: gboolean, + error: *mut *mut glib::GError, + ) -> gboolean; + + //========================================================================= + // GESGroup + //========================================================================= + pub fn ges_group_get_type() -> GType; + pub fn ges_group_new() -> *mut GESGroup; + + //========================================================================= + // GESImageSource + //========================================================================= + pub fn ges_image_source_get_type() -> GType; + + //========================================================================= + // GESLayer + //========================================================================= + pub fn ges_layer_get_type() -> GType; + pub fn ges_layer_new() -> *mut GESLayer; + pub fn ges_layer_add_asset( + layer: *mut GESLayer, + asset: *mut GESAsset, + start: gst::GstClockTime, + inpoint: gst::GstClockTime, + duration: gst::GstClockTime, + track_types: GESTrackType, + ) -> *mut GESClip; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_layer_add_asset_full( + layer: *mut GESLayer, + asset: *mut GESAsset, + start: gst::GstClockTime, + inpoint: gst::GstClockTime, + duration: gst::GstClockTime, + track_types: GESTrackType, + error: *mut *mut glib::GError, + ) -> *mut GESClip; + pub fn ges_layer_add_clip(layer: *mut GESLayer, clip: *mut GESClip) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_layer_add_clip_full( + layer: *mut GESLayer, + clip: *mut GESClip, + error: *mut *mut glib::GError, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_layer_get_active_for_track(layer: *mut GESLayer, track: *mut GESTrack) -> gboolean; + pub fn ges_layer_get_auto_transition(layer: *mut GESLayer) -> gboolean; + pub fn ges_layer_get_clips(layer: *mut GESLayer) -> *mut glib::GList; + pub fn ges_layer_get_clips_in_interval( + layer: *mut GESLayer, + start: gst::GstClockTime, + end: gst::GstClockTime, + ) -> *mut glib::GList; + pub fn ges_layer_get_duration(layer: *mut GESLayer) -> gst::GstClockTime; + pub fn ges_layer_get_priority(layer: *mut GESLayer) -> c_uint; + pub fn ges_layer_get_timeline(layer: *mut GESLayer) -> *mut GESTimeline; + pub fn ges_layer_is_empty(layer: *mut GESLayer) -> gboolean; + pub fn ges_layer_remove_clip(layer: *mut GESLayer, clip: *mut GESClip) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_layer_set_active_for_tracks( + layer: *mut GESLayer, + active: gboolean, + tracks: *mut glib::GList, + ) -> gboolean; + pub fn ges_layer_set_auto_transition(layer: *mut GESLayer, auto_transition: gboolean); + pub fn ges_layer_set_priority(layer: *mut GESLayer, priority: c_uint); + pub fn ges_layer_set_timeline(layer: *mut GESLayer, timeline: *mut GESTimeline); + + //========================================================================= + // GESMarker + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_marker_get_type() -> GType; + + //========================================================================= + // GESMarkerList + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_marker_list_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_marker_list_new() -> *mut GESMarkerList; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_marker_list_add( + list: *mut GESMarkerList, + position: gst::GstClockTime, + ) -> *mut GESMarker; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_marker_list_get_markers(list: *mut GESMarkerList) -> *mut glib::GList; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_marker_list_move( + list: *mut GESMarkerList, + marker: *mut GESMarker, + position: gst::GstClockTime, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_marker_list_remove(list: *mut GESMarkerList, marker: *mut GESMarker) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_marker_list_size(list: *mut GESMarkerList) -> c_uint; + + //========================================================================= + // GESMultiFileSource + //========================================================================= + pub fn ges_multi_file_source_get_type() -> GType; + pub fn ges_multi_file_source_new(uri: *mut c_char) -> *mut GESMultiFileSource; + + //========================================================================= + // GESOperation + //========================================================================= + pub fn ges_operation_get_type() -> GType; + + //========================================================================= + // GESOperationClip + //========================================================================= + pub fn ges_operation_clip_get_type() -> GType; + + //========================================================================= + // GESOverlayClip + //========================================================================= + pub fn ges_overlay_clip_get_type() -> GType; + + //========================================================================= + // GESPipeline + //========================================================================= + pub fn ges_pipeline_get_type() -> GType; + pub fn ges_pipeline_new() -> *mut GESPipeline; + pub fn ges_pipeline_get_mode(pipeline: *mut GESPipeline) -> GESPipelineFlags; + pub fn ges_pipeline_get_thumbnail( + self_: *mut GESPipeline, + caps: *mut gst::GstCaps, + ) -> *mut gst::GstSample; + pub fn ges_pipeline_get_thumbnail_rgb24( + self_: *mut GESPipeline, + width: c_int, + height: c_int, + ) -> *mut gst::GstSample; + pub fn ges_pipeline_preview_get_audio_sink(self_: *mut GESPipeline) -> *mut gst::GstElement; + pub fn ges_pipeline_preview_get_video_sink(self_: *mut GESPipeline) -> *mut gst::GstElement; + pub fn ges_pipeline_preview_set_audio_sink(self_: *mut GESPipeline, sink: *mut gst::GstElement); + pub fn ges_pipeline_preview_set_video_sink(self_: *mut GESPipeline, sink: *mut gst::GstElement); + pub fn ges_pipeline_save_thumbnail( + self_: *mut GESPipeline, + width: c_int, + height: c_int, + format: *const c_char, + location: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_pipeline_set_mode(pipeline: *mut GESPipeline, mode: GESPipelineFlags) -> gboolean; + pub fn ges_pipeline_set_render_settings( + pipeline: *mut GESPipeline, + output_uri: *const c_char, + profile: *mut gst_pbutils::GstEncodingProfile, + ) -> gboolean; + pub fn ges_pipeline_set_timeline( + pipeline: *mut GESPipeline, + timeline: *mut GESTimeline, + ) -> gboolean; + + //========================================================================= + // GESPitiviFormatter + //========================================================================= + pub fn ges_pitivi_formatter_get_type() -> GType; + pub fn ges_pitivi_formatter_new() -> *mut GESPitiviFormatter; + + //========================================================================= + // GESProject + //========================================================================= + pub fn ges_project_get_type() -> GType; + pub fn ges_project_new(uri: *const c_char) -> *mut GESProject; + pub fn ges_project_add_asset(project: *mut GESProject, asset: *mut GESAsset) -> gboolean; + pub fn ges_project_add_encoding_profile( + project: *mut GESProject, + profile: *mut gst_pbutils::GstEncodingProfile, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_project_add_formatter(project: *mut GESProject, formatter: *mut GESFormatter); + pub fn ges_project_create_asset( + project: *mut GESProject, + id: *const c_char, + extractable_type: GType, + ) -> gboolean; + pub fn ges_project_create_asset_sync( + project: *mut GESProject, + id: *const c_char, + extractable_type: GType, + error: *mut *mut glib::GError, + ) -> *mut GESAsset; + pub fn ges_project_get_asset( + project: *mut GESProject, + id: *const c_char, + extractable_type: GType, + ) -> *mut GESAsset; + pub fn ges_project_get_loading_assets(project: *mut GESProject) -> *mut glib::GList; + pub fn ges_project_get_uri(project: *mut GESProject) -> *mut c_char; + pub fn ges_project_list_assets(project: *mut GESProject, filter: GType) -> *mut glib::GList; + pub fn ges_project_list_encoding_profiles(project: *mut GESProject) -> *const glib::GList; + pub fn ges_project_load( + project: *mut GESProject, + timeline: *mut GESTimeline, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_project_remove_asset(project: *mut GESProject, asset: *mut GESAsset) -> gboolean; + pub fn ges_project_save( + project: *mut GESProject, + timeline: *mut GESTimeline, + uri: *const c_char, + formatter_asset: *mut GESAsset, + overwrite: gboolean, + error: *mut *mut glib::GError, + ) -> gboolean; + + //========================================================================= + // GESSource + //========================================================================= + pub fn ges_source_get_type() -> GType; + + //========================================================================= + // GESSourceClip + //========================================================================= + pub fn ges_source_clip_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_source_clip_new_time_overlay() -> *mut GESSourceClip; + + //========================================================================= + // GESSourceClipAsset + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_source_clip_asset_get_type() -> GType; + + //========================================================================= + // GESTestClip + //========================================================================= + pub fn ges_test_clip_get_type() -> GType; + pub fn ges_test_clip_new() -> *mut GESTestClip; + pub fn ges_test_clip_new_for_nick(nick: *mut c_char) -> *mut GESTestClip; + pub fn ges_test_clip_get_frequency(self_: *mut GESTestClip) -> c_double; + pub fn ges_test_clip_get_volume(self_: *mut GESTestClip) -> c_double; + pub fn ges_test_clip_get_vpattern(self_: *mut GESTestClip) -> GESVideoTestPattern; + pub fn ges_test_clip_is_muted(self_: *mut GESTestClip) -> gboolean; + pub fn ges_test_clip_set_frequency(self_: *mut GESTestClip, freq: c_double); + pub fn ges_test_clip_set_mute(self_: *mut GESTestClip, mute: gboolean); + pub fn ges_test_clip_set_volume(self_: *mut GESTestClip, volume: c_double); + pub fn ges_test_clip_set_vpattern(self_: *mut GESTestClip, vpattern: GESVideoTestPattern); + + //========================================================================= + // GESTextOverlay + //========================================================================= + pub fn ges_text_overlay_get_type() -> GType; + pub fn ges_text_overlay_new() -> *mut GESTextOverlay; + pub fn ges_text_overlay_get_color(self_: *mut GESTextOverlay) -> u32; + pub fn ges_text_overlay_get_font_desc(self_: *mut GESTextOverlay) -> *const c_char; + pub fn ges_text_overlay_get_halignment(self_: *mut GESTextOverlay) -> GESTextHAlign; + pub fn ges_text_overlay_get_text(self_: *mut GESTextOverlay) -> *const c_char; + pub fn ges_text_overlay_get_valignment(self_: *mut GESTextOverlay) -> GESTextVAlign; + pub fn ges_text_overlay_get_xpos(self_: *mut GESTextOverlay) -> c_double; + pub fn ges_text_overlay_get_ypos(self_: *mut GESTextOverlay) -> c_double; + pub fn ges_text_overlay_set_color(self_: *mut GESTextOverlay, color: u32); + pub fn ges_text_overlay_set_font_desc(self_: *mut GESTextOverlay, font_desc: *const c_char); + pub fn ges_text_overlay_set_halignment(self_: *mut GESTextOverlay, halign: GESTextHAlign); + pub fn ges_text_overlay_set_text(self_: *mut GESTextOverlay, text: *const c_char); + pub fn ges_text_overlay_set_valignment(self_: *mut GESTextOverlay, valign: GESTextVAlign); + pub fn ges_text_overlay_set_xpos(self_: *mut GESTextOverlay, position: c_double); + pub fn ges_text_overlay_set_ypos(self_: *mut GESTextOverlay, position: c_double); + + //========================================================================= + // GESTextOverlayClip + //========================================================================= + pub fn ges_text_overlay_clip_get_type() -> GType; + pub fn ges_text_overlay_clip_new() -> *mut GESTextOverlayClip; + pub fn ges_text_overlay_clip_get_color(self_: *mut GESTextOverlayClip) -> u32; + pub fn ges_text_overlay_clip_get_font_desc(self_: *mut GESTextOverlayClip) -> *const c_char; + pub fn ges_text_overlay_clip_get_halignment(self_: *mut GESTextOverlayClip) -> GESTextHAlign; + pub fn ges_text_overlay_clip_get_text(self_: *mut GESTextOverlayClip) -> *const c_char; + pub fn ges_text_overlay_clip_get_valignment(self_: *mut GESTextOverlayClip) -> GESTextVAlign; + pub fn ges_text_overlay_clip_get_xpos(self_: *mut GESTextOverlayClip) -> c_double; + pub fn ges_text_overlay_clip_get_ypos(self_: *mut GESTextOverlayClip) -> c_double; + pub fn ges_text_overlay_clip_set_color(self_: *mut GESTextOverlayClip, color: u32); + pub fn ges_text_overlay_clip_set_font_desc( + self_: *mut GESTextOverlayClip, + font_desc: *const c_char, + ); + pub fn ges_text_overlay_clip_set_halign(self_: *mut GESTextOverlayClip, halign: GESTextHAlign); + pub fn ges_text_overlay_clip_set_text(self_: *mut GESTextOverlayClip, text: *const c_char); + pub fn ges_text_overlay_clip_set_valign(self_: *mut GESTextOverlayClip, valign: GESTextVAlign); + pub fn ges_text_overlay_clip_set_xpos(self_: *mut GESTextOverlayClip, position: c_double); + pub fn ges_text_overlay_clip_set_ypos(self_: *mut GESTextOverlayClip, position: c_double); + + //========================================================================= + // GESTimeline + //========================================================================= + pub fn ges_timeline_get_type() -> GType; + pub fn ges_timeline_new() -> *mut GESTimeline; + pub fn ges_timeline_new_audio_video() -> *mut GESTimeline; + pub fn ges_timeline_new_from_uri( + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GESTimeline; + pub fn ges_timeline_add_layer(timeline: *mut GESTimeline, layer: *mut GESLayer) -> gboolean; + pub fn ges_timeline_add_track(timeline: *mut GESTimeline, track: *mut GESTrack) -> gboolean; + pub fn ges_timeline_append_layer(timeline: *mut GESTimeline) -> *mut GESLayer; + pub fn ges_timeline_commit(timeline: *mut GESTimeline) -> gboolean; + pub fn ges_timeline_commit_sync(timeline: *mut GESTimeline) -> gboolean; + pub fn ges_timeline_get_auto_transition(timeline: *mut GESTimeline) -> gboolean; + pub fn ges_timeline_get_duration(timeline: *mut GESTimeline) -> gst::GstClockTime; + pub fn ges_timeline_get_element( + timeline: *mut GESTimeline, + name: *const c_char, + ) -> *mut GESTimelineElement; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_timeline_get_frame_at( + self_: *mut GESTimeline, + timestamp: gst::GstClockTime, + ) -> GESFrameNumber; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_timeline_get_frame_time( + self_: *mut GESTimeline, + frame_number: GESFrameNumber, + ) -> gst::GstClockTime; + pub fn ges_timeline_get_groups(timeline: *mut GESTimeline) -> *mut glib::GList; + pub fn ges_timeline_get_layer(timeline: *mut GESTimeline, priority: c_uint) -> *mut GESLayer; + pub fn ges_timeline_get_layers(timeline: *mut GESTimeline) -> *mut glib::GList; + pub fn ges_timeline_get_pad_for_track( + timeline: *mut GESTimeline, + track: *mut GESTrack, + ) -> *mut gst::GstPad; + pub fn ges_timeline_get_snapping_distance(timeline: *mut GESTimeline) -> gst::GstClockTime; + pub fn ges_timeline_get_track_for_pad( + timeline: *mut GESTimeline, + pad: *mut gst::GstPad, + ) -> *mut GESTrack; + pub fn ges_timeline_get_tracks(timeline: *mut GESTimeline) -> *mut glib::GList; + pub fn ges_timeline_is_empty(timeline: *mut GESTimeline) -> gboolean; + pub fn ges_timeline_load_from_uri( + timeline: *mut GESTimeline, + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn ges_timeline_move_layer( + timeline: *mut GESTimeline, + layer: *mut GESLayer, + new_layer_priority: c_uint, + ) -> gboolean; + pub fn ges_timeline_paste_element( + timeline: *mut GESTimeline, + element: *mut GESTimelineElement, + position: gst::GstClockTime, + layer_priority: c_int, + ) -> *mut GESTimelineElement; + pub fn ges_timeline_remove_layer(timeline: *mut GESTimeline, layer: *mut GESLayer) -> gboolean; + pub fn ges_timeline_remove_track(timeline: *mut GESTimeline, track: *mut GESTrack) -> gboolean; + pub fn ges_timeline_save_to_uri( + timeline: *mut GESTimeline, + uri: *const c_char, + formatter_asset: *mut GESAsset, + overwrite: gboolean, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_timeline_set_auto_transition(timeline: *mut GESTimeline, auto_transition: gboolean); + pub fn ges_timeline_set_snapping_distance( + timeline: *mut GESTimeline, + snapping_distance: gst::GstClockTime, + ); + + //========================================================================= + // GESTimelineElement + //========================================================================= + pub fn ges_timeline_element_get_type() -> GType; + pub fn ges_timeline_element_add_child_property( + self_: *mut GESTimelineElement, + pspec: *mut gobject::GParamSpec, + child: *mut gobject::GObject, + ) -> gboolean; + pub fn ges_timeline_element_copy( + self_: *mut GESTimelineElement, + deep: gboolean, + ) -> *mut GESTimelineElement; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_timeline_element_edit( + self_: *mut GESTimelineElement, + layers: *mut glib::GList, + new_layer_priority: i64, + mode: GESEditMode, + edge: GESEdge, + position: u64, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_timeline_element_edit_full( + self_: *mut GESTimelineElement, + new_layer_priority: i64, + mode: GESEditMode, + edge: GESEdge, + position: u64, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_timeline_element_get_child_properties( + self_: *mut GESTimelineElement, + first_property_name: *const c_char, + ... + ); + pub fn ges_timeline_element_get_child_property( + self_: *mut GESTimelineElement, + property_name: *const c_char, + value: *mut gobject::GValue, + ) -> gboolean; + pub fn ges_timeline_element_get_child_property_by_pspec( + self_: *mut GESTimelineElement, + pspec: *mut gobject::GParamSpec, + value: *mut gobject::GValue, + ); + //pub fn ges_timeline_element_get_child_property_valist(self_: *mut GESTimelineElement, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); + pub fn ges_timeline_element_get_duration(self_: *mut GESTimelineElement) -> gst::GstClockTime; + pub fn ges_timeline_element_get_inpoint(self_: *mut GESTimelineElement) -> gst::GstClockTime; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn ges_timeline_element_get_layer_priority(self_: *mut GESTimelineElement) -> u32; + pub fn ges_timeline_element_get_max_duration( + self_: *mut GESTimelineElement, + ) -> gst::GstClockTime; + pub fn ges_timeline_element_get_name(self_: *mut GESTimelineElement) -> *mut c_char; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_timeline_element_get_natural_framerate( + self_: *mut GESTimelineElement, + framerate_n: *mut c_int, + framerate_d: *mut c_int, + ) -> gboolean; + pub fn ges_timeline_element_get_parent( + self_: *mut GESTimelineElement, + ) -> *mut GESTimelineElement; + pub fn ges_timeline_element_get_priority(self_: *mut GESTimelineElement) -> u32; + pub fn ges_timeline_element_get_start(self_: *mut GESTimelineElement) -> gst::GstClockTime; + pub fn ges_timeline_element_get_timeline(self_: *mut GESTimelineElement) -> *mut GESTimeline; + pub fn ges_timeline_element_get_toplevel_parent( + self_: *mut GESTimelineElement, + ) -> *mut GESTimelineElement; + pub fn ges_timeline_element_get_track_types(self_: *mut GESTimelineElement) -> GESTrackType; + pub fn ges_timeline_element_list_children_properties( + self_: *mut GESTimelineElement, + n_properties: *mut c_uint, + ) -> *mut *mut gobject::GParamSpec; + pub fn ges_timeline_element_lookup_child( + self_: *mut GESTimelineElement, + prop_name: *const c_char, + child: *mut *mut gobject::GObject, + pspec: *mut *mut gobject::GParamSpec, + ) -> gboolean; + pub fn ges_timeline_element_paste( + self_: *mut GESTimelineElement, + paste_position: gst::GstClockTime, + ) -> *mut GESTimelineElement; + pub fn ges_timeline_element_remove_child_property( + self_: *mut GESTimelineElement, + pspec: *mut gobject::GParamSpec, + ) -> gboolean; + pub fn ges_timeline_element_ripple( + self_: *mut GESTimelineElement, + start: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_ripple_end( + self_: *mut GESTimelineElement, + end: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_roll_end( + self_: *mut GESTimelineElement, + end: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_roll_start( + self_: *mut GESTimelineElement, + start: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_set_child_properties( + self_: *mut GESTimelineElement, + first_property_name: *const c_char, + ... + ); + pub fn ges_timeline_element_set_child_property( + self_: *mut GESTimelineElement, + property_name: *const c_char, + value: *const gobject::GValue, + ) -> gboolean; + pub fn ges_timeline_element_set_child_property_by_pspec( + self_: *mut GESTimelineElement, + pspec: *mut gobject::GParamSpec, + value: *const gobject::GValue, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_timeline_element_set_child_property_full( + self_: *mut GESTimelineElement, + property_name: *const c_char, + value: *const gobject::GValue, + error: *mut *mut glib::GError, + ) -> gboolean; + //pub fn ges_timeline_element_set_child_property_valist(self_: *mut GESTimelineElement, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); + pub fn ges_timeline_element_set_duration( + self_: *mut GESTimelineElement, + duration: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_set_inpoint( + self_: *mut GESTimelineElement, + inpoint: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_set_max_duration( + self_: *mut GESTimelineElement, + maxduration: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_set_name( + self_: *mut GESTimelineElement, + name: *const c_char, + ) -> gboolean; + pub fn ges_timeline_element_set_parent( + self_: *mut GESTimelineElement, + parent: *mut GESTimelineElement, + ) -> gboolean; + pub fn ges_timeline_element_set_priority( + self_: *mut GESTimelineElement, + priority: u32, + ) -> gboolean; + pub fn ges_timeline_element_set_start( + self_: *mut GESTimelineElement, + start: gst::GstClockTime, + ) -> gboolean; + pub fn ges_timeline_element_set_timeline( + self_: *mut GESTimelineElement, + timeline: *mut GESTimeline, + ) -> gboolean; + pub fn ges_timeline_element_trim( + self_: *mut GESTimelineElement, + start: gst::GstClockTime, + ) -> gboolean; + + //========================================================================= + // GESTitleClip + //========================================================================= + pub fn ges_title_clip_get_type() -> GType; + pub fn ges_title_clip_new() -> *mut GESTitleClip; + pub fn ges_title_clip_get_background_color(self_: *mut GESTitleClip) -> u32; + pub fn ges_title_clip_get_font_desc(self_: *mut GESTitleClip) -> *const c_char; + pub fn ges_title_clip_get_halignment(self_: *mut GESTitleClip) -> GESTextHAlign; + pub fn ges_title_clip_get_text(self_: *mut GESTitleClip) -> *const c_char; + pub fn ges_title_clip_get_text_color(self_: *mut GESTitleClip) -> u32; + pub fn ges_title_clip_get_valignment(self_: *mut GESTitleClip) -> GESTextVAlign; + pub fn ges_title_clip_get_xpos(self_: *mut GESTitleClip) -> c_double; + pub fn ges_title_clip_get_ypos(self_: *mut GESTitleClip) -> c_double; + pub fn ges_title_clip_set_background(self_: *mut GESTitleClip, background: u32); + pub fn ges_title_clip_set_color(self_: *mut GESTitleClip, color: u32); + pub fn ges_title_clip_set_font_desc(self_: *mut GESTitleClip, font_desc: *const c_char); + pub fn ges_title_clip_set_halignment(self_: *mut GESTitleClip, halign: GESTextHAlign); + pub fn ges_title_clip_set_text(self_: *mut GESTitleClip, text: *const c_char); + pub fn ges_title_clip_set_valignment(self_: *mut GESTitleClip, valign: GESTextVAlign); + pub fn ges_title_clip_set_xpos(self_: *mut GESTitleClip, position: c_double); + pub fn ges_title_clip_set_ypos(self_: *mut GESTitleClip, position: c_double); + + //========================================================================= + // GESTitleSource + //========================================================================= + pub fn ges_title_source_get_type() -> GType; + pub fn ges_title_source_get_background_color(source: *mut GESTitleSource) -> u32; + pub fn ges_title_source_get_font_desc(source: *mut GESTitleSource) -> *const c_char; + pub fn ges_title_source_get_halignment(source: *mut GESTitleSource) -> GESTextHAlign; + pub fn ges_title_source_get_text(source: *mut GESTitleSource) -> *const c_char; + pub fn ges_title_source_get_text_color(source: *mut GESTitleSource) -> u32; + pub fn ges_title_source_get_valignment(source: *mut GESTitleSource) -> GESTextVAlign; + pub fn ges_title_source_get_xpos(source: *mut GESTitleSource) -> c_double; + pub fn ges_title_source_get_ypos(source: *mut GESTitleSource) -> c_double; + pub fn ges_title_source_set_background_color(self_: *mut GESTitleSource, color: u32); + pub fn ges_title_source_set_font_desc(self_: *mut GESTitleSource, font_desc: *const c_char); + pub fn ges_title_source_set_halignment(self_: *mut GESTitleSource, halign: GESTextHAlign); + pub fn ges_title_source_set_text(self_: *mut GESTitleSource, text: *const c_char); + pub fn ges_title_source_set_text_color(self_: *mut GESTitleSource, color: u32); + pub fn ges_title_source_set_valignment(self_: *mut GESTitleSource, valign: GESTextVAlign); + pub fn ges_title_source_set_xpos(self_: *mut GESTitleSource, position: c_double); + pub fn ges_title_source_set_ypos(self_: *mut GESTitleSource, position: c_double); + + //========================================================================= + // GESTrack + //========================================================================= + pub fn ges_track_get_type() -> GType; + pub fn ges_track_new(type_: GESTrackType, caps: *mut gst::GstCaps) -> *mut GESTrack; + pub fn ges_track_add_element(track: *mut GESTrack, object: *mut GESTrackElement) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_track_add_element_full( + track: *mut GESTrack, + object: *mut GESTrackElement, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_track_commit(track: *mut GESTrack) -> gboolean; + pub fn ges_track_get_caps(track: *mut GESTrack) -> *const gst::GstCaps; + pub fn ges_track_get_elements(track: *mut GESTrack) -> *mut glib::GList; + pub fn ges_track_get_mixing(track: *mut GESTrack) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_track_get_restriction_caps(track: *mut GESTrack) -> *mut gst::GstCaps; + pub fn ges_track_get_timeline(track: *mut GESTrack) -> *const GESTimeline; + pub fn ges_track_remove_element(track: *mut GESTrack, object: *mut GESTrackElement) + -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_track_remove_element_full( + track: *mut GESTrack, + object: *mut GESTrackElement, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_track_set_create_element_for_gap_func( + track: *mut GESTrack, + func: GESCreateElementForGapFunc, + ); + pub fn ges_track_set_mixing(track: *mut GESTrack, mixing: gboolean); + pub fn ges_track_set_restriction_caps(track: *mut GESTrack, caps: *const gst::GstCaps); + pub fn ges_track_set_timeline(track: *mut GESTrack, timeline: *mut GESTimeline); + pub fn ges_track_update_restriction_caps(track: *mut GESTrack, caps: *const gst::GstCaps); + + //========================================================================= + // GESTrackElement + //========================================================================= + pub fn ges_track_element_get_type() -> GType; + pub fn ges_track_element_add_children_props( + self_: *mut GESTrackElement, + element: *mut gst::GstElement, + wanted_categories: *mut *const c_char, + blacklist: *mut *const c_char, + whitelist: *mut *const c_char, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_track_element_clamp_control_source( + object: *mut GESTrackElement, + property_name: *const c_char, + ); + pub fn ges_track_element_edit( + object: *mut GESTrackElement, + layers: *mut glib::GList, + mode: GESEditMode, + edge: GESEdge, + position: u64, + ) -> gboolean; + pub fn ges_track_element_get_all_control_bindings( + trackelement: *mut GESTrackElement, + ) -> *mut glib::GHashTable; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_track_element_get_auto_clamp_control_sources( + object: *mut GESTrackElement, + ) -> gboolean; + pub fn ges_track_element_get_child_properties( + object: *mut GESTrackElement, + first_property_name: *const c_char, + ... + ); + pub fn ges_track_element_get_child_property( + object: *mut GESTrackElement, + property_name: *const c_char, + value: *mut gobject::GValue, + ) -> gboolean; + pub fn ges_track_element_get_child_property_by_pspec( + object: *mut GESTrackElement, + pspec: *mut gobject::GParamSpec, + value: *mut gobject::GValue, + ); + //pub fn ges_track_element_get_child_property_valist(object: *mut GESTrackElement, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); + pub fn ges_track_element_get_control_binding( + object: *mut GESTrackElement, + property_name: *const c_char, + ) -> *mut gst::GstControlBinding; + pub fn ges_track_element_get_element(object: *mut GESTrackElement) -> *mut gst::GstElement; + pub fn ges_track_element_get_gnlobject(object: *mut GESTrackElement) -> *mut gst::GstElement; + pub fn ges_track_element_get_nleobject(object: *mut GESTrackElement) -> *mut gst::GstElement; + pub fn ges_track_element_get_track(object: *mut GESTrackElement) -> *mut GESTrack; + pub fn ges_track_element_get_track_type(object: *mut GESTrackElement) -> GESTrackType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_track_element_has_internal_source(object: *mut GESTrackElement) -> gboolean; + pub fn ges_track_element_is_active(object: *mut GESTrackElement) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_track_element_is_core(object: *mut GESTrackElement) -> gboolean; + pub fn ges_track_element_list_children_properties( + object: *mut GESTrackElement, + n_properties: *mut c_uint, + ) -> *mut *mut gobject::GParamSpec; + pub fn ges_track_element_lookup_child( + object: *mut GESTrackElement, + prop_name: *const c_char, + element: *mut *mut gst::GstElement, + pspec: *mut *mut gobject::GParamSpec, + ) -> gboolean; + pub fn ges_track_element_remove_control_binding( + object: *mut GESTrackElement, + property_name: *const c_char, + ) -> gboolean; + pub fn ges_track_element_set_active(object: *mut GESTrackElement, active: gboolean) + -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_track_element_set_auto_clamp_control_sources( + object: *mut GESTrackElement, + auto_clamp: gboolean, + ); + pub fn ges_track_element_set_child_properties( + object: *mut GESTrackElement, + first_property_name: *const c_char, + ... + ); + pub fn ges_track_element_set_child_property( + object: *mut GESTrackElement, + property_name: *const c_char, + value: *mut gobject::GValue, + ) -> gboolean; + pub fn ges_track_element_set_child_property_by_pspec( + object: *mut GESTrackElement, + pspec: *mut gobject::GParamSpec, + value: *mut gobject::GValue, + ); + //pub fn ges_track_element_set_child_property_valist(object: *mut GESTrackElement, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); + pub fn ges_track_element_set_control_source( + object: *mut GESTrackElement, + source: *mut gst::GstControlSource, + property_name: *const c_char, + binding_type: *const c_char, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_track_element_set_has_internal_source( + object: *mut GESTrackElement, + has_internal_source: gboolean, + ) -> gboolean; + pub fn ges_track_element_set_track_type(object: *mut GESTrackElement, type_: GESTrackType); + + //========================================================================= + // GESTrackElementAsset + //========================================================================= + pub fn ges_track_element_asset_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_track_element_asset_get_natural_framerate( + self_: *mut GESTrackElementAsset, + framerate_n: *mut c_int, + framerate_d: *mut c_int, + ) -> gboolean; + pub fn ges_track_element_asset_get_track_type(asset: *mut GESTrackElementAsset) + -> GESTrackType; + pub fn ges_track_element_asset_set_track_type( + asset: *mut GESTrackElementAsset, + type_: GESTrackType, + ); + + //========================================================================= + // GESTransition + //========================================================================= + pub fn ges_transition_get_type() -> GType; + + //========================================================================= + // GESTransitionClip + //========================================================================= + pub fn ges_transition_clip_get_type() -> GType; + pub fn ges_transition_clip_new(vtype: GESVideoStandardTransitionType) + -> *mut GESTransitionClip; + pub fn ges_transition_clip_new_for_nick(nick: *mut c_char) -> *mut GESTransitionClip; + + //========================================================================= + // GESUriClip + //========================================================================= + pub fn ges_uri_clip_get_type() -> GType; + pub fn ges_uri_clip_new(uri: *const c_char) -> *mut GESUriClip; + pub fn ges_uri_clip_get_uri(self_: *mut GESUriClip) -> *const c_char; + pub fn ges_uri_clip_is_image(self_: *mut GESUriClip) -> gboolean; + pub fn ges_uri_clip_is_muted(self_: *mut GESUriClip) -> gboolean; + pub fn ges_uri_clip_set_is_image(self_: *mut GESUriClip, is_image: gboolean); + pub fn ges_uri_clip_set_mute(self_: *mut GESUriClip, mute: gboolean); + + //========================================================================= + // GESUriClipAsset + //========================================================================= + pub fn ges_uri_clip_asset_get_type() -> GType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn ges_uri_clip_asset_finish( + res: *mut gio::GAsyncResult, + error: *mut *mut glib::GError, + ) -> *mut GESUriClipAsset; + pub fn ges_uri_clip_asset_new( + uri: *const c_char, + cancellable: *mut gio::GCancellable, + callback: gio::GAsyncReadyCallback, + user_data: gpointer, + ); + pub fn ges_uri_clip_asset_request_sync( + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GESUriClipAsset; + pub fn ges_uri_clip_asset_get_duration(self_: *mut GESUriClipAsset) -> gst::GstClockTime; + pub fn ges_uri_clip_asset_get_info( + self_: *const GESUriClipAsset, + ) -> *mut gst_pbutils::GstDiscovererInfo; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_uri_clip_asset_get_max_duration(self_: *mut GESUriClipAsset) -> gst::GstClockTime; + pub fn ges_uri_clip_asset_get_stream_assets(self_: *mut GESUriClipAsset) -> *const glib::GList; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_uri_clip_asset_is_image(self_: *mut GESUriClipAsset) -> gboolean; + + //========================================================================= + // GESUriSourceAsset + //========================================================================= + pub fn ges_uri_source_asset_get_type() -> GType; + pub fn ges_uri_source_asset_get_filesource_asset( + asset: *mut GESUriSourceAsset, + ) -> *const GESUriClipAsset; + pub fn ges_uri_source_asset_get_stream_info( + asset: *mut GESUriSourceAsset, + ) -> *mut gst_pbutils::GstDiscovererStreamInfo; + pub fn ges_uri_source_asset_get_stream_uri(asset: *mut GESUriSourceAsset) -> *const c_char; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_uri_source_asset_is_image(asset: *mut GESUriSourceAsset) -> gboolean; + + //========================================================================= + // GESVideoSource + //========================================================================= + pub fn ges_video_source_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_video_source_get_natural_size( + self_: *mut GESVideoSource, + width: *mut c_int, + height: *mut c_int, + ) -> gboolean; + + //========================================================================= + // GESVideoTestSource + //========================================================================= + pub fn ges_video_test_source_get_type() -> GType; + pub fn ges_video_test_source_get_pattern( + source: *mut GESVideoTestSource, + ) -> GESVideoTestPattern; + pub fn ges_video_test_source_set_pattern( + self_: *mut GESVideoTestSource, + pattern: GESVideoTestPattern, + ); + + //========================================================================= + // GESVideoTrack + //========================================================================= + pub fn ges_video_track_get_type() -> GType; + pub fn ges_video_track_new() -> *mut GESVideoTrack; + + //========================================================================= + // GESVideoTransition + //========================================================================= + pub fn ges_video_transition_get_type() -> GType; + pub fn ges_video_transition_new() -> *mut GESVideoTransition; + pub fn ges_video_transition_get_border(self_: *mut GESVideoTransition) -> c_int; + pub fn ges_video_transition_get_transition_type( + trans: *mut GESVideoTransition, + ) -> GESVideoStandardTransitionType; + pub fn ges_video_transition_is_inverted(self_: *mut GESVideoTransition) -> gboolean; + pub fn ges_video_transition_set_border(self_: *mut GESVideoTransition, value: c_uint); + pub fn ges_video_transition_set_inverted(self_: *mut GESVideoTransition, inverted: gboolean); + pub fn ges_video_transition_set_transition_type( + self_: *mut GESVideoTransition, + type_: GESVideoStandardTransitionType, + ) -> gboolean; + + //========================================================================= + // GESVideoUriSource + //========================================================================= + pub fn ges_video_uri_source_get_type() -> GType; + + //========================================================================= + // GESXmlFormatter + //========================================================================= + pub fn ges_xml_formatter_get_type() -> GType; + + //========================================================================= + // GESExtractable + //========================================================================= + pub fn ges_extractable_get_type() -> GType; + pub fn ges_extractable_get_asset(self_: *mut GESExtractable) -> *mut GESAsset; + pub fn ges_extractable_get_id(self_: *mut GESExtractable) -> *mut c_char; + pub fn ges_extractable_set_asset(self_: *mut GESExtractable, asset: *mut GESAsset) -> gboolean; + + //========================================================================= + // GESMetaContainer + //========================================================================= + pub fn ges_meta_container_get_type() -> GType; + pub fn ges_meta_container_add_metas_from_string( + container: *mut GESMetaContainer, + str: *const c_char, + ) -> gboolean; + pub fn ges_meta_container_check_meta_registered( + container: *mut GESMetaContainer, + meta_item: *const c_char, + flags: *mut GESMetaFlag, + type_: *mut GType, + ) -> gboolean; + pub fn ges_meta_container_foreach( + container: *mut GESMetaContainer, + func: GESMetaForeachFunc, + user_data: gpointer, + ); + pub fn ges_meta_container_get_boolean( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut gboolean, + ) -> gboolean; + pub fn ges_meta_container_get_date( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut *mut glib::GDate, + ) -> gboolean; + pub fn ges_meta_container_get_date_time( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut *mut gst::GstDateTime, + ) -> gboolean; + pub fn ges_meta_container_get_double( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut c_double, + ) -> gboolean; + pub fn ges_meta_container_get_float( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut c_float, + ) -> gboolean; + pub fn ges_meta_container_get_int( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut c_int, + ) -> gboolean; + pub fn ges_meta_container_get_int64( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut i64, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_meta_container_get_marker_list( + container: *mut GESMetaContainer, + key: *const c_char, + ) -> *mut GESMarkerList; + pub fn ges_meta_container_get_meta( + container: *mut GESMetaContainer, + key: *const c_char, + ) -> *const gobject::GValue; + pub fn ges_meta_container_get_string( + container: *mut GESMetaContainer, + meta_item: *const c_char, + ) -> *const c_char; + pub fn ges_meta_container_get_uint( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut c_uint, + ) -> gboolean; + pub fn ges_meta_container_get_uint64( + container: *mut GESMetaContainer, + meta_item: *const c_char, + dest: *mut u64, + ) -> gboolean; + pub fn ges_meta_container_metas_to_string(container: *mut GESMetaContainer) -> *mut c_char; + pub fn ges_meta_container_register_meta( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: *const gobject::GValue, + ) -> gboolean; + pub fn ges_meta_container_register_meta_boolean( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: gboolean, + ) -> gboolean; + pub fn ges_meta_container_register_meta_date( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: *const glib::GDate, + ) -> gboolean; + pub fn ges_meta_container_register_meta_date_time( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: *const gst::GstDateTime, + ) -> gboolean; + pub fn ges_meta_container_register_meta_double( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: c_double, + ) -> gboolean; + pub fn ges_meta_container_register_meta_float( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: c_float, + ) -> gboolean; + pub fn ges_meta_container_register_meta_int( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: c_int, + ) -> gboolean; + pub fn ges_meta_container_register_meta_int64( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: i64, + ) -> gboolean; + pub fn ges_meta_container_register_meta_string( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: *const c_char, + ) -> gboolean; + pub fn ges_meta_container_register_meta_uint( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: c_uint, + ) -> gboolean; + pub fn ges_meta_container_register_meta_uint64( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + value: u64, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_meta_container_register_static_meta( + container: *mut GESMetaContainer, + flags: GESMetaFlag, + meta_item: *const c_char, + type_: GType, + ) -> gboolean; + pub fn ges_meta_container_set_boolean( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: gboolean, + ) -> gboolean; + pub fn ges_meta_container_set_date( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: *const glib::GDate, + ) -> gboolean; + pub fn ges_meta_container_set_date_time( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: *const gst::GstDateTime, + ) -> gboolean; + pub fn ges_meta_container_set_double( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: c_double, + ) -> gboolean; + pub fn ges_meta_container_set_float( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: c_float, + ) -> gboolean; + pub fn ges_meta_container_set_int( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: c_int, + ) -> gboolean; + pub fn ges_meta_container_set_int64( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: i64, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_meta_container_set_marker_list( + container: *mut GESMetaContainer, + meta_item: *const c_char, + list: *const GESMarkerList, + ) -> gboolean; + pub fn ges_meta_container_set_meta( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: *const gobject::GValue, + ) -> gboolean; + pub fn ges_meta_container_set_string( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: *const c_char, + ) -> gboolean; + pub fn ges_meta_container_set_uint( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: c_uint, + ) -> gboolean; + pub fn ges_meta_container_set_uint64( + container: *mut GESMetaContainer, + meta_item: *const c_char, + value: u64, + ) -> gboolean; + + //========================================================================= + // Other functions + //========================================================================= + pub fn ges_add_missing_uri_relocation_uri(uri: *const c_char, recurse: gboolean) -> gboolean; + pub fn ges_deinit(); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn ges_find_formatter_for_uri(uri: *const c_char) -> *mut GESAsset; + pub fn ges_init() -> gboolean; + pub fn ges_init_check( + argc: *mut c_int, + argv: *mut *mut *mut c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn ges_init_get_option_group() -> *mut glib::GOptionGroup; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn ges_is_initialized() -> gboolean; + pub fn ges_list_assets(filter: GType) -> *mut glib::GList; + pub fn ges_play_sink_convert_frame( + playsink: *mut gst::GstElement, + caps: *mut gst::GstCaps, + ) -> *mut gst::GstSample; + pub fn ges_pspec_equal(key_spec_1: gconstpointer, key_spec_2: gconstpointer) -> gboolean; + pub fn ges_pspec_hash(key_spec: gconstpointer) -> c_uint; + pub fn ges_validate_register_action_types() -> gboolean; + pub fn ges_version( + major: *mut c_uint, + minor: *mut c_uint, + micro: *mut c_uint, + nano: *mut c_uint, + ); + +} diff --git a/sys/gstreamer-editing-services-sys/tests/abi.rs b/sys/gstreamer-editing-services-sys/tests/abi.rs new file mode 100644 index 000000000..855d625e9 --- /dev/null +++ b/sys/gstreamer-editing-services-sys/tests/abi.rs @@ -0,0 +1,1389 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_editing_services_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_editing_services_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gst-editing-services-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GESAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAssetLoadingReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTestSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTestSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTrack", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTrackClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTransition", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioTransitionClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioUriSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESAudioUriSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseEffect", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseEffectClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseEffectClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseEffectClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseTransitionClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseTransitionClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseXmlFormatter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESBaseXmlFormatterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESChildrenControlMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESClipAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESClipAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESCommandLineFormatter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESCommandLineFormatterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESContainer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESContainerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEdge", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEditMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffect", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffectAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffectAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffectClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffectClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESEffectClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESExtractableInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESFormatter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESFormatterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESFrameNumber", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESGroup", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESGroupClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESImageSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESImageSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESLayer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESLayerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESMarkerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESMarkerListClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESMetaContainerInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESMetaFlag", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESMultiFileSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESMultiFileSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOperation", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOperationClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOperationClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOperationClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOverlayClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESOverlayClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESPipeline", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESPipelineClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESPipelineFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESPitiviFormatter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESPitiviFormatterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESProject", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESProjectClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESSourceClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESSourceClipAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESSourceClipAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESSourceClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTestClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTestClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextHAlign", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextOverlay", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextOverlayClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextOverlayClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextOverlayClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTextVAlign", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTimeline", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTimelineClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTimelineElement", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTimelineElementClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTitleClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTitleClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTitleSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTitleSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrack", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackElement", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackElementAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackElementAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackElementClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTrackType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTransition", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTransitionClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTransitionClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESTransitionClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriClip", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriClipAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriClipAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriClipClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriSourceAsset", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESUriSourceAssetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoStandardTransitionType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTestPattern", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTestSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTestSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTrack", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTrackClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTransition", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoTransitionClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoUriSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESVideoUriSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESXmlFormatter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GESXmlFormatterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(gint) GES_ASSET_LOADING_ASYNC", "1"), + ("(gint) GES_ASSET_LOADING_ERROR", "0"), + ("(gint) GES_ASSET_LOADING_OK", "2"), + ("(gint) GES_CHILDREN_IGNORE_NOTIFIES", "1"), + ("(gint) GES_CHILDREN_LAST", "4"), + ("(gint) GES_CHILDREN_UPDATE", "0"), + ("(gint) GES_CHILDREN_UPDATE_ALL_VALUES", "3"), + ("(gint) GES_CHILDREN_UPDATE_OFFSETS", "2"), + ("(gint) GES_EDGE_END", "1"), + ("(gint) GES_EDGE_NONE", "2"), + ("(gint) GES_EDGE_START", "0"), + ("(gint) GES_EDIT_MODE_NORMAL", "0"), + ("(gint) GES_EDIT_MODE_RIPPLE", "1"), + ("(gint) GES_EDIT_MODE_ROLL", "2"), + ("(gint) GES_EDIT_MODE_SLIDE", "4"), + ("(gint) GES_EDIT_MODE_TRIM", "3"), + ("(gint) GES_ERROR_ASSET_LOADING", "1"), + ("(gint) GES_ERROR_ASSET_WRONG_ID", "0"), + ("(gint) GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE", "2"), + ("(gint) GES_ERROR_INVALID_EFFECT_BIN_DESCRIPTION", "8"), + ("(gint) GES_ERROR_INVALID_FRAME_NUMBER", "3"), + ("(gint) GES_ERROR_INVALID_OVERLAP_IN_TRACK", "7"), + ("(gint) GES_ERROR_NEGATIVE_LAYER", "4"), + ("(gint) GES_ERROR_NEGATIVE_TIME", "5"), + ("(gint) GES_ERROR_NOT_ENOUGH_INTERNAL_CONTENT", "6"), + ("GES_FRAME_NUMBER_NONE", "9223372036854775807"), + ("GES_META_DESCRIPTION", "description"), + ("GES_META_FORMATTER_EXTENSION", "extension"), + ("GES_META_FORMATTER_MIMETYPE", "mimetype"), + ("GES_META_FORMATTER_NAME", "name"), + ("GES_META_FORMATTER_RANK", "rank"), + ("GES_META_FORMATTER_VERSION", "version"), + ("GES_META_FORMAT_VERSION", "format-version"), + ("GES_META_MARKER_COLOR", "marker-color"), + ("(guint) GES_META_READABLE", "1"), + ("(guint) GES_META_READ_WRITE", "3"), + ("GES_META_VOLUME", "volume"), + ("GES_META_VOLUME_DEFAULT", "1.000000"), + ("(guint) GES_META_WRITABLE", "2"), + ("GES_MULTI_FILE_URI_PREFIX", "multifile://"), + ("GES_PADDING", "4"), + ("GES_PADDING_LARGE", "20"), + ("(guint) GES_PIPELINE_MODE_PREVIEW", "3"), + ("(guint) GES_PIPELINE_MODE_PREVIEW_AUDIO", "1"), + ("(guint) GES_PIPELINE_MODE_PREVIEW_VIDEO", "2"), + ("(guint) GES_PIPELINE_MODE_RENDER", "4"), + ("(guint) GES_PIPELINE_MODE_SMART_RENDER", "8"), + ("(gint) GES_TEXT_HALIGN_ABSOLUTE", "5"), + ("(gint) GES_TEXT_HALIGN_CENTER", "1"), + ("(gint) GES_TEXT_HALIGN_LEFT", "0"), + ("(gint) GES_TEXT_HALIGN_POSITION", "4"), + ("(gint) GES_TEXT_HALIGN_RIGHT", "2"), + ("(gint) GES_TEXT_VALIGN_ABSOLUTE", "5"), + ("(gint) GES_TEXT_VALIGN_BASELINE", "0"), + ("(gint) GES_TEXT_VALIGN_BOTTOM", "1"), + ("(gint) GES_TEXT_VALIGN_CENTER", "4"), + ("(gint) GES_TEXT_VALIGN_POSITION", "3"), + ("(gint) GES_TEXT_VALIGN_TOP", "2"), + ("GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY", "4294967295"), + ("(guint) GES_TRACK_TYPE_AUDIO", "2"), + ("(guint) GES_TRACK_TYPE_CUSTOM", "16"), + ("(guint) GES_TRACK_TYPE_TEXT", "8"), + ("(guint) GES_TRACK_TYPE_UNKNOWN", "1"), + ("(guint) GES_TRACK_TYPE_VIDEO", "4"), + ("GES_VERSION_MAJOR", "1"), + ("GES_VERSION_MICRO", "0"), + ("GES_VERSION_MINOR", "18"), + ("GES_VERSION_NANO", "0"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL", + "45", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL", + "46", + ), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H", "22"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V", "21"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D", "65"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L", "66"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R", "68"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U", "67"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR", "1"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB", "2"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H", "44"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V", "43"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC", + "25", + ), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL", "6"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR", "5"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC", + "26", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC", + "24", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC", + "23", + ), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL", "3"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR", "4"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12", + "201", + ), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3", "202"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6", "203"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9", "204"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE", "512"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL", + "41", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR", + "42", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH", + "236", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV", + "235", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH", + "214", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV", + "213", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH", + "228", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV", + "227", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD", + "226", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL", + "246", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL", + "245", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV", + "225", + ), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B", "233"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR", "212"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT", "211"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L", "234"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R", "232"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T", "231"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI", + "7", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO", + "8", + ), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT", "101"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD", + "47", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD", + "48", + ), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE", "0"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB", + "207", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH", + "206", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV", + "205", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B", + "253", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L", + "252", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R", + "254", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T", + "251", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB", + "223", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL", + "242", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR", + "243", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL", + "224", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR", + "222", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT", + "221", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL", + "241", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR", + "244", + ), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D", "61"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L", "62"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R", "64"), + ("(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U", "63"), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H", + "264", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R", + "261", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U", + "262", + ), + ( + "(gint) GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V", + "263", + ), + ("(gint) GES_VIDEO_TEST_CHROMA_ZONE_PLATE", "16"), + ("(gint) GES_VIDEO_TEST_GAMUT", "15"), + ("(gint) GES_VIDEO_TEST_PATTERN_BLACK", "2"), + ("(gint) GES_VIDEO_TEST_PATTERN_BLINK", "12"), + ("(gint) GES_VIDEO_TEST_PATTERN_BLUE", "6"), + ("(gint) GES_VIDEO_TEST_PATTERN_CHECKERS1", "7"), + ("(gint) GES_VIDEO_TEST_PATTERN_CHECKERS2", "8"), + ("(gint) GES_VIDEO_TEST_PATTERN_CHECKERS4", "9"), + ("(gint) GES_VIDEO_TEST_PATTERN_CHECKERS8", "10"), + ("(gint) GES_VIDEO_TEST_PATTERN_CIRCULAR", "11"), + ("(gint) GES_VIDEO_TEST_PATTERN_GREEN", "5"), + ("(gint) GES_VIDEO_TEST_PATTERN_RED", "4"), + ("(gint) GES_VIDEO_TEST_PATTERN_SMPTE", "0"), + ("(gint) GES_VIDEO_TEST_PATTERN_SMPTE75", "13"), + ("(gint) GES_VIDEO_TEST_PATTERN_SNOW", "1"), + ("(gint) GES_VIDEO_TEST_PATTERN_SOLID", "17"), + ("(gint) GES_VIDEO_TEST_PATTERN_WHITE", "3"), + ("(gint) GES_VIDEO_TEST_ZONE_PLATE", "14"), +]; diff --git a/sys/gstreamer-editing-services-sys/tests/constant.c b/sys/gstreamer-editing-services-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-editing-services-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-editing-services-sys/tests/layout.c b/sys/gstreamer-editing-services-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-editing-services-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-editing-services-sys/tests/manual.h b/sys/gstreamer-editing-services-sys/tests/manual.h new file mode 100644 index 000000000..b09b0dd31 --- /dev/null +++ b/sys/gstreamer-editing-services-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-gl-sys/CHANGELOG.md b/sys/gstreamer-gl-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-gl-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-gl-sys/Cargo.toml b/sys/gstreamer-gl-sys/Cargo.toml new file mode 100644 index 000000000..ef8abf464 --- /dev/null +++ b/sys/gstreamer-gl-sys/Cargo.toml @@ -0,0 +1,61 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-base-sys] +path = "../gstreamer-base-sys" +features = ["v1_14"] + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" +features = ["v1_14"] + +[dependencies.gstreamer-video-sys] +path = "../gstreamer-video-sys" +features = ["v1_14"] + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +dox = [] +egl = [] +x11 = [] +wayland = [] +v1_16 = [] +v1_18 = ["v1_16"] + +[lib] +name = "gstreamer_gl_sys" + +[package] +authors = ["Sebastian Dröge ", "Víctor Manuel Jáquez Leal "] +build = "build.rs" +description = "FFI bindings to libgstgl-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_gl_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstgl-1.0" +name = "gstreamer-gl-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_gl_1_0] +name = "gstreamer-gl-1.0" +version = "1.14" + +[package.metadata.system-deps.gstreamer_gl_1_0.feature-versions] +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-gl-sys/README.md b/sys/gstreamer-gl-sys/README.md new file mode 100644 index 000000000..cd6088413 --- /dev/null +++ b/sys/gstreamer-gl-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-gl-sys.svg)](https://crates.io/crates/gstreamer-gl-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (OpenGL library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-gl-sys/build.rs b/sys/gstreamer-gl-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-gl-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-gl-sys/src/lib.rs b/sys/gstreamer-gl-sys/src/lib.rs new file mode 100644 index 000000000..b2fbbbf08 --- /dev/null +++ b/sys/gstreamer-gl-sys/src/lib.rs @@ -0,0 +1,2887 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; +extern crate gstreamer_video_sys as gst_video; +extern crate libc; + +mod manual; + +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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstGLBaseMemoryError = c_int; +pub const GST_GL_BASE_MEMORY_ERROR_FAILED: GstGLBaseMemoryError = 0; +pub const GST_GL_BASE_MEMORY_ERROR_OLD_LIBS: GstGLBaseMemoryError = 1; +pub const GST_GL_BASE_MEMORY_ERROR_RESOURCE_UNAVAILABLE: GstGLBaseMemoryError = 2; + +pub type GstGLContextError = c_int; +pub const GST_GL_CONTEXT_ERROR_FAILED: GstGLContextError = 0; +pub const GST_GL_CONTEXT_ERROR_WRONG_CONFIG: GstGLContextError = 1; +pub const GST_GL_CONTEXT_ERROR_WRONG_API: GstGLContextError = 2; +pub const GST_GL_CONTEXT_ERROR_OLD_LIBS: GstGLContextError = 3; +pub const GST_GL_CONTEXT_ERROR_CREATE_CONTEXT: GstGLContextError = 4; +pub const GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE: GstGLContextError = 5; + +pub type GstGLFormat = c_int; +pub const GST_GL_LUMINANCE: GstGLFormat = 6409; +pub const GST_GL_ALPHA: GstGLFormat = 6406; +pub const GST_GL_LUMINANCE_ALPHA: GstGLFormat = 6410; +pub const GST_GL_RED: GstGLFormat = 6403; +pub const GST_GL_R8: GstGLFormat = 33321; +pub const GST_GL_RG: GstGLFormat = 33319; +pub const GST_GL_RG8: GstGLFormat = 33323; +pub const GST_GL_RGB: GstGLFormat = 6407; +pub const GST_GL_RGB8: GstGLFormat = 32849; +pub const GST_GL_RGB565: GstGLFormat = 36194; +pub const GST_GL_RGB16: GstGLFormat = 32852; +pub const GST_GL_RGBA: GstGLFormat = 6408; +pub const GST_GL_RGBA8: GstGLFormat = 32856; +pub const GST_GL_RGBA16: GstGLFormat = 32859; +pub const GST_GL_DEPTH_COMPONENT16: GstGLFormat = 33189; +pub const GST_GL_DEPTH24_STENCIL8: GstGLFormat = 35056; +pub const GST_GL_RGB10_A2: GstGLFormat = 32857; +pub const GST_GL_R16: GstGLFormat = 33322; +pub const GST_GL_RG16: GstGLFormat = 33324; + +pub type GstGLQueryType = c_int; +pub const GST_GL_QUERY_NONE: GstGLQueryType = 0; +pub const GST_GL_QUERY_TIME_ELAPSED: GstGLQueryType = 1; +pub const GST_GL_QUERY_TIMESTAMP: GstGLQueryType = 2; + +pub type GstGLSLError = c_int; +pub const GST_GLSL_ERROR_COMPILE: GstGLSLError = 0; +pub const GST_GLSL_ERROR_LINK: GstGLSLError = 1; +pub const GST_GLSL_ERROR_PROGRAM: GstGLSLError = 2; + +pub type GstGLSLVersion = c_int; +pub const GST_GLSL_VERSION_NONE: GstGLSLVersion = 0; +pub const GST_GLSL_VERSION_100: GstGLSLVersion = 100; +pub const GST_GLSL_VERSION_110: GstGLSLVersion = 110; +pub const GST_GLSL_VERSION_120: GstGLSLVersion = 120; +pub const GST_GLSL_VERSION_130: GstGLSLVersion = 130; +pub const GST_GLSL_VERSION_140: GstGLSLVersion = 140; +pub const GST_GLSL_VERSION_150: GstGLSLVersion = 150; +pub const GST_GLSL_VERSION_300: GstGLSLVersion = 300; +pub const GST_GLSL_VERSION_310: GstGLSLVersion = 310; +pub const GST_GLSL_VERSION_320: GstGLSLVersion = 320; +pub const GST_GLSL_VERSION_330: GstGLSLVersion = 330; +pub const GST_GLSL_VERSION_400: GstGLSLVersion = 400; +pub const GST_GLSL_VERSION_410: GstGLSLVersion = 410; +pub const GST_GLSL_VERSION_420: GstGLSLVersion = 420; +pub const GST_GLSL_VERSION_430: GstGLSLVersion = 430; +pub const GST_GLSL_VERSION_440: GstGLSLVersion = 440; +pub const GST_GLSL_VERSION_450: GstGLSLVersion = 450; + +pub type GstGLStereoDownmix = c_int; +pub const GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS: GstGLStereoDownmix = 0; +pub const GST_GL_STEREO_DOWNMIX_ANAGLYPH_RED_CYAN_DUBOIS: GstGLStereoDownmix = 1; +pub const GST_GL_STEREO_DOWNMIX_ANAGLYPH_AMBER_BLUE_DUBOIS: GstGLStereoDownmix = 2; + +pub type GstGLTextureTarget = c_int; +pub const GST_GL_TEXTURE_TARGET_NONE: GstGLTextureTarget = 0; +pub const GST_GL_TEXTURE_TARGET_2D: GstGLTextureTarget = 1; +pub const GST_GL_TEXTURE_TARGET_RECTANGLE: GstGLTextureTarget = 2; +pub const GST_GL_TEXTURE_TARGET_EXTERNAL_OES: GstGLTextureTarget = 3; + +pub type GstGLUploadReturn = c_int; +pub const GST_GL_UPLOAD_DONE: GstGLUploadReturn = 1; +pub const GST_GL_UPLOAD_ERROR: GstGLUploadReturn = -1; +pub const GST_GL_UPLOAD_UNSUPPORTED: GstGLUploadReturn = -2; +pub const GST_GL_UPLOAD_RECONFIGURE: GstGLUploadReturn = -3; +pub const GST_GL_UPLOAD_UNSHARED_GL_CONTEXT: GstGLUploadReturn = -100; + +pub type GstGLWindowError = c_int; +pub const GST_GL_WINDOW_ERROR_FAILED: GstGLWindowError = 0; +pub const GST_GL_WINDOW_ERROR_OLD_LIBS: GstGLWindowError = 1; +pub const GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE: GstGLWindowError = 2; + +// Constants +pub const GST_BUFFER_POOL_OPTION_GL_SYNC_META: *const c_char = + b"GstBufferPoolOptionGLSyncMeta\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D: *const c_char = + b"GstBufferPoolOptionGLTextureTarget2D\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES: *const c_char = + b"GstBufferPoolOptionGLTextureTargetExternalOES\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE: *const c_char = + b"GstBufferPoolOptionGLTextureTargetRectangle\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_MEMORY_GL_BUFFER: *const c_char = + b"memory:GLBuffer\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_MEMORY_GL_MEMORY: *const c_char = + b"memory:GLMemory\0" as *const u8 as *const c_char; +pub const GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_ALLOC: c_int = 1; +pub const GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER: c_int = 16; +pub const GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_USER: c_int = 65536; +pub const GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO: c_int = 8; +pub const GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE: c_int = 4; +pub const GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM: c_int = 2; +pub const GST_GL_API_GLES1_NAME: *const c_char = b"gles1\0" as *const u8 as *const c_char; +pub const GST_GL_API_GLES2_NAME: *const c_char = b"gles2\0" as *const u8 as *const c_char; +pub const GST_GL_API_OPENGL3_NAME: *const c_char = b"opengl3\0" as *const u8 as *const c_char; +pub const GST_GL_API_OPENGL_NAME: *const c_char = b"opengl\0" as *const u8 as *const c_char; +pub const GST_GL_BASE_MEMORY_ALLOCATOR_NAME: *const c_char = + b"GLBaseMemory\0" as *const u8 as *const c_char; +pub const GST_GL_BUFFER_ALLOCATOR_NAME: *const c_char = b"GLBuffer\0" as *const u8 as *const c_char; +pub const GST_GL_COLOR_CONVERT_EXT_FORMATS: *const c_char = + b", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE, Y212_LE, Y412_LE\0" as *const u8 + as *const c_char; +pub const GST_GL_CONTEXT_TYPE_CGL: *const c_char = + b"gst.gl.context.CGL\0" as *const u8 as *const c_char; +pub const GST_GL_CONTEXT_TYPE_EAGL: *const c_char = + b"gst.gl.context.EAGL\0" as *const u8 as *const c_char; +pub const GST_GL_CONTEXT_TYPE_EGL: *const c_char = + b"gst.gl.context.EGL\0" as *const u8 as *const c_char; +pub const GST_GL_CONTEXT_TYPE_GLX: *const c_char = + b"gst.gl.context.GLX\0" as *const u8 as *const c_char; +pub const GST_GL_CONTEXT_TYPE_WGL: *const c_char = + b"gst.gl.context.WGL\0" as *const u8 as *const c_char; +pub const GST_GL_DISPLAY_CONTEXT_TYPE: *const c_char = + b"gst.gl.GLDisplay\0" as *const u8 as *const c_char; +pub const GST_GL_MEMORY_ALLOCATOR_NAME: *const c_char = b"GLMemory\0" as *const u8 as *const c_char; +pub const GST_GL_MEMORY_PBO_ALLOCATOR_NAME: *const c_char = + b"GLMemoryPBO\0" as *const u8 as *const c_char; +pub const GST_GL_MEMORY_VIDEO_EXT_FORMATS: *const c_char = + b", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE, Y212_LE, Y412_LE\0" as *const u8 + as *const c_char; +pub const GST_GL_RENDERBUFFER_ALLOCATOR_NAME: *const c_char = + b"GLRenderbuffer\0" as *const u8 as *const c_char; +pub const GST_GL_TEXTURE_TARGET_2D_STR: *const c_char = b"2D\0" as *const u8 as *const c_char; +pub const GST_GL_TEXTURE_TARGET_EXTERNAL_OES_STR: *const c_char = + b"external-oes\0" as *const u8 as *const c_char; +pub const GST_GL_TEXTURE_TARGET_RECTANGLE_STR: *const c_char = + b"rectangle\0" as *const u8 as *const c_char; +pub const GST_MAP_GL: c_int = 131072; + +// Flags +pub type GstGLAPI = c_uint; +pub const GST_GL_API_NONE: GstGLAPI = 0; +pub const GST_GL_API_OPENGL: GstGLAPI = 1; +pub const GST_GL_API_OPENGL3: GstGLAPI = 2; +pub const GST_GL_API_GLES1: GstGLAPI = 32768; +pub const GST_GL_API_GLES2: GstGLAPI = 65536; +pub const GST_GL_API_ANY: GstGLAPI = 4294967295; + +pub type GstGLBaseMemoryTransfer = c_uint; +pub const GST_GL_BASE_MEMORY_TRANSFER_NEED_DOWNLOAD: GstGLBaseMemoryTransfer = 1048576; +pub const GST_GL_BASE_MEMORY_TRANSFER_NEED_UPLOAD: GstGLBaseMemoryTransfer = 2097152; + +pub type GstGLDisplayType = c_uint; +pub const GST_GL_DISPLAY_TYPE_NONE: GstGLDisplayType = 0; +pub const GST_GL_DISPLAY_TYPE_X11: GstGLDisplayType = 1; +pub const GST_GL_DISPLAY_TYPE_WAYLAND: GstGLDisplayType = 2; +pub const GST_GL_DISPLAY_TYPE_COCOA: GstGLDisplayType = 4; +pub const GST_GL_DISPLAY_TYPE_WIN32: GstGLDisplayType = 8; +pub const GST_GL_DISPLAY_TYPE_DISPMANX: GstGLDisplayType = 16; +pub const GST_GL_DISPLAY_TYPE_EGL: GstGLDisplayType = 32; +pub const GST_GL_DISPLAY_TYPE_VIV_FB: GstGLDisplayType = 64; +pub const GST_GL_DISPLAY_TYPE_GBM: GstGLDisplayType = 128; +pub const GST_GL_DISPLAY_TYPE_EGL_DEVICE: GstGLDisplayType = 256; +pub const GST_GL_DISPLAY_TYPE_ANY: GstGLDisplayType = 4294967295; + +pub type GstGLPlatform = c_uint; +pub const GST_GL_PLATFORM_NONE: GstGLPlatform = 0; +pub const GST_GL_PLATFORM_EGL: GstGLPlatform = 1; +pub const GST_GL_PLATFORM_GLX: GstGLPlatform = 2; +pub const GST_GL_PLATFORM_WGL: GstGLPlatform = 4; +pub const GST_GL_PLATFORM_CGL: GstGLPlatform = 8; +pub const GST_GL_PLATFORM_EAGL: GstGLPlatform = 16; +pub const GST_GL_PLATFORM_ANY: GstGLPlatform = 4294967295; + +pub type GstGLSLProfile = c_uint; +pub const GST_GLSL_PROFILE_NONE: GstGLSLProfile = 0; +pub const GST_GLSL_PROFILE_ES: GstGLSLProfile = 1; +pub const GST_GLSL_PROFILE_CORE: GstGLSLProfile = 2; +pub const GST_GLSL_PROFILE_COMPATIBILITY: GstGLSLProfile = 4; +pub const GST_GLSL_PROFILE_ANY: GstGLSLProfile = 4294967295; + +// Callbacks +pub type GstGLAllocationParamsCopyFunc = + Option; +pub type GstGLAllocationParamsFreeFunc = Option; +pub type GstGLAsyncDebugLogGetMessage = Option *mut c_char>; +pub type GstGLBaseMemoryAllocatorAllocFunction = Option< + unsafe extern "C" fn( + *mut GstGLBaseMemoryAllocator, + *mut GstGLAllocationParams, + ) -> *mut GstGLBaseMemory, +>; +pub type GstGLBaseMemoryAllocatorCopyFunction = + Option *mut GstGLBaseMemory>; +pub type GstGLBaseMemoryAllocatorCreateFunction = + Option gboolean>; +pub type GstGLBaseMemoryAllocatorDestroyFunction = + Option; +pub type GstGLBaseMemoryAllocatorMapFunction = + Option gpointer>; +pub type GstGLBaseMemoryAllocatorUnmapFunction = + Option; +pub type GstGLContextThreadFunc = Option; +pub type GstGLFilterRenderFunc = + Option gboolean>; +pub type GstGLFramebufferFunc = Option gboolean>; +pub type GstGLWindowCB = Option; +pub type GstGLWindowResizeCB = Option; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLAllocationParams { + pub struct_size: size_t, + pub copy: GstGLAllocationParamsCopyFunc, + pub free: GstGLAllocationParamsFreeFunc, + pub alloc_flags: c_uint, + pub alloc_size: size_t, + pub alloc_params: *mut gst::GstAllocationParams, + pub context: *mut GstGLContext, + pub notify: glib::GDestroyNotify, + pub user_data: gpointer, + pub wrapped_data: gpointer, + pub gl_handle: gpointer, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLAllocationParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLAllocationParams @ {:?}", self as *const _)) + .field("struct_size", &self.struct_size) + .field("copy", &self.copy) + .field("free", &self.free) + .field("alloc_flags", &self.alloc_flags) + .field("alloc_size", &self.alloc_size) + .field("alloc_params", &self.alloc_params) + .field("context", &self.context) + .field("notify", &self.notify) + .field("user_data", &self.user_data) + .field("wrapped_data", &self.wrapped_data) + .field("gl_handle", &self.gl_handle) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLAsyncDebug { + pub state_flags: c_uint, + pub cat: *mut gst::GstDebugCategory, + pub level: gst::GstDebugLevel, + pub file: *const c_char, + pub function: *const c_char, + pub line: c_int, + pub object: *mut gobject::GObject, + pub debug_msg: *mut c_char, + pub callback: GstGLAsyncDebugLogGetMessage, + pub user_data: gpointer, + pub notify: glib::GDestroyNotify, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLAsyncDebug { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLAsyncDebug @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBaseFilterClass { + pub parent_class: gst_base::GstBaseTransformClass, + pub supported_gl_api: GstGLAPI, + pub gl_start: Option gboolean>, + pub gl_stop: Option, + pub gl_set_caps: Option< + unsafe extern "C" fn( + *mut GstGLBaseFilter, + *mut gst::GstCaps, + *mut gst::GstCaps, + ) -> gboolean, + >, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLBaseFilterClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLBaseFilterClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("supported_gl_api", &self.supported_gl_api) + .field("gl_start", &self.gl_start) + .field("gl_stop", &self.gl_stop) + .field("gl_set_caps", &self.gl_set_caps) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLBaseFilterPrivate(c_void); + +pub type GstGLBaseFilterPrivate = *mut _GstGLBaseFilterPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBaseMemory { + pub mem: gst::GstMemory, + pub context: *mut GstGLContext, + pub lock: glib::GMutex, + pub map_flags: gst::GstMapFlags, + pub map_count: c_int, + pub gl_map_count: c_int, + pub data: gpointer, + pub query: *mut GstGLQuery, + pub alloc_size: size_t, + pub alloc_data: gpointer, + pub notify: glib::GDestroyNotify, + pub user_data: gpointer, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLBaseMemory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLBaseMemory @ {:?}", self as *const _)) + .field("mem", &self.mem) + .field("context", &self.context) + .field("lock", &self.lock) + .field("map_flags", &self.map_flags) + .field("map_count", &self.map_count) + .field("gl_map_count", &self.gl_map_count) + .field("data", &self.data) + .field("query", &self.query) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBaseMemoryAllocatorClass { + pub parent_class: gst::GstAllocatorClass, + pub alloc: GstGLBaseMemoryAllocatorAllocFunction, + pub create: GstGLBaseMemoryAllocatorCreateFunction, + pub map: GstGLBaseMemoryAllocatorMapFunction, + pub unmap: GstGLBaseMemoryAllocatorUnmapFunction, + pub copy: GstGLBaseMemoryAllocatorCopyFunction, + pub destroy: GstGLBaseMemoryAllocatorDestroyFunction, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLBaseMemoryAllocatorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLBaseMemoryAllocatorClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("alloc", &self.alloc) + .field("create", &self.create) + .field("map", &self.map) + .field("unmap", &self.unmap) + .field("copy", &self.copy) + .field("destroy", &self.destroy) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBaseSrcClass { + pub parent_class: gst_base::GstPushSrcClass, + pub supported_gl_api: GstGLAPI, + pub gl_start: Option gboolean>, + pub gl_stop: Option, + pub fill_gl_memory: + Option gboolean>, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLBaseSrcClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLBaseSrcClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("supported_gl_api", &self.supported_gl_api) + .field("gl_start", &self.gl_start) + .field("gl_stop", &self.gl_stop) + .field("fill_gl_memory", &self.fill_gl_memory) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLBaseSrcPrivate(c_void); + +pub type GstGLBaseSrcPrivate = *mut _GstGLBaseSrcPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBuffer { + pub mem: GstGLBaseMemory, + pub id: c_uint, + pub target: c_uint, + pub usage_hints: c_uint, +} + +impl ::std::fmt::Debug for GstGLBuffer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLBuffer @ {:?}", self as *const _)) + .field("mem", &self.mem) + .field("id", &self.id) + .field("target", &self.target) + .field("usage_hints", &self.usage_hints) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBufferAllocationParams { + pub parent: GstGLAllocationParams, + pub gl_target: c_uint, + pub gl_usage: c_uint, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLBufferAllocationParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLBufferAllocationParams @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("gl_target", &self.gl_target) + .field("gl_usage", &self.gl_usage) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBufferAllocatorClass { + pub parent_class: GstGLBaseMemoryAllocatorClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLBufferAllocatorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLBufferAllocatorClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBufferPoolClass { + pub parent_class: gst::GstBufferPoolClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLBufferPoolClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLBufferPoolClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLBufferPoolPrivate(c_void); + +pub type GstGLBufferPoolPrivate = *mut _GstGLBufferPoolPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLColorConvertClass { + pub object_class: gst::GstObjectClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLColorConvertClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLColorConvertClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLColorConvertPrivate(c_void); + +pub type GstGLColorConvertPrivate = *mut _GstGLColorConvertPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLContextClass { + pub parent_class: gst::GstObjectClass, + pub get_current_context: Option uintptr_t>, + pub get_gl_context: Option uintptr_t>, + pub get_gl_api: Option GstGLAPI>, + pub get_gl_platform: Option GstGLPlatform>, + pub get_proc_address: Option gpointer>, + pub activate: Option gboolean>, + pub choose_format: + Option gboolean>, + pub create_context: Option< + unsafe extern "C" fn( + *mut GstGLContext, + GstGLAPI, + *mut GstGLContext, + *mut *mut glib::GError, + ) -> gboolean, + >, + pub destroy_context: Option, + pub swap_buffers: Option, + pub check_feature: Option gboolean>, + pub get_gl_platform_version: + Option, + pub _reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLContextClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLContextClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("get_current_context", &self.get_current_context) + .field("get_gl_context", &self.get_gl_context) + .field("get_gl_api", &self.get_gl_api) + .field("get_gl_platform", &self.get_gl_platform) + .field("get_proc_address", &self.get_proc_address) + .field("activate", &self.activate) + .field("choose_format", &self.choose_format) + .field("create_context", &self.create_context) + .field("destroy_context", &self.destroy_context) + .field("swap_buffers", &self.swap_buffers) + .field("check_feature", &self.check_feature) + .field("get_gl_platform_version", &self.get_gl_platform_version) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLContextPrivate(c_void); + +pub type GstGLContextPrivate = *mut _GstGLContextPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLDisplayClass { + pub object_class: gst::GstObjectClass, + pub get_handle: Option uintptr_t>, + pub create_window: Option *mut GstGLWindow>, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLDisplayClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLDisplayClass @ {:?}", self as *const _)) + .field("object_class", &self.object_class) + .field("get_handle", &self.get_handle) + .field("create_window", &self.create_window) + .finish() + } +} + +#[cfg(any(feature = "egl", feature = "dox"))] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLDisplayEGLClass { + pub object_class: GstGLDisplayClass, + pub _padding: [gpointer; 4], +} + +#[cfg(any(feature = "egl", feature = "dox"))] +impl ::std::fmt::Debug for GstGLDisplayEGLClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLDisplayEGLClass @ {:?}", self as *const _)) + .field("object_class", &self.object_class) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLDisplayPrivate(c_void); + +pub type GstGLDisplayPrivate = *mut _GstGLDisplayPrivate; + +#[cfg(any(feature = "wayland", feature = "dox"))] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLDisplayWaylandClass { + pub object_class: GstGLDisplayClass, + pub _padding: [gpointer; 4], +} + +#[cfg(any(feature = "wayland", feature = "dox"))] +impl ::std::fmt::Debug for GstGLDisplayWaylandClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLDisplayWaylandClass @ {:?}", + self as *const _ + )) + .field("object_class", &self.object_class) + .field("_padding", &self._padding) + .finish() + } +} + +#[cfg(any(feature = "x11", feature = "dox"))] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLDisplayX11Class { + pub object_class: GstGLDisplayClass, + pub _padding: [gpointer; 4], +} + +#[cfg(any(feature = "x11", feature = "dox"))] +impl ::std::fmt::Debug for GstGLDisplayX11Class { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLDisplayX11Class @ {:?}", self as *const _)) + .field("object_class", &self.object_class) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLFilterClass { + pub parent_class: GstGLBaseFilterClass, + pub set_caps: Option< + unsafe extern "C" fn(*mut GstGLFilter, *mut gst::GstCaps, *mut gst::GstCaps) -> gboolean, + >, + pub filter: Option< + unsafe extern "C" fn( + *mut GstGLFilter, + *mut gst::GstBuffer, + *mut gst::GstBuffer, + ) -> gboolean, + >, + pub filter_texture: Option< + unsafe extern "C" fn(*mut GstGLFilter, *mut GstGLMemory, *mut GstGLMemory) -> gboolean, + >, + pub init_fbo: Option gboolean>, + pub transform_internal_caps: Option< + unsafe extern "C" fn( + *mut GstGLFilter, + gst::GstPadDirection, + *mut gst::GstCaps, + *mut gst::GstCaps, + ) -> *mut gst::GstCaps, + >, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLFilterClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLFilterClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("set_caps", &self.set_caps) + .field("filter", &self.filter) + .field("filter_texture", &self.filter_texture) + .field("init_fbo", &self.init_fbo) + .field("transform_internal_caps", &self.transform_internal_caps) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLFramebufferClass { + pub object_class: gst::GstObjectClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLFramebufferClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLFramebufferClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLFramebufferPrivate(c_void); + +pub type GstGLFramebufferPrivate = *mut _GstGLFramebufferPrivate; + +#[repr(C)] +pub struct _GstGLFuncs(c_void); + +pub type GstGLFuncs = *mut _GstGLFuncs; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLMemory { + pub mem: GstGLBaseMemory, + pub tex_id: c_uint, + pub tex_target: GstGLTextureTarget, + pub tex_format: GstGLFormat, + pub info: gst_video::GstVideoInfo, + pub valign: gst_video::GstVideoAlignment, + pub plane: c_uint, + pub tex_scaling: [c_float; 2], + pub texture_wrapped: gboolean, + pub unpack_length: c_uint, + pub tex_width: c_uint, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLMemory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLMemory @ {:?}", self as *const _)) + .field("mem", &self.mem) + .field("tex_id", &self.tex_id) + .field("tex_target", &self.tex_target) + .field("tex_format", &self.tex_format) + .field("info", &self.info) + .field("valign", &self.valign) + .field("plane", &self.plane) + .field("tex_scaling", &self.tex_scaling) + .field("texture_wrapped", &self.texture_wrapped) + .field("unpack_length", &self.unpack_length) + .field("tex_width", &self.tex_width) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLMemoryAllocatorClass { + pub parent_class: GstGLBaseMemoryAllocatorClass, + pub map: GstGLBaseMemoryAllocatorMapFunction, + pub copy: GstGLBaseMemoryAllocatorCopyFunction, + pub unmap: GstGLBaseMemoryAllocatorUnmapFunction, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLMemoryAllocatorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLMemoryAllocatorClass @ {:?}", + self as *const _ + )) + .field("map", &self.map) + .field("copy", &self.copy) + .field("unmap", &self.unmap) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLMemoryPBO { + pub mem: GstGLMemory, + pub pbo: *mut GstGLBuffer, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLMemoryPBO { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLMemoryPBO @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLMemoryPBOAllocatorClass { + pub parent_class: GstGLMemoryAllocatorClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLMemoryPBOAllocatorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLMemoryPBOAllocatorClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLOverlayCompositorClass { + pub object_class: gst::GstObjectClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLOverlayCompositorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLOverlayCompositorClass @ {:?}", + self as *const _ + )) + .field("object_class", &self.object_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLQuery { + pub context: *mut GstGLContext, + pub query_type: c_uint, + pub query_id: c_uint, + pub supported: gboolean, + pub start_called: gboolean, + pub debug: GstGLAsyncDebug, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLQuery { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLQuery @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLRenderbuffer { + pub mem: GstGLBaseMemory, + pub renderbuffer_id: c_uint, + pub renderbuffer_format: GstGLFormat, + pub width: c_uint, + pub height: c_uint, + pub renderbuffer_wrapped: gboolean, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLRenderbuffer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLRenderbuffer @ {:?}", self as *const _)) + .field("renderbuffer_id", &self.renderbuffer_id) + .field("renderbuffer_format", &self.renderbuffer_format) + .field("width", &self.width) + .field("height", &self.height) + .field("renderbuffer_wrapped", &self.renderbuffer_wrapped) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLRenderbufferAllocationParams { + pub parent: GstGLAllocationParams, + pub renderbuffer_format: GstGLFormat, + pub width: c_uint, + pub height: c_uint, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLRenderbufferAllocationParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLRenderbufferAllocationParams @ {:?}", + self as *const _ + )) + .field("renderbuffer_format", &self.renderbuffer_format) + .field("width", &self.width) + .field("height", &self.height) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLRenderbufferAllocatorClass { + pub parent_class: GstGLBaseMemoryAllocatorClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLRenderbufferAllocatorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLRenderbufferAllocatorClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLSLStageClass { + pub parent: gst::GstObjectClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLSLStageClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLSLStageClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLSLStagePrivate(c_void); + +pub type GstGLSLStagePrivate = *mut _GstGLSLStagePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLShaderClass { + pub parent_class: gst::GstObjectClass, +} + +impl ::std::fmt::Debug for GstGLShaderClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLShaderClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLShaderPrivate(c_void); + +pub type GstGLShaderPrivate = *mut _GstGLShaderPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLSyncMeta { + pub parent: gst::GstMeta, + pub context: *mut GstGLContext, + pub data: gpointer, + pub set_sync: Option, + pub set_sync_gl: Option, + pub wait: Option, + pub wait_gl: Option, + pub wait_cpu: Option, + pub wait_cpu_gl: Option, + pub copy: Option< + unsafe extern "C" fn( + *mut GstGLSyncMeta, + *mut gst::GstBuffer, + *mut GstGLSyncMeta, + *mut gst::GstBuffer, + ), + >, + pub free: Option, + pub free_gl: Option, +} + +impl ::std::fmt::Debug for GstGLSyncMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLSyncMeta @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("context", &self.context) + .field("data", &self.data) + .field("set_sync", &self.set_sync) + .field("set_sync_gl", &self.set_sync_gl) + .field("wait", &self.wait) + .field("wait_gl", &self.wait_gl) + .field("wait_cpu", &self.wait_cpu) + .field("wait_cpu_gl", &self.wait_cpu_gl) + .field("copy", &self.copy) + .field("free", &self.free) + .field("free_gl", &self.free_gl) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLUploadClass { + pub object_class: gst::GstObjectClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLUploadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLUploadClass @ {:?}", self as *const _)) + .field("object_class", &self.object_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLUploadPrivate(c_void); + +pub type GstGLUploadPrivate = *mut _GstGLUploadPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLVideoAllocationParams { + pub parent: GstGLAllocationParams, + pub v_info: *mut gst_video::GstVideoInfo, + pub plane: c_uint, + pub valign: *mut gst_video::GstVideoAlignment, + pub target: GstGLTextureTarget, + pub tex_format: GstGLFormat, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLVideoAllocationParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLVideoAllocationParams @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("v_info", &self.v_info) + .field("plane", &self.plane) + .field("valign", &self.valign) + .field("target", &self.target) + .field("tex_format", &self.tex_format) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLViewConvertClass { + pub object_class: gst::GstObjectClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLViewConvertClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLViewConvertClass @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLViewConvertPrivate(c_void); + +pub type GstGLViewConvertPrivate = *mut _GstGLViewConvertPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLWindowClass { + pub parent_class: gst::GstObjectClass, + pub get_display: Option uintptr_t>, + pub set_window_handle: Option, + pub get_window_handle: Option uintptr_t>, + pub draw: Option, + pub run: Option, + pub quit: Option, + pub send_message: Option, + pub send_message_async: Option< + unsafe extern "C" fn(*mut GstGLWindow, GstGLWindowCB, gpointer, glib::GDestroyNotify), + >, + pub open: Option gboolean>, + pub close: Option, + pub handle_events: Option, + pub set_preferred_size: Option, + pub show: Option, + pub set_render_rectangle: + Option gboolean>, + pub queue_resize: Option, + pub controls_viewport: Option gboolean>, + pub has_output_surface: Option gboolean>, + pub _reserved: [gpointer; 2], +} + +impl ::std::fmt::Debug for GstGLWindowClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLWindowClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("get_display", &self.get_display) + .field("set_window_handle", &self.set_window_handle) + .field("get_window_handle", &self.get_window_handle) + .field("draw", &self.draw) + .field("run", &self.run) + .field("quit", &self.quit) + .field("send_message", &self.send_message) + .field("send_message_async", &self.send_message_async) + .field("open", &self.open) + .field("close", &self.close) + .field("handle_events", &self.handle_events) + .field("set_preferred_size", &self.set_preferred_size) + .field("show", &self.show) + .field("set_render_rectangle", &self.set_render_rectangle) + .field("queue_resize", &self.queue_resize) + .field("controls_viewport", &self.controls_viewport) + .field("has_output_surface", &self.has_output_surface) + .finish() + } +} + +#[repr(C)] +pub struct _GstGLWindowPrivate(c_void); + +pub type GstGLWindowPrivate = *mut _GstGLWindowPrivate; + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBaseFilter { + pub parent: gst_base::GstBaseTransform, + pub display: *mut GstGLDisplay, + pub context: *mut GstGLContext, + pub in_caps: *mut gst::GstCaps, + pub out_caps: *mut gst::GstCaps, + pub _padding: [gpointer; 4], + pub priv_: *mut GstGLBaseFilterPrivate, +} + +impl ::std::fmt::Debug for GstGLBaseFilter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLBaseFilter @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("display", &self.display) + .field("context", &self.context) + .field("in_caps", &self.in_caps) + .field("out_caps", &self.out_caps) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBaseMemoryAllocator { + pub parent: gst::GstAllocator, + pub fallback_mem_copy: gst::GstMemoryCopyFunction, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLBaseMemoryAllocator { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLBaseMemoryAllocator @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBaseSrc { + pub parent: gst_base::GstPushSrc, + pub display: *mut GstGLDisplay, + pub context: *mut GstGLContext, + pub out_info: gst_video::GstVideoInfo, + pub out_caps: *mut gst::GstCaps, + pub running_time: gst::GstClockTime, + pub _padding: [gpointer; 4], + pub priv_: *mut GstGLBaseSrcPrivate, +} + +impl ::std::fmt::Debug for GstGLBaseSrc { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLBaseSrc @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("display", &self.display) + .field("context", &self.context) + .field("out_info", &self.out_info) + .field("out_caps", &self.out_caps) + .field("running_time", &self.running_time) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBufferAllocator { + pub parent: GstGLBaseMemoryAllocator, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLBufferAllocator { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLBufferAllocator @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLBufferPool { + pub bufferpool: gst::GstBufferPool, + pub context: *mut GstGLContext, + pub priv_: *mut GstGLBufferPoolPrivate, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLBufferPool { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLBufferPool @ {:?}", self as *const _)) + .field("bufferpool", &self.bufferpool) + .field("context", &self.context) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLColorConvert { + pub parent: gst::GstObject, + pub context: *mut GstGLContext, + pub in_info: gst_video::GstVideoInfo, + pub out_info: gst_video::GstVideoInfo, + pub initted: gboolean, + pub passthrough: gboolean, + pub inbuf: *mut gst::GstBuffer, + pub outbuf: *mut gst::GstBuffer, + pub fbo: *mut GstGLFramebuffer, + pub shader: *mut GstGLShader, + pub priv_: *mut GstGLColorConvertPrivate, + pub _reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLColorConvert { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLColorConvert @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLContext { + pub parent: gst::GstObject, + pub display: *mut GstGLDisplay, + pub window: *mut GstGLWindow, + pub gl_vtable: *mut GstGLFuncs, + pub priv_: *mut GstGLContextPrivate, + pub _reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLContext { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLContext @ {:?}", self as *const _)) + .field("gl_vtable", &self.gl_vtable) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLDisplay { + pub object: gst::GstObject, + pub type_: GstGLDisplayType, + pub windows: *mut glib::GList, + pub main_context: *mut glib::GMainContext, + pub main_loop: *mut glib::GMainLoop, + pub event_source: *mut glib::GSource, + pub priv_: *mut GstGLDisplayPrivate, +} + +impl ::std::fmt::Debug for GstGLDisplay { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLDisplay @ {:?}", self as *const _)) + .finish() + } +} + +#[cfg(any(feature = "egl", feature = "dox"))] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLDisplayEGL { + pub parent: GstGLDisplay, + pub display: gpointer, + pub foreign_display: gboolean, + pub _padding: [gpointer; 4], +} + +#[cfg(any(feature = "egl", feature = "dox"))] +impl ::std::fmt::Debug for GstGLDisplayEGL { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLDisplayEGL @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[cfg(any(feature = "wayland", feature = "dox"))] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLDisplayWayland { + pub parent: GstGLDisplay, + pub display: gpointer, + pub registry: gpointer, + pub compositor: gpointer, + pub subcompositor: gpointer, + pub shell: gpointer, + pub foreign_display: gboolean, + pub _padding: [gpointer; 4], +} + +#[cfg(any(feature = "wayland", feature = "dox"))] +impl ::std::fmt::Debug for GstGLDisplayWayland { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLDisplayWayland @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("display", &self.display) + .field("registry", &self.registry) + .field("compositor", &self.compositor) + .field("subcompositor", &self.subcompositor) + .field("shell", &self.shell) + .finish() + } +} + +#[cfg(any(feature = "x11", feature = "dox"))] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLDisplayX11 { + pub parent: GstGLDisplay, + pub name: *mut c_char, + pub display: gpointer, + pub xcb_connection: gpointer, + pub foreign_display: gboolean, + pub _padding: [gpointer; 4], +} + +#[cfg(any(feature = "x11", feature = "dox"))] +impl ::std::fmt::Debug for GstGLDisplayX11 { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLDisplayX11 @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLFilter { + pub parent: GstGLBaseFilter, + pub in_info: gst_video::GstVideoInfo, + pub out_info: gst_video::GstVideoInfo, + pub in_texture_target: GstGLTextureTarget, + pub out_texture_target: GstGLTextureTarget, + pub out_caps: *mut gst::GstCaps, + pub fbo: *mut GstGLFramebuffer, + pub gl_result: gboolean, + pub inbuf: *mut gst::GstBuffer, + pub outbuf: *mut gst::GstBuffer, + pub default_shader: *mut GstGLShader, + pub valid_attributes: gboolean, + pub vao: c_uint, + pub vbo_indices: c_uint, + pub vertex_buffer: c_uint, + pub draw_attr_position_loc: c_int, + pub draw_attr_texture_loc: c_int, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLFilter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLFilter @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("in_info", &self.in_info) + .field("out_info", &self.out_info) + .field("in_texture_target", &self.in_texture_target) + .field("out_texture_target", &self.out_texture_target) + .field("out_caps", &self.out_caps) + .field("fbo", &self.fbo) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLFramebuffer { + pub object: gst::GstObject, + pub context: *mut GstGLContext, + pub fbo_id: c_uint, + pub attachments: *mut glib::GArray, + pub _padding: [gpointer; 4], + pub priv_: *mut GstGLFramebufferPrivate, +} + +impl ::std::fmt::Debug for GstGLFramebuffer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLFramebuffer @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLMemoryAllocator { + pub parent: GstGLBaseMemoryAllocator, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLMemoryAllocator { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLMemoryAllocator @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLMemoryPBOAllocator { + pub parent: GstGLMemoryAllocator, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLMemoryPBOAllocator { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLMemoryPBOAllocator @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLOverlayCompositor { + pub parent: gst::GstObject, + pub context: *mut GstGLContext, + pub last_window_width: c_uint, + pub last_window_height: c_uint, + pub overlays: *mut glib::GList, + pub shader: *mut GstGLShader, + pub position_attrib: c_int, + pub texcoord_attrib: c_int, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLOverlayCompositor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLOverlayCompositor @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLRenderbufferAllocator { + pub parent: GstGLBaseMemoryAllocator, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLRenderbufferAllocator { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstGLRenderbufferAllocator @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLSLStage { + pub parent: gst::GstObject, + pub context: *mut GstGLContext, + pub priv_: *mut GstGLSLStagePrivate, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLSLStage { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLSLStage @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLShader { + pub parent: gst::GstObject, + pub context: *mut GstGLContext, + pub priv_: *mut GstGLShaderPrivate, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLShader { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLShader @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("context", &self.context) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLUpload { + pub parent: gst::GstObject, + pub context: *mut GstGLContext, + pub priv_: *mut GstGLUploadPrivate, + pub _reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLUpload { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLUpload @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("context", &self.context) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLViewConvert { + pub object: gst::GstObject, + pub context: *mut GstGLContext, + pub shader: *mut GstGLShader, + pub input_mode_override: gst_video::GstVideoMultiviewMode, + pub input_flags_override: gst_video::GstVideoMultiviewFlags, + pub output_mode_override: gst_video::GstVideoMultiviewMode, + pub output_flags_override: gst_video::GstVideoMultiviewFlags, + pub downmix_mode: GstGLStereoDownmix, + pub in_info: gst_video::GstVideoInfo, + pub out_info: gst_video::GstVideoInfo, + pub from_texture_target: GstGLTextureTarget, + pub to_texture_target: GstGLTextureTarget, + pub caps_passthrough: gboolean, + pub initted: gboolean, + pub reconfigure: gboolean, + pub fbo: *mut GstGLFramebuffer, + pub priv_: *mut GstGLViewConvertPrivate, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLViewConvert { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLViewConvert @ {:?}", self as *const _)) + .field("object", &self.object) + .field("context", &self.context) + .field("shader", &self.shader) + .field("input_mode_override", &self.input_mode_override) + .field("input_flags_override", &self.input_flags_override) + .field("output_mode_override", &self.output_mode_override) + .field("output_flags_override", &self.output_flags_override) + .field("downmix_mode", &self.downmix_mode) + .field("in_info", &self.in_info) + .field("out_info", &self.out_info) + .field("from_texture_target", &self.from_texture_target) + .field("to_texture_target", &self.to_texture_target) + .field("caps_passthrough", &self.caps_passthrough) + .field("initted", &self.initted) + .field("reconfigure", &self.reconfigure) + .field("fbo", &self.fbo) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGLWindow { + pub parent: gst::GstObject, + pub lock: glib::GMutex, + pub display: *mut GstGLDisplay, + pub context_ref: gobject::GWeakRef, + pub is_drawing: gboolean, + pub draw: GstGLWindowCB, + pub draw_data: gpointer, + pub draw_notify: glib::GDestroyNotify, + pub close: GstGLWindowCB, + pub close_data: gpointer, + pub close_notify: glib::GDestroyNotify, + pub resize: GstGLWindowResizeCB, + pub resize_data: gpointer, + pub resize_notify: glib::GDestroyNotify, + pub queue_resize: gboolean, + pub main_context: *mut glib::GMainContext, + pub priv_: *mut GstGLWindowPrivate, + pub _reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGLWindow { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGLWindow @ {:?}", self as *const _)) + .finish() + } +} + +#[link(name = "gstgl-1.0")] +extern "C" { + + //========================================================================= + // GstGLBaseMemoryError + //========================================================================= + pub fn gst_gl_base_memory_error_get_type() -> GType; + pub fn gst_gl_base_memory_error_quark() -> glib::GQuark; + + //========================================================================= + // GstGLContextError + //========================================================================= + pub fn gst_gl_context_error_get_type() -> GType; + pub fn gst_gl_context_error_quark() -> glib::GQuark; + + //========================================================================= + // GstGLFormat + //========================================================================= + pub fn gst_gl_format_get_type() -> GType; + pub fn gst_gl_format_from_video_info( + context: *mut GstGLContext, + vinfo: *mut gst_video::GstVideoInfo, + plane: c_uint, + ) -> GstGLFormat; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_gl_format_is_supported(context: *mut GstGLContext, format: GstGLFormat) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_gl_format_type_from_sized_gl_format( + format: GstGLFormat, + unsized_format: *mut GstGLFormat, + gl_type: *mut c_uint, + ); + pub fn gst_gl_format_type_n_bytes(format: c_uint, type_: c_uint) -> c_uint; + + //========================================================================= + // GstGLQueryType + //========================================================================= + pub fn gst_gl_query_type_get_type() -> GType; + + //========================================================================= + // GstGLSLError + //========================================================================= + pub fn gst_glsl_error_get_type() -> GType; + pub fn gst_glsl_error_quark() -> glib::GQuark; + + //========================================================================= + // GstGLSLVersion + //========================================================================= + pub fn gst_glsl_version_get_type() -> GType; + pub fn gst_glsl_version_from_string(string: *const c_char) -> GstGLSLVersion; + pub fn gst_glsl_version_profile_from_string( + string: *const c_char, + version_ret: *mut GstGLSLVersion, + profile_ret: *mut GstGLSLProfile, + ) -> gboolean; + pub fn gst_glsl_version_profile_to_string( + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> *mut c_char; + pub fn gst_glsl_version_to_string(version: GstGLSLVersion) -> *const c_char; + + //========================================================================= + // GstGLStereoDownmix + //========================================================================= + pub fn gst_gl_stereo_downmix_get_type() -> GType; + + //========================================================================= + // GstGLTextureTarget + //========================================================================= + pub fn gst_gl_texture_target_get_type() -> GType; + pub fn gst_gl_texture_target_from_gl(target: c_uint) -> GstGLTextureTarget; + pub fn gst_gl_texture_target_from_string(str: *const c_char) -> GstGLTextureTarget; + pub fn gst_gl_texture_target_to_buffer_pool_option(target: GstGLTextureTarget) + -> *const c_char; + pub fn gst_gl_texture_target_to_gl(target: GstGLTextureTarget) -> c_uint; + pub fn gst_gl_texture_target_to_string(target: GstGLTextureTarget) -> *const c_char; + + //========================================================================= + // GstGLUploadReturn + //========================================================================= + pub fn gst_gl_upload_return_get_type() -> GType; + + //========================================================================= + // GstGLWindowError + //========================================================================= + pub fn gst_gl_window_error_get_type() -> GType; + pub fn gst_gl_window_error_quark() -> glib::GQuark; + + //========================================================================= + // GstGLAPI + //========================================================================= + pub fn gst_gl_api_get_type() -> GType; + pub fn gst_gl_api_from_string(api_s: *const c_char) -> GstGLAPI; + pub fn gst_gl_api_to_string(api: GstGLAPI) -> *mut c_char; + + //========================================================================= + // GstGLBaseMemoryTransfer + //========================================================================= + pub fn gst_gl_base_memory_transfer_get_type() -> GType; + + //========================================================================= + // GstGLDisplayType + //========================================================================= + pub fn gst_gl_display_type_get_type() -> GType; + + //========================================================================= + // GstGLPlatform + //========================================================================= + pub fn gst_gl_platform_get_type() -> GType; + pub fn gst_gl_platform_from_string(platform_s: *const c_char) -> GstGLPlatform; + pub fn gst_gl_platform_to_string(platform: GstGLPlatform) -> *mut c_char; + + //========================================================================= + // GstGLSLProfile + //========================================================================= + pub fn gst_glsl_profile_get_type() -> GType; + pub fn gst_glsl_profile_from_string(string: *const c_char) -> GstGLSLProfile; + pub fn gst_glsl_profile_to_string(profile: GstGLSLProfile) -> *const c_char; + + //========================================================================= + // GstGLAllocationParams + //========================================================================= + pub fn gst_gl_allocation_params_get_type() -> GType; + pub fn gst_gl_allocation_params_copy( + src: *mut GstGLAllocationParams, + ) -> *mut GstGLAllocationParams; + pub fn gst_gl_allocation_params_copy_data( + src: *mut GstGLAllocationParams, + dest: *mut GstGLAllocationParams, + ); + pub fn gst_gl_allocation_params_free(params: *mut GstGLAllocationParams); + pub fn gst_gl_allocation_params_free_data(params: *mut GstGLAllocationParams); + pub fn gst_gl_allocation_params_init( + params: *mut GstGLAllocationParams, + struct_size: size_t, + alloc_flags: c_uint, + copy: GstGLAllocationParamsCopyFunc, + free: GstGLAllocationParamsFreeFunc, + context: *mut GstGLContext, + alloc_size: size_t, + alloc_params: *mut gst::GstAllocationParams, + wrapped_data: gpointer, + gl_handle: gpointer, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> gboolean; + + //========================================================================= + // GstGLAsyncDebug + //========================================================================= + pub fn gst_gl_async_debug_free(ad: *mut GstGLAsyncDebug); + pub fn gst_gl_async_debug_freeze(ad: *mut GstGLAsyncDebug); + pub fn gst_gl_async_debug_init(ad: *mut GstGLAsyncDebug); + pub fn gst_gl_async_debug_output_log_msg(ad: *mut GstGLAsyncDebug); + pub fn gst_gl_async_debug_store_log_msg( + ad: *mut GstGLAsyncDebug, + cat: *mut gst::GstDebugCategory, + level: gst::GstDebugLevel, + file: *const c_char, + function: *const c_char, + line: c_int, + object: *mut gobject::GObject, + format: *const c_char, + ... + ); + //pub fn gst_gl_async_debug_store_log_msg_valist(ad: *mut GstGLAsyncDebug, cat: *mut gst::GstDebugCategory, level: gst::GstDebugLevel, file: *const c_char, function: *const c_char, line: c_int, object: *mut gobject::GObject, format: *const c_char, varargs: /*Unimplemented*/va_list); + pub fn gst_gl_async_debug_thaw(ad: *mut GstGLAsyncDebug); + pub fn gst_gl_async_debug_unset(ad: *mut GstGLAsyncDebug); + pub fn gst_gl_async_debug_new() -> *mut GstGLAsyncDebug; + + //========================================================================= + // GstGLBaseMemory + //========================================================================= + pub fn gst_gl_base_memory_get_type() -> GType; + pub fn gst_gl_base_memory_alloc_data(gl_mem: *mut GstGLBaseMemory) -> gboolean; + pub fn gst_gl_base_memory_init( + mem: *mut GstGLBaseMemory, + allocator: *mut gst::GstAllocator, + parent: *mut gst::GstMemory, + context: *mut GstGLContext, + params: *mut gst::GstAllocationParams, + size: size_t, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_gl_base_memory_memcpy( + src: *mut GstGLBaseMemory, + dest: *mut GstGLBaseMemory, + offset: ssize_t, + size: ssize_t, + ) -> gboolean; + pub fn gst_gl_base_memory_alloc( + allocator: *mut GstGLBaseMemoryAllocator, + params: *mut GstGLAllocationParams, + ) -> *mut GstGLBaseMemory; + pub fn gst_gl_base_memory_init_once(); + + //========================================================================= + // GstGLBuffer + //========================================================================= + pub fn gst_gl_buffer_init_once(); + + //========================================================================= + // GstGLBufferAllocationParams + //========================================================================= + pub fn gst_gl_buffer_allocation_params_get_type() -> GType; + pub fn gst_gl_buffer_allocation_params_new( + context: *mut GstGLContext, + alloc_size: size_t, + alloc_params: *mut gst::GstAllocationParams, + gl_target: c_uint, + gl_usage: c_uint, + ) -> *mut GstGLBufferAllocationParams; + + //========================================================================= + // GstGLMemory + //========================================================================= + pub fn gst_gl_memory_copy_into( + gl_mem: *mut GstGLMemory, + tex_id: c_uint, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + width: c_int, + height: c_int, + ) -> gboolean; + pub fn gst_gl_memory_copy_teximage( + src: *mut GstGLMemory, + tex_id: c_uint, + out_target: GstGLTextureTarget, + out_tex_format: GstGLFormat, + out_width: c_int, + out_height: c_int, + ) -> gboolean; + pub fn gst_gl_memory_get_texture_format(gl_mem: *mut GstGLMemory) -> GstGLFormat; + pub fn gst_gl_memory_get_texture_height(gl_mem: *mut GstGLMemory) -> c_int; + pub fn gst_gl_memory_get_texture_id(gl_mem: *mut GstGLMemory) -> c_uint; + pub fn gst_gl_memory_get_texture_target(gl_mem: *mut GstGLMemory) -> GstGLTextureTarget; + pub fn gst_gl_memory_get_texture_width(gl_mem: *mut GstGLMemory) -> c_int; + pub fn gst_gl_memory_init( + mem: *mut GstGLMemory, + allocator: *mut gst::GstAllocator, + parent: *mut gst::GstMemory, + context: *mut GstGLContext, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + params: *mut gst::GstAllocationParams, + info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_gl_memory_read_pixels(gl_mem: *mut GstGLMemory, read_pointer: gpointer) -> gboolean; + pub fn gst_gl_memory_texsubimage(gl_mem: *mut GstGLMemory, read_pointer: gpointer); + pub fn gst_gl_memory_init_once(); + pub fn gst_gl_memory_setup_buffer( + allocator: *mut GstGLMemoryAllocator, + buffer: *mut gst::GstBuffer, + params: *mut GstGLVideoAllocationParams, + tex_formats: *mut GstGLFormat, + wrapped_data: *mut gpointer, + n_wrapped_pointers: size_t, + ) -> gboolean; + + //========================================================================= + // GstGLMemoryPBO + //========================================================================= + pub fn gst_gl_memory_pbo_copy_into_texture( + gl_mem: *mut GstGLMemoryPBO, + tex_id: c_uint, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + width: c_int, + height: c_int, + stride: c_int, + respecify: gboolean, + ) -> gboolean; + pub fn gst_gl_memory_pbo_download_transfer(gl_mem: *mut GstGLMemoryPBO); + pub fn gst_gl_memory_pbo_upload_transfer(gl_mem: *mut GstGLMemoryPBO); + pub fn gst_gl_memory_pbo_init_once(); + + //========================================================================= + // GstGLQuery + //========================================================================= + pub fn gst_gl_query_counter(query: *mut GstGLQuery); + pub fn gst_gl_query_end(query: *mut GstGLQuery); + pub fn gst_gl_query_free(query: *mut GstGLQuery); + pub fn gst_gl_query_init( + query: *mut GstGLQuery, + context: *mut GstGLContext, + query_type: GstGLQueryType, + ); + pub fn gst_gl_query_result(query: *mut GstGLQuery) -> u64; + pub fn gst_gl_query_start(query: *mut GstGLQuery); + pub fn gst_gl_query_unset(query: *mut GstGLQuery); + pub fn gst_gl_query_local_gl_context( + element: *mut gst::GstElement, + direction: gst::GstPadDirection, + context_ptr: *mut *mut GstGLContext, + ) -> gboolean; + pub fn gst_gl_query_new( + context: *mut GstGLContext, + query_type: GstGLQueryType, + ) -> *mut GstGLQuery; + + //========================================================================= + // GstGLRenderbuffer + //========================================================================= + pub fn gst_gl_renderbuffer_get_format(gl_mem: *mut GstGLRenderbuffer) -> GstGLFormat; + pub fn gst_gl_renderbuffer_get_height(gl_mem: *mut GstGLRenderbuffer) -> c_int; + pub fn gst_gl_renderbuffer_get_id(gl_mem: *mut GstGLRenderbuffer) -> c_uint; + pub fn gst_gl_renderbuffer_get_width(gl_mem: *mut GstGLRenderbuffer) -> c_int; + pub fn gst_gl_renderbuffer_init_once(); + + //========================================================================= + // GstGLRenderbufferAllocationParams + //========================================================================= + pub fn gst_gl_renderbuffer_allocation_params_get_type() -> GType; + pub fn gst_gl_renderbuffer_allocation_params_new( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + renderbuffer_format: GstGLFormat, + width: c_uint, + height: c_uint, + ) -> *mut GstGLRenderbufferAllocationParams; + pub fn gst_gl_renderbuffer_allocation_params_new_wrapped( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + renderbuffer_format: GstGLFormat, + width: c_uint, + height: c_uint, + gl_handle: gpointer, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstGLRenderbufferAllocationParams; + + //========================================================================= + // GstGLSyncMeta + //========================================================================= + pub fn gst_gl_sync_meta_set_sync_point( + sync_meta: *mut GstGLSyncMeta, + context: *mut GstGLContext, + ); + pub fn gst_gl_sync_meta_wait(sync_meta: *mut GstGLSyncMeta, context: *mut GstGLContext); + pub fn gst_gl_sync_meta_wait_cpu(sync_meta: *mut GstGLSyncMeta, context: *mut GstGLContext); + pub fn gst_gl_sync_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstGLVideoAllocationParams + //========================================================================= + pub fn gst_gl_video_allocation_params_get_type() -> GType; + pub fn gst_gl_video_allocation_params_new( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + v_info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + ) -> *mut GstGLVideoAllocationParams; + pub fn gst_gl_video_allocation_params_new_wrapped_data( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + v_info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + wrapped_data: gpointer, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstGLVideoAllocationParams; + pub fn gst_gl_video_allocation_params_new_wrapped_gl_handle( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + v_info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + gl_handle: gpointer, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstGLVideoAllocationParams; + pub fn gst_gl_video_allocation_params_new_wrapped_texture( + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + v_info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + tex_id: c_uint, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstGLVideoAllocationParams; + pub fn gst_gl_video_allocation_params_copy_data( + src_vid: *mut GstGLVideoAllocationParams, + dest_vid: *mut GstGLVideoAllocationParams, + ); + pub fn gst_gl_video_allocation_params_free_data(params: *mut GstGLVideoAllocationParams); + pub fn gst_gl_video_allocation_params_init_full( + params: *mut GstGLVideoAllocationParams, + struct_size: size_t, + alloc_flags: c_uint, + copy: GstGLAllocationParamsCopyFunc, + free: GstGLAllocationParamsFreeFunc, + context: *mut GstGLContext, + alloc_params: *mut gst::GstAllocationParams, + v_info: *mut gst_video::GstVideoInfo, + plane: c_uint, + valign: *mut gst_video::GstVideoAlignment, + target: GstGLTextureTarget, + tex_format: GstGLFormat, + wrapped_data: gpointer, + gl_handle: gpointer, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> gboolean; + + //========================================================================= + // GstGLBaseFilter + //========================================================================= + pub fn gst_gl_base_filter_get_type() -> GType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_gl_base_filter_find_gl_context(filter: *mut GstGLBaseFilter) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_gl_base_filter_get_gl_context(filter: *mut GstGLBaseFilter) -> *mut GstGLContext; + + //========================================================================= + // GstGLBaseMemoryAllocator + //========================================================================= + pub fn gst_gl_base_memory_allocator_get_type() -> GType; + + //========================================================================= + // GstGLBaseSrc + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_gl_base_src_get_type() -> GType; + + //========================================================================= + // GstGLBufferAllocator + //========================================================================= + pub fn gst_gl_buffer_allocator_get_type() -> GType; + + //========================================================================= + // GstGLBufferPool + //========================================================================= + pub fn gst_gl_buffer_pool_get_type() -> GType; + pub fn gst_gl_buffer_pool_new(context: *mut GstGLContext) -> *mut gst::GstBufferPool; + + //========================================================================= + // GstGLColorConvert + //========================================================================= + pub fn gst_gl_color_convert_get_type() -> GType; + pub fn gst_gl_color_convert_new(context: *mut GstGLContext) -> *mut GstGLColorConvert; + pub fn gst_gl_color_convert_fixate_caps( + context: *mut GstGLContext, + direction: gst::GstPadDirection, + caps: *mut gst::GstCaps, + other: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + pub fn gst_gl_color_convert_transform_caps( + context: *mut GstGLContext, + direction: gst::GstPadDirection, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + pub fn gst_gl_color_convert_decide_allocation( + convert: *mut GstGLColorConvert, + query: *mut gst::GstQuery, + ) -> gboolean; + pub fn gst_gl_color_convert_perform( + convert: *mut GstGLColorConvert, + inbuf: *mut gst::GstBuffer, + ) -> *mut gst::GstBuffer; + pub fn gst_gl_color_convert_set_caps( + convert: *mut GstGLColorConvert, + in_caps: *mut gst::GstCaps, + out_caps: *mut gst::GstCaps, + ) -> gboolean; + + //========================================================================= + // GstGLContext + //========================================================================= + pub fn gst_gl_context_get_type() -> GType; + pub fn gst_gl_context_new(display: *mut GstGLDisplay) -> *mut GstGLContext; + pub fn gst_gl_context_new_wrapped( + display: *mut GstGLDisplay, + handle: uintptr_t, + context_type: GstGLPlatform, + available_apis: GstGLAPI, + ) -> *mut GstGLContext; + pub fn gst_gl_context_default_get_proc_address( + gl_api: GstGLAPI, + name: *const c_char, + ) -> gpointer; + pub fn gst_gl_context_get_current() -> *mut GstGLContext; + pub fn gst_gl_context_get_current_gl_api( + platform: GstGLPlatform, + major: *mut c_uint, + minor: *mut c_uint, + ) -> GstGLAPI; + pub fn gst_gl_context_get_current_gl_context(context_type: GstGLPlatform) -> uintptr_t; + pub fn gst_gl_context_get_proc_address_with_platform( + context_type: GstGLPlatform, + gl_api: GstGLAPI, + name: *const c_char, + ) -> gpointer; + pub fn gst_gl_context_activate(context: *mut GstGLContext, activate: gboolean) -> gboolean; + pub fn gst_gl_context_can_share( + context: *mut GstGLContext, + other_context: *mut GstGLContext, + ) -> gboolean; + pub fn gst_gl_context_check_feature( + context: *mut GstGLContext, + feature: *const c_char, + ) -> gboolean; + pub fn gst_gl_context_check_framebuffer_status( + context: *mut GstGLContext, + fbo_target: c_uint, + ) -> gboolean; + pub fn gst_gl_context_check_gl_version( + context: *mut GstGLContext, + api: GstGLAPI, + maj: c_int, + min: c_int, + ) -> gboolean; + pub fn gst_gl_context_clear_framebuffer(context: *mut GstGLContext); + pub fn gst_gl_context_clear_shader(context: *mut GstGLContext); + pub fn gst_gl_context_create( + context: *mut GstGLContext, + other_context: *mut GstGLContext, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn gst_gl_context_destroy(context: *mut GstGLContext); + pub fn gst_gl_context_fill_info( + context: *mut GstGLContext, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn gst_gl_context_get_display(context: *mut GstGLContext) -> *mut GstGLDisplay; + pub fn gst_gl_context_get_gl_api(context: *mut GstGLContext) -> GstGLAPI; + pub fn gst_gl_context_get_gl_context(context: *mut GstGLContext) -> uintptr_t; + pub fn gst_gl_context_get_gl_platform(context: *mut GstGLContext) -> GstGLPlatform; + pub fn gst_gl_context_get_gl_platform_version( + context: *mut GstGLContext, + major: *mut c_int, + minor: *mut c_int, + ); + pub fn gst_gl_context_get_gl_version( + context: *mut GstGLContext, + maj: *mut c_int, + min: *mut c_int, + ); + pub fn gst_gl_context_get_proc_address( + context: *mut GstGLContext, + name: *const c_char, + ) -> gpointer; + pub fn gst_gl_context_get_thread(context: *mut GstGLContext) -> *mut glib::GThread; + pub fn gst_gl_context_get_window(context: *mut GstGLContext) -> *mut GstGLWindow; + pub fn gst_gl_context_is_shared(context: *mut GstGLContext) -> gboolean; + pub fn gst_gl_context_set_shared_with(context: *mut GstGLContext, share: *mut GstGLContext); + pub fn gst_gl_context_set_window( + context: *mut GstGLContext, + window: *mut GstGLWindow, + ) -> gboolean; + pub fn gst_gl_context_supports_glsl_profile_version( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_gl_context_supports_precision( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_gl_context_supports_precision_highp( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> gboolean; + pub fn gst_gl_context_swap_buffers(context: *mut GstGLContext); + pub fn gst_gl_context_thread_add( + context: *mut GstGLContext, + func: GstGLContextThreadFunc, + data: gpointer, + ); + + //========================================================================= + // GstGLDisplay + //========================================================================= + pub fn gst_gl_display_get_type() -> GType; + pub fn gst_gl_display_new() -> *mut GstGLDisplay; + pub fn gst_gl_display_add_context( + display: *mut GstGLDisplay, + context: *mut GstGLContext, + ) -> gboolean; + pub fn gst_gl_display_create_context( + display: *mut GstGLDisplay, + other_context: *mut GstGLContext, + p_context: *mut *mut GstGLContext, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn gst_gl_display_create_window(display: *mut GstGLDisplay) -> *mut GstGLWindow; + pub fn gst_gl_display_filter_gl_api(display: *mut GstGLDisplay, gl_api: GstGLAPI); + pub fn gst_gl_display_find_window( + display: *mut GstGLDisplay, + data: gpointer, + compare_func: glib::GCompareFunc, + ) -> *mut GstGLWindow; + pub fn gst_gl_display_get_gl_api(display: *mut GstGLDisplay) -> GstGLAPI; + pub fn gst_gl_display_get_gl_api_unlocked(display: *mut GstGLDisplay) -> GstGLAPI; + pub fn gst_gl_display_get_gl_context_for_thread( + display: *mut GstGLDisplay, + thread: *mut glib::GThread, + ) -> *mut GstGLContext; + pub fn gst_gl_display_get_handle(display: *mut GstGLDisplay) -> uintptr_t; + pub fn gst_gl_display_get_handle_type(display: *mut GstGLDisplay) -> GstGLDisplayType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_gl_display_remove_context(display: *mut GstGLDisplay, context: *mut GstGLContext); + pub fn gst_gl_display_remove_window( + display: *mut GstGLDisplay, + window: *mut GstGLWindow, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_gl_display_retrieve_window( + display: *mut GstGLDisplay, + data: gpointer, + compare_func: glib::GCompareFunc, + ) -> *mut GstGLWindow; + + //========================================================================= + // GstGLDisplayEGL + //========================================================================= + #[cfg(any(feature = "egl", feature = "dox"))] + pub fn gst_gl_display_egl_get_type() -> GType; + #[cfg(any(feature = "egl", feature = "dox"))] + pub fn gst_gl_display_egl_new() -> *mut GstGLDisplayEGL; + #[cfg(any(feature = "egl", feature = "dox"))] + pub fn gst_gl_display_egl_new_with_egl_display(display: gpointer) -> *mut GstGLDisplayEGL; + #[cfg(any(feature = "egl", feature = "dox"))] + pub fn gst_gl_display_egl_from_gl_display(display: *mut GstGLDisplay) -> *mut GstGLDisplayEGL; + #[cfg(any(feature = "egl", feature = "dox"))] + pub fn gst_gl_display_egl_get_from_native( + type_: GstGLDisplayType, + display: uintptr_t, + ) -> gpointer; + + //========================================================================= + // GstGLDisplayWayland + //========================================================================= + #[cfg(any(feature = "wayland", feature = "dox"))] + pub fn gst_gl_display_wayland_get_type() -> GType; + #[cfg(any(feature = "wayland", feature = "dox"))] + pub fn gst_gl_display_wayland_new(name: *const c_char) -> *mut GstGLDisplayWayland; + #[cfg(any(feature = "wayland", feature = "dox"))] + pub fn gst_gl_display_wayland_new_with_display(display: gpointer) -> *mut GstGLDisplayWayland; + + //========================================================================= + // GstGLDisplayX11 + //========================================================================= + #[cfg(any(feature = "x11", feature = "dox"))] + pub fn gst_gl_display_x11_get_type() -> GType; + #[cfg(any(feature = "x11", feature = "dox"))] + pub fn gst_gl_display_x11_new(name: *const c_char) -> *mut GstGLDisplayX11; + #[cfg(any(feature = "x11", feature = "dox"))] + pub fn gst_gl_display_x11_new_with_display(display: gpointer) -> *mut GstGLDisplayX11; + + //========================================================================= + // GstGLFilter + //========================================================================= + pub fn gst_gl_filter_get_type() -> GType; + pub fn gst_gl_filter_add_rgba_pad_templates(klass: *mut GstGLFilterClass); + pub fn gst_gl_filter_draw_fullscreen_quad(filter: *mut GstGLFilter); + pub fn gst_gl_filter_filter_texture( + filter: *mut GstGLFilter, + input: *mut gst::GstBuffer, + output: *mut gst::GstBuffer, + ) -> gboolean; + pub fn gst_gl_filter_render_to_target( + filter: *mut GstGLFilter, + input: *mut GstGLMemory, + output: *mut GstGLMemory, + func: GstGLFilterRenderFunc, + data: gpointer, + ) -> gboolean; + pub fn gst_gl_filter_render_to_target_with_shader( + filter: *mut GstGLFilter, + input: *mut GstGLMemory, + output: *mut GstGLMemory, + shader: *mut GstGLShader, + ); + + //========================================================================= + // GstGLFramebuffer + //========================================================================= + pub fn gst_gl_framebuffer_get_type() -> GType; + pub fn gst_gl_framebuffer_new(context: *mut GstGLContext) -> *mut GstGLFramebuffer; + pub fn gst_gl_framebuffer_new_with_default_depth( + context: *mut GstGLContext, + width: c_uint, + height: c_uint, + ) -> *mut GstGLFramebuffer; + pub fn gst_gl_framebuffer_attach( + fb: *mut GstGLFramebuffer, + attachment_point: c_uint, + mem: *mut GstGLBaseMemory, + ); + pub fn gst_gl_framebuffer_bind(fb: *mut GstGLFramebuffer); + pub fn gst_gl_framebuffer_draw_to_texture( + fb: *mut GstGLFramebuffer, + mem: *mut GstGLMemory, + func: GstGLFramebufferFunc, + user_data: gpointer, + ) -> gboolean; + pub fn gst_gl_framebuffer_get_effective_dimensions( + fb: *mut GstGLFramebuffer, + width: *mut c_uint, + height: *mut c_uint, + ); + pub fn gst_gl_framebuffer_get_id(fb: *mut GstGLFramebuffer) -> c_uint; + + //========================================================================= + // GstGLMemoryAllocator + //========================================================================= + pub fn gst_gl_memory_allocator_get_type() -> GType; + pub fn gst_gl_memory_allocator_get_default( + context: *mut GstGLContext, + ) -> *mut GstGLMemoryAllocator; + + //========================================================================= + // GstGLMemoryPBOAllocator + //========================================================================= + pub fn gst_gl_memory_pbo_allocator_get_type() -> GType; + + //========================================================================= + // GstGLOverlayCompositor + //========================================================================= + pub fn gst_gl_overlay_compositor_get_type() -> GType; + pub fn gst_gl_overlay_compositor_new(context: *mut GstGLContext) + -> *mut GstGLOverlayCompositor; + pub fn gst_gl_overlay_compositor_add_caps(caps: *mut gst::GstCaps) -> *mut gst::GstCaps; + pub fn gst_gl_overlay_compositor_draw_overlays(compositor: *mut GstGLOverlayCompositor); + pub fn gst_gl_overlay_compositor_free_overlays(compositor: *mut GstGLOverlayCompositor); + pub fn gst_gl_overlay_compositor_upload_overlays( + compositor: *mut GstGLOverlayCompositor, + buf: *mut gst::GstBuffer, + ); + + //========================================================================= + // GstGLRenderbufferAllocator + //========================================================================= + pub fn gst_gl_renderbuffer_allocator_get_type() -> GType; + + //========================================================================= + // GstGLSLStage + //========================================================================= + pub fn gst_glsl_stage_get_type() -> GType; + pub fn gst_glsl_stage_new(context: *mut GstGLContext, type_: c_uint) -> *mut GstGLSLStage; + pub fn gst_glsl_stage_new_default_fragment(context: *mut GstGLContext) -> *mut GstGLSLStage; + pub fn gst_glsl_stage_new_default_vertex(context: *mut GstGLContext) -> *mut GstGLSLStage; + pub fn gst_glsl_stage_new_with_string( + context: *mut GstGLContext, + type_: c_uint, + version: GstGLSLVersion, + profile: GstGLSLProfile, + str: *const c_char, + ) -> *mut GstGLSLStage; + pub fn gst_glsl_stage_new_with_strings( + context: *mut GstGLContext, + type_: c_uint, + version: GstGLSLVersion, + profile: GstGLSLProfile, + n_strings: c_int, + str: *mut *const c_char, + ) -> *mut GstGLSLStage; + pub fn gst_glsl_stage_compile( + stage: *mut GstGLSLStage, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn gst_glsl_stage_get_handle(stage: *mut GstGLSLStage) -> c_uint; + pub fn gst_glsl_stage_get_profile(stage: *mut GstGLSLStage) -> GstGLSLProfile; + pub fn gst_glsl_stage_get_shader_type(stage: *mut GstGLSLStage) -> c_uint; + pub fn gst_glsl_stage_get_version(stage: *mut GstGLSLStage) -> GstGLSLVersion; + pub fn gst_glsl_stage_set_strings( + stage: *mut GstGLSLStage, + version: GstGLSLVersion, + profile: GstGLSLProfile, + n_strings: c_int, + str: *mut *const c_char, + ) -> gboolean; + + //========================================================================= + // GstGLShader + //========================================================================= + pub fn gst_gl_shader_get_type() -> GType; + pub fn gst_gl_shader_new(context: *mut GstGLContext) -> *mut GstGLShader; + pub fn gst_gl_shader_new_default( + context: *mut GstGLContext, + error: *mut *mut glib::GError, + ) -> *mut GstGLShader; + pub fn gst_gl_shader_new_link_with_stages( + context: *mut GstGLContext, + error: *mut *mut glib::GError, + ... + ) -> *mut GstGLShader; + pub fn gst_gl_shader_new_with_stages( + context: *mut GstGLContext, + error: *mut *mut glib::GError, + ... + ) -> *mut GstGLShader; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_gl_shader_string_fragment_external_oes_get_default( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> *mut c_char; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_gl_shader_string_fragment_get_default( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> *mut c_char; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_gl_shader_string_get_highest_precision( + context: *mut GstGLContext, + version: GstGLSLVersion, + profile: GstGLSLProfile, + ) -> *const c_char; + pub fn gst_gl_shader_attach(shader: *mut GstGLShader, stage: *mut GstGLSLStage) -> gboolean; + pub fn gst_gl_shader_attach_unlocked( + shader: *mut GstGLShader, + stage: *mut GstGLSLStage, + ) -> gboolean; + pub fn gst_gl_shader_bind_attribute_location( + shader: *mut GstGLShader, + index: c_uint, + name: *const c_char, + ); + pub fn gst_gl_shader_bind_frag_data_location( + shader: *mut GstGLShader, + index: c_uint, + name: *const c_char, + ); + pub fn gst_gl_shader_compile_attach_stage( + shader: *mut GstGLShader, + stage: *mut GstGLSLStage, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn gst_gl_shader_detach(shader: *mut GstGLShader, stage: *mut GstGLSLStage); + pub fn gst_gl_shader_detach_unlocked(shader: *mut GstGLShader, stage: *mut GstGLSLStage); + pub fn gst_gl_shader_get_attribute_location( + shader: *mut GstGLShader, + name: *const c_char, + ) -> c_int; + pub fn gst_gl_shader_get_program_handle(shader: *mut GstGLShader) -> c_int; + pub fn gst_gl_shader_is_linked(shader: *mut GstGLShader) -> gboolean; + pub fn gst_gl_shader_link(shader: *mut GstGLShader, error: *mut *mut glib::GError) -> gboolean; + pub fn gst_gl_shader_release(shader: *mut GstGLShader); + pub fn gst_gl_shader_release_unlocked(shader: *mut GstGLShader); + pub fn gst_gl_shader_set_uniform_1f( + shader: *mut GstGLShader, + name: *const c_char, + value: c_float, + ); + pub fn gst_gl_shader_set_uniform_1fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_1i( + shader: *mut GstGLShader, + name: *const c_char, + value: c_int, + ); + pub fn gst_gl_shader_set_uniform_1iv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_int, + ); + pub fn gst_gl_shader_set_uniform_2f( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_float, + v1: c_float, + ); + pub fn gst_gl_shader_set_uniform_2fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_2i( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_int, + v1: c_int, + ); + pub fn gst_gl_shader_set_uniform_2iv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_int, + ); + pub fn gst_gl_shader_set_uniform_3f( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_float, + v1: c_float, + v2: c_float, + ); + pub fn gst_gl_shader_set_uniform_3fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_3i( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_int, + v1: c_int, + v2: c_int, + ); + pub fn gst_gl_shader_set_uniform_3iv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_int, + ); + pub fn gst_gl_shader_set_uniform_4f( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_float, + v1: c_float, + v2: c_float, + v3: c_float, + ); + pub fn gst_gl_shader_set_uniform_4fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_4i( + shader: *mut GstGLShader, + name: *const c_char, + v0: c_int, + v1: c_int, + v2: c_int, + v3: c_int, + ); + pub fn gst_gl_shader_set_uniform_4iv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_uint, + value: *const c_int, + ); + pub fn gst_gl_shader_set_uniform_matrix_2fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_2x3fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_2x4fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_3fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_3x2fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_3x4fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_4fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_4x2fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_set_uniform_matrix_4x3fv( + shader: *mut GstGLShader, + name: *const c_char, + count: c_int, + transpose: gboolean, + value: *const c_float, + ); + pub fn gst_gl_shader_use(shader: *mut GstGLShader); + + //========================================================================= + // GstGLUpload + //========================================================================= + pub fn gst_gl_upload_get_type() -> GType; + pub fn gst_gl_upload_new(context: *mut GstGLContext) -> *mut GstGLUpload; + pub fn gst_gl_upload_get_input_template_caps() -> *mut gst::GstCaps; + pub fn gst_gl_upload_get_caps( + upload: *mut GstGLUpload, + in_caps: *mut *mut gst::GstCaps, + out_caps: *mut *mut gst::GstCaps, + ); + pub fn gst_gl_upload_perform_with_buffer( + upload: *mut GstGLUpload, + buffer: *mut gst::GstBuffer, + outbuf_ptr: *mut *mut gst::GstBuffer, + ) -> GstGLUploadReturn; + pub fn gst_gl_upload_propose_allocation( + upload: *mut GstGLUpload, + decide_query: *mut gst::GstQuery, + query: *mut gst::GstQuery, + ); + pub fn gst_gl_upload_set_caps( + upload: *mut GstGLUpload, + in_caps: *mut gst::GstCaps, + out_caps: *mut gst::GstCaps, + ) -> gboolean; + pub fn gst_gl_upload_set_context(upload: *mut GstGLUpload, context: *mut GstGLContext); + pub fn gst_gl_upload_transform_caps( + upload: *mut GstGLUpload, + context: *mut GstGLContext, + direction: gst::GstPadDirection, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + + //========================================================================= + // GstGLViewConvert + //========================================================================= + pub fn gst_gl_view_convert_get_type() -> GType; + pub fn gst_gl_view_convert_new() -> *mut GstGLViewConvert; + pub fn gst_gl_view_convert_fixate_caps( + viewconvert: *mut GstGLViewConvert, + direction: gst::GstPadDirection, + caps: *mut gst::GstCaps, + othercaps: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + pub fn gst_gl_view_convert_get_output( + viewconvert: *mut GstGLViewConvert, + outbuf_ptr: *mut *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_gl_view_convert_perform( + viewconvert: *mut GstGLViewConvert, + inbuf: *mut gst::GstBuffer, + ) -> *mut gst::GstBuffer; + pub fn gst_gl_view_convert_reset(viewconvert: *mut GstGLViewConvert); + pub fn gst_gl_view_convert_set_caps( + viewconvert: *mut GstGLViewConvert, + in_caps: *mut gst::GstCaps, + out_caps: *mut gst::GstCaps, + ) -> gboolean; + pub fn gst_gl_view_convert_set_context( + viewconvert: *mut GstGLViewConvert, + context: *mut GstGLContext, + ); + pub fn gst_gl_view_convert_submit_input_buffer( + viewconvert: *mut GstGLViewConvert, + is_discont: gboolean, + input: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_gl_view_convert_transform_caps( + viewconvert: *mut GstGLViewConvert, + direction: gst::GstPadDirection, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + + //========================================================================= + // GstGLWindow + //========================================================================= + pub fn gst_gl_window_get_type() -> GType; + pub fn gst_gl_window_new(display: *mut GstGLDisplay) -> *mut GstGLWindow; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_gl_window_controls_viewport(window: *mut GstGLWindow) -> gboolean; + pub fn gst_gl_window_draw(window: *mut GstGLWindow); + pub fn gst_gl_window_get_context(window: *mut GstGLWindow) -> *mut GstGLContext; + pub fn gst_gl_window_get_display(window: *mut GstGLWindow) -> uintptr_t; + pub fn gst_gl_window_get_surface_dimensions( + window: *mut GstGLWindow, + width: *mut c_uint, + height: *mut c_uint, + ); + pub fn gst_gl_window_get_window_handle(window: *mut GstGLWindow) -> uintptr_t; + pub fn gst_gl_window_handle_events(window: *mut GstGLWindow, handle_events: gboolean); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_gl_window_has_output_surface(window: *mut GstGLWindow) -> gboolean; + pub fn gst_gl_window_queue_resize(window: *mut GstGLWindow); + pub fn gst_gl_window_quit(window: *mut GstGLWindow); + pub fn gst_gl_window_resize(window: *mut GstGLWindow, width: c_uint, height: c_uint); + pub fn gst_gl_window_run(window: *mut GstGLWindow); + pub fn gst_gl_window_send_key_event( + window: *mut GstGLWindow, + event_type: *const c_char, + key_str: *const c_char, + ); + pub fn gst_gl_window_send_message( + window: *mut GstGLWindow, + callback: GstGLWindowCB, + data: gpointer, + ); + pub fn gst_gl_window_send_message_async( + window: *mut GstGLWindow, + callback: GstGLWindowCB, + data: gpointer, + destroy: glib::GDestroyNotify, + ); + pub fn gst_gl_window_send_mouse_event( + window: *mut GstGLWindow, + event_type: *const c_char, + button: c_int, + posx: c_double, + posy: c_double, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_gl_window_send_scroll_event( + window: *mut GstGLWindow, + posx: c_double, + posy: c_double, + delta_x: c_double, + delta_y: c_double, + ); + pub fn gst_gl_window_set_close_callback( + window: *mut GstGLWindow, + callback: GstGLWindowCB, + data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); + pub fn gst_gl_window_set_draw_callback( + window: *mut GstGLWindow, + callback: GstGLWindowCB, + data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); + pub fn gst_gl_window_set_preferred_size(window: *mut GstGLWindow, width: c_int, height: c_int); + pub fn gst_gl_window_set_render_rectangle( + window: *mut GstGLWindow, + x: c_int, + y: c_int, + width: c_int, + height: c_int, + ) -> gboolean; + pub fn gst_gl_window_set_resize_callback( + window: *mut GstGLWindow, + callback: GstGLWindowResizeCB, + data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); + pub fn gst_gl_window_set_window_handle(window: *mut GstGLWindow, handle: uintptr_t); + pub fn gst_gl_window_show(window: *mut GstGLWindow); + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_buffer_add_gl_sync_meta( + context: *mut GstGLContext, + buffer: *mut gst::GstBuffer, + ) -> *mut GstGLSyncMeta; + pub fn gst_buffer_add_gl_sync_meta_full( + context: *mut GstGLContext, + buffer: *mut gst::GstBuffer, + data: gpointer, + ) -> *mut GstGLSyncMeta; + pub fn gst_buffer_pool_config_get_gl_allocation_params( + config: *mut gst::GstStructure, + ) -> *mut GstGLAllocationParams; + pub fn gst_buffer_pool_config_set_gl_allocation_params( + config: *mut gst::GstStructure, + params: *mut GstGLAllocationParams, + ); + pub fn gst_context_get_gl_display( + context: *mut gst::GstContext, + display: *mut *mut GstGLDisplay, + ) -> gboolean; + pub fn gst_context_set_gl_display(context: *mut gst::GstContext, display: *mut GstGLDisplay); + pub fn gst_gl_check_extension(name: *const c_char, ext: *const c_char) -> gboolean; + pub fn gst_gl_element_propagate_display_context( + element: *mut gst::GstElement, + display: *mut GstGLDisplay, + ); + pub fn gst_gl_ensure_element_data( + element: gpointer, + display_ptr: *mut *mut GstGLDisplay, + other_context_ptr: *mut *mut GstGLContext, + ) -> gboolean; + pub fn gst_gl_get_plane_data_size( + info: *mut gst_video::GstVideoInfo, + align: *mut gst_video::GstVideoAlignment, + plane: c_uint, + ) -> size_t; + pub fn gst_gl_get_plane_start( + info: *mut gst_video::GstVideoInfo, + valign: *mut gst_video::GstVideoAlignment, + plane: c_uint, + ) -> size_t; + pub fn gst_gl_handle_context_query( + element: *mut gst::GstElement, + query: *mut gst::GstQuery, + display: *mut GstGLDisplay, + context: *mut GstGLContext, + other_context: *mut GstGLContext, + ) -> gboolean; + pub fn gst_gl_handle_set_context( + element: *mut gst::GstElement, + context: *mut gst::GstContext, + display: *mut *mut GstGLDisplay, + other_context: *mut *mut GstGLContext, + ) -> gboolean; + pub fn gst_gl_insert_debug_marker(context: *mut GstGLContext, format: *const c_char, ...); + pub fn gst_gl_sized_gl_format_from_gl_format_type( + context: *mut GstGLContext, + format: c_uint, + type_: c_uint, + ) -> c_uint; + pub fn gst_gl_stereo_downmix_mode_get_type() -> GType; + pub fn gst_gl_sync_meta_api_get_type() -> GType; + pub fn gst_gl_value_get_texture_target_mask( + value: *const gobject::GValue, + ) -> GstGLTextureTarget; + pub fn gst_gl_value_set_texture_target( + value: *mut gobject::GValue, + target: GstGLTextureTarget, + ) -> gboolean; + pub fn gst_gl_value_set_texture_target_from_mask( + value: *mut gobject::GValue, + target_mask: GstGLTextureTarget, + ) -> gboolean; + pub fn gst_gl_version_to_glsl_version( + gl_api: GstGLAPI, + maj: c_int, + min: c_int, + ) -> GstGLSLVersion; + pub fn gst_glsl_string_get_version_profile( + s: *const c_char, + version: *mut GstGLSLVersion, + profile: *mut GstGLSLProfile, + ) -> gboolean; + pub fn gst_is_gl_base_memory(mem: *mut gst::GstMemory) -> gboolean; + pub fn gst_is_gl_buffer(mem: *mut gst::GstMemory) -> gboolean; + pub fn gst_is_gl_memory(mem: *mut gst::GstMemory) -> gboolean; + pub fn gst_is_gl_memory_pbo(mem: *mut gst::GstMemory) -> gboolean; + pub fn gst_is_gl_renderbuffer(mem: *mut gst::GstMemory) -> gboolean; + +} diff --git a/sys/gstreamer-gl-sys/src/manual.rs b/sys/gstreamer-gl-sys/src/manual.rs new file mode 100644 index 000000000..de3fc164f --- /dev/null +++ b/sys/gstreamer-gl-sys/src/manual.rs @@ -0,0 +1,9 @@ +use libc::c_char; + +// See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/497 +#[cfg(any(feature = "egl", feature = "dox"))] +pub const GST_GL_DISPLAY_EGL_NAME: *const c_char = + b"gst.gl.display.egl\0" as *const u8 as *const c_char; + +// See https://gitlab.gnome.org/GNOME/gobject-introspection/issues/238 +pub const GST_GL_COLOR_CONVERT_VIDEO_CAPS: *const c_char = b"video/x-raw(memory:GLMemory), format = (string) { RGBA, RGB, RGBx, BGR, BGRx, BGRA, xRGB, xBGR, ARGB, ABGR, Y444, I420, YV12, Y42B, Y41B, NV12, NV21, YUY2, UYVY, AYUV, GRAY8, GRAY16_LE, GRAY16_BE, RGB16, BGR16 }, width = (int) [ 1, max ], height = (int) [ 1, max ], framerate = (fraction) [ 0, max ], texture-target = (string) { 2D, rectangle, external-oes } ; video/x-raw(memory:GLMemory,meta:GstVideoOverlayComposition), format = (string) { RGBA, RGB, RGBx, BGR, BGRx, BGRA, xRGB, xBGR, ARGB, ABGR, Y444, I420, YV12, Y42B, Y41B, NV12, NV21, YUY2, UYVY, AYUV, GRAY8, GRAY16_LE, GRAY16_BE, RGB16, BGR16 }, width = (int) [ 1, max ], height = (int) [ 1, max ], framerate = (fraction) [ 0, max ], texture-target = (string) { 2D, rectangle, external-oes }\0" as *const u8 as *const c_char; diff --git a/sys/gstreamer-gl-sys/tests/abi.rs b/sys/gstreamer-gl-sys/tests/abi.rs new file mode 100644 index 000000000..f256f785e --- /dev/null +++ b/sys/gstreamer-gl-sys/tests/abi.rs @@ -0,0 +1,918 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_gl_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_gl_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-gl-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstGLAPI", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLAllocationParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLAsyncDebug", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseFilter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseFilterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseMemory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseMemoryAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseMemoryAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseMemoryError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseMemoryTransfer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseSrc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBaseSrcClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBufferAllocationParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBufferAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBufferAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBufferPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLBufferPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLColorConvert", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLColorConvertClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLContext", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLContextClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLContextError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLDisplay", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLDisplayClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + #[cfg(any(feature = "egl", feature = "dox"))] + ( + "GstGLDisplayEGL", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + #[cfg(any(feature = "egl", feature = "dox"))] + ( + "GstGLDisplayEGLClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLDisplayType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + #[cfg(any(feature = "wayland", feature = "dox"))] + ( + "GstGLDisplayWayland", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + #[cfg(any(feature = "wayland", feature = "dox"))] + ( + "GstGLDisplayWaylandClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + #[cfg(any(feature = "x11", feature = "dox"))] + ( + "GstGLDisplayX11", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + #[cfg(any(feature = "x11", feature = "dox"))] + ( + "GstGLDisplayX11Class", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLFilter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLFilterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLFramebuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLFramebufferClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemoryAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemoryAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemoryPBO", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemoryPBOAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLMemoryPBOAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLOverlayCompositor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLOverlayCompositorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLPlatform", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLQuery", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLQueryType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLRenderbuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLRenderbufferAllocationParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLRenderbufferAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLRenderbufferAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSLError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSLProfile", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSLStage", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSLStageClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSLVersion", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLShader", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLShaderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLStereoDownmix", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLSyncMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLTextureTarget", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLUpload", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLUploadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLUploadReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLVideoAllocationParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLViewConvert", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLViewConvertClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLWindow", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLWindowClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGLWindowError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ( + "GST_BUFFER_POOL_OPTION_GL_SYNC_META", + "GstBufferPoolOptionGLSyncMeta", + ), + ( + "GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D", + "GstBufferPoolOptionGLTextureTarget2D", + ), + ( + "GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES", + "GstBufferPoolOptionGLTextureTargetExternalOES", + ), + ( + "GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE", + "GstBufferPoolOptionGLTextureTargetRectangle", + ), + ("GST_CAPS_FEATURE_MEMORY_GL_BUFFER", "memory:GLBuffer"), + ("GST_CAPS_FEATURE_MEMORY_GL_MEMORY", "memory:GLMemory"), + ("(gint) GST_GLSL_ERROR_COMPILE", "0"), + ("(gint) GST_GLSL_ERROR_LINK", "1"), + ("(gint) GST_GLSL_ERROR_PROGRAM", "2"), + ("(guint) GST_GLSL_PROFILE_ANY", "4294967295"), + ("(guint) GST_GLSL_PROFILE_COMPATIBILITY", "4"), + ("(guint) GST_GLSL_PROFILE_CORE", "2"), + ("(guint) GST_GLSL_PROFILE_ES", "1"), + ("(guint) GST_GLSL_PROFILE_NONE", "0"), + ("(gint) GST_GLSL_VERSION_100", "100"), + ("(gint) GST_GLSL_VERSION_110", "110"), + ("(gint) GST_GLSL_VERSION_120", "120"), + ("(gint) GST_GLSL_VERSION_130", "130"), + ("(gint) GST_GLSL_VERSION_140", "140"), + ("(gint) GST_GLSL_VERSION_150", "150"), + ("(gint) GST_GLSL_VERSION_300", "300"), + ("(gint) GST_GLSL_VERSION_310", "310"), + ("(gint) GST_GLSL_VERSION_320", "320"), + ("(gint) GST_GLSL_VERSION_330", "330"), + ("(gint) GST_GLSL_VERSION_400", "400"), + ("(gint) GST_GLSL_VERSION_410", "410"), + ("(gint) GST_GLSL_VERSION_420", "420"), + ("(gint) GST_GLSL_VERSION_430", "430"), + ("(gint) GST_GLSL_VERSION_440", "440"), + ("(gint) GST_GLSL_VERSION_450", "450"), + ("(gint) GST_GLSL_VERSION_NONE", "0"), + ("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_ALLOC", "1"), + ("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_BUFFER", "16"), + ("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_USER", "65536"), + ("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO", "8"), + ("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE", "4"), + ("GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM", "2"), + ("(gint) GST_GL_ALPHA", "6406"), + ("(guint) GST_GL_API_ANY", "4294967295"), + ("(guint) GST_GL_API_GLES1", "32768"), + ("GST_GL_API_GLES1_NAME", "gles1"), + ("(guint) GST_GL_API_GLES2", "65536"), + ("GST_GL_API_GLES2_NAME", "gles2"), + ("(guint) GST_GL_API_NONE", "0"), + ("(guint) GST_GL_API_OPENGL", "1"), + ("(guint) GST_GL_API_OPENGL3", "2"), + ("GST_GL_API_OPENGL3_NAME", "opengl3"), + ("GST_GL_API_OPENGL_NAME", "opengl"), + ("GST_GL_BASE_MEMORY_ALLOCATOR_NAME", "GLBaseMemory"), + ("(gint) GST_GL_BASE_MEMORY_ERROR_FAILED", "0"), + ("(gint) GST_GL_BASE_MEMORY_ERROR_OLD_LIBS", "1"), + ("(gint) GST_GL_BASE_MEMORY_ERROR_RESOURCE_UNAVAILABLE", "2"), + ( + "(guint) GST_GL_BASE_MEMORY_TRANSFER_NEED_DOWNLOAD", + "1048576", + ), + ("(guint) GST_GL_BASE_MEMORY_TRANSFER_NEED_UPLOAD", "2097152"), + ("GST_GL_BUFFER_ALLOCATOR_NAME", "GLBuffer"), + ( + "GST_GL_COLOR_CONVERT_EXT_FORMATS", + ", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE, Y212_LE, Y412_LE", + ), + ("(gint) GST_GL_CONTEXT_ERROR_CREATE_CONTEXT", "4"), + ("(gint) GST_GL_CONTEXT_ERROR_FAILED", "0"), + ("(gint) GST_GL_CONTEXT_ERROR_OLD_LIBS", "3"), + ("(gint) GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE", "5"), + ("(gint) GST_GL_CONTEXT_ERROR_WRONG_API", "2"), + ("(gint) GST_GL_CONTEXT_ERROR_WRONG_CONFIG", "1"), + ("GST_GL_CONTEXT_TYPE_CGL", "gst.gl.context.CGL"), + ("GST_GL_CONTEXT_TYPE_EAGL", "gst.gl.context.EAGL"), + ("GST_GL_CONTEXT_TYPE_EGL", "gst.gl.context.EGL"), + ("GST_GL_CONTEXT_TYPE_GLX", "gst.gl.context.GLX"), + ("GST_GL_CONTEXT_TYPE_WGL", "gst.gl.context.WGL"), + ("(gint) GST_GL_DEPTH24_STENCIL8", "35056"), + ("(gint) GST_GL_DEPTH_COMPONENT16", "33189"), + ("GST_GL_DISPLAY_CONTEXT_TYPE", "gst.gl.GLDisplay"), + ("(guint) GST_GL_DISPLAY_TYPE_ANY", "4294967295"), + ("(guint) GST_GL_DISPLAY_TYPE_COCOA", "4"), + ("(guint) GST_GL_DISPLAY_TYPE_DISPMANX", "16"), + ("(guint) GST_GL_DISPLAY_TYPE_EGL", "32"), + ("(guint) GST_GL_DISPLAY_TYPE_EGL_DEVICE", "256"), + ("(guint) GST_GL_DISPLAY_TYPE_GBM", "128"), + ("(guint) GST_GL_DISPLAY_TYPE_NONE", "0"), + ("(guint) GST_GL_DISPLAY_TYPE_VIV_FB", "64"), + ("(guint) GST_GL_DISPLAY_TYPE_WAYLAND", "2"), + ("(guint) GST_GL_DISPLAY_TYPE_WIN32", "8"), + ("(guint) GST_GL_DISPLAY_TYPE_X11", "1"), + ("(gint) GST_GL_LUMINANCE", "6409"), + ("(gint) GST_GL_LUMINANCE_ALPHA", "6410"), + ("GST_GL_MEMORY_ALLOCATOR_NAME", "GLMemory"), + ("GST_GL_MEMORY_PBO_ALLOCATOR_NAME", "GLMemoryPBO"), + ( + "GST_GL_MEMORY_VIDEO_EXT_FORMATS", + ", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE, Y212_LE, Y412_LE", + ), + ("(guint) GST_GL_PLATFORM_ANY", "4294967295"), + ("(guint) GST_GL_PLATFORM_CGL", "8"), + ("(guint) GST_GL_PLATFORM_EAGL", "16"), + ("(guint) GST_GL_PLATFORM_EGL", "1"), + ("(guint) GST_GL_PLATFORM_GLX", "2"), + ("(guint) GST_GL_PLATFORM_NONE", "0"), + ("(guint) GST_GL_PLATFORM_WGL", "4"), + ("(gint) GST_GL_QUERY_NONE", "0"), + ("(gint) GST_GL_QUERY_TIMESTAMP", "2"), + ("(gint) GST_GL_QUERY_TIME_ELAPSED", "1"), + ("(gint) GST_GL_R16", "33322"), + ("(gint) GST_GL_R8", "33321"), + ("(gint) GST_GL_RED", "6403"), + ("GST_GL_RENDERBUFFER_ALLOCATOR_NAME", "GLRenderbuffer"), + ("(gint) GST_GL_RG", "33319"), + ("(gint) GST_GL_RG16", "33324"), + ("(gint) GST_GL_RG8", "33323"), + ("(gint) GST_GL_RGB", "6407"), + ("(gint) GST_GL_RGB10_A2", "32857"), + ("(gint) GST_GL_RGB16", "32852"), + ("(gint) GST_GL_RGB565", "36194"), + ("(gint) GST_GL_RGB8", "32849"), + ("(gint) GST_GL_RGBA", "6408"), + ("(gint) GST_GL_RGBA16", "32859"), + ("(gint) GST_GL_RGBA8", "32856"), + ( + "(gint) GST_GL_STEREO_DOWNMIX_ANAGLYPH_AMBER_BLUE_DUBOIS", + "2", + ), + ( + "(gint) GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS", + "0", + ), + ("(gint) GST_GL_STEREO_DOWNMIX_ANAGLYPH_RED_CYAN_DUBOIS", "1"), + ("(gint) GST_GL_TEXTURE_TARGET_2D", "1"), + ("GST_GL_TEXTURE_TARGET_2D_STR", "2D"), + ("(gint) GST_GL_TEXTURE_TARGET_EXTERNAL_OES", "3"), + ("GST_GL_TEXTURE_TARGET_EXTERNAL_OES_STR", "external-oes"), + ("(gint) GST_GL_TEXTURE_TARGET_NONE", "0"), + ("(gint) GST_GL_TEXTURE_TARGET_RECTANGLE", "2"), + ("GST_GL_TEXTURE_TARGET_RECTANGLE_STR", "rectangle"), + ("(gint) GST_GL_UPLOAD_DONE", "1"), + ("(gint) GST_GL_UPLOAD_ERROR", "-1"), + ("(gint) GST_GL_UPLOAD_RECONFIGURE", "-3"), + ("(gint) GST_GL_UPLOAD_UNSHARED_GL_CONTEXT", "-100"), + ("(gint) GST_GL_UPLOAD_UNSUPPORTED", "-2"), + ("(gint) GST_GL_WINDOW_ERROR_FAILED", "0"), + ("(gint) GST_GL_WINDOW_ERROR_OLD_LIBS", "1"), + ("(gint) GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE", "2"), + ("GST_MAP_GL", "131072"), +]; diff --git a/sys/gstreamer-gl-sys/tests/constant.c b/sys/gstreamer-gl-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-gl-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-gl-sys/tests/layout.c b/sys/gstreamer-gl-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-gl-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-gl-sys/tests/manual.h b/sys/gstreamer-gl-sys/tests/manual.h new file mode 100644 index 000000000..466e7b581 --- /dev/null +++ b/sys/gstreamer-gl-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-mpegts-sys/CHANGELOG.md b/sys/gstreamer-mpegts-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-mpegts-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-mpegts-sys/Cargo.toml b/sys/gstreamer-mpegts-sys/Cargo.toml new file mode 100644 index 000000000..a29c417c0 --- /dev/null +++ b/sys/gstreamer-mpegts-sys/Cargo.toml @@ -0,0 +1,60 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-base-sys] +path = "../gstreamer-base-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_2 = [] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] + +[lib] +name = "gstreamer_mpegts_sys" + +[package] +authors = ["Russel Winder ", "Sebastian Dröge "] +build = "build.rs" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_mpegts_sys/" +description = "FFI bindings to libgstmpegts-1.0" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstmpegts-1.0" +name = "gstreamer-mpegts-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_mpegts_1_0] +name = "gstreamer-mpegts-1.0" +version = "1.12" + +[package.metadata.system-deps.gstreamer_mpegts_1_0.feature-versions] +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-mpegts-sys/LICENSE b/sys/gstreamer-mpegts-sys/LICENSE new file mode 100644 index 000000000..edeafc830 --- /dev/null +++ b/sys/gstreamer-mpegts-sys/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Russel Winder + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sys/gstreamer-mpegts-sys/README.md b/sys/gstreamer-mpegts-sys/README.md new file mode 100644 index 000000000..5361b8eb7 --- /dev/null +++ b/sys/gstreamer-mpegts-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-mpegts-sys.svg)](https://crates.io/crates/gstreamer-mpegts-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (MPEGTS library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-mpegts-sys/build.rs b/sys/gstreamer-mpegts-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-mpegts-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-mpegts-sys/src/lib.rs b/sys/gstreamer-mpegts-sys/src/lib.rs new file mode 100644 index 000000000..6c1f85a7a --- /dev/null +++ b/sys/gstreamer-mpegts-sys/src/lib.rs @@ -0,0 +1,2473 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstMpegtsATSCDescriptorType = c_int; +pub const GST_MTS_DESC_ATSC_STUFFING: GstMpegtsATSCDescriptorType = 128; +pub const GST_MTS_DESC_ATSC_AC3: GstMpegtsATSCDescriptorType = 131; +pub const GST_MTS_DESC_ATSC_CAPTION_SERVICE: GstMpegtsATSCDescriptorType = 134; +pub const GST_MTS_DESC_ATSC_CONTENT_ADVISORY: GstMpegtsATSCDescriptorType = 135; +pub const GST_MTS_DESC_ATSC_EXTENDED_CHANNEL_NAME: GstMpegtsATSCDescriptorType = 160; +pub const GST_MTS_DESC_ATSC_SERVICE_LOCATION: GstMpegtsATSCDescriptorType = 161; +pub const GST_MTS_DESC_ATSC_TIME_SHIFTED_SERVICE: GstMpegtsATSCDescriptorType = 162; +pub const GST_MTS_DESC_ATSC_COMPONENT_NAME: GstMpegtsATSCDescriptorType = 163; +pub const GST_MTS_DESC_ATSC_DCC_DEPARTING_REQUEST: GstMpegtsATSCDescriptorType = 168; +pub const GST_MTS_DESC_ATSC_DCC_ARRIVING_REQUEST: GstMpegtsATSCDescriptorType = 169; +pub const GST_MTS_DESC_ATSC_REDISTRIBUTION_CONTROL: GstMpegtsATSCDescriptorType = 170; +pub const GST_MTS_DESC_ATSC_GENRE: GstMpegtsATSCDescriptorType = 171; +pub const GST_MTS_DESC_ATSC_PRIVATE_INFORMATION: GstMpegtsATSCDescriptorType = 173; +pub const GST_MTS_DESC_ATSC_EAC3: GstMpegtsATSCDescriptorType = 204; +pub const GST_MTS_DESC_ATSC_ENHANCED_SIGNALING: GstMpegtsATSCDescriptorType = 178; +pub const GST_MTS_DESC_ATSC_DATA_SERVICE: GstMpegtsATSCDescriptorType = 164; +pub const GST_MTS_DESC_ATSC_PID_COUNT: GstMpegtsATSCDescriptorType = 165; +pub const GST_MTS_DESC_ATSC_DOWNLOAD_DESCRIPTOR: GstMpegtsATSCDescriptorType = 166; +pub const GST_MTS_DESC_ATSC_MULTIPROTOCOL_ENCAPSULATION: GstMpegtsATSCDescriptorType = 167; +pub const GST_MTS_DESC_ATSC_MODULE_LINK: GstMpegtsATSCDescriptorType = 180; +pub const GST_MTS_DESC_ATSC_CRC32: GstMpegtsATSCDescriptorType = 181; +pub const GST_MTS_DESC_ATSC_GROUP_LINK: GstMpegtsATSCDescriptorType = 184; + +pub type GstMpegtsAtscMGTTableType = c_int; +pub const GST_MPEGTS_ATSC_MGT_TABLE_TYPE_EIT0: GstMpegtsAtscMGTTableType = 256; +pub const GST_MPEGTS_ATSC_MGT_TABLE_TYPE_EIT127: GstMpegtsAtscMGTTableType = 383; +pub const GST_MPEGTS_ATSC_MGT_TABLE_TYPE_ETT0: GstMpegtsAtscMGTTableType = 512; +pub const GST_MPEGTS_ATSC_MGT_TABLE_TYPE_ETT127: GstMpegtsAtscMGTTableType = 639; + +pub type GstMpegtsCableOuterFECScheme = c_int; +pub const GST_MPEGTS_CABLE_OUTER_FEC_UNDEFINED: GstMpegtsCableOuterFECScheme = 0; +pub const GST_MPEGTS_CABLE_OUTER_FEC_NONE: GstMpegtsCableOuterFECScheme = 1; +pub const GST_MPEGTS_CABLE_OUTER_FEC_RS_204_188: GstMpegtsCableOuterFECScheme = 2; + +pub type GstMpegtsComponentStreamContent = c_int; +pub const GST_MPEGTS_STREAM_CONTENT_MPEG2_VIDEO: GstMpegtsComponentStreamContent = 1; +pub const GST_MPEGTS_STREAM_CONTENT_MPEG1_LAYER2_AUDIO: GstMpegtsComponentStreamContent = 2; +pub const GST_MPEGTS_STREAM_CONTENT_TELETEXT_OR_SUBTITLE: GstMpegtsComponentStreamContent = 3; +pub const GST_MPEGTS_STREAM_CONTENT_AC_3: GstMpegtsComponentStreamContent = 4; +pub const GST_MPEGTS_STREAM_CONTENT_AVC: GstMpegtsComponentStreamContent = 5; +pub const GST_MPEGTS_STREAM_CONTENT_AAC: GstMpegtsComponentStreamContent = 6; +pub const GST_MPEGTS_STREAM_CONTENT_DTS: GstMpegtsComponentStreamContent = 7; +pub const GST_MPEGTS_STREAM_CONTENT_SRM_CPCM: GstMpegtsComponentStreamContent = 8; + +pub type GstMpegtsContentNibbleHi = c_int; +pub const GST_MPEGTS_CONTENT_MOVIE_DRAMA: GstMpegtsContentNibbleHi = 1; +pub const GST_MPEGTS_CONTENT_NEWS_CURRENT_AFFAIRS: GstMpegtsContentNibbleHi = 2; +pub const GST_MPEGTS_CONTENT_SHOW_GAME_SHOW: GstMpegtsContentNibbleHi = 3; +pub const GST_MPEGTS_CONTENT_SPORTS: GstMpegtsContentNibbleHi = 4; +pub const GST_MPEGTS_CONTENT_CHILDREN_YOUTH_PROGRAM: GstMpegtsContentNibbleHi = 5; +pub const GST_MPEGTS_CONTENT_MUSIC_BALLET_DANCE: GstMpegtsContentNibbleHi = 6; +pub const GST_MPEGTS_CONTENT_ARTS_CULTURE: GstMpegtsContentNibbleHi = 7; +pub const GST_MPEGTS_CONTENT_SOCIAL_POLITICAL_ECONOMICS: GstMpegtsContentNibbleHi = 8; +pub const GST_MPEGTS_CONTENT_EDUCATION_SCIENCE_FACTUAL: GstMpegtsContentNibbleHi = 9; +pub const GST_MPEGTS_CONTENT_LEISURE_HOBBIES: GstMpegtsContentNibbleHi = 10; +pub const GST_MPEGTS_CONTENT_SPECIAL_CHARACTERISTICS: GstMpegtsContentNibbleHi = 11; + +pub type GstMpegtsDVBCodeRate = c_int; +pub const GST_MPEGTS_FEC_NONE: GstMpegtsDVBCodeRate = 0; +pub const GST_MPEGTS_FEC_1_2: GstMpegtsDVBCodeRate = 1; +pub const GST_MPEGTS_FEC_2_3: GstMpegtsDVBCodeRate = 2; +pub const GST_MPEGTS_FEC_3_4: GstMpegtsDVBCodeRate = 3; +pub const GST_MPEGTS_FEC_4_5: GstMpegtsDVBCodeRate = 4; +pub const GST_MPEGTS_FEC_5_6: GstMpegtsDVBCodeRate = 5; +pub const GST_MPEGTS_FEC_6_7: GstMpegtsDVBCodeRate = 6; +pub const GST_MPEGTS_FEC_7_8: GstMpegtsDVBCodeRate = 7; +pub const GST_MPEGTS_FEC_8_9: GstMpegtsDVBCodeRate = 8; +pub const GST_MPEGTS_FEC_AUTO: GstMpegtsDVBCodeRate = 9; +pub const GST_MPEGTS_FEC_3_5: GstMpegtsDVBCodeRate = 10; +pub const GST_MPEGTS_FEC_9_10: GstMpegtsDVBCodeRate = 11; +pub const GST_MPEGTS_FEC_2_5: GstMpegtsDVBCodeRate = 12; + +pub type GstMpegtsDVBDescriptorType = c_int; +pub const GST_MTS_DESC_DVB_NETWORK_NAME: GstMpegtsDVBDescriptorType = 64; +pub const GST_MTS_DESC_DVB_SERVICE_LIST: GstMpegtsDVBDescriptorType = 65; +pub const GST_MTS_DESC_DVB_STUFFING: GstMpegtsDVBDescriptorType = 66; +pub const GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM: GstMpegtsDVBDescriptorType = 67; +pub const GST_MTS_DESC_DVB_CABLE_DELIVERY_SYSTEM: GstMpegtsDVBDescriptorType = 68; +pub const GST_MTS_DESC_DVB_VBI_DATA: GstMpegtsDVBDescriptorType = 69; +pub const GST_MTS_DESC_DVB_VBI_TELETEXT: GstMpegtsDVBDescriptorType = 70; +pub const GST_MTS_DESC_DVB_BOUQUET_NAME: GstMpegtsDVBDescriptorType = 71; +pub const GST_MTS_DESC_DVB_SERVICE: GstMpegtsDVBDescriptorType = 72; +pub const GST_MTS_DESC_DVB_COUNTRY_AVAILABILITY: GstMpegtsDVBDescriptorType = 73; +pub const GST_MTS_DESC_DVB_LINKAGE: GstMpegtsDVBDescriptorType = 74; +pub const GST_MTS_DESC_DVB_NVOD_REFERENCE: GstMpegtsDVBDescriptorType = 75; +pub const GST_MTS_DESC_DVB_TIME_SHIFTED_SERVICE: GstMpegtsDVBDescriptorType = 76; +pub const GST_MTS_DESC_DVB_SHORT_EVENT: GstMpegtsDVBDescriptorType = 77; +pub const GST_MTS_DESC_DVB_EXTENDED_EVENT: GstMpegtsDVBDescriptorType = 78; +pub const GST_MTS_DESC_DVB_TIME_SHIFTED_EVENT: GstMpegtsDVBDescriptorType = 79; +pub const GST_MTS_DESC_DVB_COMPONENT: GstMpegtsDVBDescriptorType = 80; +pub const GST_MTS_DESC_DVB_MOSAIC: GstMpegtsDVBDescriptorType = 81; +pub const GST_MTS_DESC_DVB_STREAM_IDENTIFIER: GstMpegtsDVBDescriptorType = 82; +pub const GST_MTS_DESC_DVB_CA_IDENTIFIER: GstMpegtsDVBDescriptorType = 83; +pub const GST_MTS_DESC_DVB_CONTENT: GstMpegtsDVBDescriptorType = 84; +pub const GST_MTS_DESC_DVB_PARENTAL_RATING: GstMpegtsDVBDescriptorType = 85; +pub const GST_MTS_DESC_DVB_TELETEXT: GstMpegtsDVBDescriptorType = 86; +pub const GST_MTS_DESC_DVB_TELEPHONE: GstMpegtsDVBDescriptorType = 87; +pub const GST_MTS_DESC_DVB_LOCAL_TIME_OFFSET: GstMpegtsDVBDescriptorType = 88; +pub const GST_MTS_DESC_DVB_SUBTITLING: GstMpegtsDVBDescriptorType = 89; +pub const GST_MTS_DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM: GstMpegtsDVBDescriptorType = 90; +pub const GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME: GstMpegtsDVBDescriptorType = 91; +pub const GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME: GstMpegtsDVBDescriptorType = 92; +pub const GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME: GstMpegtsDVBDescriptorType = 93; +pub const GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT: GstMpegtsDVBDescriptorType = 94; +pub const GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER: GstMpegtsDVBDescriptorType = 95; +pub const GST_MTS_DESC_DVB_SERVICE_MOVE: GstMpegtsDVBDescriptorType = 96; +pub const GST_MTS_DESC_DVB_SHORT_SMOOTHING_BUFFER: GstMpegtsDVBDescriptorType = 97; +pub const GST_MTS_DESC_DVB_FREQUENCY_LIST: GstMpegtsDVBDescriptorType = 98; +pub const GST_MTS_DESC_DVB_PARTIAL_TRANSPORT_STREAM: GstMpegtsDVBDescriptorType = 99; +pub const GST_MTS_DESC_DVB_DATA_BROADCAST: GstMpegtsDVBDescriptorType = 100; +pub const GST_MTS_DESC_DVB_SCRAMBLING: GstMpegtsDVBDescriptorType = 101; +pub const GST_MTS_DESC_DVB_DATA_BROADCAST_ID: GstMpegtsDVBDescriptorType = 102; +pub const GST_MTS_DESC_DVB_TRANSPORT_STREAM: GstMpegtsDVBDescriptorType = 103; +pub const GST_MTS_DESC_DVB_DSNG: GstMpegtsDVBDescriptorType = 104; +pub const GST_MTS_DESC_DVB_PDC: GstMpegtsDVBDescriptorType = 105; +pub const GST_MTS_DESC_DVB_AC3: GstMpegtsDVBDescriptorType = 106; +pub const GST_MTS_DESC_DVB_ANCILLARY_DATA: GstMpegtsDVBDescriptorType = 107; +pub const GST_MTS_DESC_DVB_CELL_LIST: GstMpegtsDVBDescriptorType = 108; +pub const GST_MTS_DESC_DVB_CELL_FREQUENCY_LINK: GstMpegtsDVBDescriptorType = 109; +pub const GST_MTS_DESC_DVB_ANNOUNCEMENT_SUPPORT: GstMpegtsDVBDescriptorType = 110; +pub const GST_MTS_DESC_DVB_APPLICATION_SIGNALLING: GstMpegtsDVBDescriptorType = 111; +pub const GST_MTS_DESC_DVB_ADAPTATION_FIELD_DATA: GstMpegtsDVBDescriptorType = 112; +pub const GST_MTS_DESC_DVB_SERVICE_IDENTIFIER: GstMpegtsDVBDescriptorType = 113; +pub const GST_MTS_DESC_DVB_SERVICE_AVAILABILITY: GstMpegtsDVBDescriptorType = 114; +pub const GST_MTS_DESC_DVB_DEFAULT_AUTHORITY: GstMpegtsDVBDescriptorType = 115; +pub const GST_MTS_DESC_DVB_RELATED_CONTENT: GstMpegtsDVBDescriptorType = 116; +pub const GST_MTS_DESC_DVB_TVA_ID: GstMpegtsDVBDescriptorType = 117; +pub const GST_MTS_DESC_DVB_CONTENT_IDENTIFIER: GstMpegtsDVBDescriptorType = 118; +pub const GST_MTS_DESC_DVB_TIMESLICE_FEC_IDENTIFIER: GstMpegtsDVBDescriptorType = 119; +pub const GST_MTS_DESC_DVB_ECM_REPETITION_RATE: GstMpegtsDVBDescriptorType = 120; +pub const GST_MTS_DESC_DVB_S2_SATELLITE_DELIVERY_SYSTEM: GstMpegtsDVBDescriptorType = 121; +pub const GST_MTS_DESC_DVB_ENHANCED_AC3: GstMpegtsDVBDescriptorType = 122; +pub const GST_MTS_DESC_DVB_DTS: GstMpegtsDVBDescriptorType = 123; +pub const GST_MTS_DESC_DVB_AAC: GstMpegtsDVBDescriptorType = 124; +pub const GST_MTS_DESC_DVB_XAIT_LOCATION: GstMpegtsDVBDescriptorType = 125; +pub const GST_MTS_DESC_DVB_FTA_CONTENT_MANAGEMENT: GstMpegtsDVBDescriptorType = 126; +pub const GST_MTS_DESC_DVB_EXTENSION: GstMpegtsDVBDescriptorType = 127; + +pub type GstMpegtsDVBExtendedDescriptorType = c_int; +pub const GST_MTS_DESC_EXT_DVB_IMAGE_ICON: GstMpegtsDVBExtendedDescriptorType = 0; +pub const GST_MTS_DESC_EXT_DVB_CPCM_DELIVERY_SIGNALLING: GstMpegtsDVBExtendedDescriptorType = 1; +pub const GST_MTS_DESC_EXT_DVB_CP: GstMpegtsDVBExtendedDescriptorType = 2; +pub const GST_MTS_DESC_EXT_DVB_CP_IDENTIFIER: GstMpegtsDVBExtendedDescriptorType = 3; +pub const GST_MTS_DESC_EXT_DVB_T2_DELIVERY_SYSTEM: GstMpegtsDVBExtendedDescriptorType = 4; +pub const GST_MTS_DESC_EXT_DVB_SH_DELIVERY_SYSTEM: GstMpegtsDVBExtendedDescriptorType = 5; +pub const GST_MTS_DESC_EXT_DVB_SUPPLEMENTARY_AUDIO: GstMpegtsDVBExtendedDescriptorType = 6; +pub const GST_MTS_DESC_EXT_DVB_NETWORK_CHANGE_NOTIFY: GstMpegtsDVBExtendedDescriptorType = 7; +pub const GST_MTS_DESC_EXT_DVB_MESSAGE: GstMpegtsDVBExtendedDescriptorType = 8; +pub const GST_MTS_DESC_EXT_DVB_TARGET_REGION: GstMpegtsDVBExtendedDescriptorType = 9; +pub const GST_MTS_DESC_EXT_DVB_TARGET_REGION_NAME: GstMpegtsDVBExtendedDescriptorType = 10; +pub const GST_MTS_DESC_EXT_DVB_SERVICE_RELOCATED: GstMpegtsDVBExtendedDescriptorType = 11; +pub const GST_MTS_DESC_EXT_DVB_XAIT_PID: GstMpegtsDVBExtendedDescriptorType = 12; +pub const GST_MTS_DESC_EXT_DVB_C2_DELIVERY_SYSTEM: GstMpegtsDVBExtendedDescriptorType = 13; +pub const GST_MTS_DESC_EXT_DVB_DTS_HD_AUDIO_STREAM: GstMpegtsDVBExtendedDescriptorType = 14; +pub const GST_MTS_DESC_EXT_DVB_DTS_NEUTRAL: GstMpegtsDVBExtendedDescriptorType = 15; +pub const GST_MTS_DESC_EXT_DVB_VIDEO_DEPTH_RANGE: GstMpegtsDVBExtendedDescriptorType = 16; +pub const GST_MTS_DESC_EXT_DVB_T2MI: GstMpegtsDVBExtendedDescriptorType = 17; +pub const GST_MTS_DESC_EXT_DVB_URI_LINKAGE: GstMpegtsDVBExtendedDescriptorType = 19; +pub const GST_MTS_DESC_EXT_DVB_AC4: GstMpegtsDVBExtendedDescriptorType = 21; + +pub type GstMpegtsDVBLinkageHandOverType = c_int; +pub const GST_MPEGTS_DVB_LINKAGE_HAND_OVER_RESERVED: GstMpegtsDVBLinkageHandOverType = 0; +pub const GST_MPEGTS_DVB_LINKAGE_HAND_OVER_IDENTICAL: GstMpegtsDVBLinkageHandOverType = 1; +pub const GST_MPEGTS_DVB_LINKAGE_HAND_OVER_LOCAL_VARIATION: GstMpegtsDVBLinkageHandOverType = 2; +pub const GST_MPEGTS_DVB_LINKAGE_HAND_OVER_ASSOCIATED: GstMpegtsDVBLinkageHandOverType = 3; + +pub type GstMpegtsDVBLinkageType = c_int; +pub const GST_MPEGTS_DVB_LINKAGE_RESERVED_00: GstMpegtsDVBLinkageType = 0; +pub const GST_MPEGTS_DVB_LINKAGE_INFORMATION: GstMpegtsDVBLinkageType = 1; +pub const GST_MPEGTS_DVB_LINKAGE_EPG: GstMpegtsDVBLinkageType = 2; +pub const GST_MPEGTS_DVB_LINKAGE_CA_REPLACEMENT: GstMpegtsDVBLinkageType = 3; +pub const GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_COMPLETE_SI: GstMpegtsDVBLinkageType = 4; +pub const GST_MPEGTS_DVB_LINKAGE_SERVICE_REPLACEMENT: GstMpegtsDVBLinkageType = 5; +pub const GST_MPEGTS_DVB_LINKAGE_DATA_BROADCAST: GstMpegtsDVBLinkageType = 6; +pub const GST_MPEGTS_DVB_LINKAGE_RCS_MAP: GstMpegtsDVBLinkageType = 7; +pub const GST_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER: GstMpegtsDVBLinkageType = 8; +pub const GST_MPEGTS_DVB_LINKAGE_SYSTEM_SOFTWARE_UPDATE: GstMpegtsDVBLinkageType = 9; +pub const GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_SSU: GstMpegtsDVBLinkageType = 10; +pub const GST_MPEGTS_DVB_LINKAGE_IP_MAC_NOTIFICATION: GstMpegtsDVBLinkageType = 11; +pub const GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_INT: GstMpegtsDVBLinkageType = 12; +pub const GST_MPEGTS_DVB_LINKAGE_EVENT: GstMpegtsDVBLinkageType = 13; +pub const GST_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT: GstMpegtsDVBLinkageType = 14; + +pub type GstMpegtsDVBScramblingModeType = c_int; +pub const GST_MPEGTS_DVB_SCRAMBLING_MODE_RESERVED: GstMpegtsDVBScramblingModeType = 0; +pub const GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA1: GstMpegtsDVBScramblingModeType = 1; +pub const GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA2: GstMpegtsDVBScramblingModeType = 2; +pub const GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_STANDARD: GstMpegtsDVBScramblingModeType = 3; +pub const GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_MINIMAL_ENHANCED: GstMpegtsDVBScramblingModeType = 4; +pub const GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_FULL_ENHANCED: GstMpegtsDVBScramblingModeType = 5; +pub const GST_MPEGTS_DVB_SCRAMBLING_MODE_CISSA: GstMpegtsDVBScramblingModeType = 16; +pub const GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_0: GstMpegtsDVBScramblingModeType = 112; +pub const GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_F: GstMpegtsDVBScramblingModeType = 127; + +pub type GstMpegtsDVBServiceType = c_int; +pub const GST_DVB_SERVICE_RESERVED_00: GstMpegtsDVBServiceType = 0; +pub const GST_DVB_SERVICE_DIGITAL_TELEVISION: GstMpegtsDVBServiceType = 1; +pub const GST_DVB_SERVICE_DIGITAL_RADIO_SOUND: GstMpegtsDVBServiceType = 2; +pub const GST_DVB_SERVICE_TELETEXT: GstMpegtsDVBServiceType = 3; +pub const GST_DVB_SERVICE_NVOD_REFERENCE: GstMpegtsDVBServiceType = 4; +pub const GST_DVB_SERVICE_NVOD_TIME_SHIFTED: GstMpegtsDVBServiceType = 5; +pub const GST_DVB_SERVICE_MOSAIC: GstMpegtsDVBServiceType = 6; +pub const GST_DVB_SERVICE_FM_RADIO: GstMpegtsDVBServiceType = 7; +pub const GST_DVB_SERVICE_DVB_SRM: GstMpegtsDVBServiceType = 8; +pub const GST_DVB_SERVICE_RESERVED_09: GstMpegtsDVBServiceType = 9; +pub const GST_DVB_SERVICE_ADVANCED_CODEC_DIGITAL_RADIO_SOUND: GstMpegtsDVBServiceType = 10; +pub const GST_DVB_SERVICE_ADVANCED_CODEC_MOSAIC: GstMpegtsDVBServiceType = 11; +pub const GST_DVB_SERVICE_DATA_BROADCAST: GstMpegtsDVBServiceType = 12; +pub const GST_DVB_SERVICE_RESERVED_0D_COMMON_INTERFACE: GstMpegtsDVBServiceType = 13; +pub const GST_DVB_SERVICE_RCS_MAP: GstMpegtsDVBServiceType = 14; +pub const GST_DVB_SERVICE_RCS_FLS: GstMpegtsDVBServiceType = 15; +pub const GST_DVB_SERVICE_DVB_MHP: GstMpegtsDVBServiceType = 16; +pub const GST_DVB_SERVICE_MPEG2_HD_DIGITAL_TELEVISION: GstMpegtsDVBServiceType = 17; +pub const GST_DVB_SERVICE_ADVANCED_CODEC_SD_DIGITAL_TELEVISION: GstMpegtsDVBServiceType = 22; +pub const GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_TIME_SHIFTED: GstMpegtsDVBServiceType = 23; +pub const GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_REFERENCE: GstMpegtsDVBServiceType = 24; +pub const GST_DVB_SERVICE_ADVANCED_CODEC_HD_DIGITAL_TELEVISION: GstMpegtsDVBServiceType = 25; +pub const GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_TIME_SHIFTED: GstMpegtsDVBServiceType = 26; +pub const GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_REFERENCE: GstMpegtsDVBServiceType = 27; +pub const GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_DIGITAL_TELEVISION: GstMpegtsDVBServiceType = 28; +pub const GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_TIME_SHIFTED: GstMpegtsDVBServiceType = 29; +pub const GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_REFERENCE: GstMpegtsDVBServiceType = 30; +pub const GST_DVB_SERVICE_RESERVED_FF: GstMpegtsDVBServiceType = 31; + +pub type GstMpegtsDVBTeletextType = c_int; +pub const INITIAL_PAGE: GstMpegtsDVBTeletextType = 1; +pub const SUBTITLE_PAGE: GstMpegtsDVBTeletextType = 2; +pub const ADDITIONAL_INFO_PAGE: GstMpegtsDVBTeletextType = 3; +pub const PROGRAMME_SCHEDULE_PAGE: GstMpegtsDVBTeletextType = 4; +pub const HEARING_IMPAIRED_PAGE: GstMpegtsDVBTeletextType = 5; + +pub type GstMpegtsDescriptorType = c_int; +pub const GST_MTS_DESC_RESERVED_00: GstMpegtsDescriptorType = 0; +pub const GST_MTS_DESC_RESERVED_01: GstMpegtsDescriptorType = 1; +pub const GST_MTS_DESC_VIDEO_STREAM: GstMpegtsDescriptorType = 2; +pub const GST_MTS_DESC_AUDIO_STREAM: GstMpegtsDescriptorType = 3; +pub const GST_MTS_DESC_HIERARCHY: GstMpegtsDescriptorType = 4; +pub const GST_MTS_DESC_REGISTRATION: GstMpegtsDescriptorType = 5; +pub const GST_MTS_DESC_DATA_STREAM_ALIGNMENT: GstMpegtsDescriptorType = 6; +pub const GST_MTS_DESC_TARGET_BACKGROUND_GRID: GstMpegtsDescriptorType = 7; +pub const GST_MTS_DESC_VIDEO_WINDOW: GstMpegtsDescriptorType = 8; +pub const GST_MTS_DESC_CA: GstMpegtsDescriptorType = 9; +pub const GST_MTS_DESC_ISO_639_LANGUAGE: GstMpegtsDescriptorType = 10; +pub const GST_MTS_DESC_SYSTEM_CLOCK: GstMpegtsDescriptorType = 11; +pub const GST_MTS_DESC_MULTIPLEX_BUFFER_UTILISATION: GstMpegtsDescriptorType = 12; +pub const GST_MTS_DESC_COPYRIGHT: GstMpegtsDescriptorType = 13; +pub const GST_MTS_DESC_MAXIMUM_BITRATE: GstMpegtsDescriptorType = 14; +pub const GST_MTS_DESC_PRIVATE_DATA_INDICATOR: GstMpegtsDescriptorType = 15; +pub const GST_MTS_DESC_SMOOTHING_BUFFER: GstMpegtsDescriptorType = 16; +pub const GST_MTS_DESC_STD: GstMpegtsDescriptorType = 17; +pub const GST_MTS_DESC_IBP: GstMpegtsDescriptorType = 18; +pub const GST_MTS_DESC_DSMCC_CAROUSEL_IDENTIFIER: GstMpegtsDescriptorType = 19; +pub const GST_MTS_DESC_DSMCC_ASSOCIATION_TAG: GstMpegtsDescriptorType = 20; +pub const GST_MTS_DESC_DSMCC_DEFERRED_ASSOCIATION_TAG: GstMpegtsDescriptorType = 21; +pub const GST_MTS_DESC_DSMCC_NPT_REFERENCE: GstMpegtsDescriptorType = 23; +pub const GST_MTS_DESC_DSMCC_NPT_ENDPOINT: GstMpegtsDescriptorType = 24; +pub const GST_MTS_DESC_DSMCC_STREAM_MODE: GstMpegtsDescriptorType = 25; +pub const GST_MTS_DESC_DSMCC_STREAM_EVENT: GstMpegtsDescriptorType = 26; +pub const GST_MTS_DESC_MPEG4_VIDEO: GstMpegtsDescriptorType = 27; +pub const GST_MTS_DESC_MPEG4_AUDIO: GstMpegtsDescriptorType = 28; +pub const GST_MTS_DESC_IOD: GstMpegtsDescriptorType = 29; +pub const GST_MTS_DESC_SL: GstMpegtsDescriptorType = 30; +pub const GST_MTS_DESC_FMC: GstMpegtsDescriptorType = 31; +pub const GST_MTS_DESC_EXTERNAL_ES_ID: GstMpegtsDescriptorType = 32; +pub const GST_MTS_DESC_MUX_CODE: GstMpegtsDescriptorType = 33; +pub const GST_MTS_DESC_FMX_BUFFER_SIZE: GstMpegtsDescriptorType = 34; +pub const GST_MTS_DESC_MULTIPLEX_BUFFER: GstMpegtsDescriptorType = 35; +pub const GST_MTS_DESC_CONTENT_LABELING: GstMpegtsDescriptorType = 36; +pub const GST_MTS_DESC_METADATA_POINTER: GstMpegtsDescriptorType = 37; +pub const GST_MTS_DESC_METADATA: GstMpegtsDescriptorType = 38; +pub const GST_MTS_DESC_METADATA_STD: GstMpegtsDescriptorType = 39; +pub const GST_MTS_DESC_AVC_VIDEO: GstMpegtsDescriptorType = 40; +pub const GST_MTS_DESC_IPMP: GstMpegtsDescriptorType = 41; +pub const GST_MTS_DESC_AVC_TIMING_AND_HRD: GstMpegtsDescriptorType = 42; +pub const GST_MTS_DESC_MPEG2_AAC_AUDIO: GstMpegtsDescriptorType = 43; +pub const GST_MTS_DESC_FLEX_MUX_TIMING: GstMpegtsDescriptorType = 44; +pub const GST_MTS_DESC_MPEG4_TEXT: GstMpegtsDescriptorType = 45; +pub const GST_MTS_DESC_MPEG4_AUDIO_EXTENSION: GstMpegtsDescriptorType = 46; +pub const GST_MTS_DESC_AUXILIARY_VIDEO_STREAM: GstMpegtsDescriptorType = 47; +pub const GST_MTS_DESC_SVC_EXTENSION: GstMpegtsDescriptorType = 48; +pub const GST_MTS_DESC_MVC_EXTENSION: GstMpegtsDescriptorType = 49; +pub const GST_MTS_DESC_J2K_VIDEO: GstMpegtsDescriptorType = 50; +pub const GST_MTS_DESC_MVC_OPERATION_POINT: GstMpegtsDescriptorType = 51; +pub const GST_MTS_DESC_MPEG2_STEREOSCOPIC_VIDEO_FORMAT: GstMpegtsDescriptorType = 52; +pub const GST_MTS_DESC_STEREOSCOPIC_PROGRAM_INFO: GstMpegtsDescriptorType = 53; +pub const GST_MTS_DESC_STEREOSCOPIC_VIDEO_INFO: GstMpegtsDescriptorType = 54; + +pub type GstMpegtsISDBDescriptorType = c_int; +pub const GST_MTS_DESC_ISDB_HIERARCHICAL_TRANSMISSION: GstMpegtsISDBDescriptorType = 192; +pub const GST_MTS_DESC_ISDB_DIGITAL_COPY_CONTROL: GstMpegtsISDBDescriptorType = 193; +pub const GST_MTS_DESC_ISDB_NETWORK_IDENTIFICATION: GstMpegtsISDBDescriptorType = 194; +pub const GST_MTS_DESC_ISDB_PARTIAL_TS_TIME: GstMpegtsISDBDescriptorType = 195; +pub const GST_MTS_DESC_ISDB_AUDIO_COMPONENT: GstMpegtsISDBDescriptorType = 196; +pub const GST_MTS_DESC_ISDB_HYPERLINK: GstMpegtsISDBDescriptorType = 197; +pub const GST_MTS_DESC_ISDB_TARGET_REGION: GstMpegtsISDBDescriptorType = 198; +pub const GST_MTS_DESC_ISDB_DATA_CONTENT: GstMpegtsISDBDescriptorType = 199; +pub const GST_MTS_DESC_ISDB_VIDEO_DECODE_CONTROL: GstMpegtsISDBDescriptorType = 200; +pub const GST_MTS_DESC_ISDB_DOWNLOAD_CONTENT: GstMpegtsISDBDescriptorType = 201; +pub const GST_MTS_DESC_ISDB_CA_EMM_TS: GstMpegtsISDBDescriptorType = 202; +pub const GST_MTS_DESC_ISDB_CA_CONTRACT_INFORMATION: GstMpegtsISDBDescriptorType = 203; +pub const GST_MTS_DESC_ISDB_CA_SERVICE: GstMpegtsISDBDescriptorType = 204; +pub const GST_MTS_DESC_ISDB_TS_INFORMATION: GstMpegtsISDBDescriptorType = 205; +pub const GST_MTS_DESC_ISDB_EXTENDED_BROADCASTER: GstMpegtsISDBDescriptorType = 206; +pub const GST_MTS_DESC_ISDB_LOGO_TRANSMISSION: GstMpegtsISDBDescriptorType = 207; +pub const GST_MTS_DESC_ISDB_BASIC_LOCAL_EVENT: GstMpegtsISDBDescriptorType = 208; +pub const GST_MTS_DESC_ISDB_REFERENCE: GstMpegtsISDBDescriptorType = 209; +pub const GST_MTS_DESC_ISDB_NODE_RELATION: GstMpegtsISDBDescriptorType = 210; +pub const GST_MTS_DESC_ISDB_SHORT_NODE_INFORMATION: GstMpegtsISDBDescriptorType = 211; +pub const GST_MTS_DESC_ISDB_STC_REFERENCE: GstMpegtsISDBDescriptorType = 212; +pub const GST_MTS_DESC_ISDB_SERIES: GstMpegtsISDBDescriptorType = 213; +pub const GST_MTS_DESC_ISDB_EVENT_GROUP: GstMpegtsISDBDescriptorType = 214; +pub const GST_MTS_DESC_ISDB_SI_PARAMETER: GstMpegtsISDBDescriptorType = 215; +pub const GST_MTS_DESC_ISDB_BROADCASTER_NAME: GstMpegtsISDBDescriptorType = 216; +pub const GST_MTS_DESC_ISDB_COMPONENT_GROUP: GstMpegtsISDBDescriptorType = 217; +pub const GST_MTS_DESC_ISDB_SI_PRIME_TS: GstMpegtsISDBDescriptorType = 218; +pub const GST_MTS_DESC_ISDB_BOARD_INFORMATION: GstMpegtsISDBDescriptorType = 219; +pub const GST_MTS_DESC_ISDB_LDT_LINKAGE: GstMpegtsISDBDescriptorType = 220; +pub const GST_MTS_DESC_ISDB_CONNECTED_TRANSMISSION: GstMpegtsISDBDescriptorType = 221; +pub const GST_MTS_DESC_ISDB_CONTENT_AVAILABILITY: GstMpegtsISDBDescriptorType = 222; +pub const GST_MTS_DESC_ISDB_SERVICE_GROUP: GstMpegtsISDBDescriptorType = 224; + +pub type GstMpegtsIso639AudioType = c_int; +pub const GST_MPEGTS_AUDIO_TYPE_UNDEFINED: GstMpegtsIso639AudioType = 0; +pub const GST_MPEGTS_AUDIO_TYPE_CLEAN_EFFECTS: GstMpegtsIso639AudioType = 1; +pub const GST_MPEGTS_AUDIO_TYPE_HEARING_IMPAIRED: GstMpegtsIso639AudioType = 2; +pub const GST_MPEGTS_AUDIO_TYPE_VISUAL_IMPAIRED_COMMENTARY: GstMpegtsIso639AudioType = 3; + +pub type GstMpegtsMiscDescriptorType = c_int; +pub const GST_MTS_DESC_AC3_AUDIO_STREAM: GstMpegtsMiscDescriptorType = 129; +pub const GST_MTS_DESC_DTG_LOGICAL_CHANNEL: GstMpegtsMiscDescriptorType = 131; + +pub type GstMpegtsModulationType = c_int; +pub const GST_MPEGTS_MODULATION_QPSK: GstMpegtsModulationType = 0; +pub const GST_MPEGTS_MODULATION_QAM_16: GstMpegtsModulationType = 1; +pub const GST_MPEGTS_MODULATION_QAM_32: GstMpegtsModulationType = 2; +pub const GST_MPEGTS_MODULATION_QAM_64: GstMpegtsModulationType = 3; +pub const GST_MPEGTS_MODULATION_QAM_128: GstMpegtsModulationType = 4; +pub const GST_MPEGTS_MODULATION_QAM_256: GstMpegtsModulationType = 5; +pub const GST_MPEGTS_MODULATION_QAM_AUTO: GstMpegtsModulationType = 6; +pub const GST_MPEGTS_MODULATION_VSB_8: GstMpegtsModulationType = 7; +pub const GST_MPEGTS_MODULATION_VSB_16: GstMpegtsModulationType = 8; +pub const GST_MPEGTS_MODULATION_PSK_8: GstMpegtsModulationType = 9; +pub const GST_MPEGTS_MODULATION_APSK_16: GstMpegtsModulationType = 10; +pub const GST_MPEGTS_MODULATION_APSK_32: GstMpegtsModulationType = 11; +pub const GST_MPEGTS_MODULATION_DQPSK: GstMpegtsModulationType = 12; +pub const GST_MPEGTS_MODULATION_QAM_4_NR_: GstMpegtsModulationType = 13; +pub const GST_MPEGTS_MODULATION_NONE: GstMpegtsModulationType = 14; + +pub type GstMpegtsRunningStatus = c_int; +pub const GST_MPEGTS_RUNNING_STATUS_UNDEFINED: GstMpegtsRunningStatus = 0; +pub const GST_MPEGTS_RUNNING_STATUS_NOT_RUNNING: GstMpegtsRunningStatus = 1; +pub const GST_MPEGTS_RUNNING_STATUS_STARTS_IN_FEW_SECONDS: GstMpegtsRunningStatus = 2; +pub const GST_MPEGTS_RUNNING_STATUS_PAUSING: GstMpegtsRunningStatus = 3; +pub const GST_MPEGTS_RUNNING_STATUS_RUNNING: GstMpegtsRunningStatus = 4; +pub const GST_MPEGTS_RUNNING_STATUS_OFF_AIR: GstMpegtsRunningStatus = 5; + +pub type GstMpegtsSCTESpliceCommandType = c_int; +pub const GST_MTS_SCTE_SPLICE_COMMAND_NULL: GstMpegtsSCTESpliceCommandType = 0; +pub const GST_MTS_SCTE_SPLICE_COMMAND_SCHEDULE: GstMpegtsSCTESpliceCommandType = 4; +pub const GST_MTS_SCTE_SPLICE_COMMAND_INSERT: GstMpegtsSCTESpliceCommandType = 5; +pub const GST_MTS_SCTE_SPLICE_COMMAND_TIME: GstMpegtsSCTESpliceCommandType = 6; +pub const GST_MTS_SCTE_SPLICE_COMMAND_BANDWIDTH: GstMpegtsSCTESpliceCommandType = 7; +pub const GST_MTS_SCTE_SPLICE_COMMAND_PRIVATE: GstMpegtsSCTESpliceCommandType = 255; + +pub type GstMpegtsSCTESpliceDescriptor = c_int; +pub const GST_MTS_SCTE_DESC_AVAIL: GstMpegtsSCTESpliceDescriptor = 0; +pub const GST_MTS_SCTE_DESC_DTMF: GstMpegtsSCTESpliceDescriptor = 1; +pub const GST_MTS_SCTE_DESC_SEGMENTATION: GstMpegtsSCTESpliceDescriptor = 2; +pub const GST_MTS_SCTE_DESC_TIME: GstMpegtsSCTESpliceDescriptor = 3; +pub const GST_MTS_SCTE_DESC_AUDIO: GstMpegtsSCTESpliceDescriptor = 4; + +pub type GstMpegtsSatellitePolarizationType = c_int; +pub const GST_MPEGTS_POLARIZATION_LINEAR_HORIZONTAL: GstMpegtsSatellitePolarizationType = 0; +pub const GST_MPEGTS_POLARIZATION_LINEAR_VERTICAL: GstMpegtsSatellitePolarizationType = 1; +pub const GST_MPEGTS_POLARIZATION_CIRCULAR_LEFT: GstMpegtsSatellitePolarizationType = 2; +pub const GST_MPEGTS_POLARIZATION_CIRCULAR_RIGHT: GstMpegtsSatellitePolarizationType = 3; + +pub type GstMpegtsSatelliteRolloff = c_int; +pub const GST_MPEGTS_ROLLOFF_35: GstMpegtsSatelliteRolloff = 0; +pub const GST_MPEGTS_ROLLOFF_20: GstMpegtsSatelliteRolloff = 1; +pub const GST_MPEGTS_ROLLOFF_25: GstMpegtsSatelliteRolloff = 2; +pub const GST_MPEGTS_ROLLOFF_RESERVED: GstMpegtsSatelliteRolloff = 3; +pub const GST_MPEGTS_ROLLOFF_AUTO: GstMpegtsSatelliteRolloff = 4; + +pub type GstMpegtsScteStreamType = c_int; +pub const GST_MPEGTS_STREAM_TYPE_SCTE_SUBTITLING: GstMpegtsScteStreamType = 130; +pub const GST_MPEGTS_STREAM_TYPE_SCTE_ISOCH_DATA: GstMpegtsScteStreamType = 131; +pub const GST_MPEGTS_STREAM_TYPE_SCTE_SIT: GstMpegtsScteStreamType = 134; +pub const GST_MPEGTS_STREAM_TYPE_SCTE_DST_NRT: GstMpegtsScteStreamType = 149; +pub const GST_MPEGTS_STREAM_TYPE_SCTE_DSMCC_DCB: GstMpegtsScteStreamType = 176; +pub const GST_MPEGTS_STREAM_TYPE_SCTE_SIGNALING: GstMpegtsScteStreamType = 192; +pub const GST_MPEGTS_STREAM_TYPE_SCTE_SYNC_DATA: GstMpegtsScteStreamType = 194; +pub const GST_MPEGTS_STREAM_TYPE_SCTE_ASYNC_DATA: GstMpegtsScteStreamType = 195; + +pub type GstMpegtsSectionATSCTableID = c_int; +pub const GST_MTS_TABLE_ID_ATSC_MASTER_GUIDE: GstMpegtsSectionATSCTableID = 199; +pub const GST_MTS_TABLE_ID_ATSC_TERRESTRIAL_VIRTUAL_CHANNEL: GstMpegtsSectionATSCTableID = 200; +pub const GST_MTS_TABLE_ID_ATSC_CABLE_VIRTUAL_CHANNEL: GstMpegtsSectionATSCTableID = 201; +pub const GST_MTS_TABLE_ID_ATSC_RATING_REGION: GstMpegtsSectionATSCTableID = 202; +pub const GST_MTS_TABLE_ID_ATSC_EVENT_INFORMATION: GstMpegtsSectionATSCTableID = 203; +pub const GST_MTS_TABLE_ID_ATSC_CHANNEL_OR_EVENT_EXTENDED_TEXT: GstMpegtsSectionATSCTableID = 204; +pub const GST_MTS_TABLE_ID_ATSC_SYSTEM_TIME: GstMpegtsSectionATSCTableID = 205; +pub const GST_MTS_TABLE_ID_ATSC_DATA_EVENT: GstMpegtsSectionATSCTableID = 206; +pub const GST_MTS_TABLE_ID_ATSC_DATA_SERVICE: GstMpegtsSectionATSCTableID = 207; +pub const GST_MTS_TABLE_ID_ATSC_NETWORK_RESOURCE: GstMpegtsSectionATSCTableID = 209; +pub const GST_MTS_TABLE_ID_ATSC_LONG_TERM_SERVICE: GstMpegtsSectionATSCTableID = 210; +pub const GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE: GstMpegtsSectionATSCTableID = 211; +pub const GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE_SECTION_CODE: GstMpegtsSectionATSCTableID = + 212; +pub const GST_MTS_TABLE_ID_ATSC_AGGREGATE_EVENT_INFORMATION: GstMpegtsSectionATSCTableID = 214; +pub const GST_MTS_TABLE_ID_ATSC_AGGREGATE_EXTENDED_TEXT: GstMpegtsSectionATSCTableID = 215; +pub const GST_MTS_TABLE_ID_ATSC_AGGREGATE_DATA_EVENT: GstMpegtsSectionATSCTableID = 217; +pub const GST_MTS_TABLE_ID_ATSC_SATELLITE_VIRTUAL_CHANNEL: GstMpegtsSectionATSCTableID = 218; + +pub type GstMpegtsSectionDVBTableID = c_int; +pub const GST_MTS_TABLE_ID_NETWORK_INFORMATION_ACTUAL_NETWORK: GstMpegtsSectionDVBTableID = 64; +pub const GST_MTS_TABLE_ID_NETWORK_INFORMATION_OTHER_NETWORK: GstMpegtsSectionDVBTableID = 65; +pub const GST_MTS_TABLE_ID_SERVICE_DESCRIPTION_ACTUAL_TS: GstMpegtsSectionDVBTableID = 66; +pub const GST_MTS_TABLE_ID_SERVICE_DESCRIPTION_OTHER_TS: GstMpegtsSectionDVBTableID = 70; +pub const GST_MTS_TABLE_ID_BOUQUET_ASSOCIATION: GstMpegtsSectionDVBTableID = 74; +pub const GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_PRESENT: GstMpegtsSectionDVBTableID = 78; +pub const GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_PRESENT: GstMpegtsSectionDVBTableID = 79; +pub const GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_1: GstMpegtsSectionDVBTableID = 80; +pub const GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_N: GstMpegtsSectionDVBTableID = 95; +pub const GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_SCHEDULE_1: GstMpegtsSectionDVBTableID = 96; +pub const GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_SCHEDULE_N: GstMpegtsSectionDVBTableID = 111; +pub const GST_MTS_TABLE_ID_TIME_DATE: GstMpegtsSectionDVBTableID = 112; +pub const GST_MTS_TABLE_ID_RUNNING_STATUS: GstMpegtsSectionDVBTableID = 113; +pub const GST_MTS_TABLE_ID_STUFFING: GstMpegtsSectionDVBTableID = 114; +pub const GST_MTS_TABLE_ID_TIME_OFFSET: GstMpegtsSectionDVBTableID = 115; +pub const GST_MTS_TABLE_ID_APPLICATION_INFORMATION_TABLE: GstMpegtsSectionDVBTableID = 116; +pub const GST_MTS_TABLE_ID_CONTAINER: GstMpegtsSectionDVBTableID = 117; +pub const GST_MTS_TABLE_ID_RELATED_CONTENT: GstMpegtsSectionDVBTableID = 118; +pub const GST_MTS_TABLE_ID_CONTENT_IDENTIFIER: GstMpegtsSectionDVBTableID = 119; +pub const GST_MTS_TABLE_ID_MPE_FEC: GstMpegtsSectionDVBTableID = 120; +pub const GST_MTS_TABLE_ID_RESOLUTION_NOTIFICATION: GstMpegtsSectionDVBTableID = 121; +pub const GST_MTS_TABLE_ID_MPE_IFEC: GstMpegtsSectionDVBTableID = 122; +pub const GST_MTS_TABLE_ID_DISCONTINUITY_INFORMATION: GstMpegtsSectionDVBTableID = 126; +pub const GST_MTS_TABLE_ID_SELECTION_INFORMATION: GstMpegtsSectionDVBTableID = 127; +pub const GST_MTS_TABLE_ID_CA_MESSAGE_ECM_0: GstMpegtsSectionDVBTableID = 128; +pub const GST_MTS_TABLE_ID_CA_MESSAGE_ECM_1: GstMpegtsSectionDVBTableID = 129; +pub const GST_MTS_TABLE_ID_CA_MESSAGE_SYSTEM_PRIVATE_1: GstMpegtsSectionDVBTableID = 130; +pub const GST_MTS_TABLE_ID_CA_MESSAGE_SYSTEM_PRIVATE_N: GstMpegtsSectionDVBTableID = 143; +pub const GST_MTS_TABLE_ID_SCT: GstMpegtsSectionDVBTableID = 160; +pub const GST_MTS_TABLE_ID_FCT: GstMpegtsSectionDVBTableID = 161; +pub const GST_MTS_TABLE_ID_TCT: GstMpegtsSectionDVBTableID = 162; +pub const GST_MTS_TABLE_ID_SPT: GstMpegtsSectionDVBTableID = 163; +pub const GST_MTS_TABLE_ID_CMT: GstMpegtsSectionDVBTableID = 164; +pub const GST_MTS_TABLE_ID_TBTP: GstMpegtsSectionDVBTableID = 165; +pub const GST_MTS_TABLE_ID_PCR_PACKET_PAYLOAD: GstMpegtsSectionDVBTableID = 166; +pub const GST_MTS_TABLE_ID_TRANSMISSION_MODE_SUPPORT_PAYLOAD: GstMpegtsSectionDVBTableID = 170; +pub const GST_MTS_TABLE_ID_TIM: GstMpegtsSectionDVBTableID = 176; +pub const GST_MTS_TABLE_ID_LL_FEC_PARITY_DATA_TABLE: GstMpegtsSectionDVBTableID = 177; + +pub type GstMpegtsSectionSCTETableID = c_int; +pub const GST_MTS_TABLE_ID_SCTE_EAS: GstMpegtsSectionSCTETableID = 216; +pub const GST_MTS_TABLE_ID_SCTE_EBIF: GstMpegtsSectionSCTETableID = 224; +pub const GST_MTS_TABLE_ID_SCTE_RESERVED: GstMpegtsSectionSCTETableID = 225; +pub const GST_MTS_TABLE_ID_SCTE_EISS: GstMpegtsSectionSCTETableID = 226; +pub const GST_MTS_TABLE_ID_SCTE_DII: GstMpegtsSectionSCTETableID = 227; +pub const GST_MTS_TABLE_ID_SCTE_DDB: GstMpegtsSectionSCTETableID = 228; +pub const GST_MTS_TABLE_ID_SCTE_SPLICE: GstMpegtsSectionSCTETableID = 252; + +pub type GstMpegtsSectionTableID = c_int; +pub const GST_MTS_TABLE_ID_PROGRAM_ASSOCIATION: GstMpegtsSectionTableID = 0; +pub const GST_MTS_TABLE_ID_CONDITIONAL_ACCESS: GstMpegtsSectionTableID = 1; +pub const GST_MTS_TABLE_ID_TS_PROGRAM_MAP: GstMpegtsSectionTableID = 2; +pub const GST_MTS_TABLE_ID_TS_DESCRIPTION: GstMpegtsSectionTableID = 3; +pub const GST_MTS_TABLE_ID_14496_SCENE_DESCRIPTION: GstMpegtsSectionTableID = 4; +pub const GST_MTS_TABLE_ID_14496_OBJET_DESCRIPTOR: GstMpegtsSectionTableID = 5; +pub const GST_MTS_TABLE_ID_METADATA: GstMpegtsSectionTableID = 6; +pub const GST_MTS_TABLE_ID_IPMP_CONTROL_INFORMATION: GstMpegtsSectionTableID = 7; +pub const GST_MTS_TABLE_ID_DSM_CC_MULTIPROTO_ENCAPSULATED_DATA: GstMpegtsSectionTableID = 58; +pub const GST_MTS_TABLE_ID_DSM_CC_U_N_MESSAGES: GstMpegtsSectionTableID = 59; +pub const GST_MTS_TABLE_ID_DSM_CC_DOWNLOAD_DATA_MESSAGES: GstMpegtsSectionTableID = 60; +pub const GST_MTS_TABLE_ID_DSM_CC_STREAM_DESCRIPTORS: GstMpegtsSectionTableID = 61; +pub const GST_MTS_TABLE_ID_DSM_CC_PRIVATE_DATA: GstMpegtsSectionTableID = 62; +pub const GST_MTS_TABLE_ID_DSM_CC_ADDRESSABLE_SECTIONS: GstMpegtsSectionTableID = 63; +pub const GST_MTS_TABLE_ID_UNSET: GstMpegtsSectionTableID = 255; + +pub type GstMpegtsSectionType = c_int; +pub const GST_MPEGTS_SECTION_UNKNOWN: GstMpegtsSectionType = 0; +pub const GST_MPEGTS_SECTION_PAT: GstMpegtsSectionType = 1; +pub const GST_MPEGTS_SECTION_PMT: GstMpegtsSectionType = 2; +pub const GST_MPEGTS_SECTION_CAT: GstMpegtsSectionType = 3; +pub const GST_MPEGTS_SECTION_TSDT: GstMpegtsSectionType = 4; +pub const GST_MPEGTS_SECTION_EIT: GstMpegtsSectionType = 5; +pub const GST_MPEGTS_SECTION_NIT: GstMpegtsSectionType = 6; +pub const GST_MPEGTS_SECTION_BAT: GstMpegtsSectionType = 7; +pub const GST_MPEGTS_SECTION_SDT: GstMpegtsSectionType = 8; +pub const GST_MPEGTS_SECTION_TDT: GstMpegtsSectionType = 9; +pub const GST_MPEGTS_SECTION_TOT: GstMpegtsSectionType = 10; +pub const GST_MPEGTS_SECTION_ATSC_TVCT: GstMpegtsSectionType = 11; +pub const GST_MPEGTS_SECTION_ATSC_CVCT: GstMpegtsSectionType = 12; +pub const GST_MPEGTS_SECTION_ATSC_MGT: GstMpegtsSectionType = 13; +pub const GST_MPEGTS_SECTION_ATSC_ETT: GstMpegtsSectionType = 14; +pub const GST_MPEGTS_SECTION_ATSC_EIT: GstMpegtsSectionType = 15; +pub const GST_MPEGTS_SECTION_ATSC_STT: GstMpegtsSectionType = 16; +pub const GST_MPEGTS_SECTION_ATSC_RRT: GstMpegtsSectionType = 17; +pub const GST_MPEGTS_SECTION_SCTE_SIT: GstMpegtsSectionType = 18; + +pub type GstMpegtsStreamType = c_int; +pub const GST_MPEGTS_STREAM_TYPE_RESERVED_00: GstMpegtsStreamType = 0; +pub const GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG1: GstMpegtsStreamType = 1; +pub const GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2: GstMpegtsStreamType = 2; +pub const GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG1: GstMpegtsStreamType = 3; +pub const GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG2: GstMpegtsStreamType = 4; +pub const GST_MPEGTS_STREAM_TYPE_PRIVATE_SECTIONS: GstMpegtsStreamType = 5; +pub const GST_MPEGTS_STREAM_TYPE_PRIVATE_PES_PACKETS: GstMpegtsStreamType = 6; +pub const GST_MPEGTS_STREAM_TYPE_MHEG: GstMpegtsStreamType = 7; +pub const GST_MPEGTS_STREAM_TYPE_DSM_CC: GstMpegtsStreamType = 8; +pub const GST_MPEGTS_STREAM_TYPE_H_222_1: GstMpegtsStreamType = 9; +pub const GST_MPEGTS_STREAM_TYPE_DSMCC_A: GstMpegtsStreamType = 10; +pub const GST_MPEGTS_STREAM_TYPE_DSMCC_B: GstMpegtsStreamType = 11; +pub const GST_MPEGTS_STREAM_TYPE_DSMCC_C: GstMpegtsStreamType = 12; +pub const GST_MPEGTS_STREAM_TYPE_DSMCC_D: GstMpegtsStreamType = 13; +pub const GST_MPEGTS_STREAM_TYPE_AUXILIARY: GstMpegtsStreamType = 14; +pub const GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_ADTS: GstMpegtsStreamType = 15; +pub const GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG4: GstMpegtsStreamType = 16; +pub const GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_LATM: GstMpegtsStreamType = 17; +pub const GST_MPEGTS_STREAM_TYPE_SL_FLEXMUX_PES_PACKETS: GstMpegtsStreamType = 18; +pub const GST_MPEGTS_STREAM_TYPE_SL_FLEXMUX_SECTIONS: GstMpegtsStreamType = 19; +pub const GST_MPEGTS_STREAM_TYPE_SYNCHRONIZED_DOWNLOAD: GstMpegtsStreamType = 20; +pub const GST_MPEGTS_STREAM_TYPE_METADATA_PES_PACKETS: GstMpegtsStreamType = 21; +pub const GST_MPEGTS_STREAM_TYPE_METADATA_SECTIONS: GstMpegtsStreamType = 22; +pub const GST_MPEGTS_STREAM_TYPE_METADATA_DATA_CAROUSEL: GstMpegtsStreamType = 23; +pub const GST_MPEGTS_STREAM_TYPE_METADATA_OBJECT_CAROUSEL: GstMpegtsStreamType = 24; +pub const GST_MPEGTS_STREAM_TYPE_METADATA_SYNCHRONIZED_DOWNLOAD: GstMpegtsStreamType = 25; +pub const GST_MPEGTS_STREAM_TYPE_MPEG2_IPMP: GstMpegtsStreamType = 26; +pub const GST_MPEGTS_STREAM_TYPE_VIDEO_H264: GstMpegtsStreamType = 27; +pub const GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_CLEAN: GstMpegtsStreamType = 28; +pub const GST_MPEGTS_STREAM_TYPE_MPEG4_TIMED_TEXT: GstMpegtsStreamType = 29; +pub const GST_MPEGTS_STREAM_TYPE_VIDEO_RVC: GstMpegtsStreamType = 30; +pub const GST_MPEGTS_STREAM_TYPE_VIDEO_H264_SVC_SUB_BITSTREAM: GstMpegtsStreamType = 31; +pub const GST_MPEGTS_STREAM_TYPE_VIDEO_H264_MVC_SUB_BITSTREAM: GstMpegtsStreamType = 32; +pub const GST_MPEGTS_STREAM_TYPE_VIDEO_JP2K: GstMpegtsStreamType = 33; +pub const GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2_STEREO_ADDITIONAL_VIEW: GstMpegtsStreamType = 34; +pub const GST_MPEGTS_STREAM_TYPE_VIDEO_H264_STEREO_ADDITIONAL_VIEW: GstMpegtsStreamType = 35; +pub const GST_MPEGTS_STREAM_TYPE_VIDEO_HEVC: GstMpegtsStreamType = 36; +pub const GST_MPEGTS_STREAM_TYPE_IPMP_STREAM: GstMpegtsStreamType = 127; + +pub type GstMpegtsTerrestrialGuardInterval = c_int; +pub const GST_MPEGTS_GUARD_INTERVAL_1_32: GstMpegtsTerrestrialGuardInterval = 0; +pub const GST_MPEGTS_GUARD_INTERVAL_1_16: GstMpegtsTerrestrialGuardInterval = 1; +pub const GST_MPEGTS_GUARD_INTERVAL_1_8: GstMpegtsTerrestrialGuardInterval = 2; +pub const GST_MPEGTS_GUARD_INTERVAL_1_4: GstMpegtsTerrestrialGuardInterval = 3; +pub const GST_MPEGTS_GUARD_INTERVAL_AUTO: GstMpegtsTerrestrialGuardInterval = 4; +pub const GST_MPEGTS_GUARD_INTERVAL_1_128: GstMpegtsTerrestrialGuardInterval = 5; +pub const GST_MPEGTS_GUARD_INTERVAL_19_128: GstMpegtsTerrestrialGuardInterval = 6; +pub const GST_MPEGTS_GUARD_INTERVAL_19_256: GstMpegtsTerrestrialGuardInterval = 7; +pub const GST_MPEGTS_GUARD_INTERVAL_PN420: GstMpegtsTerrestrialGuardInterval = 8; +pub const GST_MPEGTS_GUARD_INTERVAL_PN595: GstMpegtsTerrestrialGuardInterval = 9; +pub const GST_MPEGTS_GUARD_INTERVAL_PN945: GstMpegtsTerrestrialGuardInterval = 10; + +pub type GstMpegtsTerrestrialHierarchy = c_int; +pub const GST_MPEGTS_HIERARCHY_NONE: GstMpegtsTerrestrialHierarchy = 0; +pub const GST_MPEGTS_HIERARCHY_1: GstMpegtsTerrestrialHierarchy = 1; +pub const GST_MPEGTS_HIERARCHY_2: GstMpegtsTerrestrialHierarchy = 2; +pub const GST_MPEGTS_HIERARCHY_4: GstMpegtsTerrestrialHierarchy = 3; +pub const GST_MPEGTS_HIERARCHY_AUTO: GstMpegtsTerrestrialHierarchy = 4; + +pub type GstMpegtsTerrestrialTransmissionMode = c_int; +pub const GST_MPEGTS_TRANSMISSION_MODE_2K: GstMpegtsTerrestrialTransmissionMode = 0; +pub const GST_MPEGTS_TRANSMISSION_MODE_8K: GstMpegtsTerrestrialTransmissionMode = 1; +pub const GST_MPEGTS_TRANSMISSION_MODE_AUTO: GstMpegtsTerrestrialTransmissionMode = 2; +pub const GST_MPEGTS_TRANSMISSION_MODE_4K: GstMpegtsTerrestrialTransmissionMode = 3; +pub const GST_MPEGTS_TRANSMISSION_MODE_1K: GstMpegtsTerrestrialTransmissionMode = 4; +pub const GST_MPEGTS_TRANSMISSION_MODE_16K: GstMpegtsTerrestrialTransmissionMode = 5; +pub const GST_MPEGTS_TRANSMISSION_MODE_32K: GstMpegtsTerrestrialTransmissionMode = 6; +pub const GST_MPEGTS_TRANSMISSION_MODE_C1: GstMpegtsTerrestrialTransmissionMode = 7; +pub const GST_MPEGTS_TRANSMISSION_MODE_C3780: GstMpegtsTerrestrialTransmissionMode = 8; + +// Callbacks +pub type GstMpegtsPacketizeFunc = Option gboolean>; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscEIT { + pub source_id: u16, + pub protocol_version: u8, + pub events: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsAtscEIT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsAtscEIT @ {:?}", self as *const _)) + .field("source_id", &self.source_id) + .field("protocol_version", &self.protocol_version) + .field("events", &self.events) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscEITEvent { + pub event_id: u16, + pub start_time: u32, + pub etm_location: u8, + pub length_in_seconds: u32, + pub titles: *mut glib::GPtrArray, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsAtscEITEvent { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsAtscEITEvent @ {:?}", self as *const _)) + .field("event_id", &self.event_id) + .field("start_time", &self.start_time) + .field("etm_location", &self.etm_location) + .field("length_in_seconds", &self.length_in_seconds) + .field("titles", &self.titles) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscETT { + pub ett_table_id_extension: u16, + pub protocol_version: u16, + pub etm_id: u32, + pub messages: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsAtscETT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsAtscETT @ {:?}", self as *const _)) + .field("ett_table_id_extension", &self.ett_table_id_extension) + .field("protocol_version", &self.protocol_version) + .field("etm_id", &self.etm_id) + .field("messages", &self.messages) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscMGT { + pub protocol_version: u8, + pub tables_defined: u16, + pub tables: *mut glib::GPtrArray, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsAtscMGT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsAtscMGT @ {:?}", self as *const _)) + .field("protocol_version", &self.protocol_version) + .field("tables_defined", &self.tables_defined) + .field("tables", &self.tables) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscMGTTable { + pub table_type: u16, + pub pid: u16, + pub version_number: u8, + pub number_bytes: u32, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsAtscMGTTable { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsAtscMGTTable @ {:?}", self as *const _)) + .field("table_type", &self.table_type) + .field("pid", &self.pid) + .field("version_number", &self.version_number) + .field("number_bytes", &self.number_bytes) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscMultString { + pub iso_639_langcode: [c_char; 4], + pub segments: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsAtscMultString { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsAtscMultString @ {:?}", self as *const _)) + .field("iso_639_langcode", &self.iso_639_langcode) + .field("segments", &self.segments) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscRRT { + pub protocol_version: u8, + pub names: *mut glib::GPtrArray, + pub dimensions_defined: u8, + pub dimensions: *mut glib::GPtrArray, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsAtscRRT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsAtscRRT @ {:?}", self as *const _)) + .field("protocol_version", &self.protocol_version) + .field("names", &self.names) + .field("dimensions_defined", &self.dimensions_defined) + .field("dimensions", &self.dimensions) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscRRTDimension { + pub names: *mut glib::GPtrArray, + pub graduated_scale: gboolean, + pub values_defined: u8, + pub values: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsAtscRRTDimension { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsAtscRRTDimension @ {:?}", + self as *const _ + )) + .field("names", &self.names) + .field("graduated_scale", &self.graduated_scale) + .field("values_defined", &self.values_defined) + .field("values", &self.values) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscRRTDimensionValue { + pub abbrev_ratings: *mut glib::GPtrArray, + pub ratings: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsAtscRRTDimensionValue { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsAtscRRTDimensionValue @ {:?}", + self as *const _ + )) + .field("abbrev_ratings", &self.abbrev_ratings) + .field("ratings", &self.ratings) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscSTT { + pub protocol_version: u8, + pub system_time: u32, + pub gps_utc_offset: u8, + pub ds_status: gboolean, + pub ds_dayofmonth: u8, + pub ds_hour: u8, + pub descriptors: *mut glib::GPtrArray, + pub utc_datetime: *mut gst::GstDateTime, +} + +impl ::std::fmt::Debug for GstMpegtsAtscSTT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsAtscSTT @ {:?}", self as *const _)) + .field("protocol_version", &self.protocol_version) + .field("system_time", &self.system_time) + .field("gps_utc_offset", &self.gps_utc_offset) + .field("ds_status", &self.ds_status) + .field("ds_dayofmonth", &self.ds_dayofmonth) + .field("ds_hour", &self.ds_hour) + .field("descriptors", &self.descriptors) + .field("utc_datetime", &self.utc_datetime) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscStringSegment { + pub compression_type: u8, + pub mode: u8, + pub compressed_data_size: u8, + pub compressed_data: *mut u8, + pub cached_string: *mut c_char, +} + +impl ::std::fmt::Debug for GstMpegtsAtscStringSegment { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsAtscStringSegment @ {:?}", + self as *const _ + )) + .field("compression_type", &self.compression_type) + .field("mode", &self.mode) + .field("compressed_data_size", &self.compressed_data_size) + .field("compressed_data", &self.compressed_data) + .field("cached_string", &self.cached_string) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscVCT { + pub transport_stream_id: u16, + pub protocol_version: u8, + pub sources: *mut glib::GPtrArray, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsAtscVCT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsAtscVCT @ {:?}", self as *const _)) + .field("transport_stream_id", &self.transport_stream_id) + .field("protocol_version", &self.protocol_version) + .field("sources", &self.sources) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsAtscVCTSource { + pub short_name: *mut c_char, + pub major_channel_number: u16, + pub minor_channel_number: u16, + pub modulation_mode: u8, + pub carrier_frequency: u32, + pub channel_TSID: u16, + pub program_number: u16, + pub ETM_location: u8, + pub access_controlled: gboolean, + pub hidden: gboolean, + pub path_select: gboolean, + pub out_of_band: gboolean, + pub hide_guide: gboolean, + pub service_type: u8, + pub source_id: u16, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsAtscVCTSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsAtscVCTSource @ {:?}", self as *const _)) + .field("short_name", &self.short_name) + .field("major_channel_number", &self.major_channel_number) + .field("minor_channel_number", &self.minor_channel_number) + .field("modulation_mode", &self.modulation_mode) + .field("carrier_frequency", &self.carrier_frequency) + .field("channel_TSID", &self.channel_TSID) + .field("program_number", &self.program_number) + .field("ETM_location", &self.ETM_location) + .field("access_controlled", &self.access_controlled) + .field("hidden", &self.hidden) + .field("path_select", &self.path_select) + .field("out_of_band", &self.out_of_band) + .field("hide_guide", &self.hide_guide) + .field("service_type", &self.service_type) + .field("source_id", &self.source_id) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsBAT { + pub descriptors: *mut glib::GPtrArray, + pub streams: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsBAT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsBAT @ {:?}", self as *const _)) + .field("descriptors", &self.descriptors) + .field("streams", &self.streams) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsBATStream { + pub transport_stream_id: u16, + pub original_network_id: u16, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsBATStream { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsBATStream @ {:?}", self as *const _)) + .field("transport_stream_id", &self.transport_stream_id) + .field("original_network_id", &self.original_network_id) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsCableDeliverySystemDescriptor { + pub frequency: u32, + pub outer_fec: GstMpegtsCableOuterFECScheme, + pub modulation: GstMpegtsModulationType, + pub symbol_rate: u32, + pub fec_inner: GstMpegtsDVBCodeRate, +} + +impl ::std::fmt::Debug for GstMpegtsCableDeliverySystemDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsCableDeliverySystemDescriptor @ {:?}", + self as *const _ + )) + .field("frequency", &self.frequency) + .field("outer_fec", &self.outer_fec) + .field("modulation", &self.modulation) + .field("symbol_rate", &self.symbol_rate) + .field("fec_inner", &self.fec_inner) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsComponentDescriptor { + pub stream_content: u8, + pub component_type: u8, + pub component_tag: u8, + pub language_code: *mut c_char, + pub text: *mut c_char, +} + +impl ::std::fmt::Debug for GstMpegtsComponentDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsComponentDescriptor @ {:?}", + self as *const _ + )) + .field("stream_content", &self.stream_content) + .field("component_type", &self.component_type) + .field("component_tag", &self.component_tag) + .field("language_code", &self.language_code) + .field("text", &self.text) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsContent { + pub content_nibble_1: GstMpegtsContentNibbleHi, + pub content_nibble_2: u8, + pub user_byte: u8, +} + +impl ::std::fmt::Debug for GstMpegtsContent { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsContent @ {:?}", self as *const _)) + .field("content_nibble_1", &self.content_nibble_1) + .field("content_nibble_2", &self.content_nibble_2) + .field("user_byte", &self.user_byte) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDVBLinkageDescriptor { + pub transport_stream_id: u16, + pub original_network_id: u16, + pub service_id: u16, + pub linkage_type: GstMpegtsDVBLinkageType, + pub linkage_data: gpointer, + pub private_data_length: u8, + pub private_data_bytes: *mut u8, +} + +impl ::std::fmt::Debug for GstMpegtsDVBLinkageDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsDVBLinkageDescriptor @ {:?}", + self as *const _ + )) + .field("transport_stream_id", &self.transport_stream_id) + .field("original_network_id", &self.original_network_id) + .field("service_id", &self.service_id) + .field("linkage_type", &self.linkage_type) + .field("private_data_length", &self.private_data_length) + .field("private_data_bytes", &self.private_data_bytes) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDVBLinkageEvent { + pub target_event_id: u16, + pub target_listed: gboolean, + pub event_simulcast: gboolean, +} + +impl ::std::fmt::Debug for GstMpegtsDVBLinkageEvent { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsDVBLinkageEvent @ {:?}", + self as *const _ + )) + .field("target_event_id", &self.target_event_id) + .field("target_listed", &self.target_listed) + .field("event_simulcast", &self.event_simulcast) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDVBLinkageExtendedEvent { + pub target_event_id: u16, + pub target_listed: gboolean, + pub event_simulcast: gboolean, + pub link_type: u8, + pub target_id_type: u8, + pub original_network_id_flag: gboolean, + pub service_id_flag: gboolean, + pub user_defined_id: u16, + pub target_transport_stream_id: u16, + pub target_original_network_id: u16, + pub target_service_id: u16, +} + +impl ::std::fmt::Debug for GstMpegtsDVBLinkageExtendedEvent { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsDVBLinkageExtendedEvent @ {:?}", + self as *const _ + )) + .field("target_event_id", &self.target_event_id) + .field("target_listed", &self.target_listed) + .field("event_simulcast", &self.event_simulcast) + .field("link_type", &self.link_type) + .field("target_id_type", &self.target_id_type) + .field("original_network_id_flag", &self.original_network_id_flag) + .field("service_id_flag", &self.service_id_flag) + .field("user_defined_id", &self.user_defined_id) + .field( + "target_transport_stream_id", + &self.target_transport_stream_id, + ) + .field( + "target_original_network_id", + &self.target_original_network_id, + ) + .field("target_service_id", &self.target_service_id) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDVBLinkageMobileHandOver { + pub hand_over_type: GstMpegtsDVBLinkageHandOverType, + pub origin_type: gboolean, + pub network_id: u16, + pub initial_service_id: u16, +} + +impl ::std::fmt::Debug for GstMpegtsDVBLinkageMobileHandOver { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsDVBLinkageMobileHandOver @ {:?}", + self as *const _ + )) + .field("hand_over_type", &self.hand_over_type) + .field("origin_type", &self.origin_type) + .field("network_id", &self.network_id) + .field("initial_service_id", &self.initial_service_id) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDVBParentalRatingItem { + pub country_code: *mut c_char, + pub rating: u8, +} + +impl ::std::fmt::Debug for GstMpegtsDVBParentalRatingItem { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsDVBParentalRatingItem @ {:?}", + self as *const _ + )) + .field("country_code", &self.country_code) + .field("rating", &self.rating) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDVBServiceListItem { + pub service_id: u16, + pub type_: GstMpegtsDVBServiceType, +} + +impl ::std::fmt::Debug for GstMpegtsDVBServiceListItem { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsDVBServiceListItem @ {:?}", + self as *const _ + )) + .field("service_id", &self.service_id) + .field("type_", &self.type_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDataBroadcastDescriptor { + pub data_broadcast_id: u16, + pub component_tag: u8, + pub length: u8, + pub selector_bytes: *mut u8, + pub language_code: *mut c_char, + pub text: *mut c_char, +} + +impl ::std::fmt::Debug for GstMpegtsDataBroadcastDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsDataBroadcastDescriptor @ {:?}", + self as *const _ + )) + .field("data_broadcast_id", &self.data_broadcast_id) + .field("component_tag", &self.component_tag) + .field("length", &self.length) + .field("selector_bytes", &self.selector_bytes) + .field("language_code", &self.language_code) + .field("text", &self.text) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDescriptor { + pub tag: u8, + pub tag_extension: u8, + pub length: u8, + pub data: *mut u8, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstMpegtsDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsDescriptor @ {:?}", self as *const _)) + .field("tag", &self.tag) + .field("tag_extension", &self.tag_extension) + .field("length", &self.length) + .field("data", &self.data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDvbMultilingualBouquetNameItem { + pub language_code: *mut c_char, + pub bouquet_name: *mut c_char, +} + +impl ::std::fmt::Debug for GstMpegtsDvbMultilingualBouquetNameItem { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsDvbMultilingualBouquetNameItem @ {:?}", + self as *const _ + )) + .field("language_code", &self.language_code) + .field("bouquet_name", &self.bouquet_name) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDvbMultilingualComponentItem { + pub language_code: *mut c_char, + pub description: *mut c_char, +} + +impl ::std::fmt::Debug for GstMpegtsDvbMultilingualComponentItem { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsDvbMultilingualComponentItem @ {:?}", + self as *const _ + )) + .field("language_code", &self.language_code) + .field("description", &self.description) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDvbMultilingualNetworkNameItem { + pub language_code: *mut c_char, + pub network_name: *mut c_char, +} + +impl ::std::fmt::Debug for GstMpegtsDvbMultilingualNetworkNameItem { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsDvbMultilingualNetworkNameItem @ {:?}", + self as *const _ + )) + .field("language_code", &self.language_code) + .field("network_name", &self.network_name) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsDvbMultilingualServiceNameItem { + pub language_code: *mut c_char, + pub provider_name: *mut c_char, + pub service_name: *mut c_char, +} + +impl ::std::fmt::Debug for GstMpegtsDvbMultilingualServiceNameItem { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsDvbMultilingualServiceNameItem @ {:?}", + self as *const _ + )) + .field("language_code", &self.language_code) + .field("provider_name", &self.provider_name) + .field("service_name", &self.service_name) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsEIT { + pub transport_stream_id: u16, + pub original_network_id: u16, + pub segment_last_section_number: u8, + pub last_table_id: u8, + pub actual_stream: gboolean, + pub present_following: gboolean, + pub events: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsEIT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsEIT @ {:?}", self as *const _)) + .field("transport_stream_id", &self.transport_stream_id) + .field("original_network_id", &self.original_network_id) + .field( + "segment_last_section_number", + &self.segment_last_section_number, + ) + .field("last_table_id", &self.last_table_id) + .field("actual_stream", &self.actual_stream) + .field("present_following", &self.present_following) + .field("events", &self.events) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsEITEvent { + pub event_id: u16, + pub start_time: *mut gst::GstDateTime, + pub duration: u32, + pub running_status: GstMpegtsRunningStatus, + pub free_CA_mode: gboolean, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsEITEvent { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsEITEvent @ {:?}", self as *const _)) + .field("event_id", &self.event_id) + .field("start_time", &self.start_time) + .field("duration", &self.duration) + .field("running_status", &self.running_status) + .field("free_CA_mode", &self.free_CA_mode) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsExtendedEventDescriptor { + pub descriptor_number: u8, + pub last_descriptor_number: u8, + pub language_code: *mut c_char, + pub items: *mut glib::GPtrArray, + pub text: *mut c_char, +} + +impl ::std::fmt::Debug for GstMpegtsExtendedEventDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsExtendedEventDescriptor @ {:?}", + self as *const _ + )) + .field("descriptor_number", &self.descriptor_number) + .field("last_descriptor_number", &self.last_descriptor_number) + .field("language_code", &self.language_code) + .field("items", &self.items) + .field("text", &self.text) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsExtendedEventItem { + pub item_description: *mut c_char, + pub item: *mut c_char, +} + +impl ::std::fmt::Debug for GstMpegtsExtendedEventItem { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsExtendedEventItem @ {:?}", + self as *const _ + )) + .field("item_description", &self.item_description) + .field("item", &self.item) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsISO639LanguageDescriptor { + pub nb_language: c_uint, + pub language: [*mut c_char; 64], + pub audio_type: [GstMpegtsIso639AudioType; 64], +} + +impl ::std::fmt::Debug for GstMpegtsISO639LanguageDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsISO639LanguageDescriptor @ {:?}", + self as *const _ + )) + .field("nb_language", &self.nb_language) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsLogicalChannel { + pub service_id: u16, + pub visible_service: gboolean, + pub logical_channel_number: u16, +} + +impl ::std::fmt::Debug for GstMpegtsLogicalChannel { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsLogicalChannel @ {:?}", self as *const _)) + .field("service_id", &self.service_id) + .field("visible_service", &self.visible_service) + .field("logical_channel_number", &self.logical_channel_number) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsLogicalChannelDescriptor { + pub nb_channels: c_uint, + pub channels: [GstMpegtsLogicalChannel; 64], +} + +impl ::std::fmt::Debug for GstMpegtsLogicalChannelDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsLogicalChannelDescriptor @ {:?}", + self as *const _ + )) + .field("nb_channels", &self.nb_channels) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsNIT { + pub actual_network: gboolean, + pub network_id: u16, + pub descriptors: *mut glib::GPtrArray, + pub streams: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsNIT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsNIT @ {:?}", self as *const _)) + .field("actual_network", &self.actual_network) + .field("network_id", &self.network_id) + .field("descriptors", &self.descriptors) + .field("streams", &self.streams) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsNITStream { + pub transport_stream_id: u16, + pub original_network_id: u16, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsNITStream { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsNITStream @ {:?}", self as *const _)) + .field("transport_stream_id", &self.transport_stream_id) + .field("original_network_id", &self.original_network_id) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsPMT { + pub pcr_pid: u16, + pub program_number: u16, + pub descriptors: *mut glib::GPtrArray, + pub streams: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsPMT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsPMT @ {:?}", self as *const _)) + .field("pcr_pid", &self.pcr_pid) + .field("program_number", &self.program_number) + .field("descriptors", &self.descriptors) + .field("streams", &self.streams) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsPMTStream { + pub stream_type: u8, + pub pid: u16, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsPMTStream { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsPMTStream @ {:?}", self as *const _)) + .field("stream_type", &self.stream_type) + .field("pid", &self.pid) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsPatProgram { + pub program_number: u16, + pub network_or_program_map_PID: u16, +} + +impl ::std::fmt::Debug for GstMpegtsPatProgram { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsPatProgram @ {:?}", self as *const _)) + .field("program_number", &self.program_number) + .field( + "network_or_program_map_PID", + &self.network_or_program_map_PID, + ) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsSCTESIT { + pub encrypted_packet: gboolean, + pub encryption_algorithm: u8, + pub pts_adjustment: u64, + pub cw_index: u8, + pub tier: u16, + pub splice_command_length: u16, + pub splice_command_type: GstMpegtsSCTESpliceCommandType, + pub splice_time_specified: gboolean, + pub splice_time: u64, + pub splices: *mut glib::GPtrArray, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsSCTESIT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsSCTESIT @ {:?}", self as *const _)) + .field("encrypted_packet", &self.encrypted_packet) + .field("encryption_algorithm", &self.encryption_algorithm) + .field("pts_adjustment", &self.pts_adjustment) + .field("cw_index", &self.cw_index) + .field("tier", &self.tier) + .field("splice_command_length", &self.splice_command_length) + .field("splice_command_type", &self.splice_command_type) + .field("splice_time_specified", &self.splice_time_specified) + .field("splice_time", &self.splice_time) + .field("splices", &self.splices) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsSCTESpliceEvent { + pub insert_event: gboolean, + pub splice_event_id: u32, + pub splice_event_cancel_indicator: gboolean, + pub out_of_network_indicator: gboolean, + pub program_splice_flag: gboolean, + pub duration_flag: gboolean, + pub splice_immediate_flag: gboolean, + pub program_splice_time_specified: gboolean, + pub program_splice_time: u64, + pub break_duration_auto_return: gboolean, + pub break_duration: u64, + pub unique_program_id: u16, + pub avail_num: u8, + pub avails_expected: u8, +} + +impl ::std::fmt::Debug for GstMpegtsSCTESpliceEvent { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsSCTESpliceEvent @ {:?}", + self as *const _ + )) + .field("insert_event", &self.insert_event) + .field("splice_event_id", &self.splice_event_id) + .field( + "splice_event_cancel_indicator", + &self.splice_event_cancel_indicator, + ) + .field("out_of_network_indicator", &self.out_of_network_indicator) + .field("program_splice_flag", &self.program_splice_flag) + .field("duration_flag", &self.duration_flag) + .field("splice_immediate_flag", &self.splice_immediate_flag) + .field( + "program_splice_time_specified", + &self.program_splice_time_specified, + ) + .field("program_splice_time", &self.program_splice_time) + .field( + "break_duration_auto_return", + &self.break_duration_auto_return, + ) + .field("break_duration", &self.break_duration) + .field("unique_program_id", &self.unique_program_id) + .field("avail_num", &self.avail_num) + .field("avails_expected", &self.avails_expected) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsSDT { + pub original_network_id: u16, + pub actual_ts: gboolean, + pub transport_stream_id: u16, + pub services: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsSDT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsSDT @ {:?}", self as *const _)) + .field("original_network_id", &self.original_network_id) + .field("actual_ts", &self.actual_ts) + .field("transport_stream_id", &self.transport_stream_id) + .field("services", &self.services) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsSDTService { + pub service_id: u16, + pub EIT_schedule_flag: gboolean, + pub EIT_present_following_flag: gboolean, + pub running_status: GstMpegtsRunningStatus, + pub free_CA_mode: gboolean, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsSDTService { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsSDTService @ {:?}", self as *const _)) + .field("service_id", &self.service_id) + .field("EIT_schedule_flag", &self.EIT_schedule_flag) + .field( + "EIT_present_following_flag", + &self.EIT_present_following_flag, + ) + .field("running_status", &self.running_status) + .field("free_CA_mode", &self.free_CA_mode) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsSatelliteDeliverySystemDescriptor { + pub frequency: u32, + pub orbital_position: c_float, + pub west_east: gboolean, + pub polarization: GstMpegtsSatellitePolarizationType, + pub roll_off: GstMpegtsSatelliteRolloff, + pub modulation_system: gboolean, + pub modulation_type: GstMpegtsModulationType, + pub symbol_rate: u32, + pub fec_inner: GstMpegtsDVBCodeRate, +} + +impl ::std::fmt::Debug for GstMpegtsSatelliteDeliverySystemDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsSatelliteDeliverySystemDescriptor @ {:?}", + self as *const _ + )) + .field("frequency", &self.frequency) + .field("orbital_position", &self.orbital_position) + .field("west_east", &self.west_east) + .field("polarization", &self.polarization) + .field("roll_off", &self.roll_off) + .field("modulation_system", &self.modulation_system) + .field("modulation_type", &self.modulation_type) + .field("symbol_rate", &self.symbol_rate) + .field("fec_inner", &self.fec_inner) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsSection { + pub parent: gst::GstMiniObject, + pub section_type: GstMpegtsSectionType, + pub pid: u16, + pub table_id: u8, + pub subtable_extension: u16, + pub version_number: u8, + pub current_next_indicator: gboolean, + pub section_number: u8, + pub last_section_number: u8, + pub crc: u32, + pub data: *mut u8, + pub section_length: c_uint, + pub cached_parsed: *mut gpointer, + pub destroy_parsed: glib::GDestroyNotify, + pub offset: u64, + pub short_section: gboolean, + pub packetizer: GstMpegtsPacketizeFunc, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstMpegtsSection { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsSection @ {:?}", self as *const _)) + .field("section_type", &self.section_type) + .field("pid", &self.pid) + .field("table_id", &self.table_id) + .field("subtable_extension", &self.subtable_extension) + .field("version_number", &self.version_number) + .field("current_next_indicator", &self.current_next_indicator) + .field("section_number", &self.section_number) + .field("last_section_number", &self.last_section_number) + .field("crc", &self.crc) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsT2DeliverySystemCell { + pub cell_id: u16, + pub centre_frequencies: *mut glib::GArray, + pub sub_cells: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsT2DeliverySystemCell { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsT2DeliverySystemCell @ {:?}", + self as *const _ + )) + .field("cell_id", &self.cell_id) + .field("centre_frequencies", &self.centre_frequencies) + .field("sub_cells", &self.sub_cells) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsT2DeliverySystemCellExtension { + pub cell_id_extension: u8, + pub transposer_frequency: u32, +} + +impl ::std::fmt::Debug for GstMpegtsT2DeliverySystemCellExtension { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsT2DeliverySystemCellExtension @ {:?}", + self as *const _ + )) + .field("cell_id_extension", &self.cell_id_extension) + .field("transposer_frequency", &self.transposer_frequency) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsT2DeliverySystemDescriptor { + pub plp_id: u8, + pub t2_system_id: u16, + pub siso_miso: u8, + pub bandwidth: u32, + pub guard_interval: GstMpegtsTerrestrialGuardInterval, + pub transmission_mode: GstMpegtsTerrestrialTransmissionMode, + pub other_frequency: gboolean, + pub tfs: gboolean, + pub cells: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsT2DeliverySystemDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsT2DeliverySystemDescriptor @ {:?}", + self as *const _ + )) + .field("plp_id", &self.plp_id) + .field("t2_system_id", &self.t2_system_id) + .field("siso_miso", &self.siso_miso) + .field("bandwidth", &self.bandwidth) + .field("guard_interval", &self.guard_interval) + .field("transmission_mode", &self.transmission_mode) + .field("other_frequency", &self.other_frequency) + .field("tfs", &self.tfs) + .field("cells", &self.cells) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsTOT { + pub utc_time: *mut gst::GstDateTime, + pub descriptors: *mut glib::GPtrArray, +} + +impl ::std::fmt::Debug for GstMpegtsTOT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMpegtsTOT @ {:?}", self as *const _)) + .field("utc_time", &self.utc_time) + .field("descriptors", &self.descriptors) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMpegtsTerrestrialDeliverySystemDescriptor { + pub frequency: u32, + pub bandwidth: u32, + pub priority: gboolean, + pub time_slicing: gboolean, + pub mpe_fec: gboolean, + pub constellation: GstMpegtsModulationType, + pub hierarchy: GstMpegtsTerrestrialHierarchy, + pub code_rate_hp: GstMpegtsDVBCodeRate, + pub code_rate_lp: GstMpegtsDVBCodeRate, + pub guard_interval: GstMpegtsTerrestrialGuardInterval, + pub transmission_mode: GstMpegtsTerrestrialTransmissionMode, + pub other_frequency: gboolean, +} + +impl ::std::fmt::Debug for GstMpegtsTerrestrialDeliverySystemDescriptor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstMpegtsTerrestrialDeliverySystemDescriptor @ {:?}", + self as *const _ + )) + .field("frequency", &self.frequency) + .field("bandwidth", &self.bandwidth) + .field("priority", &self.priority) + .field("time_slicing", &self.time_slicing) + .field("mpe_fec", &self.mpe_fec) + .field("constellation", &self.constellation) + .field("hierarchy", &self.hierarchy) + .field("code_rate_hp", &self.code_rate_hp) + .field("code_rate_lp", &self.code_rate_lp) + .field("guard_interval", &self.guard_interval) + .field("transmission_mode", &self.transmission_mode) + .field("other_frequency", &self.other_frequency) + .finish() + } +} + +#[link(name = "gstmpegts-1.0")] +extern "C" { + + //========================================================================= + // GstMpegtsAtscEIT + //========================================================================= + pub fn gst_mpegts_atsc_eit_get_type() -> GType; + + //========================================================================= + // GstMpegtsAtscEITEvent + //========================================================================= + pub fn gst_mpegts_atsc_eit_event_get_type() -> GType; + + //========================================================================= + // GstMpegtsAtscETT + //========================================================================= + pub fn gst_mpegts_atsc_ett_get_type() -> GType; + + //========================================================================= + // GstMpegtsAtscMGT + //========================================================================= + pub fn gst_mpegts_atsc_mgt_get_type() -> GType; + pub fn gst_mpegts_atsc_mgt_new() -> *mut GstMpegtsAtscMGT; + + //========================================================================= + // GstMpegtsAtscMGTTable + //========================================================================= + pub fn gst_mpegts_atsc_mgt_table_get_type() -> GType; + + //========================================================================= + // GstMpegtsAtscMultString + //========================================================================= + pub fn gst_mpegts_atsc_mult_string_get_type() -> GType; + + //========================================================================= + // GstMpegtsAtscRRT + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_mpegts_atsc_rrt_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_mpegts_atsc_rrt_new() -> *mut GstMpegtsAtscRRT; + + //========================================================================= + // GstMpegtsAtscRRTDimension + //========================================================================= + pub fn gst_mpegts_atsc_rrt_dimension_get_type() -> GType; + pub fn gst_mpegts_atsc_rrt_dimension_new() -> *mut GstMpegtsAtscRRTDimension; + + //========================================================================= + // GstMpegtsAtscRRTDimensionValue + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_mpegts_atsc_rrt_dimension_value_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_mpegts_atsc_rrt_dimension_value_new() -> *mut GstMpegtsAtscRRTDimensionValue; + + //========================================================================= + // GstMpegtsAtscSTT + //========================================================================= + pub fn gst_mpegts_atsc_stt_get_type() -> GType; + pub fn gst_mpegts_atsc_stt_new() -> *mut GstMpegtsAtscSTT; + pub fn gst_mpegts_atsc_stt_get_datetime_utc( + stt: *mut GstMpegtsAtscSTT, + ) -> *mut gst::GstDateTime; + + //========================================================================= + // GstMpegtsAtscStringSegment + //========================================================================= + pub fn gst_mpegts_atsc_string_segment_get_type() -> GType; + pub fn gst_mpegts_atsc_string_segment_get_string( + seg: *mut GstMpegtsAtscStringSegment, + ) -> *const c_char; + pub fn gst_mpegts_atsc_string_segment_set_string( + seg: *mut GstMpegtsAtscStringSegment, + string: *mut c_char, + compression_type: u8, + mode: u8, + ) -> gboolean; + + //========================================================================= + // GstMpegtsAtscVCT + //========================================================================= + pub fn gst_mpegts_atsc_vct_get_type() -> GType; + + //========================================================================= + // GstMpegtsAtscVCTSource + //========================================================================= + pub fn gst_mpegts_atsc_vct_source_get_type() -> GType; + + //========================================================================= + // GstMpegtsBAT + //========================================================================= + pub fn gst_mpegts_bat_get_type() -> GType; + + //========================================================================= + // GstMpegtsBATStream + //========================================================================= + pub fn gst_mpegts_bat_stream_get_type() -> GType; + + //========================================================================= + // GstMpegtsCableDeliverySystemDescriptor + //========================================================================= + pub fn gst_mpegts_dvb_cable_delivery_system_descriptor_get_type() -> GType; + pub fn gst_mpegts_dvb_cable_delivery_system_descriptor_free( + source: *mut GstMpegtsCableDeliverySystemDescriptor, + ); + + //========================================================================= + // GstMpegtsComponentDescriptor + //========================================================================= + pub fn gst_mpegts_component_descriptor_get_type() -> GType; + + //========================================================================= + // GstMpegtsContent + //========================================================================= + pub fn gst_mpegts_content_get_type() -> GType; + + //========================================================================= + // GstMpegtsDVBLinkageDescriptor + //========================================================================= + pub fn gst_mpegts_dvb_linkage_descriptor_get_type() -> GType; + pub fn gst_mpegts_dvb_linkage_descriptor_free(source: *mut GstMpegtsDVBLinkageDescriptor); + pub fn gst_mpegts_dvb_linkage_descriptor_get_event( + desc: *const GstMpegtsDVBLinkageDescriptor, + ) -> *const GstMpegtsDVBLinkageEvent; + pub fn gst_mpegts_dvb_linkage_descriptor_get_extended_event( + desc: *const GstMpegtsDVBLinkageDescriptor, + ) -> *const glib::GPtrArray; + pub fn gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over( + desc: *const GstMpegtsDVBLinkageDescriptor, + ) -> *const GstMpegtsDVBLinkageMobileHandOver; + + //========================================================================= + // GstMpegtsDVBLinkageEvent + //========================================================================= + pub fn gst_mpegts_dvb_linkage_event_get_type() -> GType; + + //========================================================================= + // GstMpegtsDVBLinkageExtendedEvent + //========================================================================= + pub fn gst_mpegts_dvb_linkage_extended_event_get_type() -> GType; + + //========================================================================= + // GstMpegtsDVBLinkageMobileHandOver + //========================================================================= + pub fn gst_mpegts_dvb_linkage_mobile_hand_over_get_type() -> GType; + + //========================================================================= + // GstMpegtsDVBParentalRatingItem + //========================================================================= + pub fn gst_mpegts_dvb_parental_rating_item_get_type() -> GType; + + //========================================================================= + // GstMpegtsDVBServiceListItem + //========================================================================= + pub fn gst_mpegts_dvb_service_list_item_get_type() -> GType; + + //========================================================================= + // GstMpegtsDataBroadcastDescriptor + //========================================================================= + pub fn gst_mpegts_dvb_data_broadcast_descriptor_get_type() -> GType; + pub fn gst_mpegts_dvb_data_broadcast_descriptor_free( + source: *mut GstMpegtsDataBroadcastDescriptor, + ); + + //========================================================================= + // GstMpegtsDescriptor + //========================================================================= + pub fn gst_mpegts_descriptor_get_type() -> GType; + pub fn gst_mpegts_descriptor_free(desc: *mut GstMpegtsDescriptor); + pub fn gst_mpegts_descriptor_parse_ca( + descriptor: *mut GstMpegtsDescriptor, + ca_system_id: *mut u16, + ca_pid: *mut u16, + private_data: *mut *const u8, + private_data_size: *mut size_t, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_cable_delivery_system( + descriptor: *const GstMpegtsDescriptor, + res: *mut GstMpegtsCableDeliverySystemDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_bouquet_name( + descriptor: *const GstMpegtsDescriptor, + bouquet_name: *mut *mut c_char, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_ca_identifier( + descriptor: *const GstMpegtsDescriptor, + list: *mut *mut glib::GArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_component( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsComponentDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_content( + descriptor: *const GstMpegtsDescriptor, + content: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_data_broadcast( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsDataBroadcastDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_data_broadcast_id( + descriptor: *const GstMpegtsDescriptor, + data_broadcast_id: *mut u16, + id_selector_bytes: *mut *mut u8, + len: *mut u8, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_extended_event( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsExtendedEventDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_frequency_list( + descriptor: *const GstMpegtsDescriptor, + offset: *mut gboolean, + list: *mut *mut glib::GArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_linkage( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsDVBLinkageDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name( + descriptor: *const GstMpegtsDescriptor, + bouquet_name_items: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_multilingual_component( + descriptor: *const GstMpegtsDescriptor, + component_tag: *mut u8, + component_description_items: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_multilingual_network_name( + descriptor: *const GstMpegtsDescriptor, + network_name_items: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_multilingual_service_name( + descriptor: *const GstMpegtsDescriptor, + service_name_items: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_network_name( + descriptor: *const GstMpegtsDescriptor, + name: *mut *mut c_char, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_parental_rating( + descriptor: *const GstMpegtsDescriptor, + rating: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_private_data_specifier( + descriptor: *const GstMpegtsDescriptor, + private_data_specifier: *mut u32, + private_data: *mut *mut u8, + length: *mut u8, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_scrambling( + descriptor: *const GstMpegtsDescriptor, + scrambling_mode: *mut GstMpegtsDVBScramblingModeType, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_service( + descriptor: *const GstMpegtsDescriptor, + service_type: *mut GstMpegtsDVBServiceType, + service_name: *mut *mut c_char, + provider_name: *mut *mut c_char, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_service_list( + descriptor: *const GstMpegtsDescriptor, + list: *mut *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_short_event( + descriptor: *const GstMpegtsDescriptor, + language_code: *mut *mut c_char, + event_name: *mut *mut c_char, + text: *mut *mut c_char, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_stream_identifier( + descriptor: *const GstMpegtsDescriptor, + component_tag: *mut u8, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_stuffing( + descriptor: *const GstMpegtsDescriptor, + stuffing_bytes: *mut *mut u8, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_subtitling_idx( + descriptor: *const GstMpegtsDescriptor, + idx: c_uint, + lang: *mut *mut c_char, + type_: *mut u8, + composition_page_id: *mut u16, + ancillary_page_id: *mut u16, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_subtitling_nb( + descriptor: *const GstMpegtsDescriptor, + ) -> c_uint; + pub fn gst_mpegts_descriptor_parse_dvb_t2_delivery_system( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsT2DeliverySystemDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_teletext_idx( + descriptor: *const GstMpegtsDescriptor, + idx: c_uint, + language_code: *mut *mut c_char, + teletext_type: *mut GstMpegtsDVBTeletextType, + magazine_number: *mut u8, + page_number: *mut u8, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_dvb_teletext_nb( + descriptor: *const GstMpegtsDescriptor, + ) -> c_uint; + pub fn gst_mpegts_descriptor_parse_iso_639_language( + descriptor: *const GstMpegtsDescriptor, + res: *mut *mut GstMpegtsISO639LanguageDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_iso_639_language_idx( + descriptor: *const GstMpegtsDescriptor, + idx: c_uint, + lang: *mut *mut c_char, + audio_type: *mut GstMpegtsIso639AudioType, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_iso_639_language_nb( + descriptor: *const GstMpegtsDescriptor, + ) -> c_uint; + pub fn gst_mpegts_descriptor_parse_logical_channel( + descriptor: *const GstMpegtsDescriptor, + res: *mut GstMpegtsLogicalChannelDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_satellite_delivery_system( + descriptor: *const GstMpegtsDescriptor, + res: *mut GstMpegtsSatelliteDeliverySystemDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_parse_terrestrial_delivery_system( + descriptor: *const GstMpegtsDescriptor, + res: *mut GstMpegtsTerrestrialDeliverySystemDescriptor, + ) -> gboolean; + pub fn gst_mpegts_descriptor_from_custom( + tag: u8, + data: *const u8, + length: size_t, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_custom_with_extension( + tag: u8, + tag_extension: u8, + data: *const u8, + length: size_t, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_dvb_network_name( + name: *const c_char, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_dvb_service( + service_type: GstMpegtsDVBServiceType, + service_name: *const c_char, + service_provider: *const c_char, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_dvb_subtitling( + lang: *const c_char, + type_: u8, + composition: u16, + ancillary: u16, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_iso_639_language( + language: *const c_char, + ) -> *mut GstMpegtsDescriptor; + pub fn gst_mpegts_descriptor_from_registration( + format_identifier: *const c_char, + additional_info: *mut u8, + additional_info_length: size_t, + ) -> *mut GstMpegtsDescriptor; + + //========================================================================= + // GstMpegtsDvbMultilingualBouquetNameItem + //========================================================================= + pub fn gst_mpegts_dvb_multilingual_bouquet_name_item_get_type() -> GType; + + //========================================================================= + // GstMpegtsDvbMultilingualComponentItem + //========================================================================= + pub fn gst_mpegts_dvb_multilingual_component_item_get_type() -> GType; + + //========================================================================= + // GstMpegtsDvbMultilingualNetworkNameItem + //========================================================================= + pub fn gst_mpegts_dvb_multilingual_network_name_item_get_type() -> GType; + + //========================================================================= + // GstMpegtsDvbMultilingualServiceNameItem + //========================================================================= + pub fn gst_mpegts_dvb_multilingual_service_name_item_get_type() -> GType; + + //========================================================================= + // GstMpegtsEIT + //========================================================================= + pub fn gst_mpegts_eit_get_type() -> GType; + + //========================================================================= + // GstMpegtsEITEvent + //========================================================================= + pub fn gst_mpegts_eit_event_get_type() -> GType; + + //========================================================================= + // GstMpegtsExtendedEventDescriptor + //========================================================================= + pub fn gst_mpegts_extended_event_descriptor_get_type() -> GType; + pub fn gst_mpegts_extended_event_descriptor_free(source: *mut GstMpegtsExtendedEventDescriptor); + + //========================================================================= + // GstMpegtsExtendedEventItem + //========================================================================= + pub fn gst_mpegts_extended_event_item_get_type() -> GType; + + //========================================================================= + // GstMpegtsISO639LanguageDescriptor + //========================================================================= + pub fn gst_mpegts_iso_639_language_get_type() -> GType; + pub fn gst_mpegts_iso_639_language_descriptor_free( + desc: *mut GstMpegtsISO639LanguageDescriptor, + ); + + //========================================================================= + // GstMpegtsLogicalChannel + //========================================================================= + pub fn gst_mpegts_logical_channel_get_type() -> GType; + + //========================================================================= + // GstMpegtsLogicalChannelDescriptor + //========================================================================= + pub fn gst_mpegts_logical_channel_descriptor_get_type() -> GType; + + //========================================================================= + // GstMpegtsNIT + //========================================================================= + pub fn gst_mpegts_nit_get_type() -> GType; + pub fn gst_mpegts_nit_new() -> *mut GstMpegtsNIT; + + //========================================================================= + // GstMpegtsNITStream + //========================================================================= + pub fn gst_mpegts_nit_stream_get_type() -> GType; + pub fn gst_mpegts_nit_stream_new() -> *mut GstMpegtsNITStream; + + //========================================================================= + // GstMpegtsPMT + //========================================================================= + pub fn gst_mpegts_pmt_get_type() -> GType; + pub fn gst_mpegts_pmt_new() -> *mut GstMpegtsPMT; + + //========================================================================= + // GstMpegtsPMTStream + //========================================================================= + pub fn gst_mpegts_pmt_stream_get_type() -> GType; + pub fn gst_mpegts_pmt_stream_new() -> *mut GstMpegtsPMTStream; + + //========================================================================= + // GstMpegtsPatProgram + //========================================================================= + pub fn gst_mpegts_pat_program_get_type() -> GType; + pub fn gst_mpegts_pat_program_new() -> *mut GstMpegtsPatProgram; + + //========================================================================= + // GstMpegtsSCTESIT + //========================================================================= + pub fn gst_mpegts_scte_sit_get_type() -> GType; + pub fn gst_mpegts_scte_sit_new() -> *mut GstMpegtsSCTESIT; + + //========================================================================= + // GstMpegtsSCTESpliceEvent + //========================================================================= + pub fn gst_mpegts_scte_splice_event_get_type() -> GType; + pub fn gst_mpegts_scte_splice_event_new() -> *mut GstMpegtsSCTESpliceEvent; + + //========================================================================= + // GstMpegtsSDT + //========================================================================= + pub fn gst_mpegts_sdt_get_type() -> GType; + pub fn gst_mpegts_sdt_new() -> *mut GstMpegtsSDT; + + //========================================================================= + // GstMpegtsSDTService + //========================================================================= + pub fn gst_mpegts_sdt_service_get_type() -> GType; + pub fn gst_mpegts_sdt_service_new() -> *mut GstMpegtsSDTService; + + //========================================================================= + // GstMpegtsSatelliteDeliverySystemDescriptor + //========================================================================= + pub fn gst_mpegts_satellite_delivery_system_descriptor_get_type() -> GType; + + //========================================================================= + // GstMpegtsSection + //========================================================================= + pub fn gst_mpegts_section_get_type() -> GType; + pub fn gst_mpegts_section_new( + pid: u16, + data: *mut u8, + data_size: size_t, + ) -> *mut GstMpegtsSection; + pub fn gst_mpegts_section_get_atsc_cvct( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscVCT; + pub fn gst_mpegts_section_get_atsc_eit( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscEIT; + pub fn gst_mpegts_section_get_atsc_ett( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscETT; + pub fn gst_mpegts_section_get_atsc_mgt( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscMGT; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_mpegts_section_get_atsc_rrt( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscRRT; + pub fn gst_mpegts_section_get_atsc_stt( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscSTT; + pub fn gst_mpegts_section_get_atsc_tvct( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsAtscVCT; + pub fn gst_mpegts_section_get_bat(section: *mut GstMpegtsSection) -> *const GstMpegtsBAT; + pub fn gst_mpegts_section_get_cat(section: *mut GstMpegtsSection) -> *mut glib::GPtrArray; + pub fn gst_mpegts_section_get_data(section: *mut GstMpegtsSection) -> *mut glib::GBytes; + pub fn gst_mpegts_section_get_eit(section: *mut GstMpegtsSection) -> *const GstMpegtsEIT; + pub fn gst_mpegts_section_get_nit(section: *mut GstMpegtsSection) -> *const GstMpegtsNIT; + pub fn gst_mpegts_section_get_pat(section: *mut GstMpegtsSection) -> *mut glib::GPtrArray; + pub fn gst_mpegts_section_get_pmt(section: *mut GstMpegtsSection) -> *const GstMpegtsPMT; + pub fn gst_mpegts_section_get_scte_sit( + section: *mut GstMpegtsSection, + ) -> *const GstMpegtsSCTESIT; + pub fn gst_mpegts_section_get_sdt(section: *mut GstMpegtsSection) -> *const GstMpegtsSDT; + pub fn gst_mpegts_section_get_tdt(section: *mut GstMpegtsSection) -> *mut gst::GstDateTime; + pub fn gst_mpegts_section_get_tot(section: *mut GstMpegtsSection) -> *const GstMpegtsTOT; + pub fn gst_mpegts_section_get_tsdt(section: *mut GstMpegtsSection) -> *mut glib::GPtrArray; + pub fn gst_mpegts_section_packetize( + section: *mut GstMpegtsSection, + output_size: *mut size_t, + ) -> *mut u8; + pub fn gst_mpegts_section_send_event( + section: *mut GstMpegtsSection, + element: *mut gst::GstElement, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_mpegts_section_from_atsc_mgt(mgt: *mut GstMpegtsAtscMGT) -> *mut GstMpegtsSection; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_mpegts_section_from_atsc_rrt(rrt: *mut GstMpegtsAtscRRT) -> *mut GstMpegtsSection; + pub fn gst_mpegts_section_from_atsc_stt(stt: *mut GstMpegtsAtscSTT) -> *mut GstMpegtsSection; + pub fn gst_mpegts_section_from_nit(nit: *mut GstMpegtsNIT) -> *mut GstMpegtsSection; + pub fn gst_mpegts_section_from_pat( + programs: *mut glib::GPtrArray, + ts_id: u16, + ) -> *mut GstMpegtsSection; + pub fn gst_mpegts_section_from_pmt(pmt: *mut GstMpegtsPMT, pid: u16) -> *mut GstMpegtsSection; + pub fn gst_mpegts_section_from_scte_sit( + sit: *mut GstMpegtsSCTESIT, + pid: u16, + ) -> *mut GstMpegtsSection; + pub fn gst_mpegts_section_from_sdt(sdt: *mut GstMpegtsSDT) -> *mut GstMpegtsSection; + + //========================================================================= + // GstMpegtsT2DeliverySystemCell + //========================================================================= + pub fn gst_mpegts_t2_delivery_system_cell_get_type() -> GType; + + //========================================================================= + // GstMpegtsT2DeliverySystemCellExtension + //========================================================================= + pub fn gst_mpegts_t2_delivery_system_cell_extension_get_type() -> GType; + + //========================================================================= + // GstMpegtsT2DeliverySystemDescriptor + //========================================================================= + pub fn gst_mpegts_t2_delivery_system_descriptor_get_type() -> GType; + pub fn gst_mpegts_t2_delivery_system_descriptor_free( + source: *mut GstMpegtsT2DeliverySystemDescriptor, + ); + + //========================================================================= + // GstMpegtsTOT + //========================================================================= + pub fn gst_mpegts_tot_get_type() -> GType; + + //========================================================================= + // GstMpegtsTerrestrialDeliverySystemDescriptor + //========================================================================= + pub fn gst_mpegts_terrestrial_delivery_system_descriptor_get_type() -> GType; + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_mpegts_dvb_component_descriptor_free(source: *mut GstMpegtsComponentDescriptor); + pub fn gst_event_parse_mpegts_section(event: *mut gst::GstEvent) -> *mut GstMpegtsSection; + pub fn gst_mpegts_find_descriptor( + descriptors: *mut glib::GPtrArray, + tag: u8, + ) -> *const GstMpegtsDescriptor; + pub fn gst_mpegts_initialize(); + pub fn gst_message_new_mpegts_section( + parent: *mut gst::GstObject, + section: *mut GstMpegtsSection, + ) -> *mut gst::GstMessage; + pub fn gst_message_parse_mpegts_section(message: *mut gst::GstMessage) + -> *mut GstMpegtsSection; + pub fn gst_mpegts_parse_descriptors(buffer: *mut u8, buf_len: size_t) -> *mut glib::GPtrArray; + pub fn gst_mpegts_pat_new() -> *mut glib::GPtrArray; + pub fn gst_mpegts_scte_cancel_new(event_id: u32) -> *mut GstMpegtsSCTESIT; + pub fn gst_mpegts_scte_null_new() -> *mut GstMpegtsSCTESIT; + pub fn gst_mpegts_scte_splice_in_new(event_id: u32, splice_time: u64) -> *mut GstMpegtsSCTESIT; + pub fn gst_mpegts_scte_splice_out_new( + event_id: u32, + splice_time: u64, + duration: u64, + ) -> *mut GstMpegtsSCTESIT; + +} diff --git a/sys/gstreamer-mpegts-sys/tests/abi.rs b/sys/gstreamer-mpegts-sys/tests/abi.rs new file mode 100644 index 000000000..21c51d01b --- /dev/null +++ b/sys/gstreamer-mpegts-sys/tests/abi.rs @@ -0,0 +1,1498 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_mpegts_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_mpegts_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-mpegts-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstMpegtsATSCDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscEIT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscEITEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscETT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscMGT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscMGTTable", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscMGTTableType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscMultString", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscRRT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscRRTDimension", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscRRTDimensionValue", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscSTT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscStringSegment", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscVCT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsAtscVCTSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsBAT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsBATStream", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsCableDeliverySystemDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsCableOuterFECScheme", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsComponentDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsComponentStreamContent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsContent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsContentNibbleHi", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBCodeRate", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBExtendedDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageExtendedEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageHandOverType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageMobileHandOver", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBLinkageType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBParentalRatingItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBScramblingModeType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBServiceListItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBServiceType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDVBTeletextType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDataBroadcastDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDvbMultilingualBouquetNameItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDvbMultilingualComponentItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDvbMultilingualNetworkNameItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsDvbMultilingualServiceNameItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsEIT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsEITEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsExtendedEventDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsExtendedEventItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsISDBDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsISO639LanguageDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsIso639AudioType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsLogicalChannel", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsLogicalChannelDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsMiscDescriptorType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsModulationType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsNIT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsNITStream", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsPMT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsPMTStream", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsPatProgram", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsRunningStatus", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSCTESIT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSCTESpliceCommandType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSCTESpliceDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSCTESpliceEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSDT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSDTService", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSatelliteDeliverySystemDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSatellitePolarizationType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSatelliteRolloff", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsScteStreamType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSectionATSCTableID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSectionDVBTableID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSectionSCTETableID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSectionTableID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsSectionType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsStreamType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsT2DeliverySystemCell", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsT2DeliverySystemCellExtension", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsT2DeliverySystemDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsTOT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsTerrestrialDeliverySystemDescriptor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsTerrestrialGuardInterval", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsTerrestrialHierarchy", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMpegtsTerrestrialTransmissionMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(gint) ADDITIONAL_INFO_PAGE", "3"), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_DIGITAL_RADIO_SOUND", + "10", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_HD_DIGITAL_TELEVISION", + "25", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_REFERENCE", + "27", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_HD_NVOD_TIME_SHIFTED", + "26", + ), + ("(gint) GST_DVB_SERVICE_ADVANCED_CODEC_MOSAIC", "11"), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_SD_DIGITAL_TELEVISION", + "22", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_REFERENCE", + "24", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_SD_NVOD_TIME_SHIFTED", + "23", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_DIGITAL_TELEVISION", + "28", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_REFERENCE", + "30", + ), + ( + "(gint) GST_DVB_SERVICE_ADVANCED_CODEC_STEREO_HD_NVOD_TIME_SHIFTED", + "29", + ), + ("(gint) GST_DVB_SERVICE_DATA_BROADCAST", "12"), + ("(gint) GST_DVB_SERVICE_DIGITAL_RADIO_SOUND", "2"), + ("(gint) GST_DVB_SERVICE_DIGITAL_TELEVISION", "1"), + ("(gint) GST_DVB_SERVICE_DVB_MHP", "16"), + ("(gint) GST_DVB_SERVICE_DVB_SRM", "8"), + ("(gint) GST_DVB_SERVICE_FM_RADIO", "7"), + ("(gint) GST_DVB_SERVICE_MOSAIC", "6"), + ("(gint) GST_DVB_SERVICE_MPEG2_HD_DIGITAL_TELEVISION", "17"), + ("(gint) GST_DVB_SERVICE_NVOD_REFERENCE", "4"), + ("(gint) GST_DVB_SERVICE_NVOD_TIME_SHIFTED", "5"), + ("(gint) GST_DVB_SERVICE_RCS_FLS", "15"), + ("(gint) GST_DVB_SERVICE_RCS_MAP", "14"), + ("(gint) GST_DVB_SERVICE_RESERVED_00", "0"), + ("(gint) GST_DVB_SERVICE_RESERVED_09", "9"), + ("(gint) GST_DVB_SERVICE_RESERVED_0D_COMMON_INTERFACE", "13"), + ("(gint) GST_DVB_SERVICE_RESERVED_FF", "31"), + ("(gint) GST_DVB_SERVICE_TELETEXT", "3"), + ("(gint) GST_MPEGTS_ATSC_MGT_TABLE_TYPE_EIT0", "256"), + ("(gint) GST_MPEGTS_ATSC_MGT_TABLE_TYPE_EIT127", "383"), + ("(gint) GST_MPEGTS_ATSC_MGT_TABLE_TYPE_ETT0", "512"), + ("(gint) GST_MPEGTS_ATSC_MGT_TABLE_TYPE_ETT127", "639"), + ("(gint) GST_MPEGTS_AUDIO_TYPE_CLEAN_EFFECTS", "1"), + ("(gint) GST_MPEGTS_AUDIO_TYPE_HEARING_IMPAIRED", "2"), + ("(gint) GST_MPEGTS_AUDIO_TYPE_UNDEFINED", "0"), + ( + "(gint) GST_MPEGTS_AUDIO_TYPE_VISUAL_IMPAIRED_COMMENTARY", + "3", + ), + ("(gint) GST_MPEGTS_CABLE_OUTER_FEC_NONE", "1"), + ("(gint) GST_MPEGTS_CABLE_OUTER_FEC_RS_204_188", "2"), + ("(gint) GST_MPEGTS_CABLE_OUTER_FEC_UNDEFINED", "0"), + ("(gint) GST_MPEGTS_CONTENT_ARTS_CULTURE", "7"), + ("(gint) GST_MPEGTS_CONTENT_CHILDREN_YOUTH_PROGRAM", "5"), + ("(gint) GST_MPEGTS_CONTENT_EDUCATION_SCIENCE_FACTUAL", "9"), + ("(gint) GST_MPEGTS_CONTENT_LEISURE_HOBBIES", "10"), + ("(gint) GST_MPEGTS_CONTENT_MOVIE_DRAMA", "1"), + ("(gint) GST_MPEGTS_CONTENT_MUSIC_BALLET_DANCE", "6"), + ("(gint) GST_MPEGTS_CONTENT_NEWS_CURRENT_AFFAIRS", "2"), + ("(gint) GST_MPEGTS_CONTENT_SHOW_GAME_SHOW", "3"), + ("(gint) GST_MPEGTS_CONTENT_SOCIAL_POLITICAL_ECONOMICS", "8"), + ("(gint) GST_MPEGTS_CONTENT_SPECIAL_CHARACTERISTICS", "11"), + ("(gint) GST_MPEGTS_CONTENT_SPORTS", "4"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_CA_REPLACEMENT", "3"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_DATA_BROADCAST", "6"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_EPG", "2"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_EVENT", "13"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_EXTENDED_EVENT", "14"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_HAND_OVER_ASSOCIATED", "3"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_HAND_OVER_IDENTICAL", "1"), + ( + "(gint) GST_MPEGTS_DVB_LINKAGE_HAND_OVER_LOCAL_VARIATION", + "2", + ), + ("(gint) GST_MPEGTS_DVB_LINKAGE_HAND_OVER_RESERVED", "0"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_INFORMATION", "1"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_IP_MAC_NOTIFICATION", "11"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_MOBILE_HAND_OVER", "8"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_RCS_MAP", "7"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_RESERVED_00", "0"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_SERVICE_REPLACEMENT", "5"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_SYSTEM_SOFTWARE_UPDATE", "9"), + ( + "(gint) GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_COMPLETE_SI", + "4", + ), + ("(gint) GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_INT", "12"), + ("(gint) GST_MPEGTS_DVB_LINKAGE_TS_CONTAINING_SSU", "10"), + ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_0", "112"), + ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_F", "127"), + ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CISSA", "16"), + ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA1", "1"), + ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA2", "2"), + ( + "(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_FULL_ENHANCED", + "5", + ), + ( + "(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_MINIMAL_ENHANCED", + "4", + ), + ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_STANDARD", "3"), + ("(gint) GST_MPEGTS_DVB_SCRAMBLING_MODE_RESERVED", "0"), + ("(gint) GST_MPEGTS_FEC_1_2", "1"), + ("(gint) GST_MPEGTS_FEC_2_3", "2"), + ("(gint) GST_MPEGTS_FEC_2_5", "12"), + ("(gint) GST_MPEGTS_FEC_3_4", "3"), + ("(gint) GST_MPEGTS_FEC_3_5", "10"), + ("(gint) GST_MPEGTS_FEC_4_5", "4"), + ("(gint) GST_MPEGTS_FEC_5_6", "5"), + ("(gint) GST_MPEGTS_FEC_6_7", "6"), + ("(gint) GST_MPEGTS_FEC_7_8", "7"), + ("(gint) GST_MPEGTS_FEC_8_9", "8"), + ("(gint) GST_MPEGTS_FEC_9_10", "11"), + ("(gint) GST_MPEGTS_FEC_AUTO", "9"), + ("(gint) GST_MPEGTS_FEC_NONE", "0"), + ("(gint) GST_MPEGTS_GUARD_INTERVAL_19_128", "6"), + ("(gint) GST_MPEGTS_GUARD_INTERVAL_19_256", "7"), + ("(gint) GST_MPEGTS_GUARD_INTERVAL_1_128", "5"), + ("(gint) GST_MPEGTS_GUARD_INTERVAL_1_16", "1"), + ("(gint) GST_MPEGTS_GUARD_INTERVAL_1_32", "0"), + ("(gint) GST_MPEGTS_GUARD_INTERVAL_1_4", "3"), + ("(gint) GST_MPEGTS_GUARD_INTERVAL_1_8", "2"), + ("(gint) GST_MPEGTS_GUARD_INTERVAL_AUTO", "4"), + ("(gint) GST_MPEGTS_GUARD_INTERVAL_PN420", "8"), + ("(gint) GST_MPEGTS_GUARD_INTERVAL_PN595", "9"), + ("(gint) GST_MPEGTS_GUARD_INTERVAL_PN945", "10"), + ("(gint) GST_MPEGTS_HIERARCHY_1", "1"), + ("(gint) GST_MPEGTS_HIERARCHY_2", "2"), + ("(gint) GST_MPEGTS_HIERARCHY_4", "3"), + ("(gint) GST_MPEGTS_HIERARCHY_AUTO", "4"), + ("(gint) GST_MPEGTS_HIERARCHY_NONE", "0"), + ("(gint) GST_MPEGTS_MODULATION_APSK_16", "10"), + ("(gint) GST_MPEGTS_MODULATION_APSK_32", "11"), + ("(gint) GST_MPEGTS_MODULATION_DQPSK", "12"), + ("(gint) GST_MPEGTS_MODULATION_NONE", "14"), + ("(gint) GST_MPEGTS_MODULATION_PSK_8", "9"), + ("(gint) GST_MPEGTS_MODULATION_QAM_128", "4"), + ("(gint) GST_MPEGTS_MODULATION_QAM_16", "1"), + ("(gint) GST_MPEGTS_MODULATION_QAM_256", "5"), + ("(gint) GST_MPEGTS_MODULATION_QAM_32", "2"), + ("(gint) GST_MPEGTS_MODULATION_QAM_4_NR_", "13"), + ("(gint) GST_MPEGTS_MODULATION_QAM_64", "3"), + ("(gint) GST_MPEGTS_MODULATION_QAM_AUTO", "6"), + ("(gint) GST_MPEGTS_MODULATION_QPSK", "0"), + ("(gint) GST_MPEGTS_MODULATION_VSB_16", "8"), + ("(gint) GST_MPEGTS_MODULATION_VSB_8", "7"), + ("(gint) GST_MPEGTS_POLARIZATION_CIRCULAR_LEFT", "2"), + ("(gint) GST_MPEGTS_POLARIZATION_CIRCULAR_RIGHT", "3"), + ("(gint) GST_MPEGTS_POLARIZATION_LINEAR_HORIZONTAL", "0"), + ("(gint) GST_MPEGTS_POLARIZATION_LINEAR_VERTICAL", "1"), + ("(gint) GST_MPEGTS_ROLLOFF_20", "1"), + ("(gint) GST_MPEGTS_ROLLOFF_25", "2"), + ("(gint) GST_MPEGTS_ROLLOFF_35", "0"), + ("(gint) GST_MPEGTS_ROLLOFF_AUTO", "4"), + ("(gint) GST_MPEGTS_ROLLOFF_RESERVED", "3"), + ("(gint) GST_MPEGTS_RUNNING_STATUS_NOT_RUNNING", "1"), + ("(gint) GST_MPEGTS_RUNNING_STATUS_OFF_AIR", "5"), + ("(gint) GST_MPEGTS_RUNNING_STATUS_PAUSING", "3"), + ("(gint) GST_MPEGTS_RUNNING_STATUS_RUNNING", "4"), + ( + "(gint) GST_MPEGTS_RUNNING_STATUS_STARTS_IN_FEW_SECONDS", + "2", + ), + ("(gint) GST_MPEGTS_RUNNING_STATUS_UNDEFINED", "0"), + ("(gint) GST_MPEGTS_SECTION_ATSC_CVCT", "12"), + ("(gint) GST_MPEGTS_SECTION_ATSC_EIT", "15"), + ("(gint) GST_MPEGTS_SECTION_ATSC_ETT", "14"), + ("(gint) GST_MPEGTS_SECTION_ATSC_MGT", "13"), + ("(gint) GST_MPEGTS_SECTION_ATSC_RRT", "17"), + ("(gint) GST_MPEGTS_SECTION_ATSC_STT", "16"), + ("(gint) GST_MPEGTS_SECTION_ATSC_TVCT", "11"), + ("(gint) GST_MPEGTS_SECTION_BAT", "7"), + ("(gint) GST_MPEGTS_SECTION_CAT", "3"), + ("(gint) GST_MPEGTS_SECTION_EIT", "5"), + ("(gint) GST_MPEGTS_SECTION_NIT", "6"), + ("(gint) GST_MPEGTS_SECTION_PAT", "1"), + ("(gint) GST_MPEGTS_SECTION_PMT", "2"), + ("(gint) GST_MPEGTS_SECTION_SCTE_SIT", "18"), + ("(gint) GST_MPEGTS_SECTION_SDT", "8"), + ("(gint) GST_MPEGTS_SECTION_TDT", "9"), + ("(gint) GST_MPEGTS_SECTION_TOT", "10"), + ("(gint) GST_MPEGTS_SECTION_TSDT", "4"), + ("(gint) GST_MPEGTS_SECTION_UNKNOWN", "0"), + ("(gint) GST_MPEGTS_STREAM_CONTENT_AAC", "6"), + ("(gint) GST_MPEGTS_STREAM_CONTENT_AC_3", "4"), + ("(gint) GST_MPEGTS_STREAM_CONTENT_AVC", "5"), + ("(gint) GST_MPEGTS_STREAM_CONTENT_DTS", "7"), + ("(gint) GST_MPEGTS_STREAM_CONTENT_MPEG1_LAYER2_AUDIO", "2"), + ("(gint) GST_MPEGTS_STREAM_CONTENT_MPEG2_VIDEO", "1"), + ("(gint) GST_MPEGTS_STREAM_CONTENT_SRM_CPCM", "8"), + ("(gint) GST_MPEGTS_STREAM_CONTENT_TELETEXT_OR_SUBTITLE", "3"), + ("(gint) GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_ADTS", "15"), + ("(gint) GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_CLEAN", "28"), + ("(gint) GST_MPEGTS_STREAM_TYPE_AUDIO_AAC_LATM", "17"), + ("(gint) GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG1", "3"), + ("(gint) GST_MPEGTS_STREAM_TYPE_AUDIO_MPEG2", "4"), + ("(gint) GST_MPEGTS_STREAM_TYPE_AUXILIARY", "14"), + ("(gint) GST_MPEGTS_STREAM_TYPE_DSMCC_A", "10"), + ("(gint) GST_MPEGTS_STREAM_TYPE_DSMCC_B", "11"), + ("(gint) GST_MPEGTS_STREAM_TYPE_DSMCC_C", "12"), + ("(gint) GST_MPEGTS_STREAM_TYPE_DSMCC_D", "13"), + ("(gint) GST_MPEGTS_STREAM_TYPE_DSM_CC", "8"), + ("(gint) GST_MPEGTS_STREAM_TYPE_H_222_1", "9"), + ("(gint) GST_MPEGTS_STREAM_TYPE_IPMP_STREAM", "127"), + ("(gint) GST_MPEGTS_STREAM_TYPE_METADATA_DATA_CAROUSEL", "23"), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_METADATA_OBJECT_CAROUSEL", + "24", + ), + ("(gint) GST_MPEGTS_STREAM_TYPE_METADATA_PES_PACKETS", "21"), + ("(gint) GST_MPEGTS_STREAM_TYPE_METADATA_SECTIONS", "22"), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_METADATA_SYNCHRONIZED_DOWNLOAD", + "25", + ), + ("(gint) GST_MPEGTS_STREAM_TYPE_MHEG", "7"), + ("(gint) GST_MPEGTS_STREAM_TYPE_MPEG2_IPMP", "26"), + ("(gint) GST_MPEGTS_STREAM_TYPE_MPEG4_TIMED_TEXT", "29"), + ("(gint) GST_MPEGTS_STREAM_TYPE_PRIVATE_PES_PACKETS", "6"), + ("(gint) GST_MPEGTS_STREAM_TYPE_PRIVATE_SECTIONS", "5"), + ("(gint) GST_MPEGTS_STREAM_TYPE_RESERVED_00", "0"), + ("(gint) GST_MPEGTS_STREAM_TYPE_SCTE_ASYNC_DATA", "195"), + ("(gint) GST_MPEGTS_STREAM_TYPE_SCTE_DSMCC_DCB", "176"), + ("(gint) GST_MPEGTS_STREAM_TYPE_SCTE_DST_NRT", "149"), + ("(gint) GST_MPEGTS_STREAM_TYPE_SCTE_ISOCH_DATA", "131"), + ("(gint) GST_MPEGTS_STREAM_TYPE_SCTE_SIGNALING", "192"), + ("(gint) GST_MPEGTS_STREAM_TYPE_SCTE_SIT", "134"), + ("(gint) GST_MPEGTS_STREAM_TYPE_SCTE_SUBTITLING", "130"), + ("(gint) GST_MPEGTS_STREAM_TYPE_SCTE_SYNC_DATA", "194"), + ("(gint) GST_MPEGTS_STREAM_TYPE_SL_FLEXMUX_PES_PACKETS", "18"), + ("(gint) GST_MPEGTS_STREAM_TYPE_SL_FLEXMUX_SECTIONS", "19"), + ("(gint) GST_MPEGTS_STREAM_TYPE_SYNCHRONIZED_DOWNLOAD", "20"), + ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_H264", "27"), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_H264_MVC_SUB_BITSTREAM", + "32", + ), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_H264_STEREO_ADDITIONAL_VIEW", + "35", + ), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_H264_SVC_SUB_BITSTREAM", + "31", + ), + ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_HEVC", "36"), + ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_JP2K", "33"), + ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG1", "1"), + ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2", "2"), + ( + "(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG2_STEREO_ADDITIONAL_VIEW", + "34", + ), + ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_MPEG4", "16"), + ("(gint) GST_MPEGTS_STREAM_TYPE_VIDEO_RVC", "30"), + ("(gint) GST_MPEGTS_TRANSMISSION_MODE_16K", "5"), + ("(gint) GST_MPEGTS_TRANSMISSION_MODE_1K", "4"), + ("(gint) GST_MPEGTS_TRANSMISSION_MODE_2K", "0"), + ("(gint) GST_MPEGTS_TRANSMISSION_MODE_32K", "6"), + ("(gint) GST_MPEGTS_TRANSMISSION_MODE_4K", "3"), + ("(gint) GST_MPEGTS_TRANSMISSION_MODE_8K", "1"), + ("(gint) GST_MPEGTS_TRANSMISSION_MODE_AUTO", "2"), + ("(gint) GST_MPEGTS_TRANSMISSION_MODE_C1", "7"), + ("(gint) GST_MPEGTS_TRANSMISSION_MODE_C3780", "8"), + ("(gint) GST_MTS_DESC_AC3_AUDIO_STREAM", "129"), + ("(gint) GST_MTS_DESC_ATSC_AC3", "131"), + ("(gint) GST_MTS_DESC_ATSC_CAPTION_SERVICE", "134"), + ("(gint) GST_MTS_DESC_ATSC_COMPONENT_NAME", "163"), + ("(gint) GST_MTS_DESC_ATSC_CONTENT_ADVISORY", "135"), + ("(gint) GST_MTS_DESC_ATSC_CRC32", "181"), + ("(gint) GST_MTS_DESC_ATSC_DATA_SERVICE", "164"), + ("(gint) GST_MTS_DESC_ATSC_DCC_ARRIVING_REQUEST", "169"), + ("(gint) GST_MTS_DESC_ATSC_DCC_DEPARTING_REQUEST", "168"), + ("(gint) GST_MTS_DESC_ATSC_DOWNLOAD_DESCRIPTOR", "166"), + ("(gint) GST_MTS_DESC_ATSC_EAC3", "204"), + ("(gint) GST_MTS_DESC_ATSC_ENHANCED_SIGNALING", "178"), + ("(gint) GST_MTS_DESC_ATSC_EXTENDED_CHANNEL_NAME", "160"), + ("(gint) GST_MTS_DESC_ATSC_GENRE", "171"), + ("(gint) GST_MTS_DESC_ATSC_GROUP_LINK", "184"), + ("(gint) GST_MTS_DESC_ATSC_MODULE_LINK", "180"), + ( + "(gint) GST_MTS_DESC_ATSC_MULTIPROTOCOL_ENCAPSULATION", + "167", + ), + ("(gint) GST_MTS_DESC_ATSC_PID_COUNT", "165"), + ("(gint) GST_MTS_DESC_ATSC_PRIVATE_INFORMATION", "173"), + ("(gint) GST_MTS_DESC_ATSC_REDISTRIBUTION_CONTROL", "170"), + ("(gint) GST_MTS_DESC_ATSC_SERVICE_LOCATION", "161"), + ("(gint) GST_MTS_DESC_ATSC_STUFFING", "128"), + ("(gint) GST_MTS_DESC_ATSC_TIME_SHIFTED_SERVICE", "162"), + ("(gint) GST_MTS_DESC_AUDIO_STREAM", "3"), + ("(gint) GST_MTS_DESC_AUXILIARY_VIDEO_STREAM", "47"), + ("(gint) GST_MTS_DESC_AVC_TIMING_AND_HRD", "42"), + ("(gint) GST_MTS_DESC_AVC_VIDEO", "40"), + ("(gint) GST_MTS_DESC_CA", "9"), + ("(gint) GST_MTS_DESC_CONTENT_LABELING", "36"), + ("(gint) GST_MTS_DESC_COPYRIGHT", "13"), + ("(gint) GST_MTS_DESC_DATA_STREAM_ALIGNMENT", "6"), + ("(gint) GST_MTS_DESC_DSMCC_ASSOCIATION_TAG", "20"), + ("(gint) GST_MTS_DESC_DSMCC_CAROUSEL_IDENTIFIER", "19"), + ("(gint) GST_MTS_DESC_DSMCC_DEFERRED_ASSOCIATION_TAG", "21"), + ("(gint) GST_MTS_DESC_DSMCC_NPT_ENDPOINT", "24"), + ("(gint) GST_MTS_DESC_DSMCC_NPT_REFERENCE", "23"), + ("(gint) GST_MTS_DESC_DSMCC_STREAM_EVENT", "26"), + ("(gint) GST_MTS_DESC_DSMCC_STREAM_MODE", "25"), + ("(gint) GST_MTS_DESC_DTG_LOGICAL_CHANNEL", "131"), + ("(gint) GST_MTS_DESC_DVB_AAC", "124"), + ("(gint) GST_MTS_DESC_DVB_AC3", "106"), + ("(gint) GST_MTS_DESC_DVB_ADAPTATION_FIELD_DATA", "112"), + ("(gint) GST_MTS_DESC_DVB_ANCILLARY_DATA", "107"), + ("(gint) GST_MTS_DESC_DVB_ANNOUNCEMENT_SUPPORT", "110"), + ("(gint) GST_MTS_DESC_DVB_APPLICATION_SIGNALLING", "111"), + ("(gint) GST_MTS_DESC_DVB_BOUQUET_NAME", "71"), + ("(gint) GST_MTS_DESC_DVB_CABLE_DELIVERY_SYSTEM", "68"), + ("(gint) GST_MTS_DESC_DVB_CA_IDENTIFIER", "83"), + ("(gint) GST_MTS_DESC_DVB_CELL_FREQUENCY_LINK", "109"), + ("(gint) GST_MTS_DESC_DVB_CELL_LIST", "108"), + ("(gint) GST_MTS_DESC_DVB_COMPONENT", "80"), + ("(gint) GST_MTS_DESC_DVB_CONTENT", "84"), + ("(gint) GST_MTS_DESC_DVB_CONTENT_IDENTIFIER", "118"), + ("(gint) GST_MTS_DESC_DVB_COUNTRY_AVAILABILITY", "73"), + ("(gint) GST_MTS_DESC_DVB_DATA_BROADCAST", "100"), + ("(gint) GST_MTS_DESC_DVB_DATA_BROADCAST_ID", "102"), + ("(gint) GST_MTS_DESC_DVB_DEFAULT_AUTHORITY", "115"), + ("(gint) GST_MTS_DESC_DVB_DSNG", "104"), + ("(gint) GST_MTS_DESC_DVB_DTS", "123"), + ("(gint) GST_MTS_DESC_DVB_ECM_REPETITION_RATE", "120"), + ("(gint) GST_MTS_DESC_DVB_ENHANCED_AC3", "122"), + ("(gint) GST_MTS_DESC_DVB_EXTENDED_EVENT", "78"), + ("(gint) GST_MTS_DESC_DVB_EXTENSION", "127"), + ("(gint) GST_MTS_DESC_DVB_FREQUENCY_LIST", "98"), + ("(gint) GST_MTS_DESC_DVB_FTA_CONTENT_MANAGEMENT", "126"), + ("(gint) GST_MTS_DESC_DVB_LINKAGE", "74"), + ("(gint) GST_MTS_DESC_DVB_LOCAL_TIME_OFFSET", "88"), + ("(gint) GST_MTS_DESC_DVB_MOSAIC", "81"), + ("(gint) GST_MTS_DESC_DVB_MULTILINGUAL_BOUQUET_NAME", "92"), + ("(gint) GST_MTS_DESC_DVB_MULTILINGUAL_COMPONENT", "94"), + ("(gint) GST_MTS_DESC_DVB_MULTILINGUAL_NETWORK_NAME", "91"), + ("(gint) GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME", "93"), + ("(gint) GST_MTS_DESC_DVB_NETWORK_NAME", "64"), + ("(gint) GST_MTS_DESC_DVB_NVOD_REFERENCE", "75"), + ("(gint) GST_MTS_DESC_DVB_PARENTAL_RATING", "85"), + ("(gint) GST_MTS_DESC_DVB_PARTIAL_TRANSPORT_STREAM", "99"), + ("(gint) GST_MTS_DESC_DVB_PDC", "105"), + ("(gint) GST_MTS_DESC_DVB_PRIVATE_DATA_SPECIFIER", "95"), + ("(gint) GST_MTS_DESC_DVB_RELATED_CONTENT", "116"), + ( + "(gint) GST_MTS_DESC_DVB_S2_SATELLITE_DELIVERY_SYSTEM", + "121", + ), + ("(gint) GST_MTS_DESC_DVB_SATELLITE_DELIVERY_SYSTEM", "67"), + ("(gint) GST_MTS_DESC_DVB_SCRAMBLING", "101"), + ("(gint) GST_MTS_DESC_DVB_SERVICE", "72"), + ("(gint) GST_MTS_DESC_DVB_SERVICE_AVAILABILITY", "114"), + ("(gint) GST_MTS_DESC_DVB_SERVICE_IDENTIFIER", "113"), + ("(gint) GST_MTS_DESC_DVB_SERVICE_LIST", "65"), + ("(gint) GST_MTS_DESC_DVB_SERVICE_MOVE", "96"), + ("(gint) GST_MTS_DESC_DVB_SHORT_EVENT", "77"), + ("(gint) GST_MTS_DESC_DVB_SHORT_SMOOTHING_BUFFER", "97"), + ("(gint) GST_MTS_DESC_DVB_STREAM_IDENTIFIER", "82"), + ("(gint) GST_MTS_DESC_DVB_STUFFING", "66"), + ("(gint) GST_MTS_DESC_DVB_SUBTITLING", "89"), + ("(gint) GST_MTS_DESC_DVB_TELEPHONE", "87"), + ("(gint) GST_MTS_DESC_DVB_TELETEXT", "86"), + ("(gint) GST_MTS_DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM", "90"), + ("(gint) GST_MTS_DESC_DVB_TIMESLICE_FEC_IDENTIFIER", "119"), + ("(gint) GST_MTS_DESC_DVB_TIME_SHIFTED_EVENT", "79"), + ("(gint) GST_MTS_DESC_DVB_TIME_SHIFTED_SERVICE", "76"), + ("(gint) GST_MTS_DESC_DVB_TRANSPORT_STREAM", "103"), + ("(gint) GST_MTS_DESC_DVB_TVA_ID", "117"), + ("(gint) GST_MTS_DESC_DVB_VBI_DATA", "69"), + ("(gint) GST_MTS_DESC_DVB_VBI_TELETEXT", "70"), + ("(gint) GST_MTS_DESC_DVB_XAIT_LOCATION", "125"), + ("(gint) GST_MTS_DESC_EXTERNAL_ES_ID", "32"), + ("(gint) GST_MTS_DESC_EXT_DVB_AC4", "21"), + ("(gint) GST_MTS_DESC_EXT_DVB_C2_DELIVERY_SYSTEM", "13"), + ("(gint) GST_MTS_DESC_EXT_DVB_CP", "2"), + ("(gint) GST_MTS_DESC_EXT_DVB_CPCM_DELIVERY_SIGNALLING", "1"), + ("(gint) GST_MTS_DESC_EXT_DVB_CP_IDENTIFIER", "3"), + ("(gint) GST_MTS_DESC_EXT_DVB_DTS_HD_AUDIO_STREAM", "14"), + ("(gint) GST_MTS_DESC_EXT_DVB_DTS_NEUTRAL", "15"), + ("(gint) GST_MTS_DESC_EXT_DVB_IMAGE_ICON", "0"), + ("(gint) GST_MTS_DESC_EXT_DVB_MESSAGE", "8"), + ("(gint) GST_MTS_DESC_EXT_DVB_NETWORK_CHANGE_NOTIFY", "7"), + ("(gint) GST_MTS_DESC_EXT_DVB_SERVICE_RELOCATED", "11"), + ("(gint) GST_MTS_DESC_EXT_DVB_SH_DELIVERY_SYSTEM", "5"), + ("(gint) GST_MTS_DESC_EXT_DVB_SUPPLEMENTARY_AUDIO", "6"), + ("(gint) GST_MTS_DESC_EXT_DVB_T2MI", "17"), + ("(gint) GST_MTS_DESC_EXT_DVB_T2_DELIVERY_SYSTEM", "4"), + ("(gint) GST_MTS_DESC_EXT_DVB_TARGET_REGION", "9"), + ("(gint) GST_MTS_DESC_EXT_DVB_TARGET_REGION_NAME", "10"), + ("(gint) GST_MTS_DESC_EXT_DVB_URI_LINKAGE", "19"), + ("(gint) GST_MTS_DESC_EXT_DVB_VIDEO_DEPTH_RANGE", "16"), + ("(gint) GST_MTS_DESC_EXT_DVB_XAIT_PID", "12"), + ("(gint) GST_MTS_DESC_FLEX_MUX_TIMING", "44"), + ("(gint) GST_MTS_DESC_FMC", "31"), + ("(gint) GST_MTS_DESC_FMX_BUFFER_SIZE", "34"), + ("(gint) GST_MTS_DESC_HIERARCHY", "4"), + ("(gint) GST_MTS_DESC_IBP", "18"), + ("(gint) GST_MTS_DESC_IOD", "29"), + ("(gint) GST_MTS_DESC_IPMP", "41"), + ("(gint) GST_MTS_DESC_ISDB_AUDIO_COMPONENT", "196"), + ("(gint) GST_MTS_DESC_ISDB_BASIC_LOCAL_EVENT", "208"), + ("(gint) GST_MTS_DESC_ISDB_BOARD_INFORMATION", "219"), + ("(gint) GST_MTS_DESC_ISDB_BROADCASTER_NAME", "216"), + ("(gint) GST_MTS_DESC_ISDB_CA_CONTRACT_INFORMATION", "203"), + ("(gint) GST_MTS_DESC_ISDB_CA_EMM_TS", "202"), + ("(gint) GST_MTS_DESC_ISDB_CA_SERVICE", "204"), + ("(gint) GST_MTS_DESC_ISDB_COMPONENT_GROUP", "217"), + ("(gint) GST_MTS_DESC_ISDB_CONNECTED_TRANSMISSION", "221"), + ("(gint) GST_MTS_DESC_ISDB_CONTENT_AVAILABILITY", "222"), + ("(gint) GST_MTS_DESC_ISDB_DATA_CONTENT", "199"), + ("(gint) GST_MTS_DESC_ISDB_DIGITAL_COPY_CONTROL", "193"), + ("(gint) GST_MTS_DESC_ISDB_DOWNLOAD_CONTENT", "201"), + ("(gint) GST_MTS_DESC_ISDB_EVENT_GROUP", "214"), + ("(gint) GST_MTS_DESC_ISDB_EXTENDED_BROADCASTER", "206"), + ("(gint) GST_MTS_DESC_ISDB_HIERARCHICAL_TRANSMISSION", "192"), + ("(gint) GST_MTS_DESC_ISDB_HYPERLINK", "197"), + ("(gint) GST_MTS_DESC_ISDB_LDT_LINKAGE", "220"), + ("(gint) GST_MTS_DESC_ISDB_LOGO_TRANSMISSION", "207"), + ("(gint) GST_MTS_DESC_ISDB_NETWORK_IDENTIFICATION", "194"), + ("(gint) GST_MTS_DESC_ISDB_NODE_RELATION", "210"), + ("(gint) GST_MTS_DESC_ISDB_PARTIAL_TS_TIME", "195"), + ("(gint) GST_MTS_DESC_ISDB_REFERENCE", "209"), + ("(gint) GST_MTS_DESC_ISDB_SERIES", "213"), + ("(gint) GST_MTS_DESC_ISDB_SERVICE_GROUP", "224"), + ("(gint) GST_MTS_DESC_ISDB_SHORT_NODE_INFORMATION", "211"), + ("(gint) GST_MTS_DESC_ISDB_SI_PARAMETER", "215"), + ("(gint) GST_MTS_DESC_ISDB_SI_PRIME_TS", "218"), + ("(gint) GST_MTS_DESC_ISDB_STC_REFERENCE", "212"), + ("(gint) GST_MTS_DESC_ISDB_TARGET_REGION", "198"), + ("(gint) GST_MTS_DESC_ISDB_TS_INFORMATION", "205"), + ("(gint) GST_MTS_DESC_ISDB_VIDEO_DECODE_CONTROL", "200"), + ("(gint) GST_MTS_DESC_ISO_639_LANGUAGE", "10"), + ("(gint) GST_MTS_DESC_J2K_VIDEO", "50"), + ("(gint) GST_MTS_DESC_MAXIMUM_BITRATE", "14"), + ("(gint) GST_MTS_DESC_METADATA", "38"), + ("(gint) GST_MTS_DESC_METADATA_POINTER", "37"), + ("(gint) GST_MTS_DESC_METADATA_STD", "39"), + ("(gint) GST_MTS_DESC_MPEG2_AAC_AUDIO", "43"), + ("(gint) GST_MTS_DESC_MPEG2_STEREOSCOPIC_VIDEO_FORMAT", "52"), + ("(gint) GST_MTS_DESC_MPEG4_AUDIO", "28"), + ("(gint) GST_MTS_DESC_MPEG4_AUDIO_EXTENSION", "46"), + ("(gint) GST_MTS_DESC_MPEG4_TEXT", "45"), + ("(gint) GST_MTS_DESC_MPEG4_VIDEO", "27"), + ("(gint) GST_MTS_DESC_MULTIPLEX_BUFFER", "35"), + ("(gint) GST_MTS_DESC_MULTIPLEX_BUFFER_UTILISATION", "12"), + ("(gint) GST_MTS_DESC_MUX_CODE", "33"), + ("(gint) GST_MTS_DESC_MVC_EXTENSION", "49"), + ("(gint) GST_MTS_DESC_MVC_OPERATION_POINT", "51"), + ("(gint) GST_MTS_DESC_PRIVATE_DATA_INDICATOR", "15"), + ("(gint) GST_MTS_DESC_REGISTRATION", "5"), + ("(gint) GST_MTS_DESC_RESERVED_00", "0"), + ("(gint) GST_MTS_DESC_RESERVED_01", "1"), + ("(gint) GST_MTS_DESC_SL", "30"), + ("(gint) GST_MTS_DESC_SMOOTHING_BUFFER", "16"), + ("(gint) GST_MTS_DESC_STD", "17"), + ("(gint) GST_MTS_DESC_STEREOSCOPIC_PROGRAM_INFO", "53"), + ("(gint) GST_MTS_DESC_STEREOSCOPIC_VIDEO_INFO", "54"), + ("(gint) GST_MTS_DESC_SVC_EXTENSION", "48"), + ("(gint) GST_MTS_DESC_SYSTEM_CLOCK", "11"), + ("(gint) GST_MTS_DESC_TARGET_BACKGROUND_GRID", "7"), + ("(gint) GST_MTS_DESC_VIDEO_STREAM", "2"), + ("(gint) GST_MTS_DESC_VIDEO_WINDOW", "8"), + ("(gint) GST_MTS_SCTE_DESC_AUDIO", "4"), + ("(gint) GST_MTS_SCTE_DESC_AVAIL", "0"), + ("(gint) GST_MTS_SCTE_DESC_DTMF", "1"), + ("(gint) GST_MTS_SCTE_DESC_SEGMENTATION", "2"), + ("(gint) GST_MTS_SCTE_DESC_TIME", "3"), + ("(gint) GST_MTS_SCTE_SPLICE_COMMAND_BANDWIDTH", "7"), + ("(gint) GST_MTS_SCTE_SPLICE_COMMAND_INSERT", "5"), + ("(gint) GST_MTS_SCTE_SPLICE_COMMAND_NULL", "0"), + ("(gint) GST_MTS_SCTE_SPLICE_COMMAND_PRIVATE", "255"), + ("(gint) GST_MTS_SCTE_SPLICE_COMMAND_SCHEDULE", "4"), + ("(gint) GST_MTS_SCTE_SPLICE_COMMAND_TIME", "6"), + ("(gint) GST_MTS_TABLE_ID_14496_OBJET_DESCRIPTOR", "5"), + ("(gint) GST_MTS_TABLE_ID_14496_SCENE_DESCRIPTION", "4"), + ( + "(gint) GST_MTS_TABLE_ID_APPLICATION_INFORMATION_TABLE", + "116", + ), + ("(gint) GST_MTS_TABLE_ID_ATSC_AGGREGATE_DATA_EVENT", "217"), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_AGGREGATE_EVENT_INFORMATION", + "214", + ), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_AGGREGATE_EXTENDED_TEXT", + "215", + ), + ("(gint) GST_MTS_TABLE_ID_ATSC_CABLE_VIRTUAL_CHANNEL", "201"), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_CHANNEL_OR_EVENT_EXTENDED_TEXT", + "204", + ), + ("(gint) GST_MTS_TABLE_ID_ATSC_DATA_EVENT", "206"), + ("(gint) GST_MTS_TABLE_ID_ATSC_DATA_SERVICE", "207"), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE", + "211", + ), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_DIRECTED_CHANNEL_CHANGE_SECTION_CODE", + "212", + ), + ("(gint) GST_MTS_TABLE_ID_ATSC_EVENT_INFORMATION", "203"), + ("(gint) GST_MTS_TABLE_ID_ATSC_LONG_TERM_SERVICE", "210"), + ("(gint) GST_MTS_TABLE_ID_ATSC_MASTER_GUIDE", "199"), + ("(gint) GST_MTS_TABLE_ID_ATSC_NETWORK_RESOURCE", "209"), + ("(gint) GST_MTS_TABLE_ID_ATSC_RATING_REGION", "202"), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_SATELLITE_VIRTUAL_CHANNEL", + "218", + ), + ("(gint) GST_MTS_TABLE_ID_ATSC_SYSTEM_TIME", "205"), + ( + "(gint) GST_MTS_TABLE_ID_ATSC_TERRESTRIAL_VIRTUAL_CHANNEL", + "200", + ), + ("(gint) GST_MTS_TABLE_ID_BOUQUET_ASSOCIATION", "74"), + ("(gint) GST_MTS_TABLE_ID_CA_MESSAGE_ECM_0", "128"), + ("(gint) GST_MTS_TABLE_ID_CA_MESSAGE_ECM_1", "129"), + ("(gint) GST_MTS_TABLE_ID_CA_MESSAGE_SYSTEM_PRIVATE_1", "130"), + ("(gint) GST_MTS_TABLE_ID_CA_MESSAGE_SYSTEM_PRIVATE_N", "143"), + ("(gint) GST_MTS_TABLE_ID_CMT", "164"), + ("(gint) GST_MTS_TABLE_ID_CONDITIONAL_ACCESS", "1"), + ("(gint) GST_MTS_TABLE_ID_CONTAINER", "117"), + ("(gint) GST_MTS_TABLE_ID_CONTENT_IDENTIFIER", "119"), + ("(gint) GST_MTS_TABLE_ID_DISCONTINUITY_INFORMATION", "126"), + ("(gint) GST_MTS_TABLE_ID_DSM_CC_ADDRESSABLE_SECTIONS", "63"), + ( + "(gint) GST_MTS_TABLE_ID_DSM_CC_DOWNLOAD_DATA_MESSAGES", + "60", + ), + ( + "(gint) GST_MTS_TABLE_ID_DSM_CC_MULTIPROTO_ENCAPSULATED_DATA", + "58", + ), + ("(gint) GST_MTS_TABLE_ID_DSM_CC_PRIVATE_DATA", "62"), + ("(gint) GST_MTS_TABLE_ID_DSM_CC_STREAM_DESCRIPTORS", "61"), + ("(gint) GST_MTS_TABLE_ID_DSM_CC_U_N_MESSAGES", "59"), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_PRESENT", + "78", + ), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_1", + "80", + ), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_N", + "95", + ), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_PRESENT", + "79", + ), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_SCHEDULE_1", + "96", + ), + ( + "(gint) GST_MTS_TABLE_ID_EVENT_INFORMATION_OTHER_TS_SCHEDULE_N", + "111", + ), + ("(gint) GST_MTS_TABLE_ID_FCT", "161"), + ("(gint) GST_MTS_TABLE_ID_IPMP_CONTROL_INFORMATION", "7"), + ("(gint) GST_MTS_TABLE_ID_LL_FEC_PARITY_DATA_TABLE", "177"), + ("(gint) GST_MTS_TABLE_ID_METADATA", "6"), + ("(gint) GST_MTS_TABLE_ID_MPE_FEC", "120"), + ("(gint) GST_MTS_TABLE_ID_MPE_IFEC", "122"), + ( + "(gint) GST_MTS_TABLE_ID_NETWORK_INFORMATION_ACTUAL_NETWORK", + "64", + ), + ( + "(gint) GST_MTS_TABLE_ID_NETWORK_INFORMATION_OTHER_NETWORK", + "65", + ), + ("(gint) GST_MTS_TABLE_ID_PCR_PACKET_PAYLOAD", "166"), + ("(gint) GST_MTS_TABLE_ID_PROGRAM_ASSOCIATION", "0"), + ("(gint) GST_MTS_TABLE_ID_RELATED_CONTENT", "118"), + ("(gint) GST_MTS_TABLE_ID_RESOLUTION_NOTIFICATION", "121"), + ("(gint) GST_MTS_TABLE_ID_RUNNING_STATUS", "113"), + ("(gint) GST_MTS_TABLE_ID_SCT", "160"), + ("(gint) GST_MTS_TABLE_ID_SCTE_DDB", "228"), + ("(gint) GST_MTS_TABLE_ID_SCTE_DII", "227"), + ("(gint) GST_MTS_TABLE_ID_SCTE_EAS", "216"), + ("(gint) GST_MTS_TABLE_ID_SCTE_EBIF", "224"), + ("(gint) GST_MTS_TABLE_ID_SCTE_EISS", "226"), + ("(gint) GST_MTS_TABLE_ID_SCTE_RESERVED", "225"), + ("(gint) GST_MTS_TABLE_ID_SCTE_SPLICE", "252"), + ("(gint) GST_MTS_TABLE_ID_SELECTION_INFORMATION", "127"), + ( + "(gint) GST_MTS_TABLE_ID_SERVICE_DESCRIPTION_ACTUAL_TS", + "66", + ), + ("(gint) GST_MTS_TABLE_ID_SERVICE_DESCRIPTION_OTHER_TS", "70"), + ("(gint) GST_MTS_TABLE_ID_SPT", "163"), + ("(gint) GST_MTS_TABLE_ID_STUFFING", "114"), + ("(gint) GST_MTS_TABLE_ID_TBTP", "165"), + ("(gint) GST_MTS_TABLE_ID_TCT", "162"), + ("(gint) GST_MTS_TABLE_ID_TIM", "176"), + ("(gint) GST_MTS_TABLE_ID_TIME_DATE", "112"), + ("(gint) GST_MTS_TABLE_ID_TIME_OFFSET", "115"), + ( + "(gint) GST_MTS_TABLE_ID_TRANSMISSION_MODE_SUPPORT_PAYLOAD", + "170", + ), + ("(gint) GST_MTS_TABLE_ID_TS_DESCRIPTION", "3"), + ("(gint) GST_MTS_TABLE_ID_TS_PROGRAM_MAP", "2"), + ("(gint) GST_MTS_TABLE_ID_UNSET", "255"), + ("(gint) HEARING_IMPAIRED_PAGE", "5"), + ("(gint) INITIAL_PAGE", "1"), + ("(gint) PROGRAMME_SCHEDULE_PAGE", "4"), + ("(gint) SUBTITLE_PAGE", "2"), +]; diff --git a/sys/gstreamer-mpegts-sys/tests/constant.c b/sys/gstreamer-mpegts-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-mpegts-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-mpegts-sys/tests/layout.c b/sys/gstreamer-mpegts-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-mpegts-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-mpegts-sys/tests/manual.h b/sys/gstreamer-mpegts-sys/tests/manual.h new file mode 100644 index 000000000..f6d179eb8 --- /dev/null +++ b/sys/gstreamer-mpegts-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-net-sys/CHANGELOG.md b/sys/gstreamer-net-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-net-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-net-sys/Cargo.toml b/sys/gstreamer-net-sys/Cargo.toml new file mode 100644 index 000000000..3c3007412 --- /dev/null +++ b/sys/gstreamer-net-sys/Cargo.toml @@ -0,0 +1,62 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.gio-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_2 = [] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] + +[lib] +name = "gstreamer_net_sys" + +[package] +authors = ["Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstnet-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_net_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstnet-1.0" +name = "gstreamer-net-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_net_1_0] +name = "gstreamer-net-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_net_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-net-sys/LICENSE b/sys/gstreamer-net-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-net-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-net-sys/README.md b/sys/gstreamer-net-sys/README.md new file mode 100644 index 000000000..8a6e17bb9 --- /dev/null +++ b/sys/gstreamer-net-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-net-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-net-sys.svg)](https://crates.io/crates/gstreamer-net-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Net Library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-net-sys/build.rs b/sys/gstreamer-net-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-net-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-net-sys/src/lib.rs b/sys/gstreamer-net-sys/src/lib.rs new file mode 100644 index 000000000..78cf0c896 --- /dev/null +++ b/sys/gstreamer-net-sys/src/lib.rs @@ -0,0 +1,334 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate gio_sys as gio; +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Constants +pub const GST_NET_TIME_PACKET_SIZE: c_int = 16; +pub const GST_PTP_CLOCK_ID_NONE: u64 = 18446744073709551615; +pub const GST_PTP_STATISTICS_BEST_MASTER_CLOCK_SELECTED: *const c_char = + b"GstPtpStatisticsBestMasterClockSelected\0" as *const u8 as *const c_char; +pub const GST_PTP_STATISTICS_NEW_DOMAIN_FOUND: *const c_char = + b"GstPtpStatisticsNewDomainFound\0" as *const u8 as *const c_char; +pub const GST_PTP_STATISTICS_PATH_DELAY_MEASURED: *const c_char = + b"GstPtpStatisticsPathDelayMeasured\0" as *const u8 as *const c_char; +pub const GST_PTP_STATISTICS_TIME_UPDATED: *const c_char = + b"GstPtpStatisticsTimeUpdated\0" as *const u8 as *const c_char; + +// Callbacks +pub type GstPtpStatisticsCallback = + Option gboolean>; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstNetAddressMeta { + pub meta: gst::GstMeta, + pub addr: *mut gio::GSocketAddress, +} + +impl ::std::fmt::Debug for GstNetAddressMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstNetAddressMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("addr", &self.addr) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstNetClientClockClass { + pub parent_class: gst::GstSystemClockClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstNetClientClockClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstNetClientClockClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstNetClientClockPrivate(c_void); + +pub type GstNetClientClockPrivate = *mut _GstNetClientClockPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstNetControlMessageMeta { + pub meta: gst::GstMeta, + pub message: *mut gio::GSocketControlMessage, +} + +impl ::std::fmt::Debug for GstNetControlMessageMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstNetControlMessageMeta @ {:?}", + self as *const _ + )) + .field("meta", &self.meta) + .field("message", &self.message) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstNetTimePacket { + pub local_time: gst::GstClockTime, + pub remote_time: gst::GstClockTime, +} + +impl ::std::fmt::Debug for GstNetTimePacket { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstNetTimePacket @ {:?}", self as *const _)) + .field("local_time", &self.local_time) + .field("remote_time", &self.remote_time) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstNetTimeProviderClass { + pub parent_class: gst::GstObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstNetTimeProviderClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstNetTimeProviderClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_gst_reserved", &self._gst_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GstNetTimeProviderPrivate(c_void); + +pub type GstNetTimeProviderPrivate = *mut _GstNetTimeProviderPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstNtpClockClass { + pub parent_class: gst::GstSystemClockClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstNtpClockClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstNtpClockClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPtpClockClass { + pub parent_class: gst::GstSystemClockClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstPtpClockClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPtpClockClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstPtpClockPrivate(c_void); + +pub type GstPtpClockPrivate = *mut _GstPtpClockPrivate; + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstNetClientClock { + pub clock: gst::GstSystemClock, + pub priv_: *mut GstNetClientClockPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstNetClientClock { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstNetClientClock @ {:?}", self as *const _)) + .field("clock", &self.clock) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstNetTimeProvider { + pub parent: gst::GstObject, + pub priv_: *mut GstNetTimeProviderPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstNetTimeProvider { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstNetTimeProvider @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstNtpClock { + pub clock: gst::GstSystemClock, + pub priv_: *mut GstNetClientClockPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstNtpClock { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstNtpClock @ {:?}", self as *const _)) + .field("clock", &self.clock) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPtpClock { + pub clock: gst::GstSystemClock, + pub priv_: *mut GstPtpClockPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstPtpClock { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPtpClock @ {:?}", self as *const _)) + .field("clock", &self.clock) + .finish() + } +} + +#[link(name = "gstnet-1.0")] +extern "C" { + + //========================================================================= + // GstNetAddressMeta + //========================================================================= + pub fn gst_net_address_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstNetControlMessageMeta + //========================================================================= + pub fn gst_net_control_message_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstNetTimePacket + //========================================================================= + pub fn gst_net_time_packet_get_type() -> GType; + pub fn gst_net_time_packet_new(buffer: *const u8) -> *mut GstNetTimePacket; + pub fn gst_net_time_packet_copy(packet: *const GstNetTimePacket) -> *mut GstNetTimePacket; + pub fn gst_net_time_packet_free(packet: *mut GstNetTimePacket); + pub fn gst_net_time_packet_send( + packet: *const GstNetTimePacket, + socket: *mut gio::GSocket, + dest_address: *mut gio::GSocketAddress, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn gst_net_time_packet_serialize(packet: *const GstNetTimePacket) -> *mut u8; + pub fn gst_net_time_packet_receive( + socket: *mut gio::GSocket, + src_address: *mut *mut gio::GSocketAddress, + error: *mut *mut glib::GError, + ) -> *mut GstNetTimePacket; + + //========================================================================= + // GstNetClientClock + //========================================================================= + pub fn gst_net_client_clock_get_type() -> GType; + pub fn gst_net_client_clock_new( + name: *const c_char, + remote_address: *const c_char, + remote_port: c_int, + base_time: gst::GstClockTime, + ) -> *mut gst::GstClock; + + //========================================================================= + // GstNetTimeProvider + //========================================================================= + pub fn gst_net_time_provider_get_type() -> GType; + pub fn gst_net_time_provider_new( + clock: *mut gst::GstClock, + address: *const c_char, + port: c_int, + ) -> *mut GstNetTimeProvider; + + //========================================================================= + // GstNtpClock + //========================================================================= + pub fn gst_ntp_clock_get_type() -> GType; + pub fn gst_ntp_clock_new( + name: *const c_char, + remote_address: *const c_char, + remote_port: c_int, + base_time: gst::GstClockTime, + ) -> *mut gst::GstClock; + + //========================================================================= + // GstPtpClock + //========================================================================= + pub fn gst_ptp_clock_get_type() -> GType; + pub fn gst_ptp_clock_new(name: *const c_char, domain: c_uint) -> *mut gst::GstClock; + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_buffer_add_net_address_meta( + buffer: *mut gst::GstBuffer, + addr: *mut gio::GSocketAddress, + ) -> *mut GstNetAddressMeta; + pub fn gst_buffer_add_net_control_message_meta( + buffer: *mut gst::GstBuffer, + message: *mut gio::GSocketControlMessage, + ) -> *mut GstNetControlMessageMeta; + pub fn gst_buffer_get_net_address_meta(buffer: *mut gst::GstBuffer) -> *mut GstNetAddressMeta; + pub fn gst_net_address_meta_api_get_type() -> GType; + pub fn gst_net_control_message_meta_api_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_net_utils_set_socket_tos(socket: *mut gio::GSocket, qos_dscp: c_int) -> gboolean; + pub fn gst_ptp_deinit(); + pub fn gst_ptp_init(clock_id: u64, interfaces: *mut *mut c_char) -> gboolean; + pub fn gst_ptp_is_initialized() -> gboolean; + pub fn gst_ptp_is_supported() -> gboolean; + pub fn gst_ptp_statistics_callback_add( + callback: GstPtpStatisticsCallback, + user_data: gpointer, + destroy_data: glib::GDestroyNotify, + ) -> c_ulong; + pub fn gst_ptp_statistics_callback_remove(id: c_ulong); + +} diff --git a/sys/gstreamer-net-sys/tests/abi.rs b/sys/gstreamer-net-sys/tests/abi.rs new file mode 100644 index 000000000..f44f42295 --- /dev/null +++ b/sys/gstreamer-net-sys/tests/abi.rs @@ -0,0 +1,353 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_net_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_net_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-net-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstNetAddressMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetClientClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetClientClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetControlMessageMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetTimePacket", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetTimeProvider", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNetTimeProviderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNtpClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNtpClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPtpClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPtpClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("GST_NET_TIME_PACKET_SIZE", "16"), + ("GST_PTP_CLOCK_ID_NONE", "18446744073709551615"), + ( + "GST_PTP_STATISTICS_BEST_MASTER_CLOCK_SELECTED", + "GstPtpStatisticsBestMasterClockSelected", + ), + ( + "GST_PTP_STATISTICS_NEW_DOMAIN_FOUND", + "GstPtpStatisticsNewDomainFound", + ), + ( + "GST_PTP_STATISTICS_PATH_DELAY_MEASURED", + "GstPtpStatisticsPathDelayMeasured", + ), + ( + "GST_PTP_STATISTICS_TIME_UPDATED", + "GstPtpStatisticsTimeUpdated", + ), +]; diff --git a/sys/gstreamer-net-sys/tests/constant.c b/sys/gstreamer-net-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-net-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-net-sys/tests/layout.c b/sys/gstreamer-net-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-net-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-net-sys/tests/manual.h b/sys/gstreamer-net-sys/tests/manual.h new file mode 100644 index 000000000..3a86ae8cd --- /dev/null +++ b/sys/gstreamer-net-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-pbutils-sys/CHANGELOG.md b/sys/gstreamer-pbutils-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-pbutils-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-pbutils-sys/Cargo.toml b/sys/gstreamer-pbutils-sys/Cargo.toml new file mode 100644 index 000000000..3b6aaf940 --- /dev/null +++ b/sys/gstreamer-pbutils-sys/Cargo.toml @@ -0,0 +1,67 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-audio-sys] +path = "../gstreamer-audio-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dependencies.gstreamer-video-sys] +path = "../gstreamer-video-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_2 = [] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12_1"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] +v1_12_1 = ["v1_12"] + +[lib] +name = "gstreamer_pbutils_sys" + +[package] +authors = ["Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstpbutils-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_pbutils_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstpbutils-1.0" +name = "gstreamer-pbutils-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_pbutils_1_0] +name = "gstreamer-pbutils-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_pbutils_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" +v1_12_1 = "1.12.1" diff --git a/sys/gstreamer-pbutils-sys/LICENSE b/sys/gstreamer-pbutils-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-pbutils-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-pbutils-sys/README.md b/sys/gstreamer-pbutils-sys/README.md new file mode 100644 index 000000000..b59f0bd1f --- /dev/null +++ b/sys/gstreamer-pbutils-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-pbutils-sys.svg)](https://crates.io/crates/gstreamer-pbutils-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Pbutils library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-pbutils-sys/build.rs b/sys/gstreamer-pbutils-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-pbutils-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-pbutils-sys/src/lib.rs b/sys/gstreamer-pbutils-sys/src/lib.rs new file mode 100644 index 000000000..e219f9ebd --- /dev/null +++ b/sys/gstreamer-pbutils-sys/src/lib.rs @@ -0,0 +1,883 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_audio_sys as gst_audio; +extern crate gstreamer_sys as gst; +extern crate gstreamer_video_sys as gst_video; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Aliases +pub type GstDiscovererAudioInfoClass = gobject::GObjectClass; +pub type GstDiscovererContainerInfoClass = gobject::GObjectClass; +pub type GstDiscovererInfoClass = gobject::GObjectClass; +pub type GstDiscovererStreamInfoClass = gobject::GObjectClass; +pub type GstDiscovererSubtitleInfoClass = gobject::GObjectClass; +pub type GstDiscovererVideoInfoClass = gobject::GObjectClass; +pub type GstEncodingTargetClass = gobject::GObjectClass; + +// Enums +pub type GstAudioVisualizerShader = c_int; +pub const GST_AUDIO_VISUALIZER_SHADER_NONE: GstAudioVisualizerShader = 0; +pub const GST_AUDIO_VISUALIZER_SHADER_FADE: GstAudioVisualizerShader = 1; +pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP: GstAudioVisualizerShader = 2; +pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN: GstAudioVisualizerShader = 3; +pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT: GstAudioVisualizerShader = 4; +pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT: GstAudioVisualizerShader = 5; +pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT: GstAudioVisualizerShader = 6; +pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN: GstAudioVisualizerShader = 7; +pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT: GstAudioVisualizerShader = 8; +pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN: GstAudioVisualizerShader = 9; + +pub type GstDiscovererResult = c_int; +pub const GST_DISCOVERER_OK: GstDiscovererResult = 0; +pub const GST_DISCOVERER_URI_INVALID: GstDiscovererResult = 1; +pub const GST_DISCOVERER_ERROR: GstDiscovererResult = 2; +pub const GST_DISCOVERER_TIMEOUT: GstDiscovererResult = 3; +pub const GST_DISCOVERER_BUSY: GstDiscovererResult = 4; +pub const GST_DISCOVERER_MISSING_PLUGINS: GstDiscovererResult = 5; + +pub type GstInstallPluginsReturn = c_int; +pub const GST_INSTALL_PLUGINS_SUCCESS: GstInstallPluginsReturn = 0; +pub const GST_INSTALL_PLUGINS_NOT_FOUND: GstInstallPluginsReturn = 1; +pub const GST_INSTALL_PLUGINS_ERROR: GstInstallPluginsReturn = 2; +pub const GST_INSTALL_PLUGINS_PARTIAL_SUCCESS: GstInstallPluginsReturn = 3; +pub const GST_INSTALL_PLUGINS_USER_ABORT: GstInstallPluginsReturn = 4; +pub const GST_INSTALL_PLUGINS_CRASHED: GstInstallPluginsReturn = 100; +pub const GST_INSTALL_PLUGINS_INVALID: GstInstallPluginsReturn = 101; +pub const GST_INSTALL_PLUGINS_STARTED_OK: GstInstallPluginsReturn = 200; +pub const GST_INSTALL_PLUGINS_INTERNAL_FAILURE: GstInstallPluginsReturn = 201; +pub const GST_INSTALL_PLUGINS_HELPER_MISSING: GstInstallPluginsReturn = 202; +pub const GST_INSTALL_PLUGINS_INSTALL_IN_PROGRESS: GstInstallPluginsReturn = 203; + +// Constants +pub const GST_ENCODING_CATEGORY_CAPTURE: *const c_char = b"capture\0" as *const u8 as *const c_char; +pub const GST_ENCODING_CATEGORY_DEVICE: *const c_char = b"device\0" as *const u8 as *const c_char; +pub const GST_ENCODING_CATEGORY_FILE_EXTENSION: *const c_char = + b"file-extension\0" as *const u8 as *const c_char; +pub const GST_ENCODING_CATEGORY_ONLINE_SERVICE: *const c_char = + b"online-service\0" as *const u8 as *const c_char; +pub const GST_ENCODING_CATEGORY_STORAGE_EDITING: *const c_char = + b"storage-editing\0" as *const u8 as *const c_char; + +// Flags +pub type GstDiscovererSerializeFlags = c_uint; +pub const GST_DISCOVERER_SERIALIZE_BASIC: GstDiscovererSerializeFlags = 0; +pub const GST_DISCOVERER_SERIALIZE_CAPS: GstDiscovererSerializeFlags = 1; +pub const GST_DISCOVERER_SERIALIZE_TAGS: GstDiscovererSerializeFlags = 2; +pub const GST_DISCOVERER_SERIALIZE_MISC: GstDiscovererSerializeFlags = 4; +pub const GST_DISCOVERER_SERIALIZE_ALL: GstDiscovererSerializeFlags = 7; + +// Callbacks +pub type GstAudioVisualizerShaderFunc = Option< + unsafe extern "C" fn( + *mut GstAudioVisualizer, + *const gst_video::GstVideoFrame, + *mut gst_video::GstVideoFrame, + ), +>; +pub type GstInstallPluginsResultFunc = + Option; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioVisualizerClass { + pub parent_class: gst::GstElementClass, + pub setup: Option gboolean>, + pub render: Option< + unsafe extern "C" fn( + *mut GstAudioVisualizer, + *mut gst::GstBuffer, + *mut gst_video::GstVideoFrame, + ) -> gboolean, + >, + pub decide_allocation: + Option gboolean>, +} + +impl ::std::fmt::Debug for GstAudioVisualizerClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioVisualizerClass @ {:?}", self as *const _)) + .field("setup", &self.setup) + .field("render", &self.render) + .field("decide_allocation", &self.decide_allocation) + .finish() + } +} + +#[repr(C)] +pub struct _GstAudioVisualizerPrivate(c_void); + +pub type GstAudioVisualizerPrivate = *mut _GstAudioVisualizerPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDiscovererClass { + pub parentclass: gobject::GObjectClass, + pub finished: Option, + pub starting: Option, + pub discovered: Option< + unsafe extern "C" fn(*mut GstDiscoverer, *mut GstDiscovererInfo, *const glib::GError), + >, + pub source_setup: Option, + pub _reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDiscovererClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDiscovererClass @ {:?}", self as *const _)) + .field("parentclass", &self.parentclass) + .field("finished", &self.finished) + .field("starting", &self.starting) + .field("discovered", &self.discovered) + .field("source_setup", &self.source_setup) + .field("_reserved", &self._reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GstDiscovererPrivate(c_void); + +pub type GstDiscovererPrivate = *mut _GstDiscovererPrivate; + +#[repr(C)] +pub struct _GstEncodingAudioProfileClass(c_void); + +pub type GstEncodingAudioProfileClass = *mut _GstEncodingAudioProfileClass; + +#[repr(C)] +pub struct _GstEncodingContainerProfileClass(c_void); + +pub type GstEncodingContainerProfileClass = *mut _GstEncodingContainerProfileClass; + +#[repr(C)] +pub struct _GstEncodingProfileClass(c_void); + +pub type GstEncodingProfileClass = *mut _GstEncodingProfileClass; + +#[repr(C)] +pub struct _GstEncodingVideoProfileClass(c_void); + +pub type GstEncodingVideoProfileClass = *mut _GstEncodingVideoProfileClass; + +#[repr(C)] +pub struct GstInstallPluginsContext(c_void); + +impl ::std::fmt::Debug for GstInstallPluginsContext { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstInstallPluginsContext @ {:?}", + self as *const _ + )) + .finish() + } +} + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAudioVisualizer { + pub parent: gst::GstElement, + pub req_spf: c_uint, + pub vinfo: gst_video::GstVideoInfo, + pub ainfo: gst_audio::GstAudioInfo, + pub priv_: *mut GstAudioVisualizerPrivate, +} + +impl ::std::fmt::Debug for GstAudioVisualizer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAudioVisualizer @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("req_spf", &self.req_spf) + .field("vinfo", &self.vinfo) + .field("ainfo", &self.ainfo) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDiscoverer { + pub parent: gobject::GObject, + pub priv_: *mut GstDiscovererPrivate, + pub _reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDiscoverer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDiscoverer @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +pub struct GstDiscovererAudioInfo(c_void); + +impl ::std::fmt::Debug for GstDiscovererAudioInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDiscovererAudioInfo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstDiscovererContainerInfo(c_void); + +impl ::std::fmt::Debug for GstDiscovererContainerInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstDiscovererContainerInfo @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +pub struct GstDiscovererInfo(c_void); + +impl ::std::fmt::Debug for GstDiscovererInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDiscovererInfo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstDiscovererStreamInfo(c_void); + +impl ::std::fmt::Debug for GstDiscovererStreamInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDiscovererStreamInfo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstDiscovererSubtitleInfo(c_void); + +impl ::std::fmt::Debug for GstDiscovererSubtitleInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstDiscovererSubtitleInfo @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +pub struct GstDiscovererVideoInfo(c_void); + +impl ::std::fmt::Debug for GstDiscovererVideoInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDiscovererVideoInfo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstEncodingAudioProfile(c_void); + +impl ::std::fmt::Debug for GstEncodingAudioProfile { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstEncodingAudioProfile @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstEncodingContainerProfile(c_void); + +impl ::std::fmt::Debug for GstEncodingContainerProfile { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstEncodingContainerProfile @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +pub struct GstEncodingProfile(c_void); + +impl ::std::fmt::Debug for GstEncodingProfile { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstEncodingProfile @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstEncodingTarget(c_void); + +impl ::std::fmt::Debug for GstEncodingTarget { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstEncodingTarget @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstEncodingVideoProfile(c_void); + +impl ::std::fmt::Debug for GstEncodingVideoProfile { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstEncodingVideoProfile @ {:?}", self as *const _)) + .finish() + } +} + +#[link(name = "gstpbutils-1.0")] +extern "C" { + + //========================================================================= + // GstAudioVisualizerShader + //========================================================================= + pub fn gst_audio_visualizer_shader_get_type() -> GType; + + //========================================================================= + // GstDiscovererResult + //========================================================================= + pub fn gst_discoverer_result_get_type() -> GType; + + //========================================================================= + // GstInstallPluginsReturn + //========================================================================= + pub fn gst_install_plugins_return_get_type() -> GType; + pub fn gst_install_plugins_return_get_name(ret: GstInstallPluginsReturn) -> *const c_char; + + //========================================================================= + // GstDiscovererSerializeFlags + //========================================================================= + pub fn gst_discoverer_serialize_flags_get_type() -> GType; + + //========================================================================= + // GstInstallPluginsContext + //========================================================================= + pub fn gst_install_plugins_context_get_type() -> GType; + pub fn gst_install_plugins_context_new() -> *mut GstInstallPluginsContext; + #[cfg(any(feature = "v1_12_1", feature = "dox"))] + pub fn gst_install_plugins_context_copy( + ctx: *mut GstInstallPluginsContext, + ) -> *mut GstInstallPluginsContext; + pub fn gst_install_plugins_context_free(ctx: *mut GstInstallPluginsContext); + pub fn gst_install_plugins_context_set_confirm_search( + ctx: *mut GstInstallPluginsContext, + confirm_search: gboolean, + ); + pub fn gst_install_plugins_context_set_desktop_id( + ctx: *mut GstInstallPluginsContext, + desktop_id: *const c_char, + ); + pub fn gst_install_plugins_context_set_startup_notification_id( + ctx: *mut GstInstallPluginsContext, + startup_id: *const c_char, + ); + pub fn gst_install_plugins_context_set_xid(ctx: *mut GstInstallPluginsContext, xid: c_uint); + + //========================================================================= + // GstAudioVisualizer + //========================================================================= + pub fn gst_audio_visualizer_get_type() -> GType; + + //========================================================================= + // GstDiscoverer + //========================================================================= + pub fn gst_discoverer_get_type() -> GType; + pub fn gst_discoverer_new( + timeout: gst::GstClockTime, + error: *mut *mut glib::GError, + ) -> *mut GstDiscoverer; + pub fn gst_discoverer_discover_uri( + discoverer: *mut GstDiscoverer, + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstDiscovererInfo; + pub fn gst_discoverer_discover_uri_async( + discoverer: *mut GstDiscoverer, + uri: *const c_char, + ) -> gboolean; + pub fn gst_discoverer_start(discoverer: *mut GstDiscoverer); + pub fn gst_discoverer_stop(discoverer: *mut GstDiscoverer); + + //========================================================================= + // GstDiscovererAudioInfo + //========================================================================= + pub fn gst_discoverer_audio_info_get_type() -> GType; + pub fn gst_discoverer_audio_info_get_bitrate(info: *const GstDiscovererAudioInfo) -> c_uint; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_discoverer_audio_info_get_channel_mask(info: *const GstDiscovererAudioInfo) -> u64; + pub fn gst_discoverer_audio_info_get_channels(info: *const GstDiscovererAudioInfo) -> c_uint; + pub fn gst_discoverer_audio_info_get_depth(info: *const GstDiscovererAudioInfo) -> c_uint; + pub fn gst_discoverer_audio_info_get_language( + info: *const GstDiscovererAudioInfo, + ) -> *const c_char; + pub fn gst_discoverer_audio_info_get_max_bitrate(info: *const GstDiscovererAudioInfo) + -> c_uint; + pub fn gst_discoverer_audio_info_get_sample_rate(info: *const GstDiscovererAudioInfo) + -> c_uint; + + //========================================================================= + // GstDiscovererContainerInfo + //========================================================================= + pub fn gst_discoverer_container_info_get_type() -> GType; + pub fn gst_discoverer_container_info_get_streams( + info: *mut GstDiscovererContainerInfo, + ) -> *mut glib::GList; + + //========================================================================= + // GstDiscovererInfo + //========================================================================= + pub fn gst_discoverer_info_get_type() -> GType; + pub fn gst_discoverer_info_from_variant(variant: *mut glib::GVariant) + -> *mut GstDiscovererInfo; + pub fn gst_discoverer_info_copy(ptr: *mut GstDiscovererInfo) -> *mut GstDiscovererInfo; + pub fn gst_discoverer_info_get_audio_streams(info: *mut GstDiscovererInfo) -> *mut glib::GList; + pub fn gst_discoverer_info_get_container_streams( + info: *mut GstDiscovererInfo, + ) -> *mut glib::GList; + pub fn gst_discoverer_info_get_duration(info: *const GstDiscovererInfo) -> gst::GstClockTime; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_discoverer_info_get_live(info: *const GstDiscovererInfo) -> gboolean; + pub fn gst_discoverer_info_get_misc(info: *const GstDiscovererInfo) + -> *const gst::GstStructure; + pub fn gst_discoverer_info_get_missing_elements_installer_details( + info: *const GstDiscovererInfo, + ) -> *mut *const c_char; + pub fn gst_discoverer_info_get_result(info: *const GstDiscovererInfo) -> GstDiscovererResult; + pub fn gst_discoverer_info_get_seekable(info: *const GstDiscovererInfo) -> gboolean; + pub fn gst_discoverer_info_get_stream_info( + info: *mut GstDiscovererInfo, + ) -> *mut GstDiscovererStreamInfo; + pub fn gst_discoverer_info_get_stream_list(info: *mut GstDiscovererInfo) -> *mut glib::GList; + pub fn gst_discoverer_info_get_streams( + info: *mut GstDiscovererInfo, + streamtype: GType, + ) -> *mut glib::GList; + pub fn gst_discoverer_info_get_subtitle_streams( + info: *mut GstDiscovererInfo, + ) -> *mut glib::GList; + pub fn gst_discoverer_info_get_tags(info: *const GstDiscovererInfo) -> *const gst::GstTagList; + pub fn gst_discoverer_info_get_toc(info: *const GstDiscovererInfo) -> *const gst::GstToc; + pub fn gst_discoverer_info_get_uri(info: *const GstDiscovererInfo) -> *const c_char; + pub fn gst_discoverer_info_get_video_streams(info: *mut GstDiscovererInfo) -> *mut glib::GList; + pub fn gst_discoverer_info_to_variant( + info: *mut GstDiscovererInfo, + flags: GstDiscovererSerializeFlags, + ) -> *mut glib::GVariant; + + //========================================================================= + // GstDiscovererStreamInfo + //========================================================================= + pub fn gst_discoverer_stream_info_get_type() -> GType; + pub fn gst_discoverer_stream_info_list_free(infos: *mut glib::GList); + pub fn gst_discoverer_stream_info_get_caps( + info: *mut GstDiscovererStreamInfo, + ) -> *mut gst::GstCaps; + pub fn gst_discoverer_stream_info_get_misc( + info: *mut GstDiscovererStreamInfo, + ) -> *const gst::GstStructure; + pub fn gst_discoverer_stream_info_get_next( + info: *mut GstDiscovererStreamInfo, + ) -> *mut GstDiscovererStreamInfo; + pub fn gst_discoverer_stream_info_get_previous( + info: *mut GstDiscovererStreamInfo, + ) -> *mut GstDiscovererStreamInfo; + pub fn gst_discoverer_stream_info_get_stream_id( + info: *mut GstDiscovererStreamInfo, + ) -> *const c_char; + pub fn gst_discoverer_stream_info_get_stream_type_nick( + info: *mut GstDiscovererStreamInfo, + ) -> *const c_char; + pub fn gst_discoverer_stream_info_get_tags( + info: *mut GstDiscovererStreamInfo, + ) -> *const gst::GstTagList; + pub fn gst_discoverer_stream_info_get_toc( + info: *mut GstDiscovererStreamInfo, + ) -> *const gst::GstToc; + + //========================================================================= + // GstDiscovererSubtitleInfo + //========================================================================= + pub fn gst_discoverer_subtitle_info_get_type() -> GType; + pub fn gst_discoverer_subtitle_info_get_language( + info: *const GstDiscovererSubtitleInfo, + ) -> *const c_char; + + //========================================================================= + // GstDiscovererVideoInfo + //========================================================================= + pub fn gst_discoverer_video_info_get_type() -> GType; + pub fn gst_discoverer_video_info_get_bitrate(info: *const GstDiscovererVideoInfo) -> c_uint; + pub fn gst_discoverer_video_info_get_depth(info: *const GstDiscovererVideoInfo) -> c_uint; + pub fn gst_discoverer_video_info_get_framerate_denom( + info: *const GstDiscovererVideoInfo, + ) -> c_uint; + pub fn gst_discoverer_video_info_get_framerate_num( + info: *const GstDiscovererVideoInfo, + ) -> c_uint; + pub fn gst_discoverer_video_info_get_height(info: *const GstDiscovererVideoInfo) -> c_uint; + pub fn gst_discoverer_video_info_get_max_bitrate(info: *const GstDiscovererVideoInfo) + -> c_uint; + pub fn gst_discoverer_video_info_get_par_denom(info: *const GstDiscovererVideoInfo) -> c_uint; + pub fn gst_discoverer_video_info_get_par_num(info: *const GstDiscovererVideoInfo) -> c_uint; + pub fn gst_discoverer_video_info_get_width(info: *const GstDiscovererVideoInfo) -> c_uint; + pub fn gst_discoverer_video_info_is_image(info: *const GstDiscovererVideoInfo) -> gboolean; + pub fn gst_discoverer_video_info_is_interlaced(info: *const GstDiscovererVideoInfo) + -> gboolean; + + //========================================================================= + // GstEncodingAudioProfile + //========================================================================= + pub fn gst_encoding_audio_profile_get_type() -> GType; + pub fn gst_encoding_audio_profile_new( + format: *mut gst::GstCaps, + preset: *const c_char, + restriction: *mut gst::GstCaps, + presence: c_uint, + ) -> *mut GstEncodingAudioProfile; + + //========================================================================= + // GstEncodingContainerProfile + //========================================================================= + pub fn gst_encoding_container_profile_get_type() -> GType; + pub fn gst_encoding_container_profile_new( + name: *const c_char, + description: *const c_char, + format: *mut gst::GstCaps, + preset: *const c_char, + ) -> *mut GstEncodingContainerProfile; + pub fn gst_encoding_container_profile_add_profile( + container: *mut GstEncodingContainerProfile, + profile: *mut GstEncodingProfile, + ) -> gboolean; + pub fn gst_encoding_container_profile_contains_profile( + container: *mut GstEncodingContainerProfile, + profile: *mut GstEncodingProfile, + ) -> gboolean; + pub fn gst_encoding_container_profile_get_profiles( + profile: *mut GstEncodingContainerProfile, + ) -> *const glib::GList; + + //========================================================================= + // GstEncodingProfile + //========================================================================= + pub fn gst_encoding_profile_get_type() -> GType; + pub fn gst_encoding_profile_find( + targetname: *const c_char, + profilename: *const c_char, + category: *const c_char, + ) -> *mut GstEncodingProfile; + pub fn gst_encoding_profile_from_discoverer( + info: *mut GstDiscovererInfo, + ) -> *mut GstEncodingProfile; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_encoding_profile_copy(self_: *mut GstEncodingProfile) -> *mut GstEncodingProfile; + pub fn gst_encoding_profile_get_allow_dynamic_output( + profile: *mut GstEncodingProfile, + ) -> gboolean; + pub fn gst_encoding_profile_get_description(profile: *mut GstEncodingProfile) -> *const c_char; + pub fn gst_encoding_profile_get_file_extension( + profile: *mut GstEncodingProfile, + ) -> *const c_char; + pub fn gst_encoding_profile_get_format(profile: *mut GstEncodingProfile) -> *mut gst::GstCaps; + pub fn gst_encoding_profile_get_input_caps( + profile: *mut GstEncodingProfile, + ) -> *mut gst::GstCaps; + pub fn gst_encoding_profile_get_name(profile: *mut GstEncodingProfile) -> *const c_char; + pub fn gst_encoding_profile_get_presence(profile: *mut GstEncodingProfile) -> c_uint; + pub fn gst_encoding_profile_get_preset(profile: *mut GstEncodingProfile) -> *const c_char; + pub fn gst_encoding_profile_get_preset_name(profile: *mut GstEncodingProfile) -> *const c_char; + pub fn gst_encoding_profile_get_restriction( + profile: *mut GstEncodingProfile, + ) -> *mut gst::GstCaps; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_encoding_profile_get_single_segment(profile: *mut GstEncodingProfile) -> gboolean; + pub fn gst_encoding_profile_get_type_nick(profile: *mut GstEncodingProfile) -> *const c_char; + pub fn gst_encoding_profile_is_enabled(profile: *mut GstEncodingProfile) -> gboolean; + pub fn gst_encoding_profile_is_equal( + a: *mut GstEncodingProfile, + b: *mut GstEncodingProfile, + ) -> gboolean; + pub fn gst_encoding_profile_set_allow_dynamic_output( + profile: *mut GstEncodingProfile, + allow_dynamic_output: gboolean, + ); + pub fn gst_encoding_profile_set_description( + profile: *mut GstEncodingProfile, + description: *const c_char, + ); + pub fn gst_encoding_profile_set_enabled(profile: *mut GstEncodingProfile, enabled: gboolean); + pub fn gst_encoding_profile_set_format( + profile: *mut GstEncodingProfile, + format: *mut gst::GstCaps, + ); + pub fn gst_encoding_profile_set_name(profile: *mut GstEncodingProfile, name: *const c_char); + pub fn gst_encoding_profile_set_presence(profile: *mut GstEncodingProfile, presence: c_uint); + pub fn gst_encoding_profile_set_preset(profile: *mut GstEncodingProfile, preset: *const c_char); + pub fn gst_encoding_profile_set_preset_name( + profile: *mut GstEncodingProfile, + preset_name: *const c_char, + ); + pub fn gst_encoding_profile_set_restriction( + profile: *mut GstEncodingProfile, + restriction: *mut gst::GstCaps, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_encoding_profile_set_single_segment( + profile: *mut GstEncodingProfile, + single_segment: gboolean, + ); + + //========================================================================= + // GstEncodingTarget + //========================================================================= + pub fn gst_encoding_target_get_type() -> GType; + pub fn gst_encoding_target_new( + name: *const c_char, + category: *const c_char, + description: *const c_char, + profiles: *const glib::GList, + ) -> *mut GstEncodingTarget; + pub fn gst_encoding_target_load( + name: *const c_char, + category: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstEncodingTarget; + pub fn gst_encoding_target_load_from_file( + filepath: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstEncodingTarget; + pub fn gst_encoding_target_add_profile( + target: *mut GstEncodingTarget, + profile: *mut GstEncodingProfile, + ) -> gboolean; + pub fn gst_encoding_target_get_category(target: *mut GstEncodingTarget) -> *const c_char; + pub fn gst_encoding_target_get_description(target: *mut GstEncodingTarget) -> *const c_char; + pub fn gst_encoding_target_get_name(target: *mut GstEncodingTarget) -> *const c_char; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_encoding_target_get_path(target: *mut GstEncodingTarget) -> *const c_char; + pub fn gst_encoding_target_get_profile( + target: *mut GstEncodingTarget, + name: *const c_char, + ) -> *mut GstEncodingProfile; + pub fn gst_encoding_target_get_profiles(target: *mut GstEncodingTarget) -> *const glib::GList; + pub fn gst_encoding_target_save( + target: *mut GstEncodingTarget, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn gst_encoding_target_save_to_file( + target: *mut GstEncodingTarget, + filepath: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + + //========================================================================= + // GstEncodingVideoProfile + //========================================================================= + pub fn gst_encoding_video_profile_get_type() -> GType; + pub fn gst_encoding_video_profile_new( + format: *mut gst::GstCaps, + preset: *const c_char, + restriction: *mut gst::GstCaps, + presence: c_uint, + ) -> *mut GstEncodingVideoProfile; + pub fn gst_encoding_video_profile_get_pass(prof: *mut GstEncodingVideoProfile) -> c_uint; + pub fn gst_encoding_video_profile_get_variableframerate( + prof: *mut GstEncodingVideoProfile, + ) -> gboolean; + pub fn gst_encoding_video_profile_set_pass(prof: *mut GstEncodingVideoProfile, pass: c_uint); + pub fn gst_encoding_video_profile_set_variableframerate( + prof: *mut GstEncodingVideoProfile, + variableframerate: gboolean, + ); + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_codec_utils_aac_caps_set_level_and_profile( + caps: *mut gst::GstCaps, + audio_config: *const u8, + len: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_codec_utils_aac_get_channels(audio_config: *const u8, len: c_uint) -> c_uint; + pub fn gst_codec_utils_aac_get_index_from_sample_rate(rate: c_uint) -> c_int; + pub fn gst_codec_utils_aac_get_level(audio_config: *const u8, len: c_uint) -> *const c_char; + pub fn gst_codec_utils_aac_get_profile(audio_config: *const u8, len: c_uint) -> *const c_char; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_codec_utils_aac_get_sample_rate(audio_config: *const u8, len: c_uint) -> c_uint; + pub fn gst_codec_utils_aac_get_sample_rate_from_index(sr_idx: c_uint) -> c_uint; + pub fn gst_codec_utils_h264_caps_set_level_and_profile( + caps: *mut gst::GstCaps, + sps: *const u8, + len: c_uint, + ) -> gboolean; + pub fn gst_codec_utils_h264_get_level(sps: *const u8, len: c_uint) -> *const c_char; + pub fn gst_codec_utils_h264_get_level_idc(level: *const c_char) -> u8; + pub fn gst_codec_utils_h264_get_profile(sps: *const u8, len: c_uint) -> *const c_char; + pub fn gst_codec_utils_h265_caps_set_level_tier_and_profile( + caps: *mut gst::GstCaps, + profile_tier_level: *const u8, + len: c_uint, + ) -> gboolean; + pub fn gst_codec_utils_h265_get_level( + profile_tier_level: *const u8, + len: c_uint, + ) -> *const c_char; + pub fn gst_codec_utils_h265_get_level_idc(level: *const c_char) -> u8; + pub fn gst_codec_utils_h265_get_profile( + profile_tier_level: *const u8, + len: c_uint, + ) -> *const c_char; + pub fn gst_codec_utils_h265_get_tier( + profile_tier_level: *const u8, + len: c_uint, + ) -> *const c_char; + pub fn gst_codec_utils_mpeg4video_caps_set_level_and_profile( + caps: *mut gst::GstCaps, + vis_obj_seq: *const u8, + len: c_uint, + ) -> gboolean; + pub fn gst_codec_utils_mpeg4video_get_level( + vis_obj_seq: *const u8, + len: c_uint, + ) -> *const c_char; + pub fn gst_codec_utils_mpeg4video_get_profile( + vis_obj_seq: *const u8, + len: c_uint, + ) -> *const c_char; + pub fn gst_codec_utils_opus_create_caps( + rate: u32, + channels: u8, + channel_mapping_family: u8, + stream_count: u8, + coupled_count: u8, + channel_mapping: *const u8, + ) -> *mut gst::GstCaps; + pub fn gst_codec_utils_opus_create_caps_from_header( + header: *mut gst::GstBuffer, + comments: *mut gst::GstBuffer, + ) -> *mut gst::GstCaps; + pub fn gst_codec_utils_opus_create_header( + rate: u32, + channels: u8, + channel_mapping_family: u8, + stream_count: u8, + coupled_count: u8, + channel_mapping: *const u8, + pre_skip: u16, + output_gain: i16, + ) -> *mut gst::GstBuffer; + pub fn gst_codec_utils_opus_parse_caps( + caps: *mut gst::GstCaps, + rate: *mut u32, + channels: *mut u8, + channel_mapping_family: *mut u8, + stream_count: *mut u8, + coupled_count: *mut u8, + channel_mapping: *mut [u8; 256], + ) -> gboolean; + pub fn gst_codec_utils_opus_parse_header( + header: *mut gst::GstBuffer, + rate: *mut u32, + channels: *mut u8, + channel_mapping_family: *mut u8, + stream_count: *mut u8, + coupled_count: *mut u8, + channel_mapping: *mut [u8; 256], + pre_skip: *mut u16, + output_gain: *mut i16, + ) -> gboolean; + pub fn gst_encoding_list_all_targets(categoryname: *const c_char) -> *mut glib::GList; + pub fn gst_encoding_list_available_categories() -> *mut glib::GList; + pub fn gst_install_plugins_async( + details: *const *const c_char, + ctx: *mut GstInstallPluginsContext, + func: GstInstallPluginsResultFunc, + user_data: gpointer, + ) -> GstInstallPluginsReturn; + pub fn gst_install_plugins_installation_in_progress() -> gboolean; + pub fn gst_install_plugins_supported() -> gboolean; + pub fn gst_install_plugins_sync( + details: *const *const c_char, + ctx: *mut GstInstallPluginsContext, + ) -> GstInstallPluginsReturn; + pub fn gst_is_missing_plugin_message(msg: *mut gst::GstMessage) -> gboolean; + pub fn gst_missing_decoder_installer_detail_new( + decode_caps: *const gst::GstCaps, + ) -> *mut c_char; + pub fn gst_missing_decoder_message_new( + element: *mut gst::GstElement, + decode_caps: *const gst::GstCaps, + ) -> *mut gst::GstMessage; + pub fn gst_missing_element_installer_detail_new(factory_name: *const c_char) -> *mut c_char; + pub fn gst_missing_element_message_new( + element: *mut gst::GstElement, + factory_name: *const c_char, + ) -> *mut gst::GstMessage; + pub fn gst_missing_encoder_installer_detail_new( + encode_caps: *const gst::GstCaps, + ) -> *mut c_char; + pub fn gst_missing_encoder_message_new( + element: *mut gst::GstElement, + encode_caps: *const gst::GstCaps, + ) -> *mut gst::GstMessage; + pub fn gst_missing_plugin_message_get_description(msg: *mut gst::GstMessage) -> *mut c_char; + pub fn gst_missing_plugin_message_get_installer_detail( + msg: *mut gst::GstMessage, + ) -> *mut c_char; + pub fn gst_missing_uri_sink_installer_detail_new(protocol: *const c_char) -> *mut c_char; + pub fn gst_missing_uri_sink_message_new( + element: *mut gst::GstElement, + protocol: *const c_char, + ) -> *mut gst::GstMessage; + pub fn gst_missing_uri_source_installer_detail_new(protocol: *const c_char) -> *mut c_char; + pub fn gst_missing_uri_source_message_new( + element: *mut gst::GstElement, + protocol: *const c_char, + ) -> *mut gst::GstMessage; + pub fn gst_pb_utils_add_codec_description_to_tag_list( + taglist: *mut gst::GstTagList, + codec_tag: *const c_char, + caps: *const gst::GstCaps, + ) -> gboolean; + pub fn gst_pb_utils_get_codec_description(caps: *const gst::GstCaps) -> *mut c_char; + pub fn gst_pb_utils_get_decoder_description(caps: *const gst::GstCaps) -> *mut c_char; + pub fn gst_pb_utils_get_element_description(factory_name: *const c_char) -> *mut c_char; + pub fn gst_pb_utils_get_encoder_description(caps: *const gst::GstCaps) -> *mut c_char; + pub fn gst_pb_utils_get_sink_description(protocol: *const c_char) -> *mut c_char; + pub fn gst_pb_utils_get_source_description(protocol: *const c_char) -> *mut c_char; + pub fn gst_pb_utils_init(); + pub fn gst_plugins_base_version( + major: *mut c_uint, + minor: *mut c_uint, + micro: *mut c_uint, + nano: *mut c_uint, + ); + pub fn gst_plugins_base_version_string() -> *mut c_char; + +} diff --git a/sys/gstreamer-pbutils-sys/tests/abi.rs b/sys/gstreamer-pbutils-sys/tests/abi.rs new file mode 100644 index 000000000..37eb6631e --- /dev/null +++ b/sys/gstreamer-pbutils-sys/tests/abi.rs @@ -0,0 +1,415 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_pbutils_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_pbutils_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-pbutils-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstAudioVisualizer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioVisualizerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAudioVisualizerShader", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscoverer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererAudioInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererContainerInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererSerializeFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererStreamInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererSubtitleInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDiscovererVideoInfoClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstEncodingTargetClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstInstallPluginsReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE", "1"), + ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN", "3"), + ( + "(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN", + "7", + ), + ( + "(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT", + "6", + ), + ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT", "4"), + ( + "(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT", + "5", + ), + ("(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP", "2"), + ( + "(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN", + "9", + ), + ( + "(gint) GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT", + "8", + ), + ("(gint) GST_AUDIO_VISUALIZER_SHADER_NONE", "0"), + ("(gint) GST_DISCOVERER_BUSY", "4"), + ("(gint) GST_DISCOVERER_ERROR", "2"), + ("(gint) GST_DISCOVERER_MISSING_PLUGINS", "5"), + ("(gint) GST_DISCOVERER_OK", "0"), + ("(guint) GST_DISCOVERER_SERIALIZE_ALL", "7"), + ("(guint) GST_DISCOVERER_SERIALIZE_BASIC", "0"), + ("(guint) GST_DISCOVERER_SERIALIZE_CAPS", "1"), + ("(guint) GST_DISCOVERER_SERIALIZE_MISC", "4"), + ("(guint) GST_DISCOVERER_SERIALIZE_TAGS", "2"), + ("(gint) GST_DISCOVERER_TIMEOUT", "3"), + ("(gint) GST_DISCOVERER_URI_INVALID", "1"), + ("GST_ENCODING_CATEGORY_CAPTURE", "capture"), + ("GST_ENCODING_CATEGORY_DEVICE", "device"), + ("GST_ENCODING_CATEGORY_FILE_EXTENSION", "file-extension"), + ("GST_ENCODING_CATEGORY_ONLINE_SERVICE", "online-service"), + ("GST_ENCODING_CATEGORY_STORAGE_EDITING", "storage-editing"), + ("(gint) GST_INSTALL_PLUGINS_CRASHED", "100"), + ("(gint) GST_INSTALL_PLUGINS_ERROR", "2"), + ("(gint) GST_INSTALL_PLUGINS_HELPER_MISSING", "202"), + ("(gint) GST_INSTALL_PLUGINS_INSTALL_IN_PROGRESS", "203"), + ("(gint) GST_INSTALL_PLUGINS_INTERNAL_FAILURE", "201"), + ("(gint) GST_INSTALL_PLUGINS_INVALID", "101"), + ("(gint) GST_INSTALL_PLUGINS_NOT_FOUND", "1"), + ("(gint) GST_INSTALL_PLUGINS_PARTIAL_SUCCESS", "3"), + ("(gint) GST_INSTALL_PLUGINS_STARTED_OK", "200"), + ("(gint) GST_INSTALL_PLUGINS_SUCCESS", "0"), + ("(gint) GST_INSTALL_PLUGINS_USER_ABORT", "4"), +]; diff --git a/sys/gstreamer-pbutils-sys/tests/constant.c b/sys/gstreamer-pbutils-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-pbutils-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-pbutils-sys/tests/layout.c b/sys/gstreamer-pbutils-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-pbutils-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-pbutils-sys/tests/manual.h b/sys/gstreamer-pbutils-sys/tests/manual.h new file mode 100644 index 000000000..cbe4526d6 --- /dev/null +++ b/sys/gstreamer-pbutils-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-player-sys/CHANGELOG.md b/sys/gstreamer-player-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-player-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-player-sys/Cargo.toml b/sys/gstreamer-player-sys/Cargo.toml new file mode 100644 index 000000000..4234b1a21 --- /dev/null +++ b/sys/gstreamer-player-sys/Cargo.toml @@ -0,0 +1,56 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" +features = ["v1_12"] + +[dependencies.gstreamer-video-sys] +path = "../gstreamer-video-sys" +features = ["v1_12"] + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_14 = [] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] + +[lib] +name = "gstreamer_player_sys" + +[package] +authors = ["Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstplayer-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_player_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstplayer-1.0" +name = "gstreamer-player-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_player_1_0] +name = "gstreamer-player-1.0" +version = "1.12" + +[package.metadata.system-deps.gstreamer_player_1_0.feature-versions] +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-player-sys/LICENSE b/sys/gstreamer-player-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-player-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-player-sys/README.md b/sys/gstreamer-player-sys/README.md new file mode 100644 index 000000000..701c6819c --- /dev/null +++ b/sys/gstreamer-player-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-player-sys.svg)](https://crates.io/crates/gstreamer-player-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Player library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-player-sys/build.rs b/sys/gstreamer-player-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-player-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-player-sys/src/lib.rs b/sys/gstreamer-player-sys/src/lib.rs new file mode 100644 index 000000000..8f62ebe44 --- /dev/null +++ b/sys/gstreamer-player-sys/src/lib.rs @@ -0,0 +1,540 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_sys as gst; +extern crate gstreamer_video_sys as gst_video; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstPlayerColorBalanceType = c_int; +pub const GST_PLAYER_COLOR_BALANCE_HUE: GstPlayerColorBalanceType = 3; +pub const GST_PLAYER_COLOR_BALANCE_BRIGHTNESS: GstPlayerColorBalanceType = 0; +pub const GST_PLAYER_COLOR_BALANCE_SATURATION: GstPlayerColorBalanceType = 2; +pub const GST_PLAYER_COLOR_BALANCE_CONTRAST: GstPlayerColorBalanceType = 1; + +pub type GstPlayerError = c_int; +pub const GST_PLAYER_ERROR_FAILED: GstPlayerError = 0; + +pub type GstPlayerSnapshotFormat = c_int; +pub const GST_PLAYER_THUMBNAIL_RAW_NATIVE: GstPlayerSnapshotFormat = 0; +pub const GST_PLAYER_THUMBNAIL_RAW_xRGB: GstPlayerSnapshotFormat = 1; +pub const GST_PLAYER_THUMBNAIL_RAW_BGRx: GstPlayerSnapshotFormat = 2; +pub const GST_PLAYER_THUMBNAIL_JPG: GstPlayerSnapshotFormat = 3; +pub const GST_PLAYER_THUMBNAIL_PNG: GstPlayerSnapshotFormat = 4; + +pub type GstPlayerState = c_int; +pub const GST_PLAYER_STATE_STOPPED: GstPlayerState = 0; +pub const GST_PLAYER_STATE_BUFFERING: GstPlayerState = 1; +pub const GST_PLAYER_STATE_PAUSED: GstPlayerState = 2; +pub const GST_PLAYER_STATE_PLAYING: GstPlayerState = 3; + +// Callbacks +pub type GstPlayerSignalDispatcherFunc = Option; + +// Records +#[repr(C)] +pub struct _GstPlayerAudioInfoClass(c_void); + +pub type GstPlayerAudioInfoClass = *mut _GstPlayerAudioInfoClass; + +#[repr(C)] +pub struct _GstPlayerClass(c_void); + +pub type GstPlayerClass = *mut _GstPlayerClass; + +#[repr(C)] +pub struct _GstPlayerGMainContextSignalDispatcherClass(c_void); + +pub type GstPlayerGMainContextSignalDispatcherClass = + *mut _GstPlayerGMainContextSignalDispatcherClass; + +#[repr(C)] +pub struct _GstPlayerMediaInfoClass(c_void); + +pub type GstPlayerMediaInfoClass = *mut _GstPlayerMediaInfoClass; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPlayerSignalDispatcherInterface { + pub parent_iface: gobject::GTypeInterface, + pub dispatch: Option< + unsafe extern "C" fn( + *mut GstPlayerSignalDispatcher, + *mut GstPlayer, + GstPlayerSignalDispatcherFunc, + gpointer, + glib::GDestroyNotify, + ), + >, +} + +impl ::std::fmt::Debug for GstPlayerSignalDispatcherInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstPlayerSignalDispatcherInterface @ {:?}", + self as *const _ + )) + .field("parent_iface", &self.parent_iface) + .field("dispatch", &self.dispatch) + .finish() + } +} + +#[repr(C)] +pub struct _GstPlayerStreamInfoClass(c_void); + +pub type GstPlayerStreamInfoClass = *mut _GstPlayerStreamInfoClass; + +#[repr(C)] +pub struct _GstPlayerSubtitleInfoClass(c_void); + +pub type GstPlayerSubtitleInfoClass = *mut _GstPlayerSubtitleInfoClass; + +#[repr(C)] +pub struct _GstPlayerVideoInfoClass(c_void); + +pub type GstPlayerVideoInfoClass = *mut _GstPlayerVideoInfoClass; + +#[repr(C)] +pub struct _GstPlayerVideoOverlayVideoRendererClass(c_void); + +pub type GstPlayerVideoOverlayVideoRendererClass = *mut _GstPlayerVideoOverlayVideoRendererClass; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPlayerVideoRendererInterface { + pub parent_iface: gobject::GTypeInterface, + pub create_video_sink: Option< + unsafe extern "C" fn(*mut GstPlayerVideoRenderer, *mut GstPlayer) -> *mut gst::GstElement, + >, +} + +impl ::std::fmt::Debug for GstPlayerVideoRendererInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstPlayerVideoRendererInterface @ {:?}", + self as *const _ + )) + .field("parent_iface", &self.parent_iface) + .field("create_video_sink", &self.create_video_sink) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPlayerVisualization { + pub name: *mut c_char, + pub description: *mut c_char, +} + +impl ::std::fmt::Debug for GstPlayerVisualization { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPlayerVisualization @ {:?}", self as *const _)) + .field("name", &self.name) + .field("description", &self.description) + .finish() + } +} + +// Classes +#[repr(C)] +pub struct GstPlayer(c_void); + +impl ::std::fmt::Debug for GstPlayer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPlayer @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstPlayerAudioInfo(c_void); + +impl ::std::fmt::Debug for GstPlayerAudioInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPlayerAudioInfo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstPlayerGMainContextSignalDispatcher(c_void); + +impl ::std::fmt::Debug for GstPlayerGMainContextSignalDispatcher { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstPlayerGMainContextSignalDispatcher @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +pub struct GstPlayerMediaInfo(c_void); + +impl ::std::fmt::Debug for GstPlayerMediaInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPlayerMediaInfo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstPlayerStreamInfo(c_void); + +impl ::std::fmt::Debug for GstPlayerStreamInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPlayerStreamInfo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstPlayerSubtitleInfo(c_void); + +impl ::std::fmt::Debug for GstPlayerSubtitleInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPlayerSubtitleInfo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstPlayerVideoInfo(c_void); + +impl ::std::fmt::Debug for GstPlayerVideoInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPlayerVideoInfo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstPlayerVideoOverlayVideoRenderer(c_void); + +impl ::std::fmt::Debug for GstPlayerVideoOverlayVideoRenderer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstPlayerVideoOverlayVideoRenderer @ {:?}", + self as *const _ + )) + .finish() + } +} + +// Interfaces +#[repr(C)] +pub struct GstPlayerSignalDispatcher(c_void); + +impl ::std::fmt::Debug for GstPlayerSignalDispatcher { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstPlayerSignalDispatcher @ {:?}", self as *const _) + } +} + +#[repr(C)] +pub struct GstPlayerVideoRenderer(c_void); + +impl ::std::fmt::Debug for GstPlayerVideoRenderer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstPlayerVideoRenderer @ {:?}", self as *const _) + } +} + +#[link(name = "gstplayer-1.0")] +extern "C" { + + //========================================================================= + // GstPlayerColorBalanceType + //========================================================================= + pub fn gst_player_color_balance_type_get_type() -> GType; + pub fn gst_player_color_balance_type_get_name( + type_: GstPlayerColorBalanceType, + ) -> *const c_char; + + //========================================================================= + // GstPlayerError + //========================================================================= + pub fn gst_player_error_get_type() -> GType; + pub fn gst_player_error_get_name(error: GstPlayerError) -> *const c_char; + pub fn gst_player_error_quark() -> glib::GQuark; + + //========================================================================= + // GstPlayerState + //========================================================================= + pub fn gst_player_state_get_type() -> GType; + pub fn gst_player_state_get_name(state: GstPlayerState) -> *const c_char; + + //========================================================================= + // GstPlayerVisualization + //========================================================================= + pub fn gst_player_visualization_get_type() -> GType; + pub fn gst_player_visualization_copy( + vis: *const GstPlayerVisualization, + ) -> *mut GstPlayerVisualization; + pub fn gst_player_visualization_free(vis: *mut GstPlayerVisualization); + + //========================================================================= + // GstPlayer + //========================================================================= + pub fn gst_player_get_type() -> GType; + pub fn gst_player_new( + video_renderer: *mut GstPlayerVideoRenderer, + signal_dispatcher: *mut GstPlayerSignalDispatcher, + ) -> *mut GstPlayer; + pub fn gst_player_config_get_position_update_interval( + config: *const gst::GstStructure, + ) -> c_uint; + pub fn gst_player_config_get_seek_accurate(config: *const gst::GstStructure) -> gboolean; + pub fn gst_player_config_get_user_agent(config: *const gst::GstStructure) -> *mut c_char; + pub fn gst_player_config_set_position_update_interval( + config: *mut gst::GstStructure, + interval: c_uint, + ); + pub fn gst_player_config_set_seek_accurate(config: *mut gst::GstStructure, accurate: gboolean); + pub fn gst_player_config_set_user_agent(config: *mut gst::GstStructure, agent: *const c_char); + pub fn gst_player_get_audio_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_get_subtitle_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_get_video_streams(info: *const GstPlayerMediaInfo) -> *mut glib::GList; + pub fn gst_player_visualizations_free(viss: *mut *mut GstPlayerVisualization); + pub fn gst_player_visualizations_get() -> *mut *mut GstPlayerVisualization; + pub fn gst_player_get_audio_video_offset(player: *mut GstPlayer) -> i64; + pub fn gst_player_get_color_balance( + player: *mut GstPlayer, + type_: GstPlayerColorBalanceType, + ) -> c_double; + pub fn gst_player_get_config(player: *mut GstPlayer) -> *mut gst::GstStructure; + pub fn gst_player_get_current_audio_track(player: *mut GstPlayer) -> *mut GstPlayerAudioInfo; + pub fn gst_player_get_current_subtitle_track( + player: *mut GstPlayer, + ) -> *mut GstPlayerSubtitleInfo; + pub fn gst_player_get_current_video_track(player: *mut GstPlayer) -> *mut GstPlayerVideoInfo; + pub fn gst_player_get_current_visualization(player: *mut GstPlayer) -> *mut c_char; + pub fn gst_player_get_duration(player: *mut GstPlayer) -> gst::GstClockTime; + pub fn gst_player_get_media_info(player: *mut GstPlayer) -> *mut GstPlayerMediaInfo; + pub fn gst_player_get_multiview_flags( + player: *mut GstPlayer, + ) -> gst_video::GstVideoMultiviewFlags; + pub fn gst_player_get_multiview_mode( + player: *mut GstPlayer, + ) -> gst_video::GstVideoMultiviewFramePacking; + pub fn gst_player_get_mute(player: *mut GstPlayer) -> gboolean; + pub fn gst_player_get_pipeline(player: *mut GstPlayer) -> *mut gst::GstElement; + pub fn gst_player_get_position(player: *mut GstPlayer) -> gst::GstClockTime; + pub fn gst_player_get_rate(player: *mut GstPlayer) -> c_double; + pub fn gst_player_get_subtitle_uri(player: *mut GstPlayer) -> *mut c_char; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_player_get_subtitle_video_offset(player: *mut GstPlayer) -> i64; + pub fn gst_player_get_uri(player: *mut GstPlayer) -> *mut c_char; + pub fn gst_player_get_video_snapshot( + player: *mut GstPlayer, + format: GstPlayerSnapshotFormat, + config: *const gst::GstStructure, + ) -> *mut gst::GstSample; + pub fn gst_player_get_volume(player: *mut GstPlayer) -> c_double; + pub fn gst_player_has_color_balance(player: *mut GstPlayer) -> gboolean; + pub fn gst_player_pause(player: *mut GstPlayer); + pub fn gst_player_play(player: *mut GstPlayer); + pub fn gst_player_seek(player: *mut GstPlayer, position: gst::GstClockTime); + pub fn gst_player_set_audio_track(player: *mut GstPlayer, stream_index: c_int) -> gboolean; + pub fn gst_player_set_audio_track_enabled(player: *mut GstPlayer, enabled: gboolean); + pub fn gst_player_set_audio_video_offset(player: *mut GstPlayer, offset: i64); + pub fn gst_player_set_color_balance( + player: *mut GstPlayer, + type_: GstPlayerColorBalanceType, + value: c_double, + ); + pub fn gst_player_set_config( + player: *mut GstPlayer, + config: *mut gst::GstStructure, + ) -> gboolean; + pub fn gst_player_set_multiview_flags( + player: *mut GstPlayer, + flags: gst_video::GstVideoMultiviewFlags, + ); + pub fn gst_player_set_multiview_mode( + player: *mut GstPlayer, + mode: gst_video::GstVideoMultiviewFramePacking, + ); + pub fn gst_player_set_mute(player: *mut GstPlayer, val: gboolean); + pub fn gst_player_set_rate(player: *mut GstPlayer, rate: c_double); + pub fn gst_player_set_subtitle_track(player: *mut GstPlayer, stream_index: c_int) -> gboolean; + pub fn gst_player_set_subtitle_track_enabled(player: *mut GstPlayer, enabled: gboolean); + pub fn gst_player_set_subtitle_uri(player: *mut GstPlayer, uri: *const c_char); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_player_set_subtitle_video_offset(player: *mut GstPlayer, offset: i64); + pub fn gst_player_set_uri(player: *mut GstPlayer, uri: *const c_char); + pub fn gst_player_set_video_track(player: *mut GstPlayer, stream_index: c_int) -> gboolean; + pub fn gst_player_set_video_track_enabled(player: *mut GstPlayer, enabled: gboolean); + pub fn gst_player_set_visualization(player: *mut GstPlayer, name: *const c_char) -> gboolean; + pub fn gst_player_set_visualization_enabled(player: *mut GstPlayer, enabled: gboolean); + pub fn gst_player_set_volume(player: *mut GstPlayer, val: c_double); + pub fn gst_player_stop(player: *mut GstPlayer); + + //========================================================================= + // GstPlayerAudioInfo + //========================================================================= + pub fn gst_player_audio_info_get_type() -> GType; + pub fn gst_player_audio_info_get_bitrate(info: *const GstPlayerAudioInfo) -> c_int; + pub fn gst_player_audio_info_get_channels(info: *const GstPlayerAudioInfo) -> c_int; + pub fn gst_player_audio_info_get_language(info: *const GstPlayerAudioInfo) -> *const c_char; + pub fn gst_player_audio_info_get_max_bitrate(info: *const GstPlayerAudioInfo) -> c_int; + pub fn gst_player_audio_info_get_sample_rate(info: *const GstPlayerAudioInfo) -> c_int; + + //========================================================================= + // GstPlayerGMainContextSignalDispatcher + //========================================================================= + pub fn gst_player_g_main_context_signal_dispatcher_get_type() -> GType; + pub fn gst_player_g_main_context_signal_dispatcher_new( + application_context: *mut glib::GMainContext, + ) -> *mut GstPlayerSignalDispatcher; + + //========================================================================= + // GstPlayerMediaInfo + //========================================================================= + pub fn gst_player_media_info_get_type() -> GType; + pub fn gst_player_media_info_get_audio_streams( + info: *const GstPlayerMediaInfo, + ) -> *mut glib::GList; + pub fn gst_player_media_info_get_container_format( + info: *const GstPlayerMediaInfo, + ) -> *const c_char; + pub fn gst_player_media_info_get_duration(info: *const GstPlayerMediaInfo) + -> gst::GstClockTime; + pub fn gst_player_media_info_get_image_sample( + info: *const GstPlayerMediaInfo, + ) -> *mut gst::GstSample; + pub fn gst_player_media_info_get_number_of_audio_streams( + info: *const GstPlayerMediaInfo, + ) -> c_uint; + pub fn gst_player_media_info_get_number_of_streams(info: *const GstPlayerMediaInfo) -> c_uint; + pub fn gst_player_media_info_get_number_of_subtitle_streams( + info: *const GstPlayerMediaInfo, + ) -> c_uint; + pub fn gst_player_media_info_get_number_of_video_streams( + info: *const GstPlayerMediaInfo, + ) -> c_uint; + pub fn gst_player_media_info_get_stream_list( + info: *const GstPlayerMediaInfo, + ) -> *mut glib::GList; + pub fn gst_player_media_info_get_subtitle_streams( + info: *const GstPlayerMediaInfo, + ) -> *mut glib::GList; + pub fn gst_player_media_info_get_tags(info: *const GstPlayerMediaInfo) -> *mut gst::GstTagList; + pub fn gst_player_media_info_get_title(info: *const GstPlayerMediaInfo) -> *const c_char; + pub fn gst_player_media_info_get_uri(info: *const GstPlayerMediaInfo) -> *const c_char; + pub fn gst_player_media_info_get_video_streams( + info: *const GstPlayerMediaInfo, + ) -> *mut glib::GList; + pub fn gst_player_media_info_is_live(info: *const GstPlayerMediaInfo) -> gboolean; + pub fn gst_player_media_info_is_seekable(info: *const GstPlayerMediaInfo) -> gboolean; + + //========================================================================= + // GstPlayerStreamInfo + //========================================================================= + pub fn gst_player_stream_info_get_type() -> GType; + pub fn gst_player_stream_info_get_caps(info: *const GstPlayerStreamInfo) -> *mut gst::GstCaps; + pub fn gst_player_stream_info_get_codec(info: *const GstPlayerStreamInfo) -> *const c_char; + pub fn gst_player_stream_info_get_index(info: *const GstPlayerStreamInfo) -> c_int; + pub fn gst_player_stream_info_get_stream_type( + info: *const GstPlayerStreamInfo, + ) -> *const c_char; + pub fn gst_player_stream_info_get_tags( + info: *const GstPlayerStreamInfo, + ) -> *mut gst::GstTagList; + + //========================================================================= + // GstPlayerSubtitleInfo + //========================================================================= + pub fn gst_player_subtitle_info_get_type() -> GType; + pub fn gst_player_subtitle_info_get_language( + info: *const GstPlayerSubtitleInfo, + ) -> *const c_char; + + //========================================================================= + // GstPlayerVideoInfo + //========================================================================= + pub fn gst_player_video_info_get_type() -> GType; + pub fn gst_player_video_info_get_bitrate(info: *const GstPlayerVideoInfo) -> c_int; + pub fn gst_player_video_info_get_framerate( + info: *const GstPlayerVideoInfo, + fps_n: *mut c_int, + fps_d: *mut c_int, + ); + pub fn gst_player_video_info_get_height(info: *const GstPlayerVideoInfo) -> c_int; + pub fn gst_player_video_info_get_max_bitrate(info: *const GstPlayerVideoInfo) -> c_int; + pub fn gst_player_video_info_get_pixel_aspect_ratio( + info: *const GstPlayerVideoInfo, + par_n: *mut c_uint, + par_d: *mut c_uint, + ); + pub fn gst_player_video_info_get_width(info: *const GstPlayerVideoInfo) -> c_int; + + //========================================================================= + // GstPlayerVideoOverlayVideoRenderer + //========================================================================= + pub fn gst_player_video_overlay_video_renderer_get_type() -> GType; + pub fn gst_player_video_overlay_video_renderer_new( + window_handle: gpointer, + ) -> *mut GstPlayerVideoRenderer; + pub fn gst_player_video_overlay_video_renderer_new_with_sink( + window_handle: gpointer, + video_sink: *mut gst::GstElement, + ) -> *mut GstPlayerVideoRenderer; + pub fn gst_player_video_overlay_video_renderer_expose( + self_: *mut GstPlayerVideoOverlayVideoRenderer, + ); + pub fn gst_player_video_overlay_video_renderer_get_render_rectangle( + self_: *mut GstPlayerVideoOverlayVideoRenderer, + x: *mut c_int, + y: *mut c_int, + width: *mut c_int, + height: *mut c_int, + ); + pub fn gst_player_video_overlay_video_renderer_get_window_handle( + self_: *mut GstPlayerVideoOverlayVideoRenderer, + ) -> gpointer; + pub fn gst_player_video_overlay_video_renderer_set_render_rectangle( + self_: *mut GstPlayerVideoOverlayVideoRenderer, + x: c_int, + y: c_int, + width: c_int, + height: c_int, + ); + pub fn gst_player_video_overlay_video_renderer_set_window_handle( + self_: *mut GstPlayerVideoOverlayVideoRenderer, + window_handle: gpointer, + ); + + //========================================================================= + // GstPlayerSignalDispatcher + //========================================================================= + pub fn gst_player_signal_dispatcher_get_type() -> GType; + + //========================================================================= + // GstPlayerVideoRenderer + //========================================================================= + pub fn gst_player_video_renderer_get_type() -> GType; + +} diff --git a/sys/gstreamer-player-sys/tests/abi.rs b/sys/gstreamer-player-sys/tests/abi.rs new file mode 100644 index 000000000..e979ded0f --- /dev/null +++ b/sys/gstreamer-player-sys/tests/abi.rs @@ -0,0 +1,321 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_player_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_player_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-player-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstPlayerColorBalanceType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerSignalDispatcherInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerSnapshotFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerVideoRendererInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPlayerVisualization", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(gint) GST_PLAYER_COLOR_BALANCE_BRIGHTNESS", "0"), + ("(gint) GST_PLAYER_COLOR_BALANCE_CONTRAST", "1"), + ("(gint) GST_PLAYER_COLOR_BALANCE_HUE", "3"), + ("(gint) GST_PLAYER_COLOR_BALANCE_SATURATION", "2"), + ("(gint) GST_PLAYER_ERROR_FAILED", "0"), + ("(gint) GST_PLAYER_STATE_BUFFERING", "1"), + ("(gint) GST_PLAYER_STATE_PAUSED", "2"), + ("(gint) GST_PLAYER_STATE_PLAYING", "3"), + ("(gint) GST_PLAYER_STATE_STOPPED", "0"), + ("(gint) GST_PLAYER_THUMBNAIL_JPG", "3"), + ("(gint) GST_PLAYER_THUMBNAIL_PNG", "4"), + ("(gint) GST_PLAYER_THUMBNAIL_RAW_BGRx", "2"), + ("(gint) GST_PLAYER_THUMBNAIL_RAW_NATIVE", "0"), + ("(gint) GST_PLAYER_THUMBNAIL_RAW_xRGB", "1"), +]; diff --git a/sys/gstreamer-player-sys/tests/constant.c b/sys/gstreamer-player-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-player-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-player-sys/tests/layout.c b/sys/gstreamer-player-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-player-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-player-sys/tests/manual.h b/sys/gstreamer-player-sys/tests/manual.h new file mode 100644 index 000000000..bd826c2f0 --- /dev/null +++ b/sys/gstreamer-player-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-rtp-sys/CHANGELOG.md b/sys/gstreamer-rtp-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-rtp-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-rtp-sys/Cargo.toml b/sys/gstreamer-rtp-sys/Cargo.toml new file mode 100644 index 000000000..1ead2708c --- /dev/null +++ b/sys/gstreamer-rtp-sys/Cargo.toml @@ -0,0 +1,64 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-base-sys] +path = "../gstreamer-base-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_4 = ["v1_2"] +v1_8 = ["v1_6"] +v1_8_1 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_2 = [] +v1_6 = ["v1_4"] +v1_6_1 = ["v1_6"] +v1_10 = ["v1_8"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] + +[lib] +name = "gstreamer_rtp_sys" + +[package] +authors = ["Mathieu Duponchelle ", "Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstrtp-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_rtp_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstrtp-1.0" +name = "gstreamer-rtp-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_rtp_1_0] +name = "gstreamer-rtp-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_rtp_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-rtp-sys/README.md b/sys/gstreamer-rtp-sys/README.md new file mode 100644 index 000000000..0f3273498 --- /dev/null +++ b/sys/gstreamer-rtp-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-rtp-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-rtp-sys.svg)](https://crates.io/crates/gstreamer-rtp-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (RTP library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-rtp-sys/build.rs b/sys/gstreamer-rtp-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-rtp-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-rtp-sys/src/lib.rs b/sys/gstreamer-rtp-sys/src/lib.rs new file mode 100644 index 000000000..63899902f --- /dev/null +++ b/sys/gstreamer-rtp-sys/src/lib.rs @@ -0,0 +1,1125 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstRTCPFBType = c_int; +pub const GST_RTCP_FB_TYPE_INVALID: GstRTCPFBType = 0; +pub const GST_RTCP_RTPFB_TYPE_NACK: GstRTCPFBType = 1; +pub const GST_RTCP_RTPFB_TYPE_TMMBR: GstRTCPFBType = 3; +pub const GST_RTCP_RTPFB_TYPE_TMMBN: GstRTCPFBType = 4; +pub const GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ: GstRTCPFBType = 5; +pub const GST_RTCP_RTPFB_TYPE_TWCC: GstRTCPFBType = 15; +pub const GST_RTCP_PSFB_TYPE_PLI: GstRTCPFBType = 1; +pub const GST_RTCP_PSFB_TYPE_SLI: GstRTCPFBType = 2; +pub const GST_RTCP_PSFB_TYPE_RPSI: GstRTCPFBType = 3; +pub const GST_RTCP_PSFB_TYPE_AFB: GstRTCPFBType = 15; +pub const GST_RTCP_PSFB_TYPE_FIR: GstRTCPFBType = 4; +pub const GST_RTCP_PSFB_TYPE_TSTR: GstRTCPFBType = 5; +pub const GST_RTCP_PSFB_TYPE_TSTN: GstRTCPFBType = 6; +pub const GST_RTCP_PSFB_TYPE_VBCN: GstRTCPFBType = 7; + +pub type GstRTCPSDESType = c_int; +pub const GST_RTCP_SDES_INVALID: GstRTCPSDESType = -1; +pub const GST_RTCP_SDES_END: GstRTCPSDESType = 0; +pub const GST_RTCP_SDES_CNAME: GstRTCPSDESType = 1; +pub const GST_RTCP_SDES_NAME: GstRTCPSDESType = 2; +pub const GST_RTCP_SDES_EMAIL: GstRTCPSDESType = 3; +pub const GST_RTCP_SDES_PHONE: GstRTCPSDESType = 4; +pub const GST_RTCP_SDES_LOC: GstRTCPSDESType = 5; +pub const GST_RTCP_SDES_TOOL: GstRTCPSDESType = 6; +pub const GST_RTCP_SDES_NOTE: GstRTCPSDESType = 7; +pub const GST_RTCP_SDES_PRIV: GstRTCPSDESType = 8; + +pub type GstRTCPType = c_int; +pub const GST_RTCP_TYPE_INVALID: GstRTCPType = 0; +pub const GST_RTCP_TYPE_SR: GstRTCPType = 200; +pub const GST_RTCP_TYPE_RR: GstRTCPType = 201; +pub const GST_RTCP_TYPE_SDES: GstRTCPType = 202; +pub const GST_RTCP_TYPE_BYE: GstRTCPType = 203; +pub const GST_RTCP_TYPE_APP: GstRTCPType = 204; +pub const GST_RTCP_TYPE_RTPFB: GstRTCPType = 205; +pub const GST_RTCP_TYPE_PSFB: GstRTCPType = 206; +pub const GST_RTCP_TYPE_XR: GstRTCPType = 207; + +pub type GstRTCPXRType = c_int; +pub const GST_RTCP_XR_TYPE_INVALID: GstRTCPXRType = -1; +pub const GST_RTCP_XR_TYPE_LRLE: GstRTCPXRType = 1; +pub const GST_RTCP_XR_TYPE_DRLE: GstRTCPXRType = 2; +pub const GST_RTCP_XR_TYPE_PRT: GstRTCPXRType = 3; +pub const GST_RTCP_XR_TYPE_RRT: GstRTCPXRType = 4; +pub const GST_RTCP_XR_TYPE_DLRR: GstRTCPXRType = 5; +pub const GST_RTCP_XR_TYPE_SSUMM: GstRTCPXRType = 6; +pub const GST_RTCP_XR_TYPE_VOIP_METRICS: GstRTCPXRType = 7; + +pub type GstRTPPayload = c_int; +pub const GST_RTP_PAYLOAD_PCMU: GstRTPPayload = 0; +pub const GST_RTP_PAYLOAD_1016: GstRTPPayload = 1; +pub const GST_RTP_PAYLOAD_G721: GstRTPPayload = 2; +pub const GST_RTP_PAYLOAD_GSM: GstRTPPayload = 3; +pub const GST_RTP_PAYLOAD_G723: GstRTPPayload = 4; +pub const GST_RTP_PAYLOAD_DVI4_8000: GstRTPPayload = 5; +pub const GST_RTP_PAYLOAD_DVI4_16000: GstRTPPayload = 6; +pub const GST_RTP_PAYLOAD_LPC: GstRTPPayload = 7; +pub const GST_RTP_PAYLOAD_PCMA: GstRTPPayload = 8; +pub const GST_RTP_PAYLOAD_G722: GstRTPPayload = 9; +pub const GST_RTP_PAYLOAD_L16_STEREO: GstRTPPayload = 10; +pub const GST_RTP_PAYLOAD_L16_MONO: GstRTPPayload = 11; +pub const GST_RTP_PAYLOAD_QCELP: GstRTPPayload = 12; +pub const GST_RTP_PAYLOAD_CN: GstRTPPayload = 13; +pub const GST_RTP_PAYLOAD_MPA: GstRTPPayload = 14; +pub const GST_RTP_PAYLOAD_G728: GstRTPPayload = 15; +pub const GST_RTP_PAYLOAD_DVI4_11025: GstRTPPayload = 16; +pub const GST_RTP_PAYLOAD_DVI4_22050: GstRTPPayload = 17; +pub const GST_RTP_PAYLOAD_G729: GstRTPPayload = 18; +pub const GST_RTP_PAYLOAD_CELLB: GstRTPPayload = 25; +pub const GST_RTP_PAYLOAD_JPEG: GstRTPPayload = 26; +pub const GST_RTP_PAYLOAD_NV: GstRTPPayload = 28; +pub const GST_RTP_PAYLOAD_H261: GstRTPPayload = 31; +pub const GST_RTP_PAYLOAD_MPV: GstRTPPayload = 32; +pub const GST_RTP_PAYLOAD_MP2T: GstRTPPayload = 33; +pub const GST_RTP_PAYLOAD_H263: GstRTPPayload = 34; + +pub type GstRTPProfile = c_int; +pub const GST_RTP_PROFILE_UNKNOWN: GstRTPProfile = 0; +pub const GST_RTP_PROFILE_AVP: GstRTPProfile = 1; +pub const GST_RTP_PROFILE_SAVP: GstRTPProfile = 2; +pub const GST_RTP_PROFILE_AVPF: GstRTPProfile = 3; +pub const GST_RTP_PROFILE_SAVPF: GstRTPProfile = 4; + +// Constants +pub const GST_RTCP_MAX_BYE_SSRC_COUNT: c_int = 31; +pub const GST_RTCP_MAX_RB_COUNT: c_int = 31; +pub const GST_RTCP_MAX_SDES: c_int = 255; +pub const GST_RTCP_MAX_SDES_ITEM_COUNT: c_int = 31; +pub const GST_RTCP_REDUCED_SIZE_VALID_MASK: c_int = 57592; +pub const GST_RTCP_VALID_MASK: c_int = 57598; +pub const GST_RTCP_VALID_VALUE: c_int = 200; +pub const GST_RTCP_VERSION: c_int = 2; +pub const GST_RTP_HDREXT_BASE: *const c_char = + b"urn:ietf:params:rtp-hdrext:\0" as *const u8 as *const c_char; +pub const GST_RTP_HDREXT_NTP_56: *const c_char = b"ntp-56\0" as *const u8 as *const c_char; +pub const GST_RTP_HDREXT_NTP_56_SIZE: c_int = 7; +pub const GST_RTP_HDREXT_NTP_64: *const c_char = b"ntp-64\0" as *const u8 as *const c_char; +pub const GST_RTP_HDREXT_NTP_64_SIZE: c_int = 8; +pub const GST_RTP_PAYLOAD_1016_STRING: *const c_char = b"1\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_CELLB_STRING: *const c_char = b"25\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_CN_STRING: *const c_char = b"13\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_DVI4_11025_STRING: *const c_char = b"16\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_DVI4_16000_STRING: *const c_char = b"6\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_DVI4_22050_STRING: *const c_char = b"17\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_DVI4_8000_STRING: *const c_char = b"5\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_DYNAMIC_STRING: *const c_char = + b"[96, 127]\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_G721_STRING: *const c_char = b"2\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_G722_STRING: *const c_char = b"9\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_G723_53: c_int = 17; +pub const GST_RTP_PAYLOAD_G723_53_STRING: *const c_char = b"17\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_G723_63: c_int = 16; +pub const GST_RTP_PAYLOAD_G723_63_STRING: *const c_char = b"16\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_G723_STRING: *const c_char = b"4\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_G728_STRING: *const c_char = b"15\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_G729_STRING: *const c_char = b"18\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_GSM_STRING: *const c_char = b"3\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_H261_STRING: *const c_char = b"31\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_H263_STRING: *const c_char = b"34\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_JPEG_STRING: *const c_char = b"26\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_L16_MONO_STRING: *const c_char = b"11\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_L16_STEREO_STRING: *const c_char = b"10\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_LPC_STRING: *const c_char = b"7\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_MP2T_STRING: *const c_char = b"33\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_MPA_STRING: *const c_char = b"14\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_MPV_STRING: *const c_char = b"32\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_NV_STRING: *const c_char = b"28\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_PCMA_STRING: *const c_char = b"8\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_PCMU_STRING: *const c_char = b"0\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_QCELP_STRING: *const c_char = b"12\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_TS41: c_int = 19; +pub const GST_RTP_PAYLOAD_TS41_STRING: *const c_char = b"19\0" as *const u8 as *const c_char; +pub const GST_RTP_PAYLOAD_TS48: c_int = 18; +pub const GST_RTP_PAYLOAD_TS48_STRING: *const c_char = b"18\0" as *const u8 as *const c_char; +pub const GST_RTP_SOURCE_META_MAX_CSRC_COUNT: c_int = 15; +pub const GST_RTP_VERSION: c_int = 2; + +// Flags +pub type GstRTPBufferFlags = c_uint; +pub const GST_RTP_BUFFER_FLAG_RETRANSMISSION: GstRTPBufferFlags = 1048576; +pub const GST_RTP_BUFFER_FLAG_REDUNDANT: GstRTPBufferFlags = 2097152; +pub const GST_RTP_BUFFER_FLAG_LAST: GstRTPBufferFlags = 268435456; + +pub type GstRTPBufferMapFlags = c_uint; +pub const GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING: GstRTPBufferMapFlags = 65536; +pub const GST_RTP_BUFFER_MAP_FLAG_LAST: GstRTPBufferMapFlags = 16777216; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTCPBuffer { + pub buffer: *mut gst::GstBuffer, + pub map: gst::GstMapInfo, +} + +impl ::std::fmt::Debug for GstRTCPBuffer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTCPBuffer @ {:?}", self as *const _)) + .field("buffer", &self.buffer) + .field("map", &self.map) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTCPPacket { + pub rtcp: *mut GstRTCPBuffer, + pub offset: c_uint, + pub padding: gboolean, + pub count: u8, + pub type_: GstRTCPType, + pub length: u16, + pub item_offset: c_uint, + pub item_count: c_uint, + pub entry_offset: c_uint, +} + +impl ::std::fmt::Debug for GstRTCPPacket { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTCPPacket @ {:?}", self as *const _)) + .field("rtcp", &self.rtcp) + .field("offset", &self.offset) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTPBaseAudioPayloadClass { + pub parent_class: GstRTPBasePayloadClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTPBaseAudioPayloadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTPBaseAudioPayloadClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTPBaseAudioPayloadPrivate(c_void); + +pub type GstRTPBaseAudioPayloadPrivate = *mut _GstRTPBaseAudioPayloadPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTPBaseDepayloadClass { + pub parent_class: gst::GstElementClass, + pub set_caps: + Option gboolean>, + pub process: Option< + unsafe extern "C" fn(*mut GstRTPBaseDepayload, *mut gst::GstBuffer) -> *mut gst::GstBuffer, + >, + pub packet_lost: + Option gboolean>, + pub handle_event: + Option gboolean>, + pub process_rtp_packet: Option< + unsafe extern "C" fn(*mut GstRTPBaseDepayload, *mut GstRTPBuffer) -> *mut gst::GstBuffer, + >, + pub _gst_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GstRTPBaseDepayloadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTPBaseDepayloadClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("set_caps", &self.set_caps) + .field("process", &self.process) + .field("packet_lost", &self.packet_lost) + .field("handle_event", &self.handle_event) + .field("process_rtp_packet", &self.process_rtp_packet) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTPBaseDepayloadPrivate(c_void); + +pub type GstRTPBaseDepayloadPrivate = *mut _GstRTPBaseDepayloadPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTPBasePayloadClass { + pub parent_class: gst::GstElementClass, + pub get_caps: Option< + unsafe extern "C" fn( + *mut GstRTPBasePayload, + *mut gst::GstPad, + *mut gst::GstCaps, + ) -> *mut gst::GstCaps, + >, + pub set_caps: + Option gboolean>, + pub handle_buffer: Option< + unsafe extern "C" fn(*mut GstRTPBasePayload, *mut gst::GstBuffer) -> gst::GstFlowReturn, + >, + pub sink_event: + Option gboolean>, + pub src_event: + Option gboolean>, + pub query: Option< + unsafe extern "C" fn( + *mut GstRTPBasePayload, + *mut gst::GstPad, + *mut gst::GstQuery, + ) -> gboolean, + >, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTPBasePayloadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTPBasePayloadClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("get_caps", &self.get_caps) + .field("set_caps", &self.set_caps) + .field("handle_buffer", &self.handle_buffer) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("query", &self.query) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTPBasePayloadPrivate(c_void); + +pub type GstRTPBasePayloadPrivate = *mut _GstRTPBasePayloadPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTPBuffer { + pub buffer: *mut gst::GstBuffer, + pub state: c_uint, + pub data: [gpointer; 4], + pub size: [size_t; 4], + pub map: [gst::GstMapInfo; 4], +} + +impl ::std::fmt::Debug for GstRTPBuffer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTPBuffer @ {:?}", self as *const _)) + .field("buffer", &self.buffer) + .field("state", &self.state) + .field("data", &self.data) + .field("size", &self.size) + .field("map", &self.map) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTPPayloadInfo { + pub payload_type: u8, + pub media: *const c_char, + pub encoding_name: *const c_char, + pub clock_rate: c_uint, + pub encoding_parameters: *const c_char, + pub bitrate: c_uint, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTPPayloadInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTPPayloadInfo @ {:?}", self as *const _)) + .field("payload_type", &self.payload_type) + .field("media", &self.media) + .field("encoding_name", &self.encoding_name) + .field("clock_rate", &self.clock_rate) + .field("encoding_parameters", &self.encoding_parameters) + .field("bitrate", &self.bitrate) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTPSourceMeta { + pub meta: gst::GstMeta, + pub ssrc: u32, + pub ssrc_valid: gboolean, + pub csrc: [u32; 15], + pub csrc_count: c_uint, +} + +impl ::std::fmt::Debug for GstRTPSourceMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTPSourceMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("ssrc", &self.ssrc) + .field("ssrc_valid", &self.ssrc_valid) + .field("csrc", &self.csrc) + .field("csrc_count", &self.csrc_count) + .finish() + } +} + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTPBaseAudioPayload { + pub payload: GstRTPBasePayload, + pub priv_: *mut GstRTPBaseAudioPayloadPrivate, + pub base_ts: gst::GstClockTime, + pub frame_size: c_int, + pub frame_duration: c_int, + pub sample_size: c_int, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTPBaseAudioPayload { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTPBaseAudioPayload @ {:?}", self as *const _)) + .field("payload", &self.payload) + .field("priv_", &self.priv_) + .field("base_ts", &self.base_ts) + .field("frame_size", &self.frame_size) + .field("frame_duration", &self.frame_duration) + .field("sample_size", &self.sample_size) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTPBaseDepayload { + pub parent: gst::GstElement, + pub sinkpad: *mut gst::GstPad, + pub srcpad: *mut gst::GstPad, + pub clock_rate: c_uint, + pub segment: gst::GstSegment, + pub need_newsegment: gboolean, + pub priv_: *mut GstRTPBaseDepayloadPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTPBaseDepayload { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTPBaseDepayload @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("sinkpad", &self.sinkpad) + .field("srcpad", &self.srcpad) + .field("clock_rate", &self.clock_rate) + .field("segment", &self.segment) + .field("need_newsegment", &self.need_newsegment) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTPBasePayload { + pub element: gst::GstElement, + pub sinkpad: *mut gst::GstPad, + pub srcpad: *mut gst::GstPad, + pub ts_base: u32, + pub seqnum_base: u16, + pub media: *mut c_char, + pub encoding_name: *mut c_char, + pub dynamic: gboolean, + pub clock_rate: u32, + pub ts_offset: i32, + pub timestamp: u32, + pub seqnum_offset: i16, + pub seqnum: u16, + pub max_ptime: i64, + pub pt: c_uint, + pub ssrc: c_uint, + pub current_ssrc: c_uint, + pub mtu: c_uint, + pub segment: gst::GstSegment, + pub min_ptime: u64, + pub ptime: u64, + pub ptime_multiple: u64, + pub priv_: *mut GstRTPBasePayloadPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTPBasePayload { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTPBasePayload @ {:?}", self as *const _)) + .field("element", &self.element) + .finish() + } +} + +#[link(name = "gstrtp-1.0")] +extern "C" { + + //========================================================================= + // GstRTCPFBType + //========================================================================= + pub fn gst_rtcpfb_type_get_type() -> GType; + + //========================================================================= + // GstRTCPSDESType + //========================================================================= + pub fn gst_rtcpsdes_type_get_type() -> GType; + + //========================================================================= + // GstRTCPType + //========================================================================= + pub fn gst_rtcp_type_get_type() -> GType; + + //========================================================================= + // GstRTCPXRType + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcpxr_type_get_type() -> GType; + + //========================================================================= + // GstRTPPayload + //========================================================================= + pub fn gst_rtp_payload_get_type() -> GType; + + //========================================================================= + // GstRTPProfile + //========================================================================= + pub fn gst_rtp_profile_get_type() -> GType; + + //========================================================================= + // GstRTPBufferFlags + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtp_buffer_flags_get_type() -> GType; + + //========================================================================= + // GstRTPBufferMapFlags + //========================================================================= + pub fn gst_rtp_buffer_map_flags_get_type() -> GType; + + //========================================================================= + // GstRTCPBuffer + //========================================================================= + pub fn gst_rtcp_buffer_add_packet( + rtcp: *mut GstRTCPBuffer, + type_: GstRTCPType, + packet: *mut GstRTCPPacket, + ) -> gboolean; + pub fn gst_rtcp_buffer_get_first_packet( + rtcp: *mut GstRTCPBuffer, + packet: *mut GstRTCPPacket, + ) -> gboolean; + pub fn gst_rtcp_buffer_get_packet_count(rtcp: *mut GstRTCPBuffer) -> c_uint; + pub fn gst_rtcp_buffer_unmap(rtcp: *mut GstRTCPBuffer) -> gboolean; + pub fn gst_rtcp_buffer_map( + buffer: *mut gst::GstBuffer, + flags: gst::GstMapFlags, + rtcp: *mut GstRTCPBuffer, + ) -> gboolean; + pub fn gst_rtcp_buffer_new(mtu: c_uint) -> *mut gst::GstBuffer; + pub fn gst_rtcp_buffer_new_copy_data(data: gconstpointer, len: c_uint) -> *mut gst::GstBuffer; + pub fn gst_rtcp_buffer_new_take_data(data: gpointer, len: c_uint) -> *mut gst::GstBuffer; + pub fn gst_rtcp_buffer_validate(buffer: *mut gst::GstBuffer) -> gboolean; + pub fn gst_rtcp_buffer_validate_data(data: *mut u8, len: c_uint) -> gboolean; + pub fn gst_rtcp_buffer_validate_data_reduced(data: *mut u8, len: c_uint) -> gboolean; + pub fn gst_rtcp_buffer_validate_reduced(buffer: *mut gst::GstBuffer) -> gboolean; + + //========================================================================= + // GstRTCPPacket + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_add_profile_specific_ext( + packet: *mut GstRTCPPacket, + data: *const u8, + len: c_uint, + ) -> gboolean; + pub fn gst_rtcp_packet_add_rb( + packet: *mut GstRTCPPacket, + ssrc: u32, + fractionlost: u8, + packetslost: i32, + exthighestseq: u32, + jitter: u32, + lsr: u32, + dlsr: u32, + ) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_app_get_data(packet: *mut GstRTCPPacket) -> *mut u8; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_app_get_data_length(packet: *mut GstRTCPPacket) -> u16; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_app_get_name(packet: *mut GstRTCPPacket) -> *const c_char; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_app_get_ssrc(packet: *mut GstRTCPPacket) -> u32; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_app_get_subtype(packet: *mut GstRTCPPacket) -> u8; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_app_set_data_length( + packet: *mut GstRTCPPacket, + wordlen: u16, + ) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_app_set_name(packet: *mut GstRTCPPacket, name: *const c_char); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_app_set_ssrc(packet: *mut GstRTCPPacket, ssrc: u32); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_app_set_subtype(packet: *mut GstRTCPPacket, subtype: u8); + pub fn gst_rtcp_packet_bye_add_ssrc(packet: *mut GstRTCPPacket, ssrc: u32) -> gboolean; + pub fn gst_rtcp_packet_bye_add_ssrcs( + packet: *mut GstRTCPPacket, + ssrc: *mut u32, + len: c_uint, + ) -> gboolean; + pub fn gst_rtcp_packet_bye_get_nth_ssrc(packet: *mut GstRTCPPacket, nth: c_uint) -> u32; + pub fn gst_rtcp_packet_bye_get_reason(packet: *mut GstRTCPPacket) -> *mut c_char; + pub fn gst_rtcp_packet_bye_get_reason_len(packet: *mut GstRTCPPacket) -> u8; + pub fn gst_rtcp_packet_bye_get_ssrc_count(packet: *mut GstRTCPPacket) -> c_uint; + pub fn gst_rtcp_packet_bye_set_reason( + packet: *mut GstRTCPPacket, + reason: *const c_char, + ) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_copy_profile_specific_ext( + packet: *mut GstRTCPPacket, + data: *mut *mut u8, + len: *mut c_uint, + ) -> gboolean; + pub fn gst_rtcp_packet_fb_get_fci(packet: *mut GstRTCPPacket) -> *mut u8; + pub fn gst_rtcp_packet_fb_get_fci_length(packet: *mut GstRTCPPacket) -> u16; + pub fn gst_rtcp_packet_fb_get_media_ssrc(packet: *mut GstRTCPPacket) -> u32; + pub fn gst_rtcp_packet_fb_get_sender_ssrc(packet: *mut GstRTCPPacket) -> u32; + pub fn gst_rtcp_packet_fb_get_type(packet: *mut GstRTCPPacket) -> GstRTCPFBType; + pub fn gst_rtcp_packet_fb_set_fci_length(packet: *mut GstRTCPPacket, wordlen: u16) -> gboolean; + pub fn gst_rtcp_packet_fb_set_media_ssrc(packet: *mut GstRTCPPacket, ssrc: u32); + pub fn gst_rtcp_packet_fb_set_sender_ssrc(packet: *mut GstRTCPPacket, ssrc: u32); + pub fn gst_rtcp_packet_fb_set_type(packet: *mut GstRTCPPacket, type_: GstRTCPFBType); + pub fn gst_rtcp_packet_get_count(packet: *mut GstRTCPPacket) -> u8; + pub fn gst_rtcp_packet_get_length(packet: *mut GstRTCPPacket) -> u16; + pub fn gst_rtcp_packet_get_padding(packet: *mut GstRTCPPacket) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_get_profile_specific_ext( + packet: *mut GstRTCPPacket, + data: *mut *mut u8, + len: *mut c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_rtcp_packet_get_profile_specific_ext_length(packet: *mut GstRTCPPacket) -> u16; + pub fn gst_rtcp_packet_get_rb( + packet: *mut GstRTCPPacket, + nth: c_uint, + ssrc: *mut u32, + fractionlost: *mut u8, + packetslost: *mut i32, + exthighestseq: *mut u32, + jitter: *mut u32, + lsr: *mut u32, + dlsr: *mut u32, + ); + pub fn gst_rtcp_packet_get_rb_count(packet: *mut GstRTCPPacket) -> c_uint; + pub fn gst_rtcp_packet_get_type(packet: *mut GstRTCPPacket) -> GstRTCPType; + pub fn gst_rtcp_packet_move_to_next(packet: *mut GstRTCPPacket) -> gboolean; + pub fn gst_rtcp_packet_remove(packet: *mut GstRTCPPacket) -> gboolean; + pub fn gst_rtcp_packet_rr_get_ssrc(packet: *mut GstRTCPPacket) -> u32; + pub fn gst_rtcp_packet_rr_set_ssrc(packet: *mut GstRTCPPacket, ssrc: u32); + pub fn gst_rtcp_packet_sdes_add_entry( + packet: *mut GstRTCPPacket, + type_: GstRTCPSDESType, + len: u8, + data: *const u8, + ) -> gboolean; + pub fn gst_rtcp_packet_sdes_add_item(packet: *mut GstRTCPPacket, ssrc: u32) -> gboolean; + pub fn gst_rtcp_packet_sdes_copy_entry( + packet: *mut GstRTCPPacket, + type_: *mut GstRTCPSDESType, + len: *mut u8, + data: *mut *mut u8, + ) -> gboolean; + pub fn gst_rtcp_packet_sdes_first_entry(packet: *mut GstRTCPPacket) -> gboolean; + pub fn gst_rtcp_packet_sdes_first_item(packet: *mut GstRTCPPacket) -> gboolean; + pub fn gst_rtcp_packet_sdes_get_entry( + packet: *mut GstRTCPPacket, + type_: *mut GstRTCPSDESType, + len: *mut u8, + data: *mut *mut u8, + ) -> gboolean; + pub fn gst_rtcp_packet_sdes_get_item_count(packet: *mut GstRTCPPacket) -> c_uint; + pub fn gst_rtcp_packet_sdes_get_ssrc(packet: *mut GstRTCPPacket) -> u32; + pub fn gst_rtcp_packet_sdes_next_entry(packet: *mut GstRTCPPacket) -> gboolean; + pub fn gst_rtcp_packet_sdes_next_item(packet: *mut GstRTCPPacket) -> gboolean; + pub fn gst_rtcp_packet_set_rb( + packet: *mut GstRTCPPacket, + nth: c_uint, + ssrc: u32, + fractionlost: u8, + packetslost: i32, + exthighestseq: u32, + jitter: u32, + lsr: u32, + dlsr: u32, + ); + pub fn gst_rtcp_packet_sr_get_sender_info( + packet: *mut GstRTCPPacket, + ssrc: *mut u32, + ntptime: *mut u64, + rtptime: *mut u32, + packet_count: *mut u32, + octet_count: *mut u32, + ); + pub fn gst_rtcp_packet_sr_set_sender_info( + packet: *mut GstRTCPPacket, + ssrc: u32, + ntptime: u64, + rtptime: u32, + packet_count: u32, + octet_count: u32, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_first_rb(packet: *mut GstRTCPPacket) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_block_length(packet: *mut GstRTCPPacket) -> u16; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_block_type(packet: *mut GstRTCPPacket) -> GstRTCPXRType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_dlrr_block( + packet: *mut GstRTCPPacket, + nth: c_uint, + ssrc: *mut u32, + last_rr: *mut u32, + delay: *mut u32, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_prt_by_seq( + packet: *mut GstRTCPPacket, + seq: u16, + receipt_time: *mut u32, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_prt_info( + packet: *mut GstRTCPPacket, + ssrc: *mut u32, + thinning: *mut u8, + begin_seq: *mut u16, + end_seq: *mut u16, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_rle_info( + packet: *mut GstRTCPPacket, + ssrc: *mut u32, + thinning: *mut u8, + begin_seq: *mut u16, + end_seq: *mut u16, + chunk_count: *mut u32, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_rle_nth_chunk( + packet: *mut GstRTCPPacket, + nth: c_uint, + chunk: *mut u16, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_rrt(packet: *mut GstRTCPPacket, timestamp: *mut u64) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_ssrc(packet: *mut GstRTCPPacket) -> u32; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_summary_info( + packet: *mut GstRTCPPacket, + ssrc: *mut u32, + begin_seq: *mut u16, + end_seq: *mut u16, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_summary_jitter( + packet: *mut GstRTCPPacket, + min_jitter: *mut u32, + max_jitter: *mut u32, + mean_jitter: *mut u32, + dev_jitter: *mut u32, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_summary_pkt( + packet: *mut GstRTCPPacket, + lost_packets: *mut u32, + dup_packets: *mut u32, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_summary_ttl( + packet: *mut GstRTCPPacket, + is_ipv4: *mut gboolean, + min_ttl: *mut u8, + max_ttl: *mut u8, + mean_ttl: *mut u8, + dev_ttl: *mut u8, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_voip_burst_metrics( + packet: *mut GstRTCPPacket, + burst_density: *mut u8, + gap_density: *mut u8, + burst_duration: *mut u16, + gap_duration: *mut u16, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_voip_configuration_params( + packet: *mut GstRTCPPacket, + gmin: *mut u8, + rx_config: *mut u8, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_voip_delay_metrics( + packet: *mut GstRTCPPacket, + roundtrip_delay: *mut u16, + end_system_delay: *mut u16, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_voip_jitter_buffer_params( + packet: *mut GstRTCPPacket, + jb_nominal: *mut u16, + jb_maximum: *mut u16, + jb_abs_max: *mut u16, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_voip_metrics_ssrc( + packet: *mut GstRTCPPacket, + ssrc: *mut u32, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_voip_packet_metrics( + packet: *mut GstRTCPPacket, + loss_rate: *mut u8, + discard_rate: *mut u8, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_voip_quality_metrics( + packet: *mut GstRTCPPacket, + r_factor: *mut u8, + ext_r_factor: *mut u8, + mos_lq: *mut u8, + mos_cq: *mut u8, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_get_voip_signal_metrics( + packet: *mut GstRTCPPacket, + signal_level: *mut u8, + noise_level: *mut u8, + rerl: *mut u8, + gmin: *mut u8, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtcp_packet_xr_next_rb(packet: *mut GstRTCPPacket) -> gboolean; + + //========================================================================= + // GstRTPBuffer + //========================================================================= + pub fn gst_rtp_buffer_add_extension_onebyte_header( + rtp: *mut GstRTPBuffer, + id: u8, + data: gconstpointer, + size: c_uint, + ) -> gboolean; + pub fn gst_rtp_buffer_add_extension_twobytes_header( + rtp: *mut GstRTPBuffer, + appbits: u8, + id: u8, + data: gconstpointer, + size: c_uint, + ) -> gboolean; + pub fn gst_rtp_buffer_get_csrc(rtp: *mut GstRTPBuffer, idx: u8) -> u32; + pub fn gst_rtp_buffer_get_csrc_count(rtp: *mut GstRTPBuffer) -> u8; + pub fn gst_rtp_buffer_get_extension(rtp: *mut GstRTPBuffer) -> gboolean; + pub fn gst_rtp_buffer_get_extension_bytes( + rtp: *mut GstRTPBuffer, + bits: *mut u16, + ) -> *mut glib::GBytes; + pub fn gst_rtp_buffer_get_extension_data( + rtp: *mut GstRTPBuffer, + bits: *mut u16, + data: *mut u8, + wordlen: *mut c_uint, + ) -> gboolean; + pub fn gst_rtp_buffer_get_extension_onebyte_header( + rtp: *mut GstRTPBuffer, + id: u8, + nth: c_uint, + data: *mut u8, + size: *mut c_uint, + ) -> gboolean; + pub fn gst_rtp_buffer_get_extension_twobytes_header( + rtp: *mut GstRTPBuffer, + appbits: *mut u8, + id: u8, + nth: c_uint, + data: *mut u8, + size: *mut c_uint, + ) -> gboolean; + pub fn gst_rtp_buffer_get_header_len(rtp: *mut GstRTPBuffer) -> c_uint; + pub fn gst_rtp_buffer_get_marker(rtp: *mut GstRTPBuffer) -> gboolean; + pub fn gst_rtp_buffer_get_packet_len(rtp: *mut GstRTPBuffer) -> c_uint; + pub fn gst_rtp_buffer_get_padding(rtp: *mut GstRTPBuffer) -> gboolean; + pub fn gst_rtp_buffer_get_payload(rtp: *mut GstRTPBuffer) -> gpointer; + pub fn gst_rtp_buffer_get_payload_buffer(rtp: *mut GstRTPBuffer) -> *mut gst::GstBuffer; + pub fn gst_rtp_buffer_get_payload_bytes(rtp: *mut GstRTPBuffer) -> *mut glib::GBytes; + pub fn gst_rtp_buffer_get_payload_len(rtp: *mut GstRTPBuffer) -> c_uint; + pub fn gst_rtp_buffer_get_payload_subbuffer( + rtp: *mut GstRTPBuffer, + offset: c_uint, + len: c_uint, + ) -> *mut gst::GstBuffer; + pub fn gst_rtp_buffer_get_payload_type(rtp: *mut GstRTPBuffer) -> u8; + pub fn gst_rtp_buffer_get_seq(rtp: *mut GstRTPBuffer) -> u16; + pub fn gst_rtp_buffer_get_ssrc(rtp: *mut GstRTPBuffer) -> u32; + pub fn gst_rtp_buffer_get_timestamp(rtp: *mut GstRTPBuffer) -> u32; + pub fn gst_rtp_buffer_get_version(rtp: *mut GstRTPBuffer) -> u8; + pub fn gst_rtp_buffer_pad_to(rtp: *mut GstRTPBuffer, len: c_uint); + pub fn gst_rtp_buffer_set_csrc(rtp: *mut GstRTPBuffer, idx: u8, csrc: u32); + pub fn gst_rtp_buffer_set_extension(rtp: *mut GstRTPBuffer, extension: gboolean); + pub fn gst_rtp_buffer_set_extension_data( + rtp: *mut GstRTPBuffer, + bits: u16, + length: u16, + ) -> gboolean; + pub fn gst_rtp_buffer_set_marker(rtp: *mut GstRTPBuffer, marker: gboolean); + pub fn gst_rtp_buffer_set_packet_len(rtp: *mut GstRTPBuffer, len: c_uint); + pub fn gst_rtp_buffer_set_padding(rtp: *mut GstRTPBuffer, padding: gboolean); + pub fn gst_rtp_buffer_set_payload_type(rtp: *mut GstRTPBuffer, payload_type: u8); + pub fn gst_rtp_buffer_set_seq(rtp: *mut GstRTPBuffer, seq: u16); + pub fn gst_rtp_buffer_set_ssrc(rtp: *mut GstRTPBuffer, ssrc: u32); + pub fn gst_rtp_buffer_set_timestamp(rtp: *mut GstRTPBuffer, timestamp: u32); + pub fn gst_rtp_buffer_set_version(rtp: *mut GstRTPBuffer, version: u8); + pub fn gst_rtp_buffer_unmap(rtp: *mut GstRTPBuffer); + pub fn gst_rtp_buffer_allocate_data( + buffer: *mut gst::GstBuffer, + payload_len: c_uint, + pad_len: u8, + csrc_count: u8, + ); + pub fn gst_rtp_buffer_calc_header_len(csrc_count: u8) -> c_uint; + pub fn gst_rtp_buffer_calc_packet_len( + payload_len: c_uint, + pad_len: u8, + csrc_count: u8, + ) -> c_uint; + pub fn gst_rtp_buffer_calc_payload_len( + packet_len: c_uint, + pad_len: u8, + csrc_count: u8, + ) -> c_uint; + pub fn gst_rtp_buffer_compare_seqnum(seqnum1: u16, seqnum2: u16) -> c_int; + pub fn gst_rtp_buffer_default_clock_rate(payload_type: u8) -> u32; + pub fn gst_rtp_buffer_ext_timestamp(exttimestamp: *mut u64, timestamp: u32) -> u64; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtp_buffer_get_extension_onebyte_header_from_bytes( + bytes: *mut glib::GBytes, + bit_pattern: u16, + id: u8, + nth: c_uint, + data: *mut u8, + size: *mut c_uint, + ) -> gboolean; + pub fn gst_rtp_buffer_map( + buffer: *mut gst::GstBuffer, + flags: gst::GstMapFlags, + rtp: *mut GstRTPBuffer, + ) -> gboolean; + pub fn gst_rtp_buffer_new_allocate( + payload_len: c_uint, + pad_len: u8, + csrc_count: u8, + ) -> *mut gst::GstBuffer; + pub fn gst_rtp_buffer_new_allocate_len( + packet_len: c_uint, + pad_len: u8, + csrc_count: u8, + ) -> *mut gst::GstBuffer; + pub fn gst_rtp_buffer_new_copy_data(data: gconstpointer, len: size_t) -> *mut gst::GstBuffer; + pub fn gst_rtp_buffer_new_take_data(data: gpointer, len: size_t) -> *mut gst::GstBuffer; + + //========================================================================= + // GstRTPPayloadInfo + //========================================================================= + pub fn gst_rtp_payload_info_for_name( + media: *const c_char, + encoding_name: *const c_char, + ) -> *const GstRTPPayloadInfo; + pub fn gst_rtp_payload_info_for_pt(payload_type: u8) -> *const GstRTPPayloadInfo; + + //========================================================================= + // GstRTPSourceMeta + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtp_source_meta_append_csrc( + meta: *mut GstRTPSourceMeta, + csrc: *const u32, + csrc_count: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtp_source_meta_get_source_count(meta: *const GstRTPSourceMeta) -> c_uint; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtp_source_meta_set_ssrc(meta: *mut GstRTPSourceMeta, ssrc: *mut u32) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtp_source_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstRTPBaseAudioPayload + //========================================================================= + pub fn gst_rtp_base_audio_payload_get_type() -> GType; + pub fn gst_rtp_base_audio_payload_flush( + baseaudiopayload: *mut GstRTPBaseAudioPayload, + payload_len: c_uint, + timestamp: gst::GstClockTime, + ) -> gst::GstFlowReturn; + pub fn gst_rtp_base_audio_payload_get_adapter( + rtpbaseaudiopayload: *mut GstRTPBaseAudioPayload, + ) -> *mut gst_base::GstAdapter; + pub fn gst_rtp_base_audio_payload_push( + baseaudiopayload: *mut GstRTPBaseAudioPayload, + data: *const u8, + payload_len: c_uint, + timestamp: gst::GstClockTime, + ) -> gst::GstFlowReturn; + pub fn gst_rtp_base_audio_payload_set_frame_based( + rtpbaseaudiopayload: *mut GstRTPBaseAudioPayload, + ); + pub fn gst_rtp_base_audio_payload_set_frame_options( + rtpbaseaudiopayload: *mut GstRTPBaseAudioPayload, + frame_duration: c_int, + frame_size: c_int, + ); + pub fn gst_rtp_base_audio_payload_set_sample_based( + rtpbaseaudiopayload: *mut GstRTPBaseAudioPayload, + ); + pub fn gst_rtp_base_audio_payload_set_sample_options( + rtpbaseaudiopayload: *mut GstRTPBaseAudioPayload, + sample_size: c_int, + ); + pub fn gst_rtp_base_audio_payload_set_samplebits_options( + rtpbaseaudiopayload: *mut GstRTPBaseAudioPayload, + sample_size: c_int, + ); + + //========================================================================= + // GstRTPBaseDepayload + //========================================================================= + pub fn gst_rtp_base_depayload_get_type() -> GType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtp_base_depayload_is_source_info_enabled( + depayload: *mut GstRTPBaseDepayload, + ) -> gboolean; + pub fn gst_rtp_base_depayload_push( + filter: *mut GstRTPBaseDepayload, + out_buf: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_rtp_base_depayload_push_list( + filter: *mut GstRTPBaseDepayload, + out_list: *mut gst::GstBufferList, + ) -> gst::GstFlowReturn; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtp_base_depayload_set_source_info_enabled( + depayload: *mut GstRTPBaseDepayload, + enable: gboolean, + ); + + //========================================================================= + // GstRTPBasePayload + //========================================================================= + pub fn gst_rtp_base_payload_get_type() -> GType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtp_base_payload_allocate_output_buffer( + payload: *mut GstRTPBasePayload, + payload_len: c_uint, + pad_len: u8, + csrc_count: u8, + ) -> *mut gst::GstBuffer; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtp_base_payload_get_source_count( + payload: *mut GstRTPBasePayload, + buffer: *mut gst::GstBuffer, + ) -> c_uint; + pub fn gst_rtp_base_payload_is_filled( + payload: *mut GstRTPBasePayload, + size: c_uint, + duration: gst::GstClockTime, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtp_base_payload_is_source_info_enabled(payload: *mut GstRTPBasePayload) + -> gboolean; + pub fn gst_rtp_base_payload_push( + payload: *mut GstRTPBasePayload, + buffer: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_rtp_base_payload_push_list( + payload: *mut GstRTPBasePayload, + list: *mut gst::GstBufferList, + ) -> gst::GstFlowReturn; + pub fn gst_rtp_base_payload_set_options( + payload: *mut GstRTPBasePayload, + media: *const c_char, + dynamic: gboolean, + encoding_name: *const c_char, + clock_rate: u32, + ); + pub fn gst_rtp_base_payload_set_outcaps( + payload: *mut GstRTPBasePayload, + fieldname: *const c_char, + ... + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtp_base_payload_set_source_info_enabled( + payload: *mut GstRTPBasePayload, + enable: gboolean, + ); + + //========================================================================= + // Other functions + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_buffer_add_rtp_source_meta( + buffer: *mut gst::GstBuffer, + ssrc: *const u32, + csrc: *const u32, + csrc_count: c_uint, + ) -> *mut GstRTPSourceMeta; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_buffer_get_rtp_source_meta(buffer: *mut gst::GstBuffer) -> *mut GstRTPSourceMeta; + pub fn gst_rtcp_ntp_to_unix(ntptime: u64) -> u64; + pub fn gst_rtcp_sdes_name_to_type(name: *const c_char) -> GstRTCPSDESType; + pub fn gst_rtcp_sdes_type_to_name(type_: GstRTCPSDESType) -> *const c_char; + pub fn gst_rtcp_unix_to_ntp(unixtime: u64) -> u64; + pub fn gst_rtp_hdrext_get_ntp_56(data: gpointer, size: c_uint, ntptime: *mut u64) -> gboolean; + pub fn gst_rtp_hdrext_get_ntp_64(data: gpointer, size: c_uint, ntptime: *mut u64) -> gboolean; + pub fn gst_rtp_hdrext_set_ntp_56(data: gpointer, size: c_uint, ntptime: u64) -> gboolean; + pub fn gst_rtp_hdrext_set_ntp_64(data: gpointer, size: c_uint, ntptime: u64) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtp_source_meta_api_get_type() -> GType; + +} diff --git a/sys/gstreamer-rtp-sys/tests/abi.rs b/sys/gstreamer-rtp-sys/tests/abi.rs new file mode 100644 index 000000000..437fc2290 --- /dev/null +++ b/sys/gstreamer-rtp-sys/tests/abi.rs @@ -0,0 +1,518 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_rtp_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_rtp_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-rtp-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstRTCPBuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTCPFBType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTCPPacket", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTCPSDESType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTCPType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTCPXRType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPBaseAudioPayload", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPBaseAudioPayloadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPBaseDepayload", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPBaseDepayloadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPBasePayload", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPBasePayloadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPBuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPBufferFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPBufferMapFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPPayload", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPPayloadInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPProfile", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTPSourceMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(gint) GST_RTCP_FB_TYPE_INVALID", "0"), + ("GST_RTCP_MAX_BYE_SSRC_COUNT", "31"), + ("GST_RTCP_MAX_RB_COUNT", "31"), + ("GST_RTCP_MAX_SDES", "255"), + ("GST_RTCP_MAX_SDES_ITEM_COUNT", "31"), + ("(gint) GST_RTCP_PSFB_TYPE_AFB", "15"), + ("(gint) GST_RTCP_PSFB_TYPE_FIR", "4"), + ("(gint) GST_RTCP_PSFB_TYPE_PLI", "1"), + ("(gint) GST_RTCP_PSFB_TYPE_RPSI", "3"), + ("(gint) GST_RTCP_PSFB_TYPE_SLI", "2"), + ("(gint) GST_RTCP_PSFB_TYPE_TSTN", "6"), + ("(gint) GST_RTCP_PSFB_TYPE_TSTR", "5"), + ("(gint) GST_RTCP_PSFB_TYPE_VBCN", "7"), + ("GST_RTCP_REDUCED_SIZE_VALID_MASK", "57592"), + ("(gint) GST_RTCP_RTPFB_TYPE_NACK", "1"), + ("(gint) GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ", "5"), + ("(gint) GST_RTCP_RTPFB_TYPE_TMMBN", "4"), + ("(gint) GST_RTCP_RTPFB_TYPE_TMMBR", "3"), + ("(gint) GST_RTCP_RTPFB_TYPE_TWCC", "15"), + ("(gint) GST_RTCP_SDES_CNAME", "1"), + ("(gint) GST_RTCP_SDES_EMAIL", "3"), + ("(gint) GST_RTCP_SDES_END", "0"), + ("(gint) GST_RTCP_SDES_INVALID", "-1"), + ("(gint) GST_RTCP_SDES_LOC", "5"), + ("(gint) GST_RTCP_SDES_NAME", "2"), + ("(gint) GST_RTCP_SDES_NOTE", "7"), + ("(gint) GST_RTCP_SDES_PHONE", "4"), + ("(gint) GST_RTCP_SDES_PRIV", "8"), + ("(gint) GST_RTCP_SDES_TOOL", "6"), + ("(gint) GST_RTCP_TYPE_APP", "204"), + ("(gint) GST_RTCP_TYPE_BYE", "203"), + ("(gint) GST_RTCP_TYPE_INVALID", "0"), + ("(gint) GST_RTCP_TYPE_PSFB", "206"), + ("(gint) GST_RTCP_TYPE_RR", "201"), + ("(gint) GST_RTCP_TYPE_RTPFB", "205"), + ("(gint) GST_RTCP_TYPE_SDES", "202"), + ("(gint) GST_RTCP_TYPE_SR", "200"), + ("(gint) GST_RTCP_TYPE_XR", "207"), + ("GST_RTCP_VALID_MASK", "57598"), + ("GST_RTCP_VALID_VALUE", "200"), + ("GST_RTCP_VERSION", "2"), + ("(gint) GST_RTCP_XR_TYPE_DLRR", "5"), + ("(gint) GST_RTCP_XR_TYPE_DRLE", "2"), + ("(gint) GST_RTCP_XR_TYPE_INVALID", "-1"), + ("(gint) GST_RTCP_XR_TYPE_LRLE", "1"), + ("(gint) GST_RTCP_XR_TYPE_PRT", "3"), + ("(gint) GST_RTCP_XR_TYPE_RRT", "4"), + ("(gint) GST_RTCP_XR_TYPE_SSUMM", "6"), + ("(gint) GST_RTCP_XR_TYPE_VOIP_METRICS", "7"), + ("(guint) GST_RTP_BUFFER_FLAG_LAST", "268435456"), + ("(guint) GST_RTP_BUFFER_FLAG_REDUNDANT", "2097152"), + ("(guint) GST_RTP_BUFFER_FLAG_RETRANSMISSION", "1048576"), + ("(guint) GST_RTP_BUFFER_MAP_FLAG_LAST", "16777216"), + ("(guint) GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING", "65536"), + ("GST_RTP_HDREXT_BASE", "urn:ietf:params:rtp-hdrext:"), + ("GST_RTP_HDREXT_NTP_56", "ntp-56"), + ("GST_RTP_HDREXT_NTP_56_SIZE", "7"), + ("GST_RTP_HDREXT_NTP_64", "ntp-64"), + ("GST_RTP_HDREXT_NTP_64_SIZE", "8"), + ("(gint) GST_RTP_PAYLOAD_1016", "1"), + ("GST_RTP_PAYLOAD_1016_STRING", "1"), + ("(gint) GST_RTP_PAYLOAD_CELLB", "25"), + ("GST_RTP_PAYLOAD_CELLB_STRING", "25"), + ("(gint) GST_RTP_PAYLOAD_CN", "13"), + ("GST_RTP_PAYLOAD_CN_STRING", "13"), + ("(gint) GST_RTP_PAYLOAD_DVI4_11025", "16"), + ("GST_RTP_PAYLOAD_DVI4_11025_STRING", "16"), + ("(gint) GST_RTP_PAYLOAD_DVI4_16000", "6"), + ("GST_RTP_PAYLOAD_DVI4_16000_STRING", "6"), + ("(gint) GST_RTP_PAYLOAD_DVI4_22050", "17"), + ("GST_RTP_PAYLOAD_DVI4_22050_STRING", "17"), + ("(gint) GST_RTP_PAYLOAD_DVI4_8000", "5"), + ("GST_RTP_PAYLOAD_DVI4_8000_STRING", "5"), + ("GST_RTP_PAYLOAD_DYNAMIC_STRING", "[96, 127]"), + ("(gint) GST_RTP_PAYLOAD_G721", "2"), + ("GST_RTP_PAYLOAD_G721_STRING", "2"), + ("(gint) GST_RTP_PAYLOAD_G722", "9"), + ("GST_RTP_PAYLOAD_G722_STRING", "9"), + ("(gint) GST_RTP_PAYLOAD_G723", "4"), + ("GST_RTP_PAYLOAD_G723_53", "17"), + ("GST_RTP_PAYLOAD_G723_53_STRING", "17"), + ("GST_RTP_PAYLOAD_G723_63", "16"), + ("GST_RTP_PAYLOAD_G723_63_STRING", "16"), + ("GST_RTP_PAYLOAD_G723_STRING", "4"), + ("(gint) GST_RTP_PAYLOAD_G728", "15"), + ("GST_RTP_PAYLOAD_G728_STRING", "15"), + ("(gint) GST_RTP_PAYLOAD_G729", "18"), + ("GST_RTP_PAYLOAD_G729_STRING", "18"), + ("(gint) GST_RTP_PAYLOAD_GSM", "3"), + ("GST_RTP_PAYLOAD_GSM_STRING", "3"), + ("(gint) GST_RTP_PAYLOAD_H261", "31"), + ("GST_RTP_PAYLOAD_H261_STRING", "31"), + ("(gint) GST_RTP_PAYLOAD_H263", "34"), + ("GST_RTP_PAYLOAD_H263_STRING", "34"), + ("(gint) GST_RTP_PAYLOAD_JPEG", "26"), + ("GST_RTP_PAYLOAD_JPEG_STRING", "26"), + ("(gint) GST_RTP_PAYLOAD_L16_MONO", "11"), + ("GST_RTP_PAYLOAD_L16_MONO_STRING", "11"), + ("(gint) GST_RTP_PAYLOAD_L16_STEREO", "10"), + ("GST_RTP_PAYLOAD_L16_STEREO_STRING", "10"), + ("(gint) GST_RTP_PAYLOAD_LPC", "7"), + ("GST_RTP_PAYLOAD_LPC_STRING", "7"), + ("(gint) GST_RTP_PAYLOAD_MP2T", "33"), + ("GST_RTP_PAYLOAD_MP2T_STRING", "33"), + ("(gint) GST_RTP_PAYLOAD_MPA", "14"), + ("GST_RTP_PAYLOAD_MPA_STRING", "14"), + ("(gint) GST_RTP_PAYLOAD_MPV", "32"), + ("GST_RTP_PAYLOAD_MPV_STRING", "32"), + ("(gint) GST_RTP_PAYLOAD_NV", "28"), + ("GST_RTP_PAYLOAD_NV_STRING", "28"), + ("(gint) GST_RTP_PAYLOAD_PCMA", "8"), + ("GST_RTP_PAYLOAD_PCMA_STRING", "8"), + ("(gint) GST_RTP_PAYLOAD_PCMU", "0"), + ("GST_RTP_PAYLOAD_PCMU_STRING", "0"), + ("(gint) GST_RTP_PAYLOAD_QCELP", "12"), + ("GST_RTP_PAYLOAD_QCELP_STRING", "12"), + ("GST_RTP_PAYLOAD_TS41", "19"), + ("GST_RTP_PAYLOAD_TS41_STRING", "19"), + ("GST_RTP_PAYLOAD_TS48", "18"), + ("GST_RTP_PAYLOAD_TS48_STRING", "18"), + ("(gint) GST_RTP_PROFILE_AVP", "1"), + ("(gint) GST_RTP_PROFILE_AVPF", "3"), + ("(gint) GST_RTP_PROFILE_SAVP", "2"), + ("(gint) GST_RTP_PROFILE_SAVPF", "4"), + ("(gint) GST_RTP_PROFILE_UNKNOWN", "0"), + ("GST_RTP_SOURCE_META_MAX_CSRC_COUNT", "15"), + ("GST_RTP_VERSION", "2"), +]; diff --git a/sys/gstreamer-rtp-sys/tests/constant.c b/sys/gstreamer-rtp-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-rtp-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-rtp-sys/tests/layout.c b/sys/gstreamer-rtp-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-rtp-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-rtp-sys/tests/manual.h b/sys/gstreamer-rtp-sys/tests/manual.h new file mode 100644 index 000000000..f7c519d66 --- /dev/null +++ b/sys/gstreamer-rtp-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-rtsp-server-sys/CHANGELOG.md b/sys/gstreamer-rtsp-server-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-rtsp-server-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-rtsp-server-sys/Cargo.toml b/sys/gstreamer-rtsp-server-sys/Cargo.toml new file mode 100644 index 000000000..5b7dff67a --- /dev/null +++ b/sys/gstreamer-rtsp-server-sys/Cargo.toml @@ -0,0 +1,71 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.gio-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-net-sys] +path = "../gstreamer-net-sys" + +[dependencies.gstreamer-rtsp-sys] +path = "../gstreamer-rtsp-sys" + +[dependencies.gstreamer-sdp-sys] +path = "../gstreamer-sdp-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +dox = [] +v1_2 = [] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] + +[lib] +name = "gstreamer_rtsp_server_sys" + +[package] +authors = ["Mathieu Duponchelle ", "Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstrtspserver-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_rtsp_server_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstrtspserver-1.0" +name = "gstreamer-rtsp-server-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_rtsp_server_1_0] +name = "gstreamer-rtsp-server-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_rtsp_server_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-rtsp-server-sys/LICENSE b/sys/gstreamer-rtsp-server-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-rtsp-server-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-rtsp-server-sys/README.md b/sys/gstreamer-rtsp-server-sys/README.md new file mode 100644 index 000000000..c35e7ca63 --- /dev/null +++ b/sys/gstreamer-rtsp-server-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-rtsp-server-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-rtsp-server-sys.svg)](https://crates.io/crates/gstreamer-rtsp-server-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Rtsp Server library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-rtsp-server-sys/build.rs b/sys/gstreamer-rtsp-server-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-rtsp-server-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-rtsp-server-sys/src/lib.rs b/sys/gstreamer-rtsp-server-sys/src/lib.rs new file mode 100644 index 000000000..77c068c00 --- /dev/null +++ b/sys/gstreamer-rtsp-server-sys/src/lib.rs @@ -0,0 +1,2554 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate gio_sys as gio; +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_net_sys as gst_net; +extern crate gstreamer_rtsp_sys as gst_rtsp; +extern crate gstreamer_sdp_sys as gst_sdp; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstRTSPAddressPoolResult = c_int; +pub const GST_RTSP_ADDRESS_POOL_OK: GstRTSPAddressPoolResult = 0; +pub const GST_RTSP_ADDRESS_POOL_EINVAL: GstRTSPAddressPoolResult = -1; +pub const GST_RTSP_ADDRESS_POOL_ERESERVED: GstRTSPAddressPoolResult = -2; +pub const GST_RTSP_ADDRESS_POOL_ERANGE: GstRTSPAddressPoolResult = -3; +pub const GST_RTSP_ADDRESS_POOL_ELAST: GstRTSPAddressPoolResult = -4; + +pub type GstRTSPFilterResult = c_int; +pub const GST_RTSP_FILTER_REMOVE: GstRTSPFilterResult = 0; +pub const GST_RTSP_FILTER_KEEP: GstRTSPFilterResult = 1; +pub const GST_RTSP_FILTER_REF: GstRTSPFilterResult = 2; + +pub type GstRTSPMediaStatus = c_int; +pub const GST_RTSP_MEDIA_STATUS_UNPREPARED: GstRTSPMediaStatus = 0; +pub const GST_RTSP_MEDIA_STATUS_UNPREPARING: GstRTSPMediaStatus = 1; +pub const GST_RTSP_MEDIA_STATUS_PREPARING: GstRTSPMediaStatus = 2; +pub const GST_RTSP_MEDIA_STATUS_PREPARED: GstRTSPMediaStatus = 3; +pub const GST_RTSP_MEDIA_STATUS_SUSPENDED: GstRTSPMediaStatus = 4; +pub const GST_RTSP_MEDIA_STATUS_ERROR: GstRTSPMediaStatus = 5; + +pub type GstRTSPPublishClockMode = c_int; +pub const GST_RTSP_PUBLISH_CLOCK_MODE_NONE: GstRTSPPublishClockMode = 0; +pub const GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK: GstRTSPPublishClockMode = 1; +pub const GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET: GstRTSPPublishClockMode = 2; + +pub type GstRTSPSuspendMode = c_int; +pub const GST_RTSP_SUSPEND_MODE_NONE: GstRTSPSuspendMode = 0; +pub const GST_RTSP_SUSPEND_MODE_PAUSE: GstRTSPSuspendMode = 1; +pub const GST_RTSP_SUSPEND_MODE_RESET: GstRTSPSuspendMode = 2; + +pub type GstRTSPThreadType = c_int; +pub const GST_RTSP_THREAD_TYPE_CLIENT: GstRTSPThreadType = 0; +pub const GST_RTSP_THREAD_TYPE_MEDIA: GstRTSPThreadType = 1; + +// Constants +pub const GST_RTSP_ADDRESS_POOL_ANY_IPV4: *const c_char = + b"0.0.0.0\0" as *const u8 as *const c_char; +pub const GST_RTSP_ADDRESS_POOL_ANY_IPV6: *const c_char = b"::\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_CONNECT: *const c_char = + b"auth.check.connect\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS: *const c_char = + b"auth.check.media.factory.access\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT: *const c_char = + b"auth.check.media.factory.construct\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS: *const c_char = + b"auth.check.transport.client-settings\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_URL: *const c_char = + b"auth.check.url\0" as *const u8 as *const c_char; +pub const GST_RTSP_ONVIF_BACKCHANNEL_REQUIREMENT: *const c_char = + b"www.onvif.org/ver20/backchannel\0" as *const u8 as *const c_char; +pub const GST_RTSP_ONVIF_REPLAY_REQUIREMENT: *const c_char = + b"onvif-replay\0" as *const u8 as *const c_char; +pub const GST_RTSP_PERM_MEDIA_FACTORY_ACCESS: *const c_char = + b"media.factory.access\0" as *const u8 as *const c_char; +pub const GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT: *const c_char = + b"media.factory.construct\0" as *const u8 as *const c_char; +pub const GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE: *const c_char = + b"media.factory.role\0" as *const u8 as *const c_char; +pub const GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS: *const c_char = + b"transport.client-settings\0" as *const u8 as *const c_char; + +// Flags +pub type GstRTSPAddressFlags = c_uint; +pub const GST_RTSP_ADDRESS_FLAG_NONE: GstRTSPAddressFlags = 0; +pub const GST_RTSP_ADDRESS_FLAG_IPV4: GstRTSPAddressFlags = 1; +pub const GST_RTSP_ADDRESS_FLAG_IPV6: GstRTSPAddressFlags = 2; +pub const GST_RTSP_ADDRESS_FLAG_EVEN_PORT: GstRTSPAddressFlags = 4; +pub const GST_RTSP_ADDRESS_FLAG_MULTICAST: GstRTSPAddressFlags = 8; +pub const GST_RTSP_ADDRESS_FLAG_UNICAST: GstRTSPAddressFlags = 16; + +pub type GstRTSPTransportMode = c_uint; +pub const GST_RTSP_TRANSPORT_MODE_PLAY: GstRTSPTransportMode = 1; +pub const GST_RTSP_TRANSPORT_MODE_RECORD: GstRTSPTransportMode = 2; + +// Callbacks +pub type GstRTSPClientSendFunc = Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut gst_rtsp::GstRTSPMessage, + gboolean, + gpointer, + ) -> gboolean, +>; +pub type GstRTSPClientSendMessagesFunc = Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut gst_rtsp::GstRTSPMessage, + c_uint, + gboolean, + gpointer, + ) -> gboolean, +>; +pub type GstRTSPClientSessionFilterFunc = Option< + unsafe extern "C" fn(*mut GstRTSPClient, *mut GstRTSPSession, gpointer) -> GstRTSPFilterResult, +>; +pub type GstRTSPKeepAliveFunc = Option; +pub type GstRTSPMessageSentFunc = Option; +pub type GstRTSPMessageSentFuncFull = + Option; +pub type GstRTSPSendFunc = + Option gboolean>; +pub type GstRTSPSendListFunc = + Option gboolean>; +pub type GstRTSPServerClientFilterFunc = Option< + unsafe extern "C" fn(*mut GstRTSPServer, *mut GstRTSPClient, gpointer) -> GstRTSPFilterResult, +>; +pub type GstRTSPSessionFilterFunc = Option< + unsafe extern "C" fn( + *mut GstRTSPSession, + *mut GstRTSPSessionMedia, + gpointer, + ) -> GstRTSPFilterResult, +>; +pub type GstRTSPSessionPoolFilterFunc = Option< + unsafe extern "C" fn( + *mut GstRTSPSessionPool, + *mut GstRTSPSession, + gpointer, + ) -> GstRTSPFilterResult, +>; +pub type GstRTSPSessionPoolFunc = + Option gboolean>; +pub type GstRTSPStreamTransportFilterFunc = Option< + unsafe extern "C" fn( + *mut GstRTSPStream, + *mut GstRTSPStreamTransport, + gpointer, + ) -> GstRTSPFilterResult, +>; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAddress { + pub pool: *mut GstRTSPAddressPool, + pub address: *mut c_char, + pub port: u16, + pub n_ports: c_int, + pub ttl: u8, + pub priv_: gpointer, +} + +impl ::std::fmt::Debug for GstRTSPAddress { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAddress @ {:?}", self as *const _)) + .field("pool", &self.pool) + .field("address", &self.address) + .field("port", &self.port) + .field("n_ports", &self.n_ports) + .field("ttl", &self.ttl) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAddressPoolClass { + pub parent_class: gobject::GObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPAddressPoolClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAddressPoolClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPAddressPoolPrivate(c_void); + +pub type GstRTSPAddressPoolPrivate = *mut _GstRTSPAddressPoolPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAuthClass { + pub parent_class: gobject::GObjectClass, + pub authenticate: + Option gboolean>, + pub check: Option< + unsafe extern "C" fn(*mut GstRTSPAuth, *mut GstRTSPContext, *const c_char) -> gboolean, + >, + pub generate_authenticate_header: + Option, + pub accept_certificate: Option< + unsafe extern "C" fn( + *mut GstRTSPAuth, + *mut gio::GTlsConnection, + *mut gio::GTlsCertificate, + gio::GTlsCertificateFlags, + ) -> gboolean, + >, + pub _gst_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GstRTSPAuthClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAuthClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("authenticate", &self.authenticate) + .field("check", &self.check) + .field( + "generate_authenticate_header", + &self.generate_authenticate_header, + ) + .field("accept_certificate", &self.accept_certificate) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPAuthPrivate(c_void); + +pub type GstRTSPAuthPrivate = *mut _GstRTSPAuthPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPClientClass { + pub parent_class: gobject::GObjectClass, + pub create_sdp: Option< + unsafe extern "C" fn(*mut GstRTSPClient, *mut GstRTSPMedia) -> *mut gst_sdp::GstSDPMessage, + >, + pub configure_client_media: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPMedia, + *mut GstRTSPStream, + *mut GstRTSPContext, + ) -> gboolean, + >, + pub configure_client_transport: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + *mut gst_rtsp::GstRTSPTransport, + ) -> gboolean, + >, + pub params_set: Option< + unsafe extern "C" fn(*mut GstRTSPClient, *mut GstRTSPContext) -> gst_rtsp::GstRTSPResult, + >, + pub params_get: Option< + unsafe extern "C" fn(*mut GstRTSPClient, *mut GstRTSPContext) -> gst_rtsp::GstRTSPResult, + >, + pub make_path_from_uri: Option< + unsafe extern "C" fn(*mut GstRTSPClient, *const gst_rtsp::GstRTSPUrl) -> *mut c_char, + >, + pub adjust_play_mode: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + *mut *mut gst_rtsp::GstRTSPTimeRange, + *mut gst::GstSeekFlags, + *mut c_double, + *mut gst::GstClockTime, + *mut gboolean, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub adjust_play_response: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub closed: Option, + pub new_session: Option, + pub options_request: Option, + pub describe_request: Option, + pub setup_request: Option, + pub play_request: Option, + pub pause_request: Option, + pub teardown_request: Option, + pub set_parameter_request: + Option, + pub get_parameter_request: + Option, + pub handle_response: Option, + pub tunnel_http_response: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut gst_rtsp::GstRTSPMessage, + *mut gst_rtsp::GstRTSPMessage, + ), + >, + pub send_message: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + *mut gst_rtsp::GstRTSPMessage, + ), + >, + pub handle_sdp: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + *mut GstRTSPMedia, + *mut gst_sdp::GstSDPMessage, + ) -> gboolean, + >, + pub announce_request: Option, + pub record_request: Option, + pub check_requirements: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + *mut *mut c_char, + ) -> *mut c_char, + >, + pub pre_options_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_describe_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_setup_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_play_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_pause_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_teardown_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_set_parameter_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_get_parameter_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_announce_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub pre_record_request: Option< + unsafe extern "C" fn( + *mut GstRTSPClient, + *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPStatusCode, + >, + pub _gst_reserved: [gpointer; 2], +} + +impl ::std::fmt::Debug for GstRTSPClientClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPClientClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("create_sdp", &self.create_sdp) + .field("configure_client_media", &self.configure_client_media) + .field( + "configure_client_transport", + &self.configure_client_transport, + ) + .field("params_set", &self.params_set) + .field("params_get", &self.params_get) + .field("make_path_from_uri", &self.make_path_from_uri) + .field("adjust_play_mode", &self.adjust_play_mode) + .field("adjust_play_response", &self.adjust_play_response) + .field("closed", &self.closed) + .field("new_session", &self.new_session) + .field("options_request", &self.options_request) + .field("describe_request", &self.describe_request) + .field("setup_request", &self.setup_request) + .field("play_request", &self.play_request) + .field("pause_request", &self.pause_request) + .field("teardown_request", &self.teardown_request) + .field("set_parameter_request", &self.set_parameter_request) + .field("get_parameter_request", &self.get_parameter_request) + .field("handle_response", &self.handle_response) + .field("tunnel_http_response", &self.tunnel_http_response) + .field("send_message", &self.send_message) + .field("handle_sdp", &self.handle_sdp) + .field("announce_request", &self.announce_request) + .field("record_request", &self.record_request) + .field("check_requirements", &self.check_requirements) + .field("pre_options_request", &self.pre_options_request) + .field("pre_describe_request", &self.pre_describe_request) + .field("pre_setup_request", &self.pre_setup_request) + .field("pre_play_request", &self.pre_play_request) + .field("pre_pause_request", &self.pre_pause_request) + .field("pre_teardown_request", &self.pre_teardown_request) + .field("pre_set_parameter_request", &self.pre_set_parameter_request) + .field("pre_get_parameter_request", &self.pre_get_parameter_request) + .field("pre_announce_request", &self.pre_announce_request) + .field("pre_record_request", &self.pre_record_request) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPClientPrivate(c_void); + +pub type GstRTSPClientPrivate = *mut _GstRTSPClientPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPContext { + pub server: *mut GstRTSPServer, + pub conn: *mut gst_rtsp::GstRTSPConnection, + pub client: *mut GstRTSPClient, + pub request: *mut gst_rtsp::GstRTSPMessage, + pub uri: *mut gst_rtsp::GstRTSPUrl, + pub method: gst_rtsp::GstRTSPMethod, + pub auth: *mut GstRTSPAuth, + pub token: *mut GstRTSPToken, + pub session: *mut GstRTSPSession, + pub sessmedia: *mut GstRTSPSessionMedia, + pub factory: *mut GstRTSPMediaFactory, + pub media: *mut GstRTSPMedia, + pub stream: *mut GstRTSPStream, + pub response: *mut gst_rtsp::GstRTSPMessage, + pub trans: *mut GstRTSPStreamTransport, + pub _gst_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GstRTSPContext { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPContext @ {:?}", self as *const _)) + .field("server", &self.server) + .field("conn", &self.conn) + .field("client", &self.client) + .field("request", &self.request) + .field("uri", &self.uri) + .field("method", &self.method) + .field("auth", &self.auth) + .field("token", &self.token) + .field("session", &self.session) + .field("sessmedia", &self.sessmedia) + .field("factory", &self.factory) + .field("media", &self.media) + .field("stream", &self.stream) + .field("response", &self.response) + .field("trans", &self.trans) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMediaClass { + pub parent_class: gobject::GObjectClass, + pub handle_message: + Option gboolean>, + pub prepare: Option gboolean>, + pub unprepare: Option gboolean>, + pub suspend: Option gboolean>, + pub unsuspend: Option gboolean>, + pub convert_range: Option< + unsafe extern "C" fn( + *mut GstRTSPMedia, + *mut gst_rtsp::GstRTSPTimeRange, + gst_rtsp::GstRTSPRangeUnit, + ) -> gboolean, + >, + pub query_position: Option gboolean>, + pub query_stop: Option gboolean>, + pub create_rtpbin: Option *mut gst::GstElement>, + pub setup_rtpbin: + Option gboolean>, + pub setup_sdp: Option< + unsafe extern "C" fn( + *mut GstRTSPMedia, + *mut gst_sdp::GstSDPMessage, + *mut GstSDPInfo, + ) -> gboolean, + >, + pub new_stream: Option, + pub removed_stream: Option, + pub prepared: Option, + pub unprepared: Option, + pub target_state: Option, + pub new_state: Option, + pub handle_sdp: + Option gboolean>, + pub _gst_reserved: [gpointer; 19], +} + +impl ::std::fmt::Debug for GstRTSPMediaClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMediaClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("handle_message", &self.handle_message) + .field("prepare", &self.prepare) + .field("unprepare", &self.unprepare) + .field("suspend", &self.suspend) + .field("unsuspend", &self.unsuspend) + .field("convert_range", &self.convert_range) + .field("query_position", &self.query_position) + .field("query_stop", &self.query_stop) + .field("create_rtpbin", &self.create_rtpbin) + .field("setup_rtpbin", &self.setup_rtpbin) + .field("setup_sdp", &self.setup_sdp) + .field("new_stream", &self.new_stream) + .field("removed_stream", &self.removed_stream) + .field("prepared", &self.prepared) + .field("unprepared", &self.unprepared) + .field("target_state", &self.target_state) + .field("new_state", &self.new_state) + .field("handle_sdp", &self.handle_sdp) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMediaFactoryClass { + pub parent_class: gobject::GObjectClass, + pub gen_key: Option< + unsafe extern "C" fn(*mut GstRTSPMediaFactory, *const gst_rtsp::GstRTSPUrl) -> *mut c_char, + >, + pub create_element: Option< + unsafe extern "C" fn( + *mut GstRTSPMediaFactory, + *const gst_rtsp::GstRTSPUrl, + ) -> *mut gst::GstElement, + >, + pub construct: Option< + unsafe extern "C" fn( + *mut GstRTSPMediaFactory, + *const gst_rtsp::GstRTSPUrl, + ) -> *mut GstRTSPMedia, + >, + pub create_pipeline: Option< + unsafe extern "C" fn(*mut GstRTSPMediaFactory, *mut GstRTSPMedia) -> *mut gst::GstElement, + >, + pub configure: Option, + pub media_constructed: + Option, + pub media_configure: Option, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstRTSPMediaFactoryClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTSPMediaFactoryClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("gen_key", &self.gen_key) + .field("create_element", &self.create_element) + .field("construct", &self.construct) + .field("create_pipeline", &self.create_pipeline) + .field("configure", &self.configure) + .field("media_constructed", &self.media_constructed) + .field("media_configure", &self.media_configure) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPMediaFactoryPrivate(c_void); + +pub type GstRTSPMediaFactoryPrivate = *mut _GstRTSPMediaFactoryPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMediaFactoryURIClass { + pub parent_class: GstRTSPMediaFactoryClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMediaFactoryURIClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTSPMediaFactoryURIClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPMediaFactoryURIPrivate(c_void); + +pub type GstRTSPMediaFactoryURIPrivate = *mut _GstRTSPMediaFactoryURIPrivate; + +#[repr(C)] +pub struct _GstRTSPMediaPrivate(c_void); + +pub type GstRTSPMediaPrivate = *mut _GstRTSPMediaPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMountPointsClass { + pub parent_class: gobject::GObjectClass, + pub make_path: Option< + unsafe extern "C" fn(*mut GstRTSPMountPoints, *const gst_rtsp::GstRTSPUrl) -> *mut c_char, + >, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMountPointsClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMountPointsClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("make_path", &self.make_path) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPMountPointsPrivate(c_void); + +pub type GstRTSPMountPointsPrivate = *mut _GstRTSPMountPointsPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPOnvifClientClass { + pub parent: GstRTSPClientClass, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstRTSPOnvifClientClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPOnvifClientClass @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPOnvifMediaClass { + pub parent: GstRTSPMediaClass, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstRTSPOnvifMediaClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPOnvifMediaClass @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPOnvifMediaFactoryClass { + pub parent: GstRTSPMediaFactoryClass, + pub has_backchannel_support: + Option gboolean>, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstRTSPOnvifMediaFactoryClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTSPOnvifMediaFactoryClass @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("has_backchannel_support", &self.has_backchannel_support) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPOnvifMediaFactoryPrivate(c_void); + +pub type GstRTSPOnvifMediaFactoryPrivate = *mut _GstRTSPOnvifMediaFactoryPrivate; + +#[repr(C)] +pub struct _GstRTSPOnvifMediaPrivate(c_void); + +pub type GstRTSPOnvifMediaPrivate = *mut _GstRTSPOnvifMediaPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPOnvifServerClass { + pub parent: GstRTSPServerClass, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstRTSPOnvifServerClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPOnvifServerClass @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPPermissions { + pub mini_object: gst::GstMiniObject, +} + +impl ::std::fmt::Debug for GstRTSPPermissions { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPPermissions @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPServerClass { + pub parent_class: gobject::GObjectClass, + pub create_client: Option *mut GstRTSPClient>, + pub client_connected: Option, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstRTSPServerClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPServerClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("create_client", &self.create_client) + .field("client_connected", &self.client_connected) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPServerPrivate(c_void); + +pub type GstRTSPServerPrivate = *mut _GstRTSPServerPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSessionClass { + pub parent_class: gobject::GObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPSessionClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSessionMediaClass { + pub parent_class: gobject::GObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPSessionMediaClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTSPSessionMediaClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPSessionMediaPrivate(c_void); + +pub type GstRTSPSessionMediaPrivate = *mut _GstRTSPSessionMediaPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSessionPoolClass { + pub parent_class: gobject::GObjectClass, + pub create_session_id: Option *mut c_char>, + pub create_session: + Option *mut GstRTSPSession>, + pub session_removed: Option, + pub _gst_reserved: [gpointer; 19], +} + +impl ::std::fmt::Debug for GstRTSPSessionPoolClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionPoolClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("create_session_id", &self.create_session_id) + .field("create_session", &self.create_session) + .field("session_removed", &self.session_removed) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPSessionPoolPrivate(c_void); + +pub type GstRTSPSessionPoolPrivate = *mut _GstRTSPSessionPoolPrivate; + +#[repr(C)] +pub struct _GstRTSPSessionPrivate(c_void); + +pub type GstRTSPSessionPrivate = *mut _GstRTSPSessionPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPStreamClass { + pub parent_class: gobject::GObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPStreamClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPStreamClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPStreamPrivate(c_void); + +pub type GstRTSPStreamPrivate = *mut _GstRTSPStreamPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPStreamTransportClass { + pub parent_class: gobject::GObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPStreamTransportClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTSPStreamTransportClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPStreamTransportPrivate(c_void); + +pub type GstRTSPStreamTransportPrivate = *mut _GstRTSPStreamTransportPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPThread { + pub mini_object: gst::GstMiniObject, + pub type_: GstRTSPThreadType, + pub context: *mut glib::GMainContext, + pub loop_: *mut glib::GMainLoop, +} + +impl ::std::fmt::Debug for GstRTSPThread { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPThread @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .field("type_", &self.type_) + .field("context", &self.context) + .field("loop_", &self.loop_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPThreadPoolClass { + pub parent_class: gobject::GObjectClass, + pub pool: *mut glib::GThreadPool, + pub get_thread: Option< + unsafe extern "C" fn( + *mut GstRTSPThreadPool, + GstRTSPThreadType, + *mut GstRTSPContext, + ) -> *mut GstRTSPThread, + >, + pub configure_thread: Option< + unsafe extern "C" fn(*mut GstRTSPThreadPool, *mut GstRTSPThread, *mut GstRTSPContext), + >, + pub thread_enter: Option, + pub thread_leave: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPThreadPoolClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPThreadPoolClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("pool", &self.pool) + .field("get_thread", &self.get_thread) + .field("configure_thread", &self.configure_thread) + .field("thread_enter", &self.thread_enter) + .field("thread_leave", &self.thread_leave) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPThreadPoolPrivate(c_void); + +pub type GstRTSPThreadPoolPrivate = *mut _GstRTSPThreadPoolPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPToken { + pub mini_object: gst::GstMiniObject, +} + +impl ::std::fmt::Debug for GstRTSPToken { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPToken @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPInfo { + pub is_ipv6: gboolean, + pub server_ip: *const c_char, +} + +impl ::std::fmt::Debug for GstSDPInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPInfo @ {:?}", self as *const _)) + .field("is_ipv6", &self.is_ipv6) + .field("server_ip", &self.server_ip) + .finish() + } +} + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAddressPool { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPAddressPoolPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPAddressPool { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAddressPool @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAuth { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPAuthPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPAuth { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAuth @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPClient { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPClientPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPClient { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPClient @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMedia { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPMediaPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMedia { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMedia @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMediaFactory { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPMediaFactoryPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMediaFactory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMediaFactory @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMediaFactoryURI { + pub parent: GstRTSPMediaFactory, + pub priv_: *mut GstRTSPMediaFactoryURIPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMediaFactoryURI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMediaFactoryURI @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMountPoints { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPMountPointsPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMountPoints { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMountPoints @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPOnvifClient { + pub parent: GstRTSPClient, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPOnvifClient { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPOnvifClient @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPOnvifMedia { + pub parent: GstRTSPMedia, + pub priv_: *mut GstRTSPOnvifMediaPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPOnvifMedia { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPOnvifMedia @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("priv_", &self.priv_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPOnvifMediaFactory { + pub parent: GstRTSPMediaFactory, + pub priv_: *mut GstRTSPOnvifMediaFactoryPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPOnvifMediaFactory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTSPOnvifMediaFactory @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("priv_", &self.priv_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPOnvifServer { + pub parent: GstRTSPServer, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPOnvifServer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPOnvifServer @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPServer { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPServerPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPServer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPServer @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSession { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPSessionPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPSession { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSession @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSessionMedia { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPSessionMediaPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPSessionMedia { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionMedia @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSessionPool { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPSessionPoolPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPSessionPool { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionPool @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPStream { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPStreamPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPStream { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPStream @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPStreamTransport { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPStreamTransportPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPStreamTransport { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPStreamTransport @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPThreadPool { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPThreadPoolPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPThreadPool { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPThreadPool @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[link(name = "gstrtspserver-1.0")] +extern "C" { + + //========================================================================= + // GstRTSPPublishClockMode + //========================================================================= + pub fn gst_rtsp_publish_clock_mode_get_type() -> GType; + + //========================================================================= + // GstRTSPSuspendMode + //========================================================================= + pub fn gst_rtsp_suspend_mode_get_type() -> GType; + + //========================================================================= + // GstRTSPTransportMode + //========================================================================= + pub fn gst_rtsp_transport_mode_get_type() -> GType; + + //========================================================================= + // GstRTSPAddress + //========================================================================= + pub fn gst_rtsp_address_get_type() -> GType; + pub fn gst_rtsp_address_copy(addr: *mut GstRTSPAddress) -> *mut GstRTSPAddress; + pub fn gst_rtsp_address_free(addr: *mut GstRTSPAddress); + + //========================================================================= + // GstRTSPContext + //========================================================================= + pub fn gst_rtsp_context_pop_current(ctx: *mut GstRTSPContext); + pub fn gst_rtsp_context_push_current(ctx: *mut GstRTSPContext); + pub fn gst_rtsp_context_get_current() -> *mut GstRTSPContext; + + //========================================================================= + // GstRTSPPermissions + //========================================================================= + pub fn gst_rtsp_permissions_get_type() -> GType; + pub fn gst_rtsp_permissions_new() -> *mut GstRTSPPermissions; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_permissions_add_permission_for_role( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + permission: *const c_char, + allowed: gboolean, + ); + pub fn gst_rtsp_permissions_add_role( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + fieldname: *const c_char, + ... + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_permissions_add_role_empty( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_permissions_add_role_from_structure( + permissions: *mut GstRTSPPermissions, + structure: *mut gst::GstStructure, + ); + //pub fn gst_rtsp_permissions_add_role_valist(permissions: *mut GstRTSPPermissions, role: *const c_char, fieldname: *const c_char, var_args: /*Unimplemented*/va_list); + pub fn gst_rtsp_permissions_get_role( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + ) -> *const gst::GstStructure; + pub fn gst_rtsp_permissions_is_allowed( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + permission: *const c_char, + ) -> gboolean; + pub fn gst_rtsp_permissions_remove_role( + permissions: *mut GstRTSPPermissions, + role: *const c_char, + ); + + //========================================================================= + // GstRTSPThread + //========================================================================= + pub fn gst_rtsp_thread_get_type() -> GType; + pub fn gst_rtsp_thread_new(type_: GstRTSPThreadType) -> *mut GstRTSPThread; + pub fn gst_rtsp_thread_reuse(thread: *mut GstRTSPThread) -> gboolean; + pub fn gst_rtsp_thread_stop(thread: *mut GstRTSPThread); + + //========================================================================= + // GstRTSPToken + //========================================================================= + pub fn gst_rtsp_token_get_type() -> GType; + pub fn gst_rtsp_token_new(firstfield: *const c_char, ...) -> *mut GstRTSPToken; + pub fn gst_rtsp_token_new_empty() -> *mut GstRTSPToken; + //pub fn gst_rtsp_token_new_valist(firstfield: *const c_char, var_args: /*Unimplemented*/va_list) -> *mut GstRTSPToken; + pub fn gst_rtsp_token_get_string( + token: *mut GstRTSPToken, + field: *const c_char, + ) -> *const c_char; + pub fn gst_rtsp_token_get_structure(token: *mut GstRTSPToken) -> *const gst::GstStructure; + pub fn gst_rtsp_token_is_allowed(token: *mut GstRTSPToken, field: *const c_char) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_token_set_bool( + token: *mut GstRTSPToken, + field: *const c_char, + bool_value: gboolean, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_token_set_string( + token: *mut GstRTSPToken, + field: *const c_char, + string_value: *const c_char, + ); + pub fn gst_rtsp_token_writable_structure(token: *mut GstRTSPToken) -> *mut gst::GstStructure; + + //========================================================================= + // GstRTSPAddressPool + //========================================================================= + pub fn gst_rtsp_address_pool_get_type() -> GType; + pub fn gst_rtsp_address_pool_new() -> *mut GstRTSPAddressPool; + pub fn gst_rtsp_address_pool_acquire_address( + pool: *mut GstRTSPAddressPool, + flags: GstRTSPAddressFlags, + n_ports: c_int, + ) -> *mut GstRTSPAddress; + pub fn gst_rtsp_address_pool_add_range( + pool: *mut GstRTSPAddressPool, + min_address: *const c_char, + max_address: *const c_char, + min_port: u16, + max_port: u16, + ttl: u8, + ) -> gboolean; + pub fn gst_rtsp_address_pool_clear(pool: *mut GstRTSPAddressPool); + pub fn gst_rtsp_address_pool_dump(pool: *mut GstRTSPAddressPool); + pub fn gst_rtsp_address_pool_has_unicast_addresses(pool: *mut GstRTSPAddressPool) -> gboolean; + pub fn gst_rtsp_address_pool_reserve_address( + pool: *mut GstRTSPAddressPool, + ip_address: *const c_char, + port: c_uint, + n_ports: c_uint, + ttl: c_uint, + address: *mut *mut GstRTSPAddress, + ) -> GstRTSPAddressPoolResult; + + //========================================================================= + // GstRTSPAuth + //========================================================================= + pub fn gst_rtsp_auth_get_type() -> GType; + pub fn gst_rtsp_auth_new() -> *mut GstRTSPAuth; + pub fn gst_rtsp_auth_check(check: *const c_char) -> gboolean; + pub fn gst_rtsp_auth_make_basic(user: *const c_char, pass: *const c_char) -> *mut c_char; + pub fn gst_rtsp_auth_add_basic( + auth: *mut GstRTSPAuth, + basic: *const c_char, + token: *mut GstRTSPToken, + ); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_add_digest( + auth: *mut GstRTSPAuth, + user: *const c_char, + pass: *const c_char, + token: *mut GstRTSPToken, + ); + pub fn gst_rtsp_auth_get_default_token(auth: *mut GstRTSPAuth) -> *mut GstRTSPToken; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_auth_get_realm(auth: *mut GstRTSPAuth) -> *mut c_char; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_get_supported_methods( + auth: *mut GstRTSPAuth, + ) -> gst_rtsp::GstRTSPAuthMethod; + pub fn gst_rtsp_auth_get_tls_authentication_mode( + auth: *mut GstRTSPAuth, + ) -> gio::GTlsAuthenticationMode; + pub fn gst_rtsp_auth_get_tls_certificate(auth: *mut GstRTSPAuth) -> *mut gio::GTlsCertificate; + pub fn gst_rtsp_auth_get_tls_database(auth: *mut GstRTSPAuth) -> *mut gio::GTlsDatabase; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_auth_parse_htdigest( + auth: *mut GstRTSPAuth, + path: *const c_char, + token: *mut GstRTSPToken, + ) -> gboolean; + pub fn gst_rtsp_auth_remove_basic(auth: *mut GstRTSPAuth, basic: *const c_char); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_remove_digest(auth: *mut GstRTSPAuth, user: *const c_char); + pub fn gst_rtsp_auth_set_default_token(auth: *mut GstRTSPAuth, token: *mut GstRTSPToken); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_auth_set_realm(auth: *mut GstRTSPAuth, realm: *const c_char); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_set_supported_methods( + auth: *mut GstRTSPAuth, + methods: gst_rtsp::GstRTSPAuthMethod, + ); + pub fn gst_rtsp_auth_set_tls_authentication_mode( + auth: *mut GstRTSPAuth, + mode: gio::GTlsAuthenticationMode, + ); + pub fn gst_rtsp_auth_set_tls_certificate( + auth: *mut GstRTSPAuth, + cert: *mut gio::GTlsCertificate, + ); + pub fn gst_rtsp_auth_set_tls_database(auth: *mut GstRTSPAuth, database: *mut gio::GTlsDatabase); + + //========================================================================= + // GstRTSPClient + //========================================================================= + pub fn gst_rtsp_client_get_type() -> GType; + pub fn gst_rtsp_client_new() -> *mut GstRTSPClient; + pub fn gst_rtsp_client_attach( + client: *mut GstRTSPClient, + context: *mut glib::GMainContext, + ) -> c_uint; + pub fn gst_rtsp_client_close(client: *mut GstRTSPClient); + pub fn gst_rtsp_client_get_auth(client: *mut GstRTSPClient) -> *mut GstRTSPAuth; + pub fn gst_rtsp_client_get_connection( + client: *mut GstRTSPClient, + ) -> *mut gst_rtsp::GstRTSPConnection; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_client_get_content_length_limit(client: *mut GstRTSPClient) -> c_uint; + pub fn gst_rtsp_client_get_mount_points(client: *mut GstRTSPClient) -> *mut GstRTSPMountPoints; + pub fn gst_rtsp_client_get_session_pool(client: *mut GstRTSPClient) -> *mut GstRTSPSessionPool; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_client_get_stream_transport( + client: *mut GstRTSPClient, + channel: u8, + ) -> *mut GstRTSPStreamTransport; + pub fn gst_rtsp_client_get_thread_pool(client: *mut GstRTSPClient) -> *mut GstRTSPThreadPool; + pub fn gst_rtsp_client_handle_message( + client: *mut GstRTSPClient, + message: *mut gst_rtsp::GstRTSPMessage, + ) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_client_send_message( + client: *mut GstRTSPClient, + session: *mut GstRTSPSession, + message: *mut gst_rtsp::GstRTSPMessage, + ) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_client_session_filter( + client: *mut GstRTSPClient, + func: GstRTSPClientSessionFilterFunc, + user_data: gpointer, + ) -> *mut glib::GList; + pub fn gst_rtsp_client_set_auth(client: *mut GstRTSPClient, auth: *mut GstRTSPAuth); + pub fn gst_rtsp_client_set_connection( + client: *mut GstRTSPClient, + conn: *mut gst_rtsp::GstRTSPConnection, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_client_set_content_length_limit(client: *mut GstRTSPClient, limit: c_uint); + pub fn gst_rtsp_client_set_mount_points( + client: *mut GstRTSPClient, + mounts: *mut GstRTSPMountPoints, + ); + pub fn gst_rtsp_client_set_send_func( + client: *mut GstRTSPClient, + func: GstRTSPClientSendFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_client_set_send_messages_func( + client: *mut GstRTSPClient, + func: GstRTSPClientSendMessagesFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_rtsp_client_set_session_pool( + client: *mut GstRTSPClient, + pool: *mut GstRTSPSessionPool, + ); + pub fn gst_rtsp_client_set_thread_pool( + client: *mut GstRTSPClient, + pool: *mut GstRTSPThreadPool, + ); + + //========================================================================= + // GstRTSPMedia + //========================================================================= + pub fn gst_rtsp_media_get_type() -> GType; + pub fn gst_rtsp_media_new(element: *mut gst::GstElement) -> *mut GstRTSPMedia; + pub fn gst_rtsp_media_collect_streams(media: *mut GstRTSPMedia); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_media_complete_pipeline( + media: *mut GstRTSPMedia, + transports: *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_rtsp_media_create_stream( + media: *mut GstRTSPMedia, + payloader: *mut gst::GstElement, + pad: *mut gst::GstPad, + ) -> *mut GstRTSPStream; + pub fn gst_rtsp_media_find_stream( + media: *mut GstRTSPMedia, + control: *const c_char, + ) -> *mut GstRTSPStream; + pub fn gst_rtsp_media_get_address_pool(media: *mut GstRTSPMedia) -> *mut GstRTSPAddressPool; + pub fn gst_rtsp_media_get_base_time(media: *mut GstRTSPMedia) -> gst::GstClockTime; + pub fn gst_rtsp_media_get_buffer_size(media: *mut GstRTSPMedia) -> c_uint; + pub fn gst_rtsp_media_get_clock(media: *mut GstRTSPMedia) -> *mut gst::GstClock; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_get_do_retransmission(media: *mut GstRTSPMedia) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_get_dscp_qos(media: *mut GstRTSPMedia) -> c_int; + pub fn gst_rtsp_media_get_element(media: *mut GstRTSPMedia) -> *mut gst::GstElement; + pub fn gst_rtsp_media_get_latency(media: *mut GstRTSPMedia) -> c_uint; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_get_max_mcast_ttl(media: *mut GstRTSPMedia) -> c_uint; + pub fn gst_rtsp_media_get_multicast_iface(media: *mut GstRTSPMedia) -> *mut c_char; + pub fn gst_rtsp_media_get_permissions(media: *mut GstRTSPMedia) -> *mut GstRTSPPermissions; + pub fn gst_rtsp_media_get_profiles(media: *mut GstRTSPMedia) -> gst_rtsp::GstRTSPProfile; + pub fn gst_rtsp_media_get_protocols(media: *mut GstRTSPMedia) -> gst_rtsp::GstRTSPLowerTrans; + pub fn gst_rtsp_media_get_publish_clock_mode( + media: *mut GstRTSPMedia, + ) -> GstRTSPPublishClockMode; + pub fn gst_rtsp_media_get_range_string( + media: *mut GstRTSPMedia, + play: gboolean, + unit: gst_rtsp::GstRTSPRangeUnit, + ) -> *mut c_char; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_get_rate_control(media: *mut GstRTSPMedia) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_get_rates( + media: *mut GstRTSPMedia, + rate: *mut c_double, + applied_rate: *mut c_double, + ) -> gboolean; + pub fn gst_rtsp_media_get_retransmission_time(media: *mut GstRTSPMedia) -> gst::GstClockTime; + pub fn gst_rtsp_media_get_status(media: *mut GstRTSPMedia) -> GstRTSPMediaStatus; + pub fn gst_rtsp_media_get_stream(media: *mut GstRTSPMedia, idx: c_uint) -> *mut GstRTSPStream; + pub fn gst_rtsp_media_get_suspend_mode(media: *mut GstRTSPMedia) -> GstRTSPSuspendMode; + pub fn gst_rtsp_media_get_time_provider( + media: *mut GstRTSPMedia, + address: *const c_char, + port: u16, + ) -> *mut gst_net::GstNetTimeProvider; + pub fn gst_rtsp_media_get_transport_mode(media: *mut GstRTSPMedia) -> GstRTSPTransportMode; + pub fn gst_rtsp_media_handle_sdp( + media: *mut GstRTSPMedia, + sdp: *mut gst_sdp::GstSDPMessage, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_has_completed_sender(media: *mut GstRTSPMedia) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_is_bind_mcast_address(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_is_eos_shutdown(media: *mut GstRTSPMedia) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_is_receive_only(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_is_reusable(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_is_shared(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_is_stop_on_disconnect(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_is_time_provider(media: *mut GstRTSPMedia) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_lock(media: *mut GstRTSPMedia); + pub fn gst_rtsp_media_n_streams(media: *mut GstRTSPMedia) -> c_uint; + pub fn gst_rtsp_media_prepare(media: *mut GstRTSPMedia, thread: *mut GstRTSPThread) + -> gboolean; + pub fn gst_rtsp_media_seek( + media: *mut GstRTSPMedia, + range: *mut gst_rtsp::GstRTSPTimeRange, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_seek_full( + media: *mut GstRTSPMedia, + range: *mut gst_rtsp::GstRTSPTimeRange, + flags: gst::GstSeekFlags, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_seek_trickmode( + media: *mut GstRTSPMedia, + range: *mut gst_rtsp::GstRTSPTimeRange, + flags: gst::GstSeekFlags, + rate: c_double, + trickmode_interval: gst::GstClockTime, + ) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_media_seekable(media: *mut GstRTSPMedia) -> gst::GstClockTimeDiff; + pub fn gst_rtsp_media_set_address_pool(media: *mut GstRTSPMedia, pool: *mut GstRTSPAddressPool); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_set_bind_mcast_address( + media: *mut GstRTSPMedia, + bind_mcast_addr: gboolean, + ); + pub fn gst_rtsp_media_set_buffer_size(media: *mut GstRTSPMedia, size: c_uint); + pub fn gst_rtsp_media_set_clock(media: *mut GstRTSPMedia, clock: *mut gst::GstClock); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_set_do_retransmission( + media: *mut GstRTSPMedia, + do_retransmission: gboolean, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_set_dscp_qos(media: *mut GstRTSPMedia, dscp_qos: c_int); + pub fn gst_rtsp_media_set_eos_shutdown(media: *mut GstRTSPMedia, eos_shutdown: gboolean); + pub fn gst_rtsp_media_set_latency(media: *mut GstRTSPMedia, latency: c_uint); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_set_max_mcast_ttl(media: *mut GstRTSPMedia, ttl: c_uint) -> gboolean; + pub fn gst_rtsp_media_set_multicast_iface( + media: *mut GstRTSPMedia, + multicast_iface: *const c_char, + ); + pub fn gst_rtsp_media_set_permissions( + media: *mut GstRTSPMedia, + permissions: *mut GstRTSPPermissions, + ); + pub fn gst_rtsp_media_set_pipeline_state(media: *mut GstRTSPMedia, state: gst::GstState); + pub fn gst_rtsp_media_set_profiles( + media: *mut GstRTSPMedia, + profiles: gst_rtsp::GstRTSPProfile, + ); + pub fn gst_rtsp_media_set_protocols( + media: *mut GstRTSPMedia, + protocols: gst_rtsp::GstRTSPLowerTrans, + ); + pub fn gst_rtsp_media_set_publish_clock_mode( + media: *mut GstRTSPMedia, + mode: GstRTSPPublishClockMode, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_set_rate_control(media: *mut GstRTSPMedia, enabled: gboolean); + pub fn gst_rtsp_media_set_retransmission_time( + media: *mut GstRTSPMedia, + time: gst::GstClockTime, + ); + pub fn gst_rtsp_media_set_reusable(media: *mut GstRTSPMedia, reusable: gboolean); + pub fn gst_rtsp_media_set_shared(media: *mut GstRTSPMedia, shared: gboolean); + pub fn gst_rtsp_media_set_state( + media: *mut GstRTSPMedia, + state: gst::GstState, + transports: *mut glib::GPtrArray, + ) -> gboolean; + pub fn gst_rtsp_media_set_stop_on_disconnect( + media: *mut GstRTSPMedia, + stop_on_disconnect: gboolean, + ); + pub fn gst_rtsp_media_set_suspend_mode(media: *mut GstRTSPMedia, mode: GstRTSPSuspendMode); + pub fn gst_rtsp_media_set_transport_mode(media: *mut GstRTSPMedia, mode: GstRTSPTransportMode); + pub fn gst_rtsp_media_setup_sdp( + media: *mut GstRTSPMedia, + sdp: *mut gst_sdp::GstSDPMessage, + info: *mut GstSDPInfo, + ) -> gboolean; + pub fn gst_rtsp_media_suspend(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_take_pipeline(media: *mut GstRTSPMedia, pipeline: *mut gst::GstPipeline); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_unlock(media: *mut GstRTSPMedia); + pub fn gst_rtsp_media_unprepare(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_unsuspend(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_use_time_provider(media: *mut GstRTSPMedia, time_provider: gboolean); + + //========================================================================= + // GstRTSPMediaFactory + //========================================================================= + pub fn gst_rtsp_media_factory_get_type() -> GType; + pub fn gst_rtsp_media_factory_new() -> *mut GstRTSPMediaFactory; + pub fn gst_rtsp_media_factory_add_role( + factory: *mut GstRTSPMediaFactory, + role: *const c_char, + fieldname: *const c_char, + ... + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_media_factory_add_role_from_structure( + factory: *mut GstRTSPMediaFactory, + structure: *mut gst::GstStructure, + ); + pub fn gst_rtsp_media_factory_construct( + factory: *mut GstRTSPMediaFactory, + url: *const gst_rtsp::GstRTSPUrl, + ) -> *mut GstRTSPMedia; + pub fn gst_rtsp_media_factory_create_element( + factory: *mut GstRTSPMediaFactory, + url: *const gst_rtsp::GstRTSPUrl, + ) -> *mut gst::GstElement; + pub fn gst_rtsp_media_factory_get_address_pool( + factory: *mut GstRTSPMediaFactory, + ) -> *mut GstRTSPAddressPool; + pub fn gst_rtsp_media_factory_get_buffer_size(factory: *mut GstRTSPMediaFactory) -> c_uint; + pub fn gst_rtsp_media_factory_get_clock( + factory: *mut GstRTSPMediaFactory, + ) -> *mut gst::GstClock; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_factory_get_do_retransmission( + factory: *mut GstRTSPMediaFactory, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_factory_get_dscp_qos(factory: *mut GstRTSPMediaFactory) -> c_int; + pub fn gst_rtsp_media_factory_get_latency(factory: *mut GstRTSPMediaFactory) -> c_uint; + pub fn gst_rtsp_media_factory_get_launch(factory: *mut GstRTSPMediaFactory) -> *mut c_char; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_factory_get_max_mcast_ttl(factory: *mut GstRTSPMediaFactory) -> c_uint; + pub fn gst_rtsp_media_factory_get_media_gtype(factory: *mut GstRTSPMediaFactory) -> GType; + pub fn gst_rtsp_media_factory_get_multicast_iface( + factory: *mut GstRTSPMediaFactory, + ) -> *mut c_char; + pub fn gst_rtsp_media_factory_get_permissions( + factory: *mut GstRTSPMediaFactory, + ) -> *mut GstRTSPPermissions; + pub fn gst_rtsp_media_factory_get_profiles( + factory: *mut GstRTSPMediaFactory, + ) -> gst_rtsp::GstRTSPProfile; + pub fn gst_rtsp_media_factory_get_protocols( + factory: *mut GstRTSPMediaFactory, + ) -> gst_rtsp::GstRTSPLowerTrans; + pub fn gst_rtsp_media_factory_get_publish_clock_mode( + factory: *mut GstRTSPMediaFactory, + ) -> GstRTSPPublishClockMode; + pub fn gst_rtsp_media_factory_get_retransmission_time( + factory: *mut GstRTSPMediaFactory, + ) -> gst::GstClockTime; + pub fn gst_rtsp_media_factory_get_suspend_mode( + factory: *mut GstRTSPMediaFactory, + ) -> GstRTSPSuspendMode; + pub fn gst_rtsp_media_factory_get_transport_mode( + factory: *mut GstRTSPMediaFactory, + ) -> GstRTSPTransportMode; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_factory_is_bind_mcast_address( + factory: *mut GstRTSPMediaFactory, + ) -> gboolean; + pub fn gst_rtsp_media_factory_is_eos_shutdown(factory: *mut GstRTSPMediaFactory) -> gboolean; + pub fn gst_rtsp_media_factory_is_shared(factory: *mut GstRTSPMediaFactory) -> gboolean; + pub fn gst_rtsp_media_factory_is_stop_on_disonnect( + factory: *mut GstRTSPMediaFactory, + ) -> gboolean; + pub fn gst_rtsp_media_factory_set_address_pool( + factory: *mut GstRTSPMediaFactory, + pool: *mut GstRTSPAddressPool, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_factory_set_bind_mcast_address( + factory: *mut GstRTSPMediaFactory, + bind_mcast_addr: gboolean, + ); + pub fn gst_rtsp_media_factory_set_buffer_size(factory: *mut GstRTSPMediaFactory, size: c_uint); + pub fn gst_rtsp_media_factory_set_clock( + factory: *mut GstRTSPMediaFactory, + clock: *mut gst::GstClock, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_factory_set_do_retransmission( + factory: *mut GstRTSPMediaFactory, + do_retransmission: gboolean, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_media_factory_set_dscp_qos(factory: *mut GstRTSPMediaFactory, dscp_qos: c_int); + pub fn gst_rtsp_media_factory_set_eos_shutdown( + factory: *mut GstRTSPMediaFactory, + eos_shutdown: gboolean, + ); + pub fn gst_rtsp_media_factory_set_latency(factory: *mut GstRTSPMediaFactory, latency: c_uint); + pub fn gst_rtsp_media_factory_set_launch( + factory: *mut GstRTSPMediaFactory, + launch: *const c_char, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_media_factory_set_max_mcast_ttl( + factory: *mut GstRTSPMediaFactory, + ttl: c_uint, + ) -> gboolean; + pub fn gst_rtsp_media_factory_set_media_gtype( + factory: *mut GstRTSPMediaFactory, + media_gtype: GType, + ); + pub fn gst_rtsp_media_factory_set_multicast_iface( + factory: *mut GstRTSPMediaFactory, + multicast_iface: *const c_char, + ); + pub fn gst_rtsp_media_factory_set_permissions( + factory: *mut GstRTSPMediaFactory, + permissions: *mut GstRTSPPermissions, + ); + pub fn gst_rtsp_media_factory_set_profiles( + factory: *mut GstRTSPMediaFactory, + profiles: gst_rtsp::GstRTSPProfile, + ); + pub fn gst_rtsp_media_factory_set_protocols( + factory: *mut GstRTSPMediaFactory, + protocols: gst_rtsp::GstRTSPLowerTrans, + ); + pub fn gst_rtsp_media_factory_set_publish_clock_mode( + factory: *mut GstRTSPMediaFactory, + mode: GstRTSPPublishClockMode, + ); + pub fn gst_rtsp_media_factory_set_retransmission_time( + factory: *mut GstRTSPMediaFactory, + time: gst::GstClockTime, + ); + pub fn gst_rtsp_media_factory_set_shared(factory: *mut GstRTSPMediaFactory, shared: gboolean); + pub fn gst_rtsp_media_factory_set_stop_on_disconnect( + factory: *mut GstRTSPMediaFactory, + stop_on_disconnect: gboolean, + ); + pub fn gst_rtsp_media_factory_set_suspend_mode( + factory: *mut GstRTSPMediaFactory, + mode: GstRTSPSuspendMode, + ); + pub fn gst_rtsp_media_factory_set_transport_mode( + factory: *mut GstRTSPMediaFactory, + mode: GstRTSPTransportMode, + ); + + //========================================================================= + // GstRTSPMediaFactoryURI + //========================================================================= + pub fn gst_rtsp_media_factory_uri_get_type() -> GType; + pub fn gst_rtsp_media_factory_uri_new() -> *mut GstRTSPMediaFactoryURI; + pub fn gst_rtsp_media_factory_uri_get_uri(factory: *mut GstRTSPMediaFactoryURI) -> *mut c_char; + pub fn gst_rtsp_media_factory_uri_set_uri( + factory: *mut GstRTSPMediaFactoryURI, + uri: *const c_char, + ); + + //========================================================================= + // GstRTSPMountPoints + //========================================================================= + pub fn gst_rtsp_mount_points_get_type() -> GType; + pub fn gst_rtsp_mount_points_new() -> *mut GstRTSPMountPoints; + pub fn gst_rtsp_mount_points_add_factory( + mounts: *mut GstRTSPMountPoints, + path: *const c_char, + factory: *mut GstRTSPMediaFactory, + ); + pub fn gst_rtsp_mount_points_make_path( + mounts: *mut GstRTSPMountPoints, + url: *const gst_rtsp::GstRTSPUrl, + ) -> *mut c_char; + pub fn gst_rtsp_mount_points_match( + mounts: *mut GstRTSPMountPoints, + path: *const c_char, + matched: *mut c_int, + ) -> *mut GstRTSPMediaFactory; + pub fn gst_rtsp_mount_points_remove_factory( + mounts: *mut GstRTSPMountPoints, + path: *const c_char, + ); + + //========================================================================= + // GstRTSPOnvifClient + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_client_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_onvif_client_new() -> *mut GstRTSPClient; + + //========================================================================= + // GstRTSPOnvifMedia + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_get_type() -> GType; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_collect_backchannel(media: *mut GstRTSPOnvifMedia) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_get_backchannel_bandwidth(media: *mut GstRTSPOnvifMedia) -> c_uint; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_set_backchannel_bandwidth( + media: *mut GstRTSPOnvifMedia, + bandwidth: c_uint, + ); + + //========================================================================= + // GstRTSPOnvifMediaFactory + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_factory_get_type() -> GType; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_factory_new() -> *mut GstRTSPMediaFactory; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_factory_requires_backchannel( + factory: *mut GstRTSPMediaFactory, + ctx: *mut GstRTSPContext, + ) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_factory_get_backchannel_bandwidth( + factory: *mut GstRTSPOnvifMediaFactory, + ) -> c_uint; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_factory_get_backchannel_launch( + factory: *mut GstRTSPOnvifMediaFactory, + ) -> *mut c_char; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_factory_has_backchannel_support( + factory: *mut GstRTSPOnvifMediaFactory, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_onvif_media_factory_has_replay_support( + factory: *mut GstRTSPOnvifMediaFactory, + ) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_factory_set_backchannel_bandwidth( + factory: *mut GstRTSPOnvifMediaFactory, + bandwidth: c_uint, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_media_factory_set_backchannel_launch( + factory: *mut GstRTSPOnvifMediaFactory, + launch: *const c_char, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_onvif_media_factory_set_replay_support( + factory: *mut GstRTSPOnvifMediaFactory, + has_replay_support: gboolean, + ); + + //========================================================================= + // GstRTSPOnvifServer + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_server_get_type() -> GType; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_onvif_server_new() -> *mut GstRTSPServer; + + //========================================================================= + // GstRTSPServer + //========================================================================= + pub fn gst_rtsp_server_get_type() -> GType; + pub fn gst_rtsp_server_new() -> *mut GstRTSPServer; + pub fn gst_rtsp_server_io_func( + socket: *mut gio::GSocket, + condition: glib::GIOCondition, + server: *mut GstRTSPServer, + ) -> gboolean; + pub fn gst_rtsp_server_attach( + server: *mut GstRTSPServer, + context: *mut glib::GMainContext, + ) -> c_uint; + pub fn gst_rtsp_server_client_filter( + server: *mut GstRTSPServer, + func: GstRTSPServerClientFilterFunc, + user_data: gpointer, + ) -> *mut glib::GList; + pub fn gst_rtsp_server_create_socket( + server: *mut GstRTSPServer, + cancellable: *mut gio::GCancellable, + error: *mut *mut glib::GError, + ) -> *mut gio::GSocket; + pub fn gst_rtsp_server_create_source( + server: *mut GstRTSPServer, + cancellable: *mut gio::GCancellable, + error: *mut *mut glib::GError, + ) -> *mut glib::GSource; + pub fn gst_rtsp_server_get_address(server: *mut GstRTSPServer) -> *mut c_char; + pub fn gst_rtsp_server_get_auth(server: *mut GstRTSPServer) -> *mut GstRTSPAuth; + pub fn gst_rtsp_server_get_backlog(server: *mut GstRTSPServer) -> c_int; + pub fn gst_rtsp_server_get_bound_port(server: *mut GstRTSPServer) -> c_int; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_server_get_content_length_limit(server: *mut GstRTSPServer) -> c_uint; + pub fn gst_rtsp_server_get_mount_points(server: *mut GstRTSPServer) -> *mut GstRTSPMountPoints; + pub fn gst_rtsp_server_get_service(server: *mut GstRTSPServer) -> *mut c_char; + pub fn gst_rtsp_server_get_session_pool(server: *mut GstRTSPServer) -> *mut GstRTSPSessionPool; + pub fn gst_rtsp_server_get_thread_pool(server: *mut GstRTSPServer) -> *mut GstRTSPThreadPool; + pub fn gst_rtsp_server_set_address(server: *mut GstRTSPServer, address: *const c_char); + pub fn gst_rtsp_server_set_auth(server: *mut GstRTSPServer, auth: *mut GstRTSPAuth); + pub fn gst_rtsp_server_set_backlog(server: *mut GstRTSPServer, backlog: c_int); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_server_set_content_length_limit(server: *mut GstRTSPServer, limit: c_uint); + pub fn gst_rtsp_server_set_mount_points( + server: *mut GstRTSPServer, + mounts: *mut GstRTSPMountPoints, + ); + pub fn gst_rtsp_server_set_service(server: *mut GstRTSPServer, service: *const c_char); + pub fn gst_rtsp_server_set_session_pool( + server: *mut GstRTSPServer, + pool: *mut GstRTSPSessionPool, + ); + pub fn gst_rtsp_server_set_thread_pool( + server: *mut GstRTSPServer, + pool: *mut GstRTSPThreadPool, + ); + pub fn gst_rtsp_server_transfer_connection( + server: *mut GstRTSPServer, + socket: *mut gio::GSocket, + ip: *const c_char, + port: c_int, + initial_buffer: *const c_char, + ) -> gboolean; + + //========================================================================= + // GstRTSPSession + //========================================================================= + pub fn gst_rtsp_session_get_type() -> GType; + pub fn gst_rtsp_session_new(sessionid: *const c_char) -> *mut GstRTSPSession; + pub fn gst_rtsp_session_allow_expire(session: *mut GstRTSPSession); + pub fn gst_rtsp_session_filter( + sess: *mut GstRTSPSession, + func: GstRTSPSessionFilterFunc, + user_data: gpointer, + ) -> *mut glib::GList; + pub fn gst_rtsp_session_get_header(session: *mut GstRTSPSession) -> *mut c_char; + pub fn gst_rtsp_session_get_media( + sess: *mut GstRTSPSession, + path: *const c_char, + matched: *mut c_int, + ) -> *mut GstRTSPSessionMedia; + pub fn gst_rtsp_session_get_sessionid(session: *mut GstRTSPSession) -> *const c_char; + pub fn gst_rtsp_session_get_timeout(session: *mut GstRTSPSession) -> c_uint; + pub fn gst_rtsp_session_is_expired( + session: *mut GstRTSPSession, + now: *mut glib::GTimeVal, + ) -> gboolean; + pub fn gst_rtsp_session_is_expired_usec(session: *mut GstRTSPSession, now: i64) -> gboolean; + pub fn gst_rtsp_session_manage_media( + sess: *mut GstRTSPSession, + path: *const c_char, + media: *mut GstRTSPMedia, + ) -> *mut GstRTSPSessionMedia; + pub fn gst_rtsp_session_next_timeout( + session: *mut GstRTSPSession, + now: *mut glib::GTimeVal, + ) -> c_int; + pub fn gst_rtsp_session_next_timeout_usec(session: *mut GstRTSPSession, now: i64) -> c_int; + pub fn gst_rtsp_session_prevent_expire(session: *mut GstRTSPSession); + pub fn gst_rtsp_session_release_media( + sess: *mut GstRTSPSession, + media: *mut GstRTSPSessionMedia, + ) -> gboolean; + pub fn gst_rtsp_session_set_timeout(session: *mut GstRTSPSession, timeout: c_uint); + pub fn gst_rtsp_session_touch(session: *mut GstRTSPSession); + + //========================================================================= + // GstRTSPSessionMedia + //========================================================================= + pub fn gst_rtsp_session_media_get_type() -> GType; + pub fn gst_rtsp_session_media_new( + path: *const c_char, + media: *mut GstRTSPMedia, + ) -> *mut GstRTSPSessionMedia; + pub fn gst_rtsp_session_media_alloc_channels( + media: *mut GstRTSPSessionMedia, + range: *mut gst_rtsp::GstRTSPRange, + ) -> gboolean; + pub fn gst_rtsp_session_media_get_base_time( + media: *mut GstRTSPSessionMedia, + ) -> gst::GstClockTime; + pub fn gst_rtsp_session_media_get_media(media: *mut GstRTSPSessionMedia) -> *mut GstRTSPMedia; + pub fn gst_rtsp_session_media_get_rtpinfo(media: *mut GstRTSPSessionMedia) -> *mut c_char; + pub fn gst_rtsp_session_media_get_rtsp_state( + media: *mut GstRTSPSessionMedia, + ) -> gst_rtsp::GstRTSPState; + pub fn gst_rtsp_session_media_get_transport( + media: *mut GstRTSPSessionMedia, + idx: c_uint, + ) -> *mut GstRTSPStreamTransport; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_session_media_get_transports( + media: *mut GstRTSPSessionMedia, + ) -> *mut glib::GPtrArray; + pub fn gst_rtsp_session_media_matches( + media: *mut GstRTSPSessionMedia, + path: *const c_char, + matched: *mut c_int, + ) -> gboolean; + pub fn gst_rtsp_session_media_set_rtsp_state( + media: *mut GstRTSPSessionMedia, + state: gst_rtsp::GstRTSPState, + ); + pub fn gst_rtsp_session_media_set_state( + media: *mut GstRTSPSessionMedia, + state: gst::GstState, + ) -> gboolean; + pub fn gst_rtsp_session_media_set_transport( + media: *mut GstRTSPSessionMedia, + stream: *mut GstRTSPStream, + tr: *mut gst_rtsp::GstRTSPTransport, + ) -> *mut GstRTSPStreamTransport; + + //========================================================================= + // GstRTSPSessionPool + //========================================================================= + pub fn gst_rtsp_session_pool_get_type() -> GType; + pub fn gst_rtsp_session_pool_new() -> *mut GstRTSPSessionPool; + pub fn gst_rtsp_session_pool_cleanup(pool: *mut GstRTSPSessionPool) -> c_uint; + pub fn gst_rtsp_session_pool_create(pool: *mut GstRTSPSessionPool) -> *mut GstRTSPSession; + pub fn gst_rtsp_session_pool_create_watch(pool: *mut GstRTSPSessionPool) -> *mut glib::GSource; + pub fn gst_rtsp_session_pool_filter( + pool: *mut GstRTSPSessionPool, + func: GstRTSPSessionPoolFilterFunc, + user_data: gpointer, + ) -> *mut glib::GList; + pub fn gst_rtsp_session_pool_find( + pool: *mut GstRTSPSessionPool, + sessionid: *const c_char, + ) -> *mut GstRTSPSession; + pub fn gst_rtsp_session_pool_get_max_sessions(pool: *mut GstRTSPSessionPool) -> c_uint; + pub fn gst_rtsp_session_pool_get_n_sessions(pool: *mut GstRTSPSessionPool) -> c_uint; + pub fn gst_rtsp_session_pool_remove( + pool: *mut GstRTSPSessionPool, + sess: *mut GstRTSPSession, + ) -> gboolean; + pub fn gst_rtsp_session_pool_set_max_sessions(pool: *mut GstRTSPSessionPool, max: c_uint); + + //========================================================================= + // GstRTSPStream + //========================================================================= + pub fn gst_rtsp_stream_get_type() -> GType; + pub fn gst_rtsp_stream_new( + idx: c_uint, + payloader: *mut gst::GstElement, + pad: *mut gst::GstPad, + ) -> *mut GstRTSPStream; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_add_multicast_client_address( + stream: *mut GstRTSPStream, + destination: *const c_char, + rtp_port: c_uint, + rtcp_port: c_uint, + family: gio::GSocketFamily, + ) -> gboolean; + pub fn gst_rtsp_stream_add_transport( + stream: *mut GstRTSPStream, + trans: *mut GstRTSPStreamTransport, + ) -> gboolean; + pub fn gst_rtsp_stream_allocate_udp_sockets( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + transport: *mut gst_rtsp::GstRTSPTransport, + use_client_settings: gboolean, + ) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_stream_complete_stream( + stream: *mut GstRTSPStream, + transport: *const gst_rtsp::GstRTSPTransport, + ) -> gboolean; + pub fn gst_rtsp_stream_get_address_pool(stream: *mut GstRTSPStream) -> *mut GstRTSPAddressPool; + pub fn gst_rtsp_stream_get_buffer_size(stream: *mut GstRTSPStream) -> c_uint; + pub fn gst_rtsp_stream_get_caps(stream: *mut GstRTSPStream) -> *mut gst::GstCaps; + pub fn gst_rtsp_stream_get_control(stream: *mut GstRTSPStream) -> *mut c_char; + pub fn gst_rtsp_stream_get_current_seqnum(stream: *mut GstRTSPStream) -> u16; + pub fn gst_rtsp_stream_get_dscp_qos(stream: *mut GstRTSPStream) -> c_int; + pub fn gst_rtsp_stream_get_index(stream: *mut GstRTSPStream) -> c_uint; + pub fn gst_rtsp_stream_get_joined_bin(stream: *mut GstRTSPStream) -> *mut gst::GstBin; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_get_max_mcast_ttl(stream: *mut GstRTSPStream) -> c_uint; + pub fn gst_rtsp_stream_get_mtu(stream: *mut GstRTSPStream) -> c_uint; + pub fn gst_rtsp_stream_get_multicast_address( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + ) -> *mut GstRTSPAddress; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_get_multicast_client_addresses( + stream: *mut GstRTSPStream, + ) -> *mut c_char; + pub fn gst_rtsp_stream_get_multicast_iface(stream: *mut GstRTSPStream) -> *mut c_char; + pub fn gst_rtsp_stream_get_profiles(stream: *mut GstRTSPStream) -> gst_rtsp::GstRTSPProfile; + pub fn gst_rtsp_stream_get_protocols(stream: *mut GstRTSPStream) + -> gst_rtsp::GstRTSPLowerTrans; + pub fn gst_rtsp_stream_get_pt(stream: *mut GstRTSPStream) -> c_uint; + pub fn gst_rtsp_stream_get_publish_clock_mode( + stream: *mut GstRTSPStream, + ) -> GstRTSPPublishClockMode; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_stream_get_rate_control(stream: *mut GstRTSPStream) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_stream_get_rates( + stream: *mut GstRTSPStream, + rate: *mut c_double, + applied_rate: *mut c_double, + ) -> gboolean; + pub fn gst_rtsp_stream_get_retransmission_pt(stream: *mut GstRTSPStream) -> c_uint; + pub fn gst_rtsp_stream_get_retransmission_time(stream: *mut GstRTSPStream) + -> gst::GstClockTime; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_stream_get_rtcp_multicast_socket( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + ) -> *mut gio::GSocket; + pub fn gst_rtsp_stream_get_rtcp_socket( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + ) -> *mut gio::GSocket; + pub fn gst_rtsp_stream_get_rtp_multicast_socket( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + ) -> *mut gio::GSocket; + pub fn gst_rtsp_stream_get_rtp_socket( + stream: *mut GstRTSPStream, + family: gio::GSocketFamily, + ) -> *mut gio::GSocket; + pub fn gst_rtsp_stream_get_rtpinfo( + stream: *mut GstRTSPStream, + rtptime: *mut c_uint, + seq: *mut c_uint, + clock_rate: *mut c_uint, + running_time: *mut gst::GstClockTime, + ) -> gboolean; + pub fn gst_rtsp_stream_get_rtpsession(stream: *mut GstRTSPStream) -> *mut gobject::GObject; + pub fn gst_rtsp_stream_get_server_port( + stream: *mut GstRTSPStream, + server_port: *mut gst_rtsp::GstRTSPRange, + family: gio::GSocketFamily, + ); + pub fn gst_rtsp_stream_get_sinkpad(stream: *mut GstRTSPStream) -> *mut gst::GstPad; + pub fn gst_rtsp_stream_get_srcpad(stream: *mut GstRTSPStream) -> *mut gst::GstPad; + pub fn gst_rtsp_stream_get_srtp_encoder(stream: *mut GstRTSPStream) -> *mut gst::GstElement; + pub fn gst_rtsp_stream_get_ssrc(stream: *mut GstRTSPStream, ssrc: *mut c_uint); + pub fn gst_rtsp_stream_get_ulpfec_enabled(stream: *mut GstRTSPStream) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_get_ulpfec_percentage(stream: *mut GstRTSPStream) -> c_uint; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_get_ulpfec_pt(stream: *mut GstRTSPStream) -> c_uint; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_handle_keymgmt( + stream: *mut GstRTSPStream, + keymgmt: *const c_char, + ) -> gboolean; + pub fn gst_rtsp_stream_has_control( + stream: *mut GstRTSPStream, + control: *const c_char, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_is_bind_mcast_address(stream: *mut GstRTSPStream) -> gboolean; + pub fn gst_rtsp_stream_is_blocking(stream: *mut GstRTSPStream) -> gboolean; + pub fn gst_rtsp_stream_is_client_side(stream: *mut GstRTSPStream) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_stream_is_complete(stream: *mut GstRTSPStream) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_stream_is_receiver(stream: *mut GstRTSPStream) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_stream_is_sender(stream: *mut GstRTSPStream) -> gboolean; + pub fn gst_rtsp_stream_is_transport_supported( + stream: *mut GstRTSPStream, + transport: *mut gst_rtsp::GstRTSPTransport, + ) -> gboolean; + pub fn gst_rtsp_stream_join_bin( + stream: *mut GstRTSPStream, + bin: *mut gst::GstBin, + rtpbin: *mut gst::GstElement, + state: gst::GstState, + ) -> gboolean; + pub fn gst_rtsp_stream_leave_bin( + stream: *mut GstRTSPStream, + bin: *mut gst::GstBin, + rtpbin: *mut gst::GstElement, + ) -> gboolean; + pub fn gst_rtsp_stream_query_position( + stream: *mut GstRTSPStream, + position: *mut i64, + ) -> gboolean; + pub fn gst_rtsp_stream_query_stop(stream: *mut GstRTSPStream, stop: *mut i64) -> gboolean; + pub fn gst_rtsp_stream_recv_rtcp( + stream: *mut GstRTSPStream, + buffer: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_rtsp_stream_recv_rtp( + stream: *mut GstRTSPStream, + buffer: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_rtsp_stream_remove_transport( + stream: *mut GstRTSPStream, + trans: *mut GstRTSPStreamTransport, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_request_aux_receiver( + stream: *mut GstRTSPStream, + sessid: c_uint, + ) -> *mut gst::GstElement; + pub fn gst_rtsp_stream_request_aux_sender( + stream: *mut GstRTSPStream, + sessid: c_uint, + ) -> *mut gst::GstElement; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_request_ulpfec_decoder( + stream: *mut GstRTSPStream, + rtpbin: *mut gst::GstElement, + sessid: c_uint, + ) -> *mut gst::GstElement; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_request_ulpfec_encoder( + stream: *mut GstRTSPStream, + sessid: c_uint, + ) -> *mut gst::GstElement; + pub fn gst_rtsp_stream_reserve_address( + stream: *mut GstRTSPStream, + address: *const c_char, + port: c_uint, + n_ports: c_uint, + ttl: c_uint, + ) -> *mut GstRTSPAddress; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_stream_seekable(stream: *mut GstRTSPStream) -> gboolean; + pub fn gst_rtsp_stream_set_address_pool( + stream: *mut GstRTSPStream, + pool: *mut GstRTSPAddressPool, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_set_bind_mcast_address( + stream: *mut GstRTSPStream, + bind_mcast_addr: gboolean, + ); + pub fn gst_rtsp_stream_set_blocked(stream: *mut GstRTSPStream, blocked: gboolean) -> gboolean; + pub fn gst_rtsp_stream_set_buffer_size(stream: *mut GstRTSPStream, size: c_uint); + pub fn gst_rtsp_stream_set_client_side(stream: *mut GstRTSPStream, client_side: gboolean); + pub fn gst_rtsp_stream_set_control(stream: *mut GstRTSPStream, control: *const c_char); + pub fn gst_rtsp_stream_set_dscp_qos(stream: *mut GstRTSPStream, dscp_qos: c_int); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_set_max_mcast_ttl(stream: *mut GstRTSPStream, ttl: c_uint) -> gboolean; + pub fn gst_rtsp_stream_set_mtu(stream: *mut GstRTSPStream, mtu: c_uint); + pub fn gst_rtsp_stream_set_multicast_iface( + stream: *mut GstRTSPStream, + multicast_iface: *const c_char, + ); + pub fn gst_rtsp_stream_set_profiles( + stream: *mut GstRTSPStream, + profiles: gst_rtsp::GstRTSPProfile, + ); + pub fn gst_rtsp_stream_set_protocols( + stream: *mut GstRTSPStream, + protocols: gst_rtsp::GstRTSPLowerTrans, + ); + pub fn gst_rtsp_stream_set_pt_map( + stream: *mut GstRTSPStream, + pt: c_uint, + caps: *mut gst::GstCaps, + ); + pub fn gst_rtsp_stream_set_publish_clock_mode( + stream: *mut GstRTSPStream, + mode: GstRTSPPublishClockMode, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_stream_set_rate_control(stream: *mut GstRTSPStream, enabled: gboolean); + pub fn gst_rtsp_stream_set_retransmission_pt(stream: *mut GstRTSPStream, rtx_pt: c_uint); + pub fn gst_rtsp_stream_set_retransmission_time( + stream: *mut GstRTSPStream, + time: gst::GstClockTime, + ); + pub fn gst_rtsp_stream_set_seqnum_offset(stream: *mut GstRTSPStream, seqnum: u16); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_set_ulpfec_percentage(stream: *mut GstRTSPStream, percentage: c_uint); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_set_ulpfec_pt(stream: *mut GstRTSPStream, pt: c_uint); + pub fn gst_rtsp_stream_transport_filter( + stream: *mut GstRTSPStream, + func: GstRTSPStreamTransportFilterFunc, + user_data: gpointer, + ) -> *mut glib::GList; + pub fn gst_rtsp_stream_unblock_linked(stream: *mut GstRTSPStream) -> gboolean; + pub fn gst_rtsp_stream_update_crypto( + stream: *mut GstRTSPStream, + ssrc: c_uint, + crypto: *mut gst::GstCaps, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_verify_mcast_ttl(stream: *mut GstRTSPStream, ttl: c_uint) -> gboolean; + + //========================================================================= + // GstRTSPStreamTransport + //========================================================================= + pub fn gst_rtsp_stream_transport_get_type() -> GType; + pub fn gst_rtsp_stream_transport_new( + stream: *mut GstRTSPStream, + tr: *mut gst_rtsp::GstRTSPTransport, + ) -> *mut GstRTSPStreamTransport; + pub fn gst_rtsp_stream_transport_get_rtpinfo( + trans: *mut GstRTSPStreamTransport, + start_time: gst::GstClockTime, + ) -> *mut c_char; + pub fn gst_rtsp_stream_transport_get_stream( + trans: *mut GstRTSPStreamTransport, + ) -> *mut GstRTSPStream; + pub fn gst_rtsp_stream_transport_get_transport( + trans: *mut GstRTSPStreamTransport, + ) -> *const gst_rtsp::GstRTSPTransport; + pub fn gst_rtsp_stream_transport_get_url( + trans: *mut GstRTSPStreamTransport, + ) -> *const gst_rtsp::GstRTSPUrl; + pub fn gst_rtsp_stream_transport_is_timed_out(trans: *mut GstRTSPStreamTransport) -> gboolean; + pub fn gst_rtsp_stream_transport_keep_alive(trans: *mut GstRTSPStreamTransport); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_transport_message_sent(trans: *mut GstRTSPStreamTransport); + pub fn gst_rtsp_stream_transport_recv_data( + trans: *mut GstRTSPStreamTransport, + channel: c_uint, + buffer: *mut gst::GstBuffer, + ) -> gst::GstFlowReturn; + pub fn gst_rtsp_stream_transport_send_rtcp( + trans: *mut GstRTSPStreamTransport, + buffer: *mut gst::GstBuffer, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_transport_send_rtcp_list( + trans: *mut GstRTSPStreamTransport, + buffer_list: *mut gst::GstBufferList, + ) -> gboolean; + pub fn gst_rtsp_stream_transport_send_rtp( + trans: *mut GstRTSPStreamTransport, + buffer: *mut gst::GstBuffer, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_transport_send_rtp_list( + trans: *mut GstRTSPStreamTransport, + buffer_list: *mut gst::GstBufferList, + ) -> gboolean; + pub fn gst_rtsp_stream_transport_set_active( + trans: *mut GstRTSPStreamTransport, + active: gboolean, + ) -> gboolean; + pub fn gst_rtsp_stream_transport_set_callbacks( + trans: *mut GstRTSPStreamTransport, + send_rtp: GstRTSPSendFunc, + send_rtcp: GstRTSPSendFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_rtsp_stream_transport_set_keepalive( + trans: *mut GstRTSPStreamTransport, + keep_alive: GstRTSPKeepAliveFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_stream_transport_set_list_callbacks( + trans: *mut GstRTSPStreamTransport, + send_rtp_list: GstRTSPSendListFunc, + send_rtcp_list: GstRTSPSendListFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_rtsp_stream_transport_set_message_sent( + trans: *mut GstRTSPStreamTransport, + message_sent: GstRTSPMessageSentFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_stream_transport_set_message_sent_full( + trans: *mut GstRTSPStreamTransport, + message_sent: GstRTSPMessageSentFuncFull, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_rtsp_stream_transport_set_timed_out( + trans: *mut GstRTSPStreamTransport, + timedout: gboolean, + ); + pub fn gst_rtsp_stream_transport_set_transport( + trans: *mut GstRTSPStreamTransport, + tr: *mut gst_rtsp::GstRTSPTransport, + ); + pub fn gst_rtsp_stream_transport_set_url( + trans: *mut GstRTSPStreamTransport, + url: *const gst_rtsp::GstRTSPUrl, + ); + + //========================================================================= + // GstRTSPThreadPool + //========================================================================= + pub fn gst_rtsp_thread_pool_get_type() -> GType; + pub fn gst_rtsp_thread_pool_new() -> *mut GstRTSPThreadPool; + pub fn gst_rtsp_thread_pool_cleanup(); + pub fn gst_rtsp_thread_pool_get_max_threads(pool: *mut GstRTSPThreadPool) -> c_int; + pub fn gst_rtsp_thread_pool_get_thread( + pool: *mut GstRTSPThreadPool, + type_: GstRTSPThreadType, + ctx: *mut GstRTSPContext, + ) -> *mut GstRTSPThread; + pub fn gst_rtsp_thread_pool_set_max_threads(pool: *mut GstRTSPThreadPool, max_threads: c_int); + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_rtsp_context_get_type() -> GType; + pub fn gst_rtsp_params_get( + client: *mut GstRTSPClient, + ctx: *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_params_set( + client: *mut GstRTSPClient, + ctx: *mut GstRTSPContext, + ) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_sdp_from_media( + sdp: *mut gst_sdp::GstSDPMessage, + info: *mut GstSDPInfo, + media: *mut GstRTSPMedia, + ) -> gboolean; + pub fn gst_rtsp_sdp_from_stream( + sdp: *mut gst_sdp::GstSDPMessage, + info: *mut GstSDPInfo, + stream: *mut GstRTSPStream, + ) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_sdp_make_media( + sdp: *mut gst_sdp::GstSDPMessage, + info: *mut GstSDPInfo, + stream: *mut GstRTSPStream, + caps: *mut gst::GstCaps, + profile: gst_rtsp::GstRTSPProfile, + ) -> gboolean; + +} diff --git a/sys/gstreamer-rtsp-server-sys/tests/abi.rs b/sys/gstreamer-rtsp-server-sys/tests/abi.rs new file mode 100644 index 000000000..17e274fbb --- /dev/null +++ b/sys/gstreamer-rtsp-server-sys/tests/abi.rs @@ -0,0 +1,669 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_rtsp_server_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_rtsp_server_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-rtsp-server-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstRTSPAddress", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAddressFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAddressPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAddressPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAddressPoolResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAuth", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAuthClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPClient", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPClientClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPContext", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPFilterResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMedia", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaFactory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaFactoryClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaFactoryURI", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaFactoryURIClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMediaStatus", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMountPoints", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMountPointsClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifClient", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifClientClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifMedia", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifMediaClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifMediaFactory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifMediaFactoryClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifServer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPOnvifServerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPPermissions", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPPublishClockMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPServer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPServerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSession", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSessionClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSessionMedia", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSessionMediaClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSessionPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSessionPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPStream", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPStreamClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPStreamTransport", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPStreamTransportClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPSuspendMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPThread", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPThreadPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPThreadPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPThreadType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPToken", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTransportMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(guint) GST_RTSP_ADDRESS_FLAG_EVEN_PORT", "4"), + ("(guint) GST_RTSP_ADDRESS_FLAG_IPV4", "1"), + ("(guint) GST_RTSP_ADDRESS_FLAG_IPV6", "2"), + ("(guint) GST_RTSP_ADDRESS_FLAG_MULTICAST", "8"), + ("(guint) GST_RTSP_ADDRESS_FLAG_NONE", "0"), + ("(guint) GST_RTSP_ADDRESS_FLAG_UNICAST", "16"), + ("GST_RTSP_ADDRESS_POOL_ANY_IPV4", "0.0.0.0"), + ("GST_RTSP_ADDRESS_POOL_ANY_IPV6", "::"), + ("(gint) GST_RTSP_ADDRESS_POOL_EINVAL", "-1"), + ("(gint) GST_RTSP_ADDRESS_POOL_ELAST", "-4"), + ("(gint) GST_RTSP_ADDRESS_POOL_ERANGE", "-3"), + ("(gint) GST_RTSP_ADDRESS_POOL_ERESERVED", "-2"), + ("(gint) GST_RTSP_ADDRESS_POOL_OK", "0"), + ("GST_RTSP_AUTH_CHECK_CONNECT", "auth.check.connect"), + ( + "GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS", + "auth.check.media.factory.access", + ), + ( + "GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT", + "auth.check.media.factory.construct", + ), + ( + "GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS", + "auth.check.transport.client-settings", + ), + ("GST_RTSP_AUTH_CHECK_URL", "auth.check.url"), + ("(gint) GST_RTSP_FILTER_KEEP", "1"), + ("(gint) GST_RTSP_FILTER_REF", "2"), + ("(gint) GST_RTSP_FILTER_REMOVE", "0"), + ("(gint) GST_RTSP_MEDIA_STATUS_ERROR", "5"), + ("(gint) GST_RTSP_MEDIA_STATUS_PREPARED", "3"), + ("(gint) GST_RTSP_MEDIA_STATUS_PREPARING", "2"), + ("(gint) GST_RTSP_MEDIA_STATUS_SUSPENDED", "4"), + ("(gint) GST_RTSP_MEDIA_STATUS_UNPREPARED", "0"), + ("(gint) GST_RTSP_MEDIA_STATUS_UNPREPARING", "1"), + ( + "GST_RTSP_ONVIF_BACKCHANNEL_REQUIREMENT", + "www.onvif.org/ver20/backchannel", + ), + ("GST_RTSP_ONVIF_REPLAY_REQUIREMENT", "onvif-replay"), + ("GST_RTSP_PERM_MEDIA_FACTORY_ACCESS", "media.factory.access"), + ( + "GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT", + "media.factory.construct", + ), + ("(gint) GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK", "1"), + ("(gint) GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET", "2"), + ("(gint) GST_RTSP_PUBLISH_CLOCK_MODE_NONE", "0"), + ("(gint) GST_RTSP_SUSPEND_MODE_NONE", "0"), + ("(gint) GST_RTSP_SUSPEND_MODE_PAUSE", "1"), + ("(gint) GST_RTSP_SUSPEND_MODE_RESET", "2"), + ("(gint) GST_RTSP_THREAD_TYPE_CLIENT", "0"), + ("(gint) GST_RTSP_THREAD_TYPE_MEDIA", "1"), + ("GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE", "media.factory.role"), + ( + "GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS", + "transport.client-settings", + ), + ("(guint) GST_RTSP_TRANSPORT_MODE_PLAY", "1"), + ("(guint) GST_RTSP_TRANSPORT_MODE_RECORD", "2"), +]; diff --git a/sys/gstreamer-rtsp-server-sys/tests/constant.c b/sys/gstreamer-rtsp-server-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-rtsp-server-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-rtsp-server-sys/tests/layout.c b/sys/gstreamer-rtsp-server-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-rtsp-server-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-rtsp-server-sys/tests/manual.h b/sys/gstreamer-rtsp-server-sys/tests/manual.h new file mode 100644 index 000000000..76d26ad2b --- /dev/null +++ b/sys/gstreamer-rtsp-server-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-rtsp-sys/CHANGELOG.md b/sys/gstreamer-rtsp-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-rtsp-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-rtsp-sys/Cargo.toml b/sys/gstreamer-rtsp-sys/Cargo.toml new file mode 100644 index 000000000..2fb67644d --- /dev/null +++ b/sys/gstreamer-rtsp-sys/Cargo.toml @@ -0,0 +1,66 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.gio-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-sdp-sys] +path = "../gstreamer-sdp-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +dox = [] +v1_2 = [] +v1_2_1 = ["v1_2"] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] + +[lib] +name = "gstreamer_rtsp_sys" + +[package] +authors = ["Mathieu Duponchelle ", "Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstrtsp-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_rtsp_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstrtsp-1.0" +name = "gstreamer-rtsp-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_rtsp_1_0] +name = "gstreamer-rtsp-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_rtsp_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-rtsp-sys/LICENSE b/sys/gstreamer-rtsp-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-rtsp-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-rtsp-sys/README.md b/sys/gstreamer-rtsp-sys/README.md new file mode 100644 index 000000000..249698163 --- /dev/null +++ b/sys/gstreamer-rtsp-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-rtsp-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-rtsp-sys.svg)](https://crates.io/crates/gstreamer-rtsp-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Rtsp library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-rtsp-sys/build.rs b/sys/gstreamer-rtsp-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-rtsp-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-rtsp-sys/src/lib.rs b/sys/gstreamer-rtsp-sys/src/lib.rs new file mode 100644 index 000000000..e88589b1e --- /dev/null +++ b/sys/gstreamer-rtsp-sys/src/lib.rs @@ -0,0 +1,1359 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate gio_sys as gio; +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_sdp_sys as gst_sdp; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstRTSPAuthMethod = c_int; +pub const GST_RTSP_AUTH_NONE: GstRTSPAuthMethod = 0; +pub const GST_RTSP_AUTH_BASIC: GstRTSPAuthMethod = 1; +pub const GST_RTSP_AUTH_DIGEST: GstRTSPAuthMethod = 2; + +pub type GstRTSPFamily = c_int; +pub const GST_RTSP_FAM_NONE: GstRTSPFamily = 0; +pub const GST_RTSP_FAM_INET: GstRTSPFamily = 1; +pub const GST_RTSP_FAM_INET6: GstRTSPFamily = 2; + +pub type GstRTSPHeaderField = c_int; +pub const GST_RTSP_HDR_INVALID: GstRTSPHeaderField = 0; +pub const GST_RTSP_HDR_ACCEPT: GstRTSPHeaderField = 1; +pub const GST_RTSP_HDR_ACCEPT_ENCODING: GstRTSPHeaderField = 2; +pub const GST_RTSP_HDR_ACCEPT_LANGUAGE: GstRTSPHeaderField = 3; +pub const GST_RTSP_HDR_ALLOW: GstRTSPHeaderField = 4; +pub const GST_RTSP_HDR_AUTHORIZATION: GstRTSPHeaderField = 5; +pub const GST_RTSP_HDR_BANDWIDTH: GstRTSPHeaderField = 6; +pub const GST_RTSP_HDR_BLOCKSIZE: GstRTSPHeaderField = 7; +pub const GST_RTSP_HDR_CACHE_CONTROL: GstRTSPHeaderField = 8; +pub const GST_RTSP_HDR_CONFERENCE: GstRTSPHeaderField = 9; +pub const GST_RTSP_HDR_CONNECTION: GstRTSPHeaderField = 10; +pub const GST_RTSP_HDR_CONTENT_BASE: GstRTSPHeaderField = 11; +pub const GST_RTSP_HDR_CONTENT_ENCODING: GstRTSPHeaderField = 12; +pub const GST_RTSP_HDR_CONTENT_LANGUAGE: GstRTSPHeaderField = 13; +pub const GST_RTSP_HDR_CONTENT_LENGTH: GstRTSPHeaderField = 14; +pub const GST_RTSP_HDR_CONTENT_LOCATION: GstRTSPHeaderField = 15; +pub const GST_RTSP_HDR_CONTENT_TYPE: GstRTSPHeaderField = 16; +pub const GST_RTSP_HDR_CSEQ: GstRTSPHeaderField = 17; +pub const GST_RTSP_HDR_DATE: GstRTSPHeaderField = 18; +pub const GST_RTSP_HDR_EXPIRES: GstRTSPHeaderField = 19; +pub const GST_RTSP_HDR_FROM: GstRTSPHeaderField = 20; +pub const GST_RTSP_HDR_IF_MODIFIED_SINCE: GstRTSPHeaderField = 21; +pub const GST_RTSP_HDR_LAST_MODIFIED: GstRTSPHeaderField = 22; +pub const GST_RTSP_HDR_PROXY_AUTHENTICATE: GstRTSPHeaderField = 23; +pub const GST_RTSP_HDR_PROXY_REQUIRE: GstRTSPHeaderField = 24; +pub const GST_RTSP_HDR_PUBLIC: GstRTSPHeaderField = 25; +pub const GST_RTSP_HDR_RANGE: GstRTSPHeaderField = 26; +pub const GST_RTSP_HDR_REFERER: GstRTSPHeaderField = 27; +pub const GST_RTSP_HDR_REQUIRE: GstRTSPHeaderField = 28; +pub const GST_RTSP_HDR_RETRY_AFTER: GstRTSPHeaderField = 29; +pub const GST_RTSP_HDR_RTP_INFO: GstRTSPHeaderField = 30; +pub const GST_RTSP_HDR_SCALE: GstRTSPHeaderField = 31; +pub const GST_RTSP_HDR_SESSION: GstRTSPHeaderField = 32; +pub const GST_RTSP_HDR_SERVER: GstRTSPHeaderField = 33; +pub const GST_RTSP_HDR_SPEED: GstRTSPHeaderField = 34; +pub const GST_RTSP_HDR_TRANSPORT: GstRTSPHeaderField = 35; +pub const GST_RTSP_HDR_UNSUPPORTED: GstRTSPHeaderField = 36; +pub const GST_RTSP_HDR_USER_AGENT: GstRTSPHeaderField = 37; +pub const GST_RTSP_HDR_VIA: GstRTSPHeaderField = 38; +pub const GST_RTSP_HDR_WWW_AUTHENTICATE: GstRTSPHeaderField = 39; +pub const GST_RTSP_HDR_CLIENT_CHALLENGE: GstRTSPHeaderField = 40; +pub const GST_RTSP_HDR_REAL_CHALLENGE1: GstRTSPHeaderField = 41; +pub const GST_RTSP_HDR_REAL_CHALLENGE2: GstRTSPHeaderField = 42; +pub const GST_RTSP_HDR_REAL_CHALLENGE3: GstRTSPHeaderField = 43; +pub const GST_RTSP_HDR_SUBSCRIBE: GstRTSPHeaderField = 44; +pub const GST_RTSP_HDR_ALERT: GstRTSPHeaderField = 45; +pub const GST_RTSP_HDR_CLIENT_ID: GstRTSPHeaderField = 46; +pub const GST_RTSP_HDR_COMPANY_ID: GstRTSPHeaderField = 47; +pub const GST_RTSP_HDR_GUID: GstRTSPHeaderField = 48; +pub const GST_RTSP_HDR_REGION_DATA: GstRTSPHeaderField = 49; +pub const GST_RTSP_HDR_MAX_ASM_WIDTH: GstRTSPHeaderField = 50; +pub const GST_RTSP_HDR_LANGUAGE: GstRTSPHeaderField = 51; +pub const GST_RTSP_HDR_PLAYER_START_TIME: GstRTSPHeaderField = 52; +pub const GST_RTSP_HDR_LOCATION: GstRTSPHeaderField = 53; +pub const GST_RTSP_HDR_ETAG: GstRTSPHeaderField = 54; +pub const GST_RTSP_HDR_IF_MATCH: GstRTSPHeaderField = 55; +pub const GST_RTSP_HDR_ACCEPT_CHARSET: GstRTSPHeaderField = 56; +pub const GST_RTSP_HDR_SUPPORTED: GstRTSPHeaderField = 57; +pub const GST_RTSP_HDR_VARY: GstRTSPHeaderField = 58; +pub const GST_RTSP_HDR_X_ACCELERATE_STREAMING: GstRTSPHeaderField = 59; +pub const GST_RTSP_HDR_X_ACCEPT_AUTHENT: GstRTSPHeaderField = 60; +pub const GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT: GstRTSPHeaderField = 61; +pub const GST_RTSP_HDR_X_BROADCAST_ID: GstRTSPHeaderField = 62; +pub const GST_RTSP_HDR_X_BURST_STREAMING: GstRTSPHeaderField = 63; +pub const GST_RTSP_HDR_X_NOTICE: GstRTSPHeaderField = 64; +pub const GST_RTSP_HDR_X_PLAYER_LAG_TIME: GstRTSPHeaderField = 65; +pub const GST_RTSP_HDR_X_PLAYLIST: GstRTSPHeaderField = 66; +pub const GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE: GstRTSPHeaderField = 67; +pub const GST_RTSP_HDR_X_PLAYLIST_GEN_ID: GstRTSPHeaderField = 68; +pub const GST_RTSP_HDR_X_PLAYLIST_SEEK_ID: GstRTSPHeaderField = 69; +pub const GST_RTSP_HDR_X_PROXY_CLIENT_AGENT: GstRTSPHeaderField = 70; +pub const GST_RTSP_HDR_X_PROXY_CLIENT_VERB: GstRTSPHeaderField = 71; +pub const GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE: GstRTSPHeaderField = 72; +pub const GST_RTSP_HDR_X_RTP_INFO: GstRTSPHeaderField = 73; +pub const GST_RTSP_HDR_X_STARTUPPROFILE: GstRTSPHeaderField = 74; +pub const GST_RTSP_HDR_TIMESTAMP: GstRTSPHeaderField = 75; +pub const GST_RTSP_HDR_AUTHENTICATION_INFO: GstRTSPHeaderField = 76; +pub const GST_RTSP_HDR_HOST: GstRTSPHeaderField = 77; +pub const GST_RTSP_HDR_PRAGMA: GstRTSPHeaderField = 78; +pub const GST_RTSP_HDR_X_SERVER_IP_ADDRESS: GstRTSPHeaderField = 79; +pub const GST_RTSP_HDR_X_SESSIONCOOKIE: GstRTSPHeaderField = 80; +pub const GST_RTSP_HDR_RTCP_INTERVAL: GstRTSPHeaderField = 81; +pub const GST_RTSP_HDR_KEYMGMT: GstRTSPHeaderField = 82; +pub const GST_RTSP_HDR_PIPELINED_REQUESTS: GstRTSPHeaderField = 83; +pub const GST_RTSP_HDR_MEDIA_PROPERTIES: GstRTSPHeaderField = 84; +pub const GST_RTSP_HDR_SEEK_STYLE: GstRTSPHeaderField = 85; +pub const GST_RTSP_HDR_ACCEPT_RANGES: GstRTSPHeaderField = 86; +pub const GST_RTSP_HDR_FRAMES: GstRTSPHeaderField = 87; +pub const GST_RTSP_HDR_RATE_CONTROL: GstRTSPHeaderField = 88; +pub const GST_RTSP_HDR_LAST: GstRTSPHeaderField = 89; + +pub type GstRTSPMsgType = c_int; +pub const GST_RTSP_MESSAGE_INVALID: GstRTSPMsgType = 0; +pub const GST_RTSP_MESSAGE_REQUEST: GstRTSPMsgType = 1; +pub const GST_RTSP_MESSAGE_RESPONSE: GstRTSPMsgType = 2; +pub const GST_RTSP_MESSAGE_HTTP_REQUEST: GstRTSPMsgType = 3; +pub const GST_RTSP_MESSAGE_HTTP_RESPONSE: GstRTSPMsgType = 4; +pub const GST_RTSP_MESSAGE_DATA: GstRTSPMsgType = 5; + +pub type GstRTSPRangeUnit = c_int; +pub const GST_RTSP_RANGE_SMPTE: GstRTSPRangeUnit = 0; +pub const GST_RTSP_RANGE_SMPTE_30_DROP: GstRTSPRangeUnit = 1; +pub const GST_RTSP_RANGE_SMPTE_25: GstRTSPRangeUnit = 2; +pub const GST_RTSP_RANGE_NPT: GstRTSPRangeUnit = 3; +pub const GST_RTSP_RANGE_CLOCK: GstRTSPRangeUnit = 4; + +pub type GstRTSPResult = c_int; +pub const GST_RTSP_OK: GstRTSPResult = 0; +pub const GST_RTSP_ERROR: GstRTSPResult = -1; +pub const GST_RTSP_EINVAL: GstRTSPResult = -2; +pub const GST_RTSP_EINTR: GstRTSPResult = -3; +pub const GST_RTSP_ENOMEM: GstRTSPResult = -4; +pub const GST_RTSP_ERESOLV: GstRTSPResult = -5; +pub const GST_RTSP_ENOTIMPL: GstRTSPResult = -6; +pub const GST_RTSP_ESYS: GstRTSPResult = -7; +pub const GST_RTSP_EPARSE: GstRTSPResult = -8; +pub const GST_RTSP_EWSASTART: GstRTSPResult = -9; +pub const GST_RTSP_EWSAVERSION: GstRTSPResult = -10; +pub const GST_RTSP_EEOF: GstRTSPResult = -11; +pub const GST_RTSP_ENET: GstRTSPResult = -12; +pub const GST_RTSP_ENOTIP: GstRTSPResult = -13; +pub const GST_RTSP_ETIMEOUT: GstRTSPResult = -14; +pub const GST_RTSP_ETGET: GstRTSPResult = -15; +pub const GST_RTSP_ETPOST: GstRTSPResult = -16; +pub const GST_RTSP_ELAST: GstRTSPResult = -17; + +pub type GstRTSPState = c_int; +pub const GST_RTSP_STATE_INVALID: GstRTSPState = 0; +pub const GST_RTSP_STATE_INIT: GstRTSPState = 1; +pub const GST_RTSP_STATE_READY: GstRTSPState = 2; +pub const GST_RTSP_STATE_SEEKING: GstRTSPState = 3; +pub const GST_RTSP_STATE_PLAYING: GstRTSPState = 4; +pub const GST_RTSP_STATE_RECORDING: GstRTSPState = 5; + +pub type GstRTSPStatusCode = c_int; +pub const GST_RTSP_STS_INVALID: GstRTSPStatusCode = 0; +pub const GST_RTSP_STS_CONTINUE: GstRTSPStatusCode = 100; +pub const GST_RTSP_STS_OK: GstRTSPStatusCode = 200; +pub const GST_RTSP_STS_CREATED: GstRTSPStatusCode = 201; +pub const GST_RTSP_STS_LOW_ON_STORAGE: GstRTSPStatusCode = 250; +pub const GST_RTSP_STS_MULTIPLE_CHOICES: GstRTSPStatusCode = 300; +pub const GST_RTSP_STS_MOVED_PERMANENTLY: GstRTSPStatusCode = 301; +pub const GST_RTSP_STS_MOVE_TEMPORARILY: GstRTSPStatusCode = 302; +pub const GST_RTSP_STS_SEE_OTHER: GstRTSPStatusCode = 303; +pub const GST_RTSP_STS_NOT_MODIFIED: GstRTSPStatusCode = 304; +pub const GST_RTSP_STS_USE_PROXY: GstRTSPStatusCode = 305; +pub const GST_RTSP_STS_BAD_REQUEST: GstRTSPStatusCode = 400; +pub const GST_RTSP_STS_UNAUTHORIZED: GstRTSPStatusCode = 401; +pub const GST_RTSP_STS_PAYMENT_REQUIRED: GstRTSPStatusCode = 402; +pub const GST_RTSP_STS_FORBIDDEN: GstRTSPStatusCode = 403; +pub const GST_RTSP_STS_NOT_FOUND: GstRTSPStatusCode = 404; +pub const GST_RTSP_STS_METHOD_NOT_ALLOWED: GstRTSPStatusCode = 405; +pub const GST_RTSP_STS_NOT_ACCEPTABLE: GstRTSPStatusCode = 406; +pub const GST_RTSP_STS_PROXY_AUTH_REQUIRED: GstRTSPStatusCode = 407; +pub const GST_RTSP_STS_REQUEST_TIMEOUT: GstRTSPStatusCode = 408; +pub const GST_RTSP_STS_GONE: GstRTSPStatusCode = 410; +pub const GST_RTSP_STS_LENGTH_REQUIRED: GstRTSPStatusCode = 411; +pub const GST_RTSP_STS_PRECONDITION_FAILED: GstRTSPStatusCode = 412; +pub const GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE: GstRTSPStatusCode = 413; +pub const GST_RTSP_STS_REQUEST_URI_TOO_LARGE: GstRTSPStatusCode = 414; +pub const GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE: GstRTSPStatusCode = 415; +pub const GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD: GstRTSPStatusCode = 451; +pub const GST_RTSP_STS_CONFERENCE_NOT_FOUND: GstRTSPStatusCode = 452; +pub const GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH: GstRTSPStatusCode = 453; +pub const GST_RTSP_STS_SESSION_NOT_FOUND: GstRTSPStatusCode = 454; +pub const GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE: GstRTSPStatusCode = 455; +pub const GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE: GstRTSPStatusCode = 456; +pub const GST_RTSP_STS_INVALID_RANGE: GstRTSPStatusCode = 457; +pub const GST_RTSP_STS_PARAMETER_IS_READONLY: GstRTSPStatusCode = 458; +pub const GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED: GstRTSPStatusCode = 459; +pub const GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED: GstRTSPStatusCode = 460; +pub const GST_RTSP_STS_UNSUPPORTED_TRANSPORT: GstRTSPStatusCode = 461; +pub const GST_RTSP_STS_DESTINATION_UNREACHABLE: GstRTSPStatusCode = 462; +pub const GST_RTSP_STS_KEY_MANAGEMENT_FAILURE: GstRTSPStatusCode = 463; +pub const GST_RTSP_STS_INTERNAL_SERVER_ERROR: GstRTSPStatusCode = 500; +pub const GST_RTSP_STS_NOT_IMPLEMENTED: GstRTSPStatusCode = 501; +pub const GST_RTSP_STS_BAD_GATEWAY: GstRTSPStatusCode = 502; +pub const GST_RTSP_STS_SERVICE_UNAVAILABLE: GstRTSPStatusCode = 503; +pub const GST_RTSP_STS_GATEWAY_TIMEOUT: GstRTSPStatusCode = 504; +pub const GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED: GstRTSPStatusCode = 505; +pub const GST_RTSP_STS_OPTION_NOT_SUPPORTED: GstRTSPStatusCode = 551; + +pub type GstRTSPTimeType = c_int; +pub const GST_RTSP_TIME_SECONDS: GstRTSPTimeType = 0; +pub const GST_RTSP_TIME_NOW: GstRTSPTimeType = 1; +pub const GST_RTSP_TIME_END: GstRTSPTimeType = 2; +pub const GST_RTSP_TIME_FRAMES: GstRTSPTimeType = 3; +pub const GST_RTSP_TIME_UTC: GstRTSPTimeType = 4; + +pub type GstRTSPVersion = c_int; +pub const GST_RTSP_VERSION_INVALID: GstRTSPVersion = 0; +pub const GST_RTSP_VERSION_1_0: GstRTSPVersion = 16; +pub const GST_RTSP_VERSION_1_1: GstRTSPVersion = 17; +pub const GST_RTSP_VERSION_2_0: GstRTSPVersion = 32; + +// Constants +pub const GST_RTSP_DEFAULT_PORT: c_int = 554; + +// Flags +pub type GstRTSPEvent = c_uint; +pub const GST_RTSP_EV_READ: GstRTSPEvent = 1; +pub const GST_RTSP_EV_WRITE: GstRTSPEvent = 2; + +pub type GstRTSPLowerTrans = c_uint; +pub const GST_RTSP_LOWER_TRANS_UNKNOWN: GstRTSPLowerTrans = 0; +pub const GST_RTSP_LOWER_TRANS_UDP: GstRTSPLowerTrans = 1; +pub const GST_RTSP_LOWER_TRANS_UDP_MCAST: GstRTSPLowerTrans = 2; +pub const GST_RTSP_LOWER_TRANS_TCP: GstRTSPLowerTrans = 4; +pub const GST_RTSP_LOWER_TRANS_HTTP: GstRTSPLowerTrans = 16; +pub const GST_RTSP_LOWER_TRANS_TLS: GstRTSPLowerTrans = 32; + +pub type GstRTSPMethod = c_uint; +pub const GST_RTSP_INVALID: GstRTSPMethod = 0; +pub const GST_RTSP_DESCRIBE: GstRTSPMethod = 1; +pub const GST_RTSP_ANNOUNCE: GstRTSPMethod = 2; +pub const GST_RTSP_GET_PARAMETER: GstRTSPMethod = 4; +pub const GST_RTSP_OPTIONS: GstRTSPMethod = 8; +pub const GST_RTSP_PAUSE: GstRTSPMethod = 16; +pub const GST_RTSP_PLAY: GstRTSPMethod = 32; +pub const GST_RTSP_RECORD: GstRTSPMethod = 64; +pub const GST_RTSP_REDIRECT: GstRTSPMethod = 128; +pub const GST_RTSP_SETUP: GstRTSPMethod = 256; +pub const GST_RTSP_SET_PARAMETER: GstRTSPMethod = 512; +pub const GST_RTSP_TEARDOWN: GstRTSPMethod = 1024; +pub const GST_RTSP_GET: GstRTSPMethod = 2048; +pub const GST_RTSP_POST: GstRTSPMethod = 4096; + +pub type GstRTSPProfile = c_uint; +pub const GST_RTSP_PROFILE_UNKNOWN: GstRTSPProfile = 0; +pub const GST_RTSP_PROFILE_AVP: GstRTSPProfile = 1; +pub const GST_RTSP_PROFILE_SAVP: GstRTSPProfile = 2; +pub const GST_RTSP_PROFILE_AVPF: GstRTSPProfile = 4; +pub const GST_RTSP_PROFILE_SAVPF: GstRTSPProfile = 8; + +pub type GstRTSPTransMode = c_uint; +pub const GST_RTSP_TRANS_UNKNOWN: GstRTSPTransMode = 0; +pub const GST_RTSP_TRANS_RTP: GstRTSPTransMode = 1; +pub const GST_RTSP_TRANS_RDT: GstRTSPTransMode = 2; + +// Unions +#[repr(C)] +#[derive(Copy, Clone)] +pub union GstRTSPMessage_type_data { + pub request: GstRTSPMessage_type_data_request, + pub response: GstRTSPMessage_type_data_response, + pub data: GstRTSPMessage_type_data_data, +} + +impl ::std::fmt::Debug for GstRTSPMessage_type_data { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTSPMessage_type_data @ {:?}", + self as *const _ + )) + .field("request", unsafe { &self.request }) + .field("response", unsafe { &self.response }) + .field("data", unsafe { &self.data }) + .finish() + } +} + +// Callbacks +pub type GstRTSPConnectionAcceptCertificateFunc = Option< + unsafe extern "C" fn( + *mut gio::GTlsConnection, + *mut gio::GTlsCertificate, + gio::GTlsCertificateFlags, + gpointer, + ) -> gboolean, +>; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAuthCredential { + pub scheme: GstRTSPAuthMethod, + pub params: *mut *mut GstRTSPAuthParam, + pub authorization: *mut c_char, +} + +impl ::std::fmt::Debug for GstRTSPAuthCredential { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAuthCredential @ {:?}", self as *const _)) + .field("scheme", &self.scheme) + .field("params", &self.params) + .field("authorization", &self.authorization) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAuthParam { + pub name: *mut c_char, + pub value: *mut c_char, +} + +impl ::std::fmt::Debug for GstRTSPAuthParam { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAuthParam @ {:?}", self as *const _)) + .field("name", &self.name) + .field("value", &self.value) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPConnection(c_void); + +pub type GstRTSPConnection = *mut _GstRTSPConnection; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPExtensionInterface { + pub parent: gobject::GTypeInterface, + pub detect_server: + Option gboolean>, + pub before_send: + Option GstRTSPResult>, + pub after_send: Option< + unsafe extern "C" fn( + *mut GstRTSPExtension, + *mut GstRTSPMessage, + *mut GstRTSPMessage, + ) -> GstRTSPResult, + >, + pub parse_sdp: Option< + unsafe extern "C" fn( + *mut GstRTSPExtension, + *mut gst_sdp::GstSDPMessage, + *mut gst::GstStructure, + ) -> GstRTSPResult, + >, + pub setup_media: Option< + unsafe extern "C" fn(*mut GstRTSPExtension, *mut gst_sdp::GstSDPMedia) -> GstRTSPResult, + >, + pub configure_stream: + Option gboolean>, + pub get_transports: Option< + unsafe extern "C" fn( + *mut GstRTSPExtension, + GstRTSPLowerTrans, + *mut *mut c_char, + ) -> GstRTSPResult, + >, + pub stream_select: + Option GstRTSPResult>, + pub send: Option< + unsafe extern "C" fn( + *mut GstRTSPExtension, + *mut GstRTSPMessage, + *mut GstRTSPMessage, + ) -> GstRTSPResult, + >, + pub receive_request: + Option GstRTSPResult>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPExtensionInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTSPExtensionInterface @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("detect_server", &self.detect_server) + .field("before_send", &self.before_send) + .field("after_send", &self.after_send) + .field("parse_sdp", &self.parse_sdp) + .field("setup_media", &self.setup_media) + .field("configure_stream", &self.configure_stream) + .field("get_transports", &self.get_transports) + .field("stream_select", &self.stream_select) + .field("send", &self.send) + .field("receive_request", &self.receive_request) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMessage { + pub type_: GstRTSPMsgType, + pub type_data: GstRTSPMessage_type_data, + pub hdr_fields: *mut glib::GArray, + pub body: *mut u8, + pub body_size: c_uint, + pub body_buffer: *mut gst::GstBuffer, + pub _gst_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GstRTSPMessage { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMessage @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("type_data", &self.type_data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMessage_type_data_data { + pub channel: u8, +} + +impl ::std::fmt::Debug for GstRTSPMessage_type_data_data { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTSPMessage_type_data_data @ {:?}", + self as *const _ + )) + .field("channel", &self.channel) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMessage_type_data_request { + pub method: GstRTSPMethod, + pub uri: *mut c_char, + pub version: GstRTSPVersion, +} + +impl ::std::fmt::Debug for GstRTSPMessage_type_data_request { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTSPMessage_type_data_request @ {:?}", + self as *const _ + )) + .field("method", &self.method) + .field("uri", &self.uri) + .field("version", &self.version) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMessage_type_data_response { + pub code: GstRTSPStatusCode, + pub reason: *mut c_char, + pub version: GstRTSPVersion, +} + +impl ::std::fmt::Debug for GstRTSPMessage_type_data_response { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstRTSPMessage_type_data_response @ {:?}", + self as *const _ + )) + .field("code", &self.code) + .field("reason", &self.reason) + .field("version", &self.version) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPRange { + pub min: c_int, + pub max: c_int, +} + +impl ::std::fmt::Debug for GstRTSPRange { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPRange @ {:?}", self as *const _)) + .field("min", &self.min) + .field("max", &self.max) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPTime { + pub type_: GstRTSPTimeType, + pub seconds: c_double, +} + +impl ::std::fmt::Debug for GstRTSPTime { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPTime @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("seconds", &self.seconds) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPTime2 { + pub frames: c_double, + pub year: c_uint, + pub month: c_uint, + pub day: c_uint, +} + +impl ::std::fmt::Debug for GstRTSPTime2 { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPTime2 @ {:?}", self as *const _)) + .field("frames", &self.frames) + .field("year", &self.year) + .field("month", &self.month) + .field("day", &self.day) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPTimeRange { + pub unit: GstRTSPRangeUnit, + pub min: GstRTSPTime, + pub max: GstRTSPTime, + pub min2: GstRTSPTime2, + pub max2: GstRTSPTime2, +} + +impl ::std::fmt::Debug for GstRTSPTimeRange { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPTimeRange @ {:?}", self as *const _)) + .field("unit", &self.unit) + .field("min", &self.min) + .field("max", &self.max) + .field("min2", &self.min2) + .field("max2", &self.max2) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPTransport { + pub trans: GstRTSPTransMode, + pub profile: GstRTSPProfile, + pub lower_transport: GstRTSPLowerTrans, + pub destination: *mut c_char, + pub source: *mut c_char, + pub layers: c_uint, + pub mode_play: gboolean, + pub mode_record: gboolean, + pub append: gboolean, + pub interleaved: GstRTSPRange, + pub ttl: c_uint, + pub port: GstRTSPRange, + pub client_port: GstRTSPRange, + pub server_port: GstRTSPRange, + pub ssrc: c_uint, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPTransport { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPTransport @ {:?}", self as *const _)) + .field("trans", &self.trans) + .field("profile", &self.profile) + .field("lower_transport", &self.lower_transport) + .field("destination", &self.destination) + .field("source", &self.source) + .field("layers", &self.layers) + .field("mode_play", &self.mode_play) + .field("mode_record", &self.mode_record) + .field("append", &self.append) + .field("interleaved", &self.interleaved) + .field("ttl", &self.ttl) + .field("port", &self.port) + .field("client_port", &self.client_port) + .field("server_port", &self.server_port) + .field("ssrc", &self.ssrc) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPUrl { + pub transports: GstRTSPLowerTrans, + pub family: GstRTSPFamily, + pub user: *mut c_char, + pub passwd: *mut c_char, + pub host: *mut c_char, + pub port: u16, + pub abspath: *mut c_char, + pub query: *mut c_char, +} + +impl ::std::fmt::Debug for GstRTSPUrl { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPUrl @ {:?}", self as *const _)) + .field("transports", &self.transports) + .field("family", &self.family) + .field("user", &self.user) + .field("passwd", &self.passwd) + .field("host", &self.host) + .field("port", &self.port) + .field("abspath", &self.abspath) + .field("query", &self.query) + .finish() + } +} + +#[repr(C)] +pub struct _GstRTSPWatch(c_void); + +pub type GstRTSPWatch = *mut _GstRTSPWatch; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPWatchFuncs { + pub message_received: Option< + unsafe extern "C" fn(*mut GstRTSPWatch, *mut GstRTSPMessage, gpointer) -> GstRTSPResult, + >, + pub message_sent: + Option GstRTSPResult>, + pub closed: Option GstRTSPResult>, + pub error: + Option GstRTSPResult>, + pub tunnel_start: + Option GstRTSPStatusCode>, + pub tunnel_complete: Option GstRTSPResult>, + pub error_full: Option< + unsafe extern "C" fn( + *mut GstRTSPWatch, + GstRTSPResult, + *mut GstRTSPMessage, + c_uint, + gpointer, + ) -> GstRTSPResult, + >, + pub tunnel_lost: Option GstRTSPResult>, + pub tunnel_http_response: Option< + unsafe extern "C" fn( + *mut GstRTSPWatch, + *mut GstRTSPMessage, + *mut GstRTSPMessage, + gpointer, + ) -> GstRTSPResult, + >, + pub _gst_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GstRTSPWatchFuncs { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPWatchFuncs @ {:?}", self as *const _)) + .field("message_received", &self.message_received) + .field("message_sent", &self.message_sent) + .field("closed", &self.closed) + .field("error", &self.error) + .field("tunnel_start", &self.tunnel_start) + .field("tunnel_complete", &self.tunnel_complete) + .field("error_full", &self.error_full) + .field("tunnel_lost", &self.tunnel_lost) + .field("tunnel_http_response", &self.tunnel_http_response) + .finish() + } +} + +// Interfaces +#[repr(C)] +pub struct GstRTSPExtension(c_void); + +impl ::std::fmt::Debug for GstRTSPExtension { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstRTSPExtension @ {:?}", self as *const _) + } +} + +#[link(name = "gstrtsp-1.0")] +extern "C" { + + //========================================================================= + // GstRTSPAuthMethod + //========================================================================= + pub fn gst_rtsp_auth_method_get_type() -> GType; + + //========================================================================= + // GstRTSPFamily + //========================================================================= + pub fn gst_rtsp_family_get_type() -> GType; + + //========================================================================= + // GstRTSPHeaderField + //========================================================================= + pub fn gst_rtsp_header_field_get_type() -> GType; + + //========================================================================= + // GstRTSPMsgType + //========================================================================= + pub fn gst_rtsp_msg_type_get_type() -> GType; + + //========================================================================= + // GstRTSPRangeUnit + //========================================================================= + pub fn gst_rtsp_range_unit_get_type() -> GType; + + //========================================================================= + // GstRTSPResult + //========================================================================= + pub fn gst_rtsp_result_get_type() -> GType; + + //========================================================================= + // GstRTSPState + //========================================================================= + pub fn gst_rtsp_state_get_type() -> GType; + + //========================================================================= + // GstRTSPStatusCode + //========================================================================= + pub fn gst_rtsp_status_code_get_type() -> GType; + + //========================================================================= + // GstRTSPTimeType + //========================================================================= + pub fn gst_rtsp_time_type_get_type() -> GType; + + //========================================================================= + // GstRTSPVersion + //========================================================================= + pub fn gst_rtsp_version_get_type() -> GType; + pub fn gst_rtsp_version_as_text(version: GstRTSPVersion) -> *const c_char; + + //========================================================================= + // GstRTSPEvent + //========================================================================= + pub fn gst_rtsp_event_get_type() -> GType; + + //========================================================================= + // GstRTSPLowerTrans + //========================================================================= + pub fn gst_rtsp_lower_trans_get_type() -> GType; + + //========================================================================= + // GstRTSPMethod + //========================================================================= + pub fn gst_rtsp_method_get_type() -> GType; + pub fn gst_rtsp_method_as_text(method: GstRTSPMethod) -> *const c_char; + + //========================================================================= + // GstRTSPProfile + //========================================================================= + pub fn gst_rtsp_profile_get_type() -> GType; + + //========================================================================= + // GstRTSPTransMode + //========================================================================= + pub fn gst_rtsp_trans_mode_get_type() -> GType; + + //========================================================================= + // GstRTSPAuthCredential + //========================================================================= + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_credential_get_type() -> GType; + + //========================================================================= + // GstRTSPAuthParam + //========================================================================= + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_param_get_type() -> GType; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_param_copy(param: *mut GstRTSPAuthParam) -> *mut GstRTSPAuthParam; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_param_free(param: *mut GstRTSPAuthParam); + + //========================================================================= + // GstRTSPConnection + //========================================================================= + pub fn gst_rtsp_connection_clear_auth_params(conn: *mut GstRTSPConnection); + pub fn gst_rtsp_connection_close(conn: *mut GstRTSPConnection) -> GstRTSPResult; + pub fn gst_rtsp_connection_connect( + conn: *mut GstRTSPConnection, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_connection_connect_usec( + conn: *mut GstRTSPConnection, + timeout: i64, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_connect_with_response( + conn: *mut GstRTSPConnection, + timeout: *mut glib::GTimeVal, + response: *mut GstRTSPMessage, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_connection_connect_with_response_usec( + conn: *mut GstRTSPConnection, + timeout: i64, + response: *mut GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_do_tunnel( + conn: *mut GstRTSPConnection, + conn2: *mut GstRTSPConnection, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_flush( + conn: *mut GstRTSPConnection, + flush: gboolean, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_free(conn: *mut GstRTSPConnection) -> GstRTSPResult; + pub fn gst_rtsp_connection_get_ip(conn: *const GstRTSPConnection) -> *const c_char; + pub fn gst_rtsp_connection_get_read_socket(conn: *const GstRTSPConnection) + -> *mut gio::GSocket; + pub fn gst_rtsp_connection_get_remember_session_id(conn: *mut GstRTSPConnection) -> gboolean; + pub fn gst_rtsp_connection_get_tls( + conn: *mut GstRTSPConnection, + error: *mut *mut glib::GError, + ) -> *mut gio::GTlsConnection; + pub fn gst_rtsp_connection_get_tls_database( + conn: *mut GstRTSPConnection, + ) -> *mut gio::GTlsDatabase; + pub fn gst_rtsp_connection_get_tls_interaction( + conn: *mut GstRTSPConnection, + ) -> *mut gio::GTlsInteraction; + pub fn gst_rtsp_connection_get_tls_validation_flags( + conn: *mut GstRTSPConnection, + ) -> gio::GTlsCertificateFlags; + pub fn gst_rtsp_connection_get_tunnelid(conn: *const GstRTSPConnection) -> *const c_char; + pub fn gst_rtsp_connection_get_url(conn: *const GstRTSPConnection) -> *mut GstRTSPUrl; + pub fn gst_rtsp_connection_get_write_socket( + conn: *const GstRTSPConnection, + ) -> *mut gio::GSocket; + pub fn gst_rtsp_connection_is_tunneled(conn: *const GstRTSPConnection) -> gboolean; + pub fn gst_rtsp_connection_next_timeout( + conn: *mut GstRTSPConnection, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_connection_next_timeout_usec(conn: *mut GstRTSPConnection) -> i64; + pub fn gst_rtsp_connection_poll( + conn: *mut GstRTSPConnection, + events: GstRTSPEvent, + revents: *mut GstRTSPEvent, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_connection_poll_usec( + conn: *mut GstRTSPConnection, + events: GstRTSPEvent, + revents: *mut GstRTSPEvent, + timeout: i64, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_read( + conn: *mut GstRTSPConnection, + data: *mut u8, + size: c_uint, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_connection_read_usec( + conn: *mut GstRTSPConnection, + data: *mut u8, + size: c_uint, + timeout: i64, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_receive( + conn: *mut GstRTSPConnection, + message: *mut GstRTSPMessage, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_connection_receive_usec( + conn: *mut GstRTSPConnection, + message: *mut GstRTSPMessage, + timeout: i64, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_reset_timeout(conn: *mut GstRTSPConnection) -> GstRTSPResult; + pub fn gst_rtsp_connection_send( + conn: *mut GstRTSPConnection, + message: *mut GstRTSPMessage, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_connection_send_messages( + conn: *mut GstRTSPConnection, + messages: *mut GstRTSPMessage, + n_messages: c_uint, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_connection_send_messages_usec( + conn: *mut GstRTSPConnection, + messages: *mut GstRTSPMessage, + n_messages: c_uint, + timeout: i64, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_connection_send_usec( + conn: *mut GstRTSPConnection, + message: *mut GstRTSPMessage, + timeout: i64, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_connection_set_accept_certificate_func( + conn: *mut GstRTSPConnection, + func: GstRTSPConnectionAcceptCertificateFunc, + user_data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); + pub fn gst_rtsp_connection_set_auth( + conn: *mut GstRTSPConnection, + method: GstRTSPAuthMethod, + user: *const c_char, + pass: *const c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_set_auth_param( + conn: *mut GstRTSPConnection, + param: *const c_char, + value: *const c_char, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_connection_set_content_length_limit( + conn: *mut GstRTSPConnection, + limit: c_uint, + ); + pub fn gst_rtsp_connection_set_http_mode(conn: *mut GstRTSPConnection, enable: gboolean); + pub fn gst_rtsp_connection_set_ip(conn: *mut GstRTSPConnection, ip: *const c_char); + pub fn gst_rtsp_connection_set_proxy( + conn: *mut GstRTSPConnection, + host: *const c_char, + port: c_uint, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_set_qos_dscp( + conn: *mut GstRTSPConnection, + qos_dscp: c_uint, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_set_remember_session_id( + conn: *mut GstRTSPConnection, + remember: gboolean, + ); + pub fn gst_rtsp_connection_set_tls_database( + conn: *mut GstRTSPConnection, + database: *mut gio::GTlsDatabase, + ); + pub fn gst_rtsp_connection_set_tls_interaction( + conn: *mut GstRTSPConnection, + interaction: *mut gio::GTlsInteraction, + ); + pub fn gst_rtsp_connection_set_tls_validation_flags( + conn: *mut GstRTSPConnection, + flags: gio::GTlsCertificateFlags, + ) -> gboolean; + pub fn gst_rtsp_connection_set_tunneled(conn: *mut GstRTSPConnection, tunneled: gboolean); + pub fn gst_rtsp_connection_write( + conn: *mut GstRTSPConnection, + data: *const u8, + size: c_uint, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_connection_write_usec( + conn: *mut GstRTSPConnection, + data: *const u8, + size: c_uint, + timeout: i64, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_accept( + socket: *mut gio::GSocket, + conn: *mut *mut GstRTSPConnection, + cancellable: *mut gio::GCancellable, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_create( + url: *const GstRTSPUrl, + conn: *mut *mut GstRTSPConnection, + ) -> GstRTSPResult; + pub fn gst_rtsp_connection_create_from_socket( + socket: *mut gio::GSocket, + ip: *const c_char, + port: u16, + initial_buffer: *const c_char, + conn: *mut *mut GstRTSPConnection, + ) -> GstRTSPResult; + + //========================================================================= + // GstRTSPMessage + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_msg_get_type() -> GType; + pub fn gst_rtsp_message_add_header( + msg: *mut GstRTSPMessage, + field: GstRTSPHeaderField, + value: *const c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_add_header_by_name( + msg: *mut GstRTSPMessage, + header: *const c_char, + value: *const c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_append_headers( + msg: *const GstRTSPMessage, + str: *mut glib::GString, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_message_copy( + msg: *const GstRTSPMessage, + copy: *mut *mut GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_dump(msg: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_free(msg: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_get_body( + msg: *const GstRTSPMessage, + data: *mut *mut u8, + size: *mut c_uint, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_message_get_body_buffer( + msg: *const GstRTSPMessage, + buffer: *mut *mut gst::GstBuffer, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_get_header( + msg: *const GstRTSPMessage, + field: GstRTSPHeaderField, + value: *mut *mut c_char, + indx: c_int, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_get_header_by_name( + msg: *mut GstRTSPMessage, + header: *const c_char, + value: *mut *mut c_char, + index: c_int, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_rtsp_message_get_type(msg: *mut GstRTSPMessage) -> GstRTSPMsgType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_message_has_body_buffer(msg: *const GstRTSPMessage) -> gboolean; + pub fn gst_rtsp_message_init(msg: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_init_data(msg: *mut GstRTSPMessage, channel: u8) -> GstRTSPResult; + pub fn gst_rtsp_message_init_request( + msg: *mut GstRTSPMessage, + method: GstRTSPMethod, + uri: *const c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_init_response( + msg: *mut GstRTSPMessage, + code: GstRTSPStatusCode, + reason: *const c_char, + request: *const GstRTSPMessage, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_message_parse_auth_credentials( + msg: *mut GstRTSPMessage, + field: GstRTSPHeaderField, + ) -> *mut *mut GstRTSPAuthCredential; + pub fn gst_rtsp_message_parse_data(msg: *mut GstRTSPMessage, channel: *mut u8) + -> GstRTSPResult; + pub fn gst_rtsp_message_parse_request( + msg: *mut GstRTSPMessage, + method: *mut GstRTSPMethod, + uri: *mut *const c_char, + version: *mut GstRTSPVersion, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_parse_response( + msg: *mut GstRTSPMessage, + code: *mut GstRTSPStatusCode, + reason: *mut *const c_char, + version: *mut GstRTSPVersion, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_remove_header( + msg: *mut GstRTSPMessage, + field: GstRTSPHeaderField, + indx: c_int, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_remove_header_by_name( + msg: *mut GstRTSPMessage, + header: *const c_char, + index: c_int, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_set_body( + msg: *mut GstRTSPMessage, + data: *const u8, + size: c_uint, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_message_set_body_buffer( + msg: *mut GstRTSPMessage, + buffer: *mut gst::GstBuffer, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_steal_body( + msg: *mut GstRTSPMessage, + data: *mut *mut u8, + size: *mut c_uint, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_message_steal_body_buffer( + msg: *mut GstRTSPMessage, + buffer: *mut *mut gst::GstBuffer, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_take_body( + msg: *mut GstRTSPMessage, + data: *mut u8, + size: c_uint, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_message_take_body_buffer( + msg: *mut GstRTSPMessage, + buffer: *mut gst::GstBuffer, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_take_header( + msg: *mut GstRTSPMessage, + field: GstRTSPHeaderField, + value: *mut c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_take_header_by_name( + msg: *mut GstRTSPMessage, + header: *const c_char, + value: *mut c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_unset(msg: *mut GstRTSPMessage) -> GstRTSPResult; + + //========================================================================= + // GstRTSPRange + //========================================================================= + pub fn gst_rtsp_range_convert_units( + range: *mut GstRTSPTimeRange, + unit: GstRTSPRangeUnit, + ) -> gboolean; + pub fn gst_rtsp_range_free(range: *mut GstRTSPTimeRange); + pub fn gst_rtsp_range_get_times( + range: *const GstRTSPTimeRange, + min: *mut gst::GstClockTime, + max: *mut gst::GstClockTime, + ) -> gboolean; + pub fn gst_rtsp_range_parse( + rangestr: *const c_char, + range: *mut *mut GstRTSPTimeRange, + ) -> GstRTSPResult; + pub fn gst_rtsp_range_to_string(range: *const GstRTSPTimeRange) -> *mut c_char; + + //========================================================================= + // GstRTSPTransport + //========================================================================= + pub fn gst_rtsp_transport_as_text(transport: *mut GstRTSPTransport) -> *mut c_char; + pub fn gst_rtsp_transport_free(transport: *mut GstRTSPTransport) -> GstRTSPResult; + pub fn gst_rtsp_transport_get_media_type( + transport: *mut GstRTSPTransport, + media_type: *mut *const c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_transport_init(transport: *mut GstRTSPTransport) -> GstRTSPResult; + pub fn gst_rtsp_transport_get_manager( + trans: GstRTSPTransMode, + manager: *mut *const c_char, + option: c_uint, + ) -> GstRTSPResult; + pub fn gst_rtsp_transport_get_mime( + trans: GstRTSPTransMode, + mime: *mut *const c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_transport_new(transport: *mut *mut GstRTSPTransport) -> GstRTSPResult; + pub fn gst_rtsp_transport_parse( + str: *const c_char, + transport: *mut GstRTSPTransport, + ) -> GstRTSPResult; + + //========================================================================= + // GstRTSPUrl + //========================================================================= + pub fn gst_rtsp_url_get_type() -> GType; + pub fn gst_rtsp_url_copy(url: *const GstRTSPUrl) -> *mut GstRTSPUrl; + pub fn gst_rtsp_url_decode_path_components(url: *const GstRTSPUrl) -> *mut *mut c_char; + pub fn gst_rtsp_url_free(url: *mut GstRTSPUrl); + pub fn gst_rtsp_url_get_port(url: *const GstRTSPUrl, port: *mut u16) -> GstRTSPResult; + pub fn gst_rtsp_url_get_request_uri(url: *const GstRTSPUrl) -> *mut c_char; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_url_get_request_uri_with_control( + url: *const GstRTSPUrl, + control_path: *const c_char, + ) -> *mut c_char; + pub fn gst_rtsp_url_set_port(url: *mut GstRTSPUrl, port: u16) -> GstRTSPResult; + pub fn gst_rtsp_url_parse(urlstr: *const c_char, url: *mut *mut GstRTSPUrl) -> GstRTSPResult; + + //========================================================================= + // GstRTSPWatch + //========================================================================= + pub fn gst_rtsp_watch_attach( + watch: *mut GstRTSPWatch, + context: *mut glib::GMainContext, + ) -> c_uint; + pub fn gst_rtsp_watch_get_send_backlog( + watch: *mut GstRTSPWatch, + bytes: *mut size_t, + messages: *mut c_uint, + ); + pub fn gst_rtsp_watch_reset(watch: *mut GstRTSPWatch); + pub fn gst_rtsp_watch_send_message( + watch: *mut GstRTSPWatch, + message: *mut GstRTSPMessage, + id: *mut c_uint, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_watch_send_messages( + watch: *mut GstRTSPWatch, + messages: *mut GstRTSPMessage, + n_messages: c_uint, + id: *mut c_uint, + ) -> GstRTSPResult; + pub fn gst_rtsp_watch_set_flushing(watch: *mut GstRTSPWatch, flushing: gboolean); + pub fn gst_rtsp_watch_set_send_backlog( + watch: *mut GstRTSPWatch, + bytes: size_t, + messages: c_uint, + ); + pub fn gst_rtsp_watch_unref(watch: *mut GstRTSPWatch); + pub fn gst_rtsp_watch_wait_backlog( + watch: *mut GstRTSPWatch, + timeout: *mut glib::GTimeVal, + ) -> GstRTSPResult; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_rtsp_watch_wait_backlog_usec( + watch: *mut GstRTSPWatch, + timeout: i64, + ) -> GstRTSPResult; + pub fn gst_rtsp_watch_write_data( + watch: *mut GstRTSPWatch, + data: *const u8, + size: c_uint, + id: *mut c_uint, + ) -> GstRTSPResult; + pub fn gst_rtsp_watch_new( + conn: *mut GstRTSPConnection, + funcs: *mut GstRTSPWatchFuncs, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstRTSPWatch; + + //========================================================================= + // GstRTSPExtension + //========================================================================= + pub fn gst_rtsp_extension_get_type() -> GType; + pub fn gst_rtsp_extension_after_send( + ext: *mut GstRTSPExtension, + req: *mut GstRTSPMessage, + resp: *mut GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_before_send( + ext: *mut GstRTSPExtension, + req: *mut GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_configure_stream( + ext: *mut GstRTSPExtension, + caps: *mut gst::GstCaps, + ) -> gboolean; + pub fn gst_rtsp_extension_detect_server( + ext: *mut GstRTSPExtension, + resp: *mut GstRTSPMessage, + ) -> gboolean; + pub fn gst_rtsp_extension_get_transports( + ext: *mut GstRTSPExtension, + protocols: GstRTSPLowerTrans, + transport: *mut *mut c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_parse_sdp( + ext: *mut GstRTSPExtension, + sdp: *mut gst_sdp::GstSDPMessage, + s: *mut gst::GstStructure, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_receive_request( + ext: *mut GstRTSPExtension, + req: *mut GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_send( + ext: *mut GstRTSPExtension, + req: *mut GstRTSPMessage, + resp: *mut GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_setup_media( + ext: *mut GstRTSPExtension, + media: *mut gst_sdp::GstSDPMedia, + ) -> GstRTSPResult; + pub fn gst_rtsp_extension_stream_select( + ext: *mut GstRTSPExtension, + url: *mut GstRTSPUrl, + ) -> GstRTSPResult; + + //========================================================================= + // Other functions + //========================================================================= + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_credentials_free(credentials: *mut *mut GstRTSPAuthCredential); + pub fn gst_rtsp_find_header_field(header: *const c_char) -> GstRTSPHeaderField; + pub fn gst_rtsp_find_method(method: *const c_char) -> GstRTSPMethod; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_generate_digest_auth_response( + algorithm: *const c_char, + method: *const c_char, + realm: *const c_char, + username: *const c_char, + password: *const c_char, + uri: *const c_char, + nonce: *const c_char, + ) -> *mut c_char; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_rtsp_generate_digest_auth_response_from_md5( + algorithm: *const c_char, + method: *const c_char, + md5: *const c_char, + uri: *const c_char, + nonce: *const c_char, + ) -> *mut c_char; + pub fn gst_rtsp_header_allow_multiple(field: GstRTSPHeaderField) -> gboolean; + pub fn gst_rtsp_header_as_text(field: GstRTSPHeaderField) -> *const c_char; + pub fn gst_rtsp_message_new(msg: *mut *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_new_data(msg: *mut *mut GstRTSPMessage, channel: u8) -> GstRTSPResult; + pub fn gst_rtsp_message_new_request( + msg: *mut *mut GstRTSPMessage, + method: GstRTSPMethod, + uri: *const c_char, + ) -> GstRTSPResult; + pub fn gst_rtsp_message_new_response( + msg: *mut *mut GstRTSPMessage, + code: GstRTSPStatusCode, + reason: *const c_char, + request: *const GstRTSPMessage, + ) -> GstRTSPResult; + pub fn gst_rtsp_options_as_text(options: GstRTSPMethod) -> *mut c_char; + pub fn gst_rtsp_options_from_text(options: *const c_char) -> GstRTSPMethod; + pub fn gst_rtsp_status_as_text(code: GstRTSPStatusCode) -> *const c_char; + pub fn gst_rtsp_strresult(result: GstRTSPResult) -> *mut c_char; + +} diff --git a/sys/gstreamer-rtsp-sys/tests/abi.rs b/sys/gstreamer-rtsp-sys/tests/abi.rs new file mode 100644 index 000000000..bddcc17e5 --- /dev/null +++ b/sys/gstreamer-rtsp-sys/tests/abi.rs @@ -0,0 +1,663 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_rtsp_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_rtsp_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-rtsp-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstRTSPAuthCredential", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAuthMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPAuthParam", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPExtensionInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPFamily", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPHeaderField", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPLowerTrans", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMessage", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPMsgType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPProfile", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPRange", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPRangeUnit", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPStatusCode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTime", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTime2", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTimeRange", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTimeType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTransMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPTransport", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPUrl", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPVersion", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRTSPWatchFuncs", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(guint) GST_RTSP_ANNOUNCE", "2"), + ("(gint) GST_RTSP_AUTH_BASIC", "1"), + ("(gint) GST_RTSP_AUTH_DIGEST", "2"), + ("(gint) GST_RTSP_AUTH_NONE", "0"), + ("GST_RTSP_DEFAULT_PORT", "554"), + ("(guint) GST_RTSP_DESCRIBE", "1"), + ("(gint) GST_RTSP_EEOF", "-11"), + ("(gint) GST_RTSP_EINTR", "-3"), + ("(gint) GST_RTSP_EINVAL", "-2"), + ("(gint) GST_RTSP_ELAST", "-17"), + ("(gint) GST_RTSP_ENET", "-12"), + ("(gint) GST_RTSP_ENOMEM", "-4"), + ("(gint) GST_RTSP_ENOTIMPL", "-6"), + ("(gint) GST_RTSP_ENOTIP", "-13"), + ("(gint) GST_RTSP_EPARSE", "-8"), + ("(gint) GST_RTSP_ERESOLV", "-5"), + ("(gint) GST_RTSP_ERROR", "-1"), + ("(gint) GST_RTSP_ESYS", "-7"), + ("(gint) GST_RTSP_ETGET", "-15"), + ("(gint) GST_RTSP_ETIMEOUT", "-14"), + ("(gint) GST_RTSP_ETPOST", "-16"), + ("(guint) GST_RTSP_EV_READ", "1"), + ("(guint) GST_RTSP_EV_WRITE", "2"), + ("(gint) GST_RTSP_EWSASTART", "-9"), + ("(gint) GST_RTSP_EWSAVERSION", "-10"), + ("(gint) GST_RTSP_FAM_INET", "1"), + ("(gint) GST_RTSP_FAM_INET6", "2"), + ("(gint) GST_RTSP_FAM_NONE", "0"), + ("(guint) GST_RTSP_GET", "2048"), + ("(guint) GST_RTSP_GET_PARAMETER", "4"), + ("(gint) GST_RTSP_HDR_ACCEPT", "1"), + ("(gint) GST_RTSP_HDR_ACCEPT_CHARSET", "56"), + ("(gint) GST_RTSP_HDR_ACCEPT_ENCODING", "2"), + ("(gint) GST_RTSP_HDR_ACCEPT_LANGUAGE", "3"), + ("(gint) GST_RTSP_HDR_ACCEPT_RANGES", "86"), + ("(gint) GST_RTSP_HDR_ALERT", "45"), + ("(gint) GST_RTSP_HDR_ALLOW", "4"), + ("(gint) GST_RTSP_HDR_AUTHENTICATION_INFO", "76"), + ("(gint) GST_RTSP_HDR_AUTHORIZATION", "5"), + ("(gint) GST_RTSP_HDR_BANDWIDTH", "6"), + ("(gint) GST_RTSP_HDR_BLOCKSIZE", "7"), + ("(gint) GST_RTSP_HDR_CACHE_CONTROL", "8"), + ("(gint) GST_RTSP_HDR_CLIENT_CHALLENGE", "40"), + ("(gint) GST_RTSP_HDR_CLIENT_ID", "46"), + ("(gint) GST_RTSP_HDR_COMPANY_ID", "47"), + ("(gint) GST_RTSP_HDR_CONFERENCE", "9"), + ("(gint) GST_RTSP_HDR_CONNECTION", "10"), + ("(gint) GST_RTSP_HDR_CONTENT_BASE", "11"), + ("(gint) GST_RTSP_HDR_CONTENT_ENCODING", "12"), + ("(gint) GST_RTSP_HDR_CONTENT_LANGUAGE", "13"), + ("(gint) GST_RTSP_HDR_CONTENT_LENGTH", "14"), + ("(gint) GST_RTSP_HDR_CONTENT_LOCATION", "15"), + ("(gint) GST_RTSP_HDR_CONTENT_TYPE", "16"), + ("(gint) GST_RTSP_HDR_CSEQ", "17"), + ("(gint) GST_RTSP_HDR_DATE", "18"), + ("(gint) GST_RTSP_HDR_ETAG", "54"), + ("(gint) GST_RTSP_HDR_EXPIRES", "19"), + ("(gint) GST_RTSP_HDR_FRAMES", "87"), + ("(gint) GST_RTSP_HDR_FROM", "20"), + ("(gint) GST_RTSP_HDR_GUID", "48"), + ("(gint) GST_RTSP_HDR_HOST", "77"), + ("(gint) GST_RTSP_HDR_IF_MATCH", "55"), + ("(gint) GST_RTSP_HDR_IF_MODIFIED_SINCE", "21"), + ("(gint) GST_RTSP_HDR_INVALID", "0"), + ("(gint) GST_RTSP_HDR_KEYMGMT", "82"), + ("(gint) GST_RTSP_HDR_LANGUAGE", "51"), + ("(gint) GST_RTSP_HDR_LAST", "89"), + ("(gint) GST_RTSP_HDR_LAST_MODIFIED", "22"), + ("(gint) GST_RTSP_HDR_LOCATION", "53"), + ("(gint) GST_RTSP_HDR_MAX_ASM_WIDTH", "50"), + ("(gint) GST_RTSP_HDR_MEDIA_PROPERTIES", "84"), + ("(gint) GST_RTSP_HDR_PIPELINED_REQUESTS", "83"), + ("(gint) GST_RTSP_HDR_PLAYER_START_TIME", "52"), + ("(gint) GST_RTSP_HDR_PRAGMA", "78"), + ("(gint) GST_RTSP_HDR_PROXY_AUTHENTICATE", "23"), + ("(gint) GST_RTSP_HDR_PROXY_REQUIRE", "24"), + ("(gint) GST_RTSP_HDR_PUBLIC", "25"), + ("(gint) GST_RTSP_HDR_RANGE", "26"), + ("(gint) GST_RTSP_HDR_RATE_CONTROL", "88"), + ("(gint) GST_RTSP_HDR_REAL_CHALLENGE1", "41"), + ("(gint) GST_RTSP_HDR_REAL_CHALLENGE2", "42"), + ("(gint) GST_RTSP_HDR_REAL_CHALLENGE3", "43"), + ("(gint) GST_RTSP_HDR_REFERER", "27"), + ("(gint) GST_RTSP_HDR_REGION_DATA", "49"), + ("(gint) GST_RTSP_HDR_REQUIRE", "28"), + ("(gint) GST_RTSP_HDR_RETRY_AFTER", "29"), + ("(gint) GST_RTSP_HDR_RTCP_INTERVAL", "81"), + ("(gint) GST_RTSP_HDR_RTP_INFO", "30"), + ("(gint) GST_RTSP_HDR_SCALE", "31"), + ("(gint) GST_RTSP_HDR_SEEK_STYLE", "85"), + ("(gint) GST_RTSP_HDR_SERVER", "33"), + ("(gint) GST_RTSP_HDR_SESSION", "32"), + ("(gint) GST_RTSP_HDR_SPEED", "34"), + ("(gint) GST_RTSP_HDR_SUBSCRIBE", "44"), + ("(gint) GST_RTSP_HDR_SUPPORTED", "57"), + ("(gint) GST_RTSP_HDR_TIMESTAMP", "75"), + ("(gint) GST_RTSP_HDR_TRANSPORT", "35"), + ("(gint) GST_RTSP_HDR_UNSUPPORTED", "36"), + ("(gint) GST_RTSP_HDR_USER_AGENT", "37"), + ("(gint) GST_RTSP_HDR_VARY", "58"), + ("(gint) GST_RTSP_HDR_VIA", "38"), + ("(gint) GST_RTSP_HDR_WWW_AUTHENTICATE", "39"), + ("(gint) GST_RTSP_HDR_X_ACCELERATE_STREAMING", "59"), + ("(gint) GST_RTSP_HDR_X_ACCEPT_AUTHENT", "60"), + ("(gint) GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT", "61"), + ("(gint) GST_RTSP_HDR_X_BROADCAST_ID", "62"), + ("(gint) GST_RTSP_HDR_X_BURST_STREAMING", "63"), + ("(gint) GST_RTSP_HDR_X_NOTICE", "64"), + ("(gint) GST_RTSP_HDR_X_PLAYER_LAG_TIME", "65"), + ("(gint) GST_RTSP_HDR_X_PLAYLIST", "66"), + ("(gint) GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE", "67"), + ("(gint) GST_RTSP_HDR_X_PLAYLIST_GEN_ID", "68"), + ("(gint) GST_RTSP_HDR_X_PLAYLIST_SEEK_ID", "69"), + ("(gint) GST_RTSP_HDR_X_PROXY_CLIENT_AGENT", "70"), + ("(gint) GST_RTSP_HDR_X_PROXY_CLIENT_VERB", "71"), + ("(gint) GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE", "72"), + ("(gint) GST_RTSP_HDR_X_RTP_INFO", "73"), + ("(gint) GST_RTSP_HDR_X_SERVER_IP_ADDRESS", "79"), + ("(gint) GST_RTSP_HDR_X_SESSIONCOOKIE", "80"), + ("(gint) GST_RTSP_HDR_X_STARTUPPROFILE", "74"), + ("(guint) GST_RTSP_INVALID", "0"), + ("(guint) GST_RTSP_LOWER_TRANS_HTTP", "16"), + ("(guint) GST_RTSP_LOWER_TRANS_TCP", "4"), + ("(guint) GST_RTSP_LOWER_TRANS_TLS", "32"), + ("(guint) GST_RTSP_LOWER_TRANS_UDP", "1"), + ("(guint) GST_RTSP_LOWER_TRANS_UDP_MCAST", "2"), + ("(guint) GST_RTSP_LOWER_TRANS_UNKNOWN", "0"), + ("(gint) GST_RTSP_MESSAGE_DATA", "5"), + ("(gint) GST_RTSP_MESSAGE_HTTP_REQUEST", "3"), + ("(gint) GST_RTSP_MESSAGE_HTTP_RESPONSE", "4"), + ("(gint) GST_RTSP_MESSAGE_INVALID", "0"), + ("(gint) GST_RTSP_MESSAGE_REQUEST", "1"), + ("(gint) GST_RTSP_MESSAGE_RESPONSE", "2"), + ("(gint) GST_RTSP_OK", "0"), + ("(guint) GST_RTSP_OPTIONS", "8"), + ("(guint) GST_RTSP_PAUSE", "16"), + ("(guint) GST_RTSP_PLAY", "32"), + ("(guint) GST_RTSP_POST", "4096"), + ("(guint) GST_RTSP_PROFILE_AVP", "1"), + ("(guint) GST_RTSP_PROFILE_AVPF", "4"), + ("(guint) GST_RTSP_PROFILE_SAVP", "2"), + ("(guint) GST_RTSP_PROFILE_SAVPF", "8"), + ("(guint) GST_RTSP_PROFILE_UNKNOWN", "0"), + ("(gint) GST_RTSP_RANGE_CLOCK", "4"), + ("(gint) GST_RTSP_RANGE_NPT", "3"), + ("(gint) GST_RTSP_RANGE_SMPTE", "0"), + ("(gint) GST_RTSP_RANGE_SMPTE_25", "2"), + ("(gint) GST_RTSP_RANGE_SMPTE_30_DROP", "1"), + ("(guint) GST_RTSP_RECORD", "64"), + ("(guint) GST_RTSP_REDIRECT", "128"), + ("(guint) GST_RTSP_SETUP", "256"), + ("(guint) GST_RTSP_SET_PARAMETER", "512"), + ("(gint) GST_RTSP_STATE_INIT", "1"), + ("(gint) GST_RTSP_STATE_INVALID", "0"), + ("(gint) GST_RTSP_STATE_PLAYING", "4"), + ("(gint) GST_RTSP_STATE_READY", "2"), + ("(gint) GST_RTSP_STATE_RECORDING", "5"), + ("(gint) GST_RTSP_STATE_SEEKING", "3"), + ("(gint) GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED", "459"), + ("(gint) GST_RTSP_STS_BAD_GATEWAY", "502"), + ("(gint) GST_RTSP_STS_BAD_REQUEST", "400"), + ("(gint) GST_RTSP_STS_CONFERENCE_NOT_FOUND", "452"), + ("(gint) GST_RTSP_STS_CONTINUE", "100"), + ("(gint) GST_RTSP_STS_CREATED", "201"), + ("(gint) GST_RTSP_STS_DESTINATION_UNREACHABLE", "462"), + ("(gint) GST_RTSP_STS_FORBIDDEN", "403"), + ("(gint) GST_RTSP_STS_GATEWAY_TIMEOUT", "504"), + ("(gint) GST_RTSP_STS_GONE", "410"), + ( + "(gint) GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE", + "456", + ), + ("(gint) GST_RTSP_STS_INTERNAL_SERVER_ERROR", "500"), + ("(gint) GST_RTSP_STS_INVALID", "0"), + ("(gint) GST_RTSP_STS_INVALID_RANGE", "457"), + ("(gint) GST_RTSP_STS_KEY_MANAGEMENT_FAILURE", "463"), + ("(gint) GST_RTSP_STS_LENGTH_REQUIRED", "411"), + ("(gint) GST_RTSP_STS_LOW_ON_STORAGE", "250"), + ("(gint) GST_RTSP_STS_METHOD_NOT_ALLOWED", "405"), + ("(gint) GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE", "455"), + ("(gint) GST_RTSP_STS_MOVED_PERMANENTLY", "301"), + ("(gint) GST_RTSP_STS_MOVE_TEMPORARILY", "302"), + ("(gint) GST_RTSP_STS_MULTIPLE_CHOICES", "300"), + ("(gint) GST_RTSP_STS_NOT_ACCEPTABLE", "406"), + ("(gint) GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH", "453"), + ("(gint) GST_RTSP_STS_NOT_FOUND", "404"), + ("(gint) GST_RTSP_STS_NOT_IMPLEMENTED", "501"), + ("(gint) GST_RTSP_STS_NOT_MODIFIED", "304"), + ("(gint) GST_RTSP_STS_OK", "200"), + ( + "(gint) GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED", + "460", + ), + ("(gint) GST_RTSP_STS_OPTION_NOT_SUPPORTED", "551"), + ("(gint) GST_RTSP_STS_PARAMETER_IS_READONLY", "458"), + ("(gint) GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD", "451"), + ("(gint) GST_RTSP_STS_PAYMENT_REQUIRED", "402"), + ("(gint) GST_RTSP_STS_PRECONDITION_FAILED", "412"), + ("(gint) GST_RTSP_STS_PROXY_AUTH_REQUIRED", "407"), + ("(gint) GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE", "413"), + ("(gint) GST_RTSP_STS_REQUEST_TIMEOUT", "408"), + ("(gint) GST_RTSP_STS_REQUEST_URI_TOO_LARGE", "414"), + ("(gint) GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED", "505"), + ("(gint) GST_RTSP_STS_SEE_OTHER", "303"), + ("(gint) GST_RTSP_STS_SERVICE_UNAVAILABLE", "503"), + ("(gint) GST_RTSP_STS_SESSION_NOT_FOUND", "454"), + ("(gint) GST_RTSP_STS_UNAUTHORIZED", "401"), + ("(gint) GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE", "415"), + ("(gint) GST_RTSP_STS_UNSUPPORTED_TRANSPORT", "461"), + ("(gint) GST_RTSP_STS_USE_PROXY", "305"), + ("(guint) GST_RTSP_TEARDOWN", "1024"), + ("(gint) GST_RTSP_TIME_END", "2"), + ("(gint) GST_RTSP_TIME_FRAMES", "3"), + ("(gint) GST_RTSP_TIME_NOW", "1"), + ("(gint) GST_RTSP_TIME_SECONDS", "0"), + ("(gint) GST_RTSP_TIME_UTC", "4"), + ("(guint) GST_RTSP_TRANS_RDT", "2"), + ("(guint) GST_RTSP_TRANS_RTP", "1"), + ("(guint) GST_RTSP_TRANS_UNKNOWN", "0"), + ("(gint) GST_RTSP_VERSION_1_0", "16"), + ("(gint) GST_RTSP_VERSION_1_1", "17"), + ("(gint) GST_RTSP_VERSION_2_0", "32"), + ("(gint) GST_RTSP_VERSION_INVALID", "0"), +]; diff --git a/sys/gstreamer-rtsp-sys/tests/constant.c b/sys/gstreamer-rtsp-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-rtsp-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-rtsp-sys/tests/layout.c b/sys/gstreamer-rtsp-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-rtsp-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-rtsp-sys/tests/manual.h b/sys/gstreamer-rtsp-sys/tests/manual.h new file mode 100644 index 000000000..faebe64fb --- /dev/null +++ b/sys/gstreamer-rtsp-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-sdp-sys/CHANGELOG.md b/sys/gstreamer-sdp-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-sdp-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-sdp-sys/Cargo.toml b/sys/gstreamer-sdp-sys/Cargo.toml new file mode 100644 index 000000000..71eae9cd1 --- /dev/null +++ b/sys/gstreamer-sdp-sys/Cargo.toml @@ -0,0 +1,61 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_6 = ["v1_4"] +v1_2 = [] +v1_4 = ["v1_2"] +v1_8 = ["v1_6"] +v1_8_1 = ["v1_8"] +v1_10 = ["v1_8_1"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] + +[lib] +name = "gstreamer_sdp_sys" + +[package] +authors = ["Mathieu Duponchelle ", "Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstsdp-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_sdp_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstsdp-1.0" +name = "gstreamer-sdp-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_sdp_1_0] +name = "gstreamer-sdp-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_sdp_1_0.feature-versions] +v1_8_1 = "1.8.1" +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-sdp-sys/LICENSE b/sys/gstreamer-sdp-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-sdp-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-sdp-sys/README.md b/sys/gstreamer-sdp-sys/README.md new file mode 100644 index 000000000..94e1a8f0f --- /dev/null +++ b/sys/gstreamer-sdp-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sdp-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sdp-sys.svg)](https://crates.io/crates/gstreamer-sdp-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Sdp library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-sdp-sys/build.rs b/sys/gstreamer-sdp-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-sdp-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-sdp-sys/src/lib.rs b/sys/gstreamer-sdp-sys/src/lib.rs new file mode 100644 index 000000000..189b67b81 --- /dev/null +++ b/sys/gstreamer-sdp-sys/src/lib.rs @@ -0,0 +1,1137 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstMIKEYCacheType = c_int; +pub const GST_MIKEY_CACHE_NONE: GstMIKEYCacheType = 0; +pub const GST_MIKEY_CACHE_ALWAYS: GstMIKEYCacheType = 1; +pub const GST_MIKEY_CACHE_FOR_CSB: GstMIKEYCacheType = 2; + +pub type GstMIKEYEncAlg = c_int; +pub const GST_MIKEY_ENC_NULL: GstMIKEYEncAlg = 0; +pub const GST_MIKEY_ENC_AES_CM_128: GstMIKEYEncAlg = 1; +pub const GST_MIKEY_ENC_AES_KW_128: GstMIKEYEncAlg = 2; +pub const GST_MIKEY_ENC_AES_GCM_128: GstMIKEYEncAlg = 6; + +pub type GstMIKEYKVType = c_int; +pub const GST_MIKEY_KV_NULL: GstMIKEYKVType = 0; +pub const GST_MIKEY_KV_SPI: GstMIKEYKVType = 1; +pub const GST_MIKEY_KV_INTERVAL: GstMIKEYKVType = 2; + +pub type GstMIKEYKeyDataType = c_int; +pub const GST_MIKEY_KD_TGK: GstMIKEYKeyDataType = 0; +pub const GST_MIKEY_KD_TEK: GstMIKEYKeyDataType = 2; + +pub type GstMIKEYMacAlg = c_int; +pub const GST_MIKEY_MAC_NULL: GstMIKEYMacAlg = 0; +pub const GST_MIKEY_MAC_HMAC_SHA_1_160: GstMIKEYMacAlg = 1; + +pub type GstMIKEYMapType = c_int; +pub const GST_MIKEY_MAP_TYPE_SRTP: GstMIKEYMapType = 0; + +pub type GstMIKEYPRFFunc = c_int; +pub const GST_MIKEY_PRF_MIKEY_1: GstMIKEYPRFFunc = 0; + +pub type GstMIKEYPayloadType = c_int; +pub const GST_MIKEY_PT_LAST: GstMIKEYPayloadType = 0; +pub const GST_MIKEY_PT_KEMAC: GstMIKEYPayloadType = 1; +pub const GST_MIKEY_PT_PKE: GstMIKEYPayloadType = 2; +pub const GST_MIKEY_PT_DH: GstMIKEYPayloadType = 3; +pub const GST_MIKEY_PT_SIGN: GstMIKEYPayloadType = 4; +pub const GST_MIKEY_PT_T: GstMIKEYPayloadType = 5; +pub const GST_MIKEY_PT_ID: GstMIKEYPayloadType = 6; +pub const GST_MIKEY_PT_CERT: GstMIKEYPayloadType = 7; +pub const GST_MIKEY_PT_CHASH: GstMIKEYPayloadType = 8; +pub const GST_MIKEY_PT_V: GstMIKEYPayloadType = 9; +pub const GST_MIKEY_PT_SP: GstMIKEYPayloadType = 10; +pub const GST_MIKEY_PT_RAND: GstMIKEYPayloadType = 11; +pub const GST_MIKEY_PT_ERR: GstMIKEYPayloadType = 12; +pub const GST_MIKEY_PT_KEY_DATA: GstMIKEYPayloadType = 20; +pub const GST_MIKEY_PT_GEN_EXT: GstMIKEYPayloadType = 21; + +pub type GstMIKEYSecProto = c_int; +pub const GST_MIKEY_SEC_PROTO_SRTP: GstMIKEYSecProto = 0; + +pub type GstMIKEYSecSRTP = c_int; +pub const GST_MIKEY_SP_SRTP_ENC_ALG: GstMIKEYSecSRTP = 0; +pub const GST_MIKEY_SP_SRTP_ENC_KEY_LEN: GstMIKEYSecSRTP = 1; +pub const GST_MIKEY_SP_SRTP_AUTH_ALG: GstMIKEYSecSRTP = 2; +pub const GST_MIKEY_SP_SRTP_AUTH_KEY_LEN: GstMIKEYSecSRTP = 3; +pub const GST_MIKEY_SP_SRTP_SALT_KEY_LEN: GstMIKEYSecSRTP = 4; +pub const GST_MIKEY_SP_SRTP_PRF: GstMIKEYSecSRTP = 5; +pub const GST_MIKEY_SP_SRTP_KEY_DERIV_RATE: GstMIKEYSecSRTP = 6; +pub const GST_MIKEY_SP_SRTP_SRTP_ENC: GstMIKEYSecSRTP = 7; +pub const GST_MIKEY_SP_SRTP_SRTCP_ENC: GstMIKEYSecSRTP = 8; +pub const GST_MIKEY_SP_SRTP_FEC_ORDER: GstMIKEYSecSRTP = 9; +pub const GST_MIKEY_SP_SRTP_SRTP_AUTH: GstMIKEYSecSRTP = 10; +pub const GST_MIKEY_SP_SRTP_AUTH_TAG_LEN: GstMIKEYSecSRTP = 11; +pub const GST_MIKEY_SP_SRTP_SRTP_PREFIX_LEN: GstMIKEYSecSRTP = 12; +pub const GST_MIKEY_SP_SRTP_AEAD_AUTH_TAG_LEN: GstMIKEYSecSRTP = 20; + +pub type GstMIKEYTSType = c_int; +pub const GST_MIKEY_TS_TYPE_NTP_UTC: GstMIKEYTSType = 0; +pub const GST_MIKEY_TS_TYPE_NTP: GstMIKEYTSType = 1; +pub const GST_MIKEY_TS_TYPE_COUNTER: GstMIKEYTSType = 2; + +pub type GstMIKEYType = c_int; +pub const GST_MIKEY_TYPE_INVALID: GstMIKEYType = -1; +pub const GST_MIKEY_TYPE_PSK_INIT: GstMIKEYType = 0; +pub const GST_MIKEY_TYPE_PSK_VERIFY: GstMIKEYType = 1; +pub const GST_MIKEY_TYPE_PK_INIT: GstMIKEYType = 2; +pub const GST_MIKEY_TYPE_PK_VERIFY: GstMIKEYType = 3; +pub const GST_MIKEY_TYPE_DH_INIT: GstMIKEYType = 4; +pub const GST_MIKEY_TYPE_DH_RESP: GstMIKEYType = 5; +pub const GST_MIKEY_TYPE_ERROR: GstMIKEYType = 6; + +pub type GstSDPResult = c_int; +pub const GST_SDP_OK: GstSDPResult = 0; +pub const GST_SDP_EINVAL: GstSDPResult = -1; + +// Constants +pub const GST_MIKEY_VERSION: c_int = 1; +pub const GST_SDP_BWTYPE_AS: *const c_char = b"AS\0" as *const u8 as *const c_char; +pub const GST_SDP_BWTYPE_CT: *const c_char = b"CT\0" as *const u8 as *const c_char; +pub const GST_SDP_BWTYPE_EXT_PREFIX: *const c_char = b"X-\0" as *const u8 as *const c_char; +pub const GST_SDP_BWTYPE_RR: *const c_char = b"RR\0" as *const u8 as *const c_char; +pub const GST_SDP_BWTYPE_RS: *const c_char = b"RS\0" as *const u8 as *const c_char; +pub const GST_SDP_BWTYPE_TIAS: *const c_char = b"TIAS\0" as *const u8 as *const c_char; + +// Records +#[repr(C)] +pub struct _GstMIKEYDecryptInfo(c_void); + +pub type GstMIKEYDecryptInfo = *mut _GstMIKEYDecryptInfo; + +#[repr(C)] +pub struct _GstMIKEYEncryptInfo(c_void); + +pub type GstMIKEYEncryptInfo = *mut _GstMIKEYEncryptInfo; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYMapSRTP { + pub policy: u8, + pub ssrc: u32, + pub roc: u32, +} + +impl ::std::fmt::Debug for GstMIKEYMapSRTP { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYMapSRTP @ {:?}", self as *const _)) + .field("policy", &self.policy) + .field("ssrc", &self.ssrc) + .field("roc", &self.roc) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYMessage { + pub mini_object: gst::GstMiniObject, + pub version: u8, + pub type_: GstMIKEYType, + pub V: gboolean, + pub prf_func: GstMIKEYPRFFunc, + pub CSB_id: u32, + pub map_type: GstMIKEYMapType, + pub map_info: *mut glib::GArray, + pub payloads: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstMIKEYMessage { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYMessage @ {:?}", self as *const _)) + .field("version", &self.version) + .field("type_", &self.type_) + .field("V", &self.V) + .field("prf_func", &self.prf_func) + .field("CSB_id", &self.CSB_id) + .field("map_type", &self.map_type) + .field("map_info", &self.map_info) + .field("payloads", &self.payloads) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayload { + pub mini_object: gst::GstMiniObject, + pub type_: GstMIKEYPayloadType, + pub len: c_uint, +} + +impl ::std::fmt::Debug for GstMIKEYPayload { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayload @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("len", &self.len) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadKEMAC { + pub pt: GstMIKEYPayload, + pub enc_alg: GstMIKEYEncAlg, + pub mac_alg: GstMIKEYMacAlg, + pub subpayloads: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadKEMAC { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadKEMAC @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("enc_alg", &self.enc_alg) + .field("mac_alg", &self.mac_alg) + .field("subpayloads", &self.subpayloads) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadKeyData { + pub pt: GstMIKEYPayload, + pub key_type: GstMIKEYKeyDataType, + pub key_len: u16, + pub key_data: *mut u8, + pub salt_len: u16, + pub salt_data: *mut u8, + pub kv_type: GstMIKEYKVType, + pub kv_len: [u8; 2], + pub kv_data: [*mut u8; 2], +} + +impl ::std::fmt::Debug for GstMIKEYPayloadKeyData { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadKeyData @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("key_type", &self.key_type) + .field("key_len", &self.key_len) + .field("key_data", &self.key_data) + .field("salt_len", &self.salt_len) + .field("salt_data", &self.salt_data) + .field("kv_type", &self.kv_type) + .field("kv_len", &self.kv_len) + .field("kv_data", &self.kv_data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadPKE { + pub pt: GstMIKEYPayload, + pub C: GstMIKEYCacheType, + pub data_len: u16, + pub data: *mut u8, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadPKE { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadPKE @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("C", &self.C) + .field("data_len", &self.data_len) + .field("data", &self.data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadRAND { + pub pt: GstMIKEYPayload, + pub len: u8, + pub rand: *mut u8, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadRAND { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadRAND @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("len", &self.len) + .field("rand", &self.rand) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadSP { + pub pt: GstMIKEYPayload, + pub policy: c_uint, + pub proto: GstMIKEYSecProto, + pub params: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadSP { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadSP @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("policy", &self.policy) + .field("proto", &self.proto) + .field("params", &self.params) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadSPParam { + pub type_: u8, + pub len: u8, + pub val: *mut u8, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadSPParam { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadSPParam @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("len", &self.len) + .field("val", &self.val) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadT { + pub pt: GstMIKEYPayload, + pub type_: GstMIKEYTSType, + pub ts_value: *mut u8, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadT @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("type_", &self.type_) + .field("ts_value", &self.ts_value) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPAttribute { + pub key: *mut c_char, + pub value: *mut c_char, +} + +impl ::std::fmt::Debug for GstSDPAttribute { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPAttribute @ {:?}", self as *const _)) + .field("key", &self.key) + .field("value", &self.value) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPBandwidth { + pub bwtype: *mut c_char, + pub bandwidth: c_uint, +} + +impl ::std::fmt::Debug for GstSDPBandwidth { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPBandwidth @ {:?}", self as *const _)) + .field("bwtype", &self.bwtype) + .field("bandwidth", &self.bandwidth) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPConnection { + pub nettype: *mut c_char, + pub addrtype: *mut c_char, + pub address: *mut c_char, + pub ttl: c_uint, + pub addr_number: c_uint, +} + +impl ::std::fmt::Debug for GstSDPConnection { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPConnection @ {:?}", self as *const _)) + .field("nettype", &self.nettype) + .field("addrtype", &self.addrtype) + .field("address", &self.address) + .field("ttl", &self.ttl) + .field("addr_number", &self.addr_number) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPKey { + pub type_: *mut c_char, + pub data: *mut c_char, +} + +impl ::std::fmt::Debug for GstSDPKey { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPKey @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("data", &self.data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPMedia { + pub media: *mut c_char, + pub port: c_uint, + pub num_ports: c_uint, + pub proto: *mut c_char, + pub fmts: *mut glib::GArray, + pub information: *mut c_char, + pub connections: *mut glib::GArray, + pub bandwidths: *mut glib::GArray, + pub key: GstSDPKey, + pub attributes: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstSDPMedia { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPMedia @ {:?}", self as *const _)) + .field("media", &self.media) + .field("port", &self.port) + .field("num_ports", &self.num_ports) + .field("proto", &self.proto) + .field("fmts", &self.fmts) + .field("information", &self.information) + .field("connections", &self.connections) + .field("bandwidths", &self.bandwidths) + .field("key", &self.key) + .field("attributes", &self.attributes) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPMessage { + pub version: *mut c_char, + pub origin: GstSDPOrigin, + pub session_name: *mut c_char, + pub information: *mut c_char, + pub uri: *mut c_char, + pub emails: *mut glib::GArray, + pub phones: *mut glib::GArray, + pub connection: GstSDPConnection, + pub bandwidths: *mut glib::GArray, + pub times: *mut glib::GArray, + pub zones: *mut glib::GArray, + pub key: GstSDPKey, + pub attributes: *mut glib::GArray, + pub medias: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstSDPMessage { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPMessage @ {:?}", self as *const _)) + .field("version", &self.version) + .field("origin", &self.origin) + .field("session_name", &self.session_name) + .field("information", &self.information) + .field("uri", &self.uri) + .field("emails", &self.emails) + .field("phones", &self.phones) + .field("connection", &self.connection) + .field("bandwidths", &self.bandwidths) + .field("times", &self.times) + .field("zones", &self.zones) + .field("key", &self.key) + .field("attributes", &self.attributes) + .field("medias", &self.medias) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPOrigin { + pub username: *mut c_char, + pub sess_id: *mut c_char, + pub sess_version: *mut c_char, + pub nettype: *mut c_char, + pub addrtype: *mut c_char, + pub addr: *mut c_char, +} + +impl ::std::fmt::Debug for GstSDPOrigin { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPOrigin @ {:?}", self as *const _)) + .field("username", &self.username) + .field("sess_id", &self.sess_id) + .field("sess_version", &self.sess_version) + .field("nettype", &self.nettype) + .field("addrtype", &self.addrtype) + .field("addr", &self.addr) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPTime { + pub start: *mut c_char, + pub stop: *mut c_char, + pub repeat: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstSDPTime { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPTime @ {:?}", self as *const _)) + .field("start", &self.start) + .field("stop", &self.stop) + .field("repeat", &self.repeat) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPZone { + pub time: *mut c_char, + pub typed_time: *mut c_char, +} + +impl ::std::fmt::Debug for GstSDPZone { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPZone @ {:?}", self as *const _)) + .field("time", &self.time) + .field("typed_time", &self.typed_time) + .finish() + } +} + +#[link(name = "gstsdp-1.0")] +extern "C" { + + //========================================================================= + // GstMIKEYMessage + //========================================================================= + pub fn gst_mikey_message_get_type() -> GType; + pub fn gst_mikey_message_new() -> *mut GstMIKEYMessage; + pub fn gst_mikey_message_new_from_bytes( + bytes: *mut glib::GBytes, + info: *mut GstMIKEYDecryptInfo, + error: *mut *mut glib::GError, + ) -> *mut GstMIKEYMessage; + pub fn gst_mikey_message_new_from_caps(caps: *mut gst::GstCaps) -> *mut GstMIKEYMessage; + pub fn gst_mikey_message_new_from_data( + data: gconstpointer, + size: size_t, + info: *mut GstMIKEYDecryptInfo, + error: *mut *mut glib::GError, + ) -> *mut GstMIKEYMessage; + pub fn gst_mikey_message_add_cs_srtp( + msg: *mut GstMIKEYMessage, + policy: u8, + ssrc: u32, + roc: u32, + ) -> gboolean; + pub fn gst_mikey_message_add_payload( + msg: *mut GstMIKEYMessage, + payload: *mut GstMIKEYPayload, + ) -> gboolean; + pub fn gst_mikey_message_add_pke( + msg: *mut GstMIKEYMessage, + C: GstMIKEYCacheType, + data_len: u16, + data: *const u8, + ) -> gboolean; + pub fn gst_mikey_message_add_rand( + msg: *mut GstMIKEYMessage, + len: u8, + rand: *const u8, + ) -> gboolean; + pub fn gst_mikey_message_add_rand_len(msg: *mut GstMIKEYMessage, len: u8) -> gboolean; + pub fn gst_mikey_message_add_t( + msg: *mut GstMIKEYMessage, + type_: GstMIKEYTSType, + ts_value: *const u8, + ) -> gboolean; + pub fn gst_mikey_message_add_t_now_ntp_utc(msg: *mut GstMIKEYMessage) -> gboolean; + pub fn gst_mikey_message_base64_encode(msg: *mut GstMIKEYMessage) -> *mut c_char; + pub fn gst_mikey_message_find_payload( + msg: *const GstMIKEYMessage, + type_: GstMIKEYPayloadType, + nth: c_uint, + ) -> *const GstMIKEYPayload; + pub fn gst_mikey_message_get_cs_srtp( + msg: *const GstMIKEYMessage, + idx: c_uint, + ) -> *const GstMIKEYMapSRTP; + pub fn gst_mikey_message_get_n_cs(msg: *const GstMIKEYMessage) -> c_uint; + pub fn gst_mikey_message_get_n_payloads(msg: *const GstMIKEYMessage) -> c_uint; + pub fn gst_mikey_message_get_payload( + msg: *const GstMIKEYMessage, + idx: c_uint, + ) -> *const GstMIKEYPayload; + pub fn gst_mikey_message_insert_cs_srtp( + msg: *mut GstMIKEYMessage, + idx: c_int, + map: *const GstMIKEYMapSRTP, + ) -> gboolean; + pub fn gst_mikey_message_insert_payload( + msg: *mut GstMIKEYMessage, + idx: c_uint, + payload: *mut GstMIKEYPayload, + ) -> gboolean; + pub fn gst_mikey_message_remove_cs_srtp(msg: *mut GstMIKEYMessage, idx: c_int) -> gboolean; + pub fn gst_mikey_message_remove_payload(msg: *mut GstMIKEYMessage, idx: c_uint) -> gboolean; + pub fn gst_mikey_message_replace_cs_srtp( + msg: *mut GstMIKEYMessage, + idx: c_int, + map: *const GstMIKEYMapSRTP, + ) -> gboolean; + pub fn gst_mikey_message_replace_payload( + msg: *mut GstMIKEYMessage, + idx: c_uint, + payload: *mut GstMIKEYPayload, + ) -> gboolean; + pub fn gst_mikey_message_set_info( + msg: *mut GstMIKEYMessage, + version: u8, + type_: GstMIKEYType, + V: gboolean, + prf_func: GstMIKEYPRFFunc, + CSB_id: u32, + map_type: GstMIKEYMapType, + ) -> gboolean; + pub fn gst_mikey_message_to_bytes( + msg: *mut GstMIKEYMessage, + info: *mut GstMIKEYEncryptInfo, + error: *mut *mut glib::GError, + ) -> *mut glib::GBytes; + #[cfg(any(feature = "v1_8_1", feature = "dox"))] + pub fn gst_mikey_message_to_caps( + msg: *const GstMIKEYMessage, + caps: *mut gst::GstCaps, + ) -> gboolean; + + //========================================================================= + // GstMIKEYPayload + //========================================================================= + pub fn gst_mikey_payload_get_type() -> GType; + pub fn gst_mikey_payload_new(type_: GstMIKEYPayloadType) -> *mut GstMIKEYPayload; + pub fn gst_mikey_payload_kemac_add_sub( + payload: *mut GstMIKEYPayload, + newpay: *mut GstMIKEYPayload, + ) -> gboolean; + pub fn gst_mikey_payload_kemac_get_n_sub(payload: *const GstMIKEYPayload) -> c_uint; + pub fn gst_mikey_payload_kemac_get_sub( + payload: *const GstMIKEYPayload, + idx: c_uint, + ) -> *const GstMIKEYPayload; + pub fn gst_mikey_payload_kemac_remove_sub( + payload: *mut GstMIKEYPayload, + idx: c_uint, + ) -> gboolean; + pub fn gst_mikey_payload_kemac_set( + payload: *mut GstMIKEYPayload, + enc_alg: GstMIKEYEncAlg, + mac_alg: GstMIKEYMacAlg, + ) -> gboolean; + pub fn gst_mikey_payload_key_data_set_interval( + payload: *mut GstMIKEYPayload, + vf_len: u8, + vf_data: *const u8, + vt_len: u8, + vt_data: *const u8, + ) -> gboolean; + pub fn gst_mikey_payload_key_data_set_key( + payload: *mut GstMIKEYPayload, + key_type: GstMIKEYKeyDataType, + key_len: u16, + key_data: *const u8, + ) -> gboolean; + pub fn gst_mikey_payload_key_data_set_salt( + payload: *mut GstMIKEYPayload, + salt_len: u16, + salt_data: *const u8, + ) -> gboolean; + pub fn gst_mikey_payload_key_data_set_spi( + payload: *mut GstMIKEYPayload, + spi_len: u8, + spi_data: *const u8, + ) -> gboolean; + pub fn gst_mikey_payload_pke_set( + payload: *mut GstMIKEYPayload, + C: GstMIKEYCacheType, + data_len: u16, + data: *const u8, + ) -> gboolean; + pub fn gst_mikey_payload_rand_set( + payload: *mut GstMIKEYPayload, + len: u8, + rand: *const u8, + ) -> gboolean; + pub fn gst_mikey_payload_sp_add_param( + payload: *mut GstMIKEYPayload, + type_: u8, + len: u8, + val: *const u8, + ) -> gboolean; + pub fn gst_mikey_payload_sp_get_n_params(payload: *const GstMIKEYPayload) -> c_uint; + pub fn gst_mikey_payload_sp_get_param( + payload: *const GstMIKEYPayload, + idx: c_uint, + ) -> *const GstMIKEYPayloadSPParam; + pub fn gst_mikey_payload_sp_remove_param( + payload: *mut GstMIKEYPayload, + idx: c_uint, + ) -> gboolean; + pub fn gst_mikey_payload_sp_set( + payload: *mut GstMIKEYPayload, + policy: c_uint, + proto: GstMIKEYSecProto, + ) -> gboolean; + pub fn gst_mikey_payload_t_set( + payload: *mut GstMIKEYPayload, + type_: GstMIKEYTSType, + ts_value: *const u8, + ) -> gboolean; + + //========================================================================= + // GstSDPAttribute + //========================================================================= + pub fn gst_sdp_attribute_clear(attr: *mut GstSDPAttribute) -> GstSDPResult; + pub fn gst_sdp_attribute_set( + attr: *mut GstSDPAttribute, + key: *const c_char, + value: *const c_char, + ) -> GstSDPResult; + + //========================================================================= + // GstSDPBandwidth + //========================================================================= + pub fn gst_sdp_bandwidth_clear(bw: *mut GstSDPBandwidth) -> GstSDPResult; + pub fn gst_sdp_bandwidth_set( + bw: *mut GstSDPBandwidth, + bwtype: *const c_char, + bandwidth: c_uint, + ) -> GstSDPResult; + + //========================================================================= + // GstSDPConnection + //========================================================================= + pub fn gst_sdp_connection_clear(conn: *mut GstSDPConnection) -> GstSDPResult; + pub fn gst_sdp_connection_set( + conn: *mut GstSDPConnection, + nettype: *const c_char, + addrtype: *const c_char, + address: *const c_char, + ttl: c_uint, + addr_number: c_uint, + ) -> GstSDPResult; + + //========================================================================= + // GstSDPMedia + //========================================================================= + pub fn gst_sdp_media_add_attribute( + media: *mut GstSDPMedia, + key: *const c_char, + value: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_media_add_bandwidth( + media: *mut GstSDPMedia, + bwtype: *const c_char, + bandwidth: c_uint, + ) -> GstSDPResult; + pub fn gst_sdp_media_add_connection( + media: *mut GstSDPMedia, + nettype: *const c_char, + addrtype: *const c_char, + address: *const c_char, + ttl: c_uint, + addr_number: c_uint, + ) -> GstSDPResult; + pub fn gst_sdp_media_add_format(media: *mut GstSDPMedia, format: *const c_char) + -> GstSDPResult; + pub fn gst_sdp_media_as_text(media: *const GstSDPMedia) -> *mut c_char; + pub fn gst_sdp_media_attributes_len(media: *const GstSDPMedia) -> c_uint; + pub fn gst_sdp_media_attributes_to_caps( + media: *const GstSDPMedia, + caps: *mut gst::GstCaps, + ) -> GstSDPResult; + pub fn gst_sdp_media_bandwidths_len(media: *const GstSDPMedia) -> c_uint; + pub fn gst_sdp_media_connections_len(media: *const GstSDPMedia) -> c_uint; + pub fn gst_sdp_media_copy( + media: *const GstSDPMedia, + copy: *mut *mut GstSDPMedia, + ) -> GstSDPResult; + pub fn gst_sdp_media_formats_len(media: *const GstSDPMedia) -> c_uint; + pub fn gst_sdp_media_free(media: *mut GstSDPMedia) -> GstSDPResult; + pub fn gst_sdp_media_get_attribute( + media: *const GstSDPMedia, + idx: c_uint, + ) -> *const GstSDPAttribute; + pub fn gst_sdp_media_get_attribute_val( + media: *const GstSDPMedia, + key: *const c_char, + ) -> *const c_char; + pub fn gst_sdp_media_get_attribute_val_n( + media: *const GstSDPMedia, + key: *const c_char, + nth: c_uint, + ) -> *const c_char; + pub fn gst_sdp_media_get_bandwidth( + media: *const GstSDPMedia, + idx: c_uint, + ) -> *const GstSDPBandwidth; + pub fn gst_sdp_media_get_caps_from_media( + media: *const GstSDPMedia, + pt: c_int, + ) -> *mut gst::GstCaps; + pub fn gst_sdp_media_get_connection( + media: *const GstSDPMedia, + idx: c_uint, + ) -> *const GstSDPConnection; + pub fn gst_sdp_media_get_format(media: *const GstSDPMedia, idx: c_uint) -> *const c_char; + pub fn gst_sdp_media_get_information(media: *const GstSDPMedia) -> *const c_char; + pub fn gst_sdp_media_get_key(media: *const GstSDPMedia) -> *const GstSDPKey; + pub fn gst_sdp_media_get_media(media: *const GstSDPMedia) -> *const c_char; + pub fn gst_sdp_media_get_num_ports(media: *const GstSDPMedia) -> c_uint; + pub fn gst_sdp_media_get_port(media: *const GstSDPMedia) -> c_uint; + pub fn gst_sdp_media_get_proto(media: *const GstSDPMedia) -> *const c_char; + pub fn gst_sdp_media_init(media: *mut GstSDPMedia) -> GstSDPResult; + pub fn gst_sdp_media_insert_attribute( + media: *mut GstSDPMedia, + idx: c_int, + attr: *mut GstSDPAttribute, + ) -> GstSDPResult; + pub fn gst_sdp_media_insert_bandwidth( + media: *mut GstSDPMedia, + idx: c_int, + bw: *mut GstSDPBandwidth, + ) -> GstSDPResult; + pub fn gst_sdp_media_insert_connection( + media: *mut GstSDPMedia, + idx: c_int, + conn: *mut GstSDPConnection, + ) -> GstSDPResult; + pub fn gst_sdp_media_insert_format( + media: *mut GstSDPMedia, + idx: c_int, + format: *const c_char, + ) -> GstSDPResult; + #[cfg(any(feature = "v1_8_1", feature = "dox"))] + pub fn gst_sdp_media_parse_keymgmt( + media: *const GstSDPMedia, + mikey: *mut *mut GstMIKEYMessage, + ) -> GstSDPResult; + pub fn gst_sdp_media_remove_attribute(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult; + pub fn gst_sdp_media_remove_bandwidth(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult; + pub fn gst_sdp_media_remove_connection(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult; + pub fn gst_sdp_media_remove_format(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult; + pub fn gst_sdp_media_replace_attribute( + media: *mut GstSDPMedia, + idx: c_uint, + attr: *mut GstSDPAttribute, + ) -> GstSDPResult; + pub fn gst_sdp_media_replace_bandwidth( + media: *mut GstSDPMedia, + idx: c_uint, + bw: *mut GstSDPBandwidth, + ) -> GstSDPResult; + pub fn gst_sdp_media_replace_connection( + media: *mut GstSDPMedia, + idx: c_uint, + conn: *mut GstSDPConnection, + ) -> GstSDPResult; + pub fn gst_sdp_media_replace_format( + media: *mut GstSDPMedia, + idx: c_uint, + format: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_media_set_information( + media: *mut GstSDPMedia, + information: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_media_set_key( + media: *mut GstSDPMedia, + type_: *const c_char, + data: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_media_set_media(media: *mut GstSDPMedia, med: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_set_port_info( + media: *mut GstSDPMedia, + port: c_uint, + num_ports: c_uint, + ) -> GstSDPResult; + pub fn gst_sdp_media_set_proto(media: *mut GstSDPMedia, proto: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_uninit(media: *mut GstSDPMedia) -> GstSDPResult; + pub fn gst_sdp_media_new(media: *mut *mut GstSDPMedia) -> GstSDPResult; + pub fn gst_sdp_media_set_media_from_caps( + caps: *const gst::GstCaps, + media: *mut GstSDPMedia, + ) -> GstSDPResult; + + //========================================================================= + // GstSDPMessage + //========================================================================= + pub fn gst_sdp_message_get_type() -> GType; + pub fn gst_sdp_message_add_attribute( + msg: *mut GstSDPMessage, + key: *const c_char, + value: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_add_bandwidth( + msg: *mut GstSDPMessage, + bwtype: *const c_char, + bandwidth: c_uint, + ) -> GstSDPResult; + pub fn gst_sdp_message_add_email(msg: *mut GstSDPMessage, email: *const c_char) + -> GstSDPResult; + pub fn gst_sdp_message_add_media( + msg: *mut GstSDPMessage, + media: *mut GstSDPMedia, + ) -> GstSDPResult; + pub fn gst_sdp_message_add_phone(msg: *mut GstSDPMessage, phone: *const c_char) + -> GstSDPResult; + pub fn gst_sdp_message_add_time( + msg: *mut GstSDPMessage, + start: *const c_char, + stop: *const c_char, + repeat: *mut *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_add_zone( + msg: *mut GstSDPMessage, + adj_time: *const c_char, + typed_time: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_as_text(msg: *const GstSDPMessage) -> *mut c_char; + pub fn gst_sdp_message_attributes_len(msg: *const GstSDPMessage) -> c_uint; + pub fn gst_sdp_message_attributes_to_caps( + msg: *const GstSDPMessage, + caps: *mut gst::GstCaps, + ) -> GstSDPResult; + pub fn gst_sdp_message_bandwidths_len(msg: *const GstSDPMessage) -> c_uint; + pub fn gst_sdp_message_copy( + msg: *const GstSDPMessage, + copy: *mut *mut GstSDPMessage, + ) -> GstSDPResult; + pub fn gst_sdp_message_dump(msg: *const GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_emails_len(msg: *const GstSDPMessage) -> c_uint; + pub fn gst_sdp_message_free(msg: *mut GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_get_attribute( + msg: *const GstSDPMessage, + idx: c_uint, + ) -> *const GstSDPAttribute; + pub fn gst_sdp_message_get_attribute_val( + msg: *const GstSDPMessage, + key: *const c_char, + ) -> *const c_char; + pub fn gst_sdp_message_get_attribute_val_n( + msg: *const GstSDPMessage, + key: *const c_char, + nth: c_uint, + ) -> *const c_char; + pub fn gst_sdp_message_get_bandwidth( + msg: *const GstSDPMessage, + idx: c_uint, + ) -> *const GstSDPBandwidth; + pub fn gst_sdp_message_get_connection(msg: *const GstSDPMessage) -> *const GstSDPConnection; + pub fn gst_sdp_message_get_email(msg: *const GstSDPMessage, idx: c_uint) -> *const c_char; + pub fn gst_sdp_message_get_information(msg: *const GstSDPMessage) -> *const c_char; + pub fn gst_sdp_message_get_key(msg: *const GstSDPMessage) -> *const GstSDPKey; + pub fn gst_sdp_message_get_media(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPMedia; + pub fn gst_sdp_message_get_origin(msg: *const GstSDPMessage) -> *const GstSDPOrigin; + pub fn gst_sdp_message_get_phone(msg: *const GstSDPMessage, idx: c_uint) -> *const c_char; + pub fn gst_sdp_message_get_session_name(msg: *const GstSDPMessage) -> *const c_char; + pub fn gst_sdp_message_get_time(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPTime; + pub fn gst_sdp_message_get_uri(msg: *const GstSDPMessage) -> *const c_char; + pub fn gst_sdp_message_get_version(msg: *const GstSDPMessage) -> *const c_char; + pub fn gst_sdp_message_get_zone(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPZone; + pub fn gst_sdp_message_init(msg: *mut GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_insert_attribute( + msg: *mut GstSDPMessage, + idx: c_int, + attr: *mut GstSDPAttribute, + ) -> GstSDPResult; + pub fn gst_sdp_message_insert_bandwidth( + msg: *mut GstSDPMessage, + idx: c_int, + bw: *mut GstSDPBandwidth, + ) -> GstSDPResult; + pub fn gst_sdp_message_insert_email( + msg: *mut GstSDPMessage, + idx: c_int, + email: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_insert_phone( + msg: *mut GstSDPMessage, + idx: c_int, + phone: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_insert_time( + msg: *mut GstSDPMessage, + idx: c_int, + t: *mut GstSDPTime, + ) -> GstSDPResult; + pub fn gst_sdp_message_insert_zone( + msg: *mut GstSDPMessage, + idx: c_int, + zone: *mut GstSDPZone, + ) -> GstSDPResult; + pub fn gst_sdp_message_medias_len(msg: *const GstSDPMessage) -> c_uint; + #[cfg(any(feature = "v1_8_1", feature = "dox"))] + pub fn gst_sdp_message_parse_keymgmt( + msg: *const GstSDPMessage, + mikey: *mut *mut GstMIKEYMessage, + ) -> GstSDPResult; + pub fn gst_sdp_message_phones_len(msg: *const GstSDPMessage) -> c_uint; + pub fn gst_sdp_message_remove_attribute(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + pub fn gst_sdp_message_remove_bandwidth(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + pub fn gst_sdp_message_remove_email(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + pub fn gst_sdp_message_remove_phone(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + pub fn gst_sdp_message_remove_time(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + pub fn gst_sdp_message_remove_zone(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + pub fn gst_sdp_message_replace_attribute( + msg: *mut GstSDPMessage, + idx: c_uint, + attr: *mut GstSDPAttribute, + ) -> GstSDPResult; + pub fn gst_sdp_message_replace_bandwidth( + msg: *mut GstSDPMessage, + idx: c_uint, + bw: *mut GstSDPBandwidth, + ) -> GstSDPResult; + pub fn gst_sdp_message_replace_email( + msg: *mut GstSDPMessage, + idx: c_uint, + email: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_replace_phone( + msg: *mut GstSDPMessage, + idx: c_uint, + phone: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_replace_time( + msg: *mut GstSDPMessage, + idx: c_uint, + t: *mut GstSDPTime, + ) -> GstSDPResult; + pub fn gst_sdp_message_replace_zone( + msg: *mut GstSDPMessage, + idx: c_uint, + zone: *mut GstSDPZone, + ) -> GstSDPResult; + pub fn gst_sdp_message_set_connection( + msg: *mut GstSDPMessage, + nettype: *const c_char, + addrtype: *const c_char, + address: *const c_char, + ttl: c_uint, + addr_number: c_uint, + ) -> GstSDPResult; + pub fn gst_sdp_message_set_information( + msg: *mut GstSDPMessage, + information: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_set_key( + msg: *mut GstSDPMessage, + type_: *const c_char, + data: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_set_origin( + msg: *mut GstSDPMessage, + username: *const c_char, + sess_id: *const c_char, + sess_version: *const c_char, + nettype: *const c_char, + addrtype: *const c_char, + addr: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_set_session_name( + msg: *mut GstSDPMessage, + session_name: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_set_uri(msg: *mut GstSDPMessage, uri: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_set_version( + msg: *mut GstSDPMessage, + version: *const c_char, + ) -> GstSDPResult; + pub fn gst_sdp_message_times_len(msg: *const GstSDPMessage) -> c_uint; + pub fn gst_sdp_message_uninit(msg: *mut GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_zones_len(msg: *const GstSDPMessage) -> c_uint; + pub fn gst_sdp_message_as_uri(scheme: *const c_char, msg: *const GstSDPMessage) -> *mut c_char; + pub fn gst_sdp_message_new(msg: *mut *mut GstSDPMessage) -> GstSDPResult; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_sdp_message_new_from_text( + text: *const c_char, + msg: *mut *mut GstSDPMessage, + ) -> GstSDPResult; + pub fn gst_sdp_message_parse_buffer( + data: *const u8, + size: c_uint, + msg: *mut GstSDPMessage, + ) -> GstSDPResult; + pub fn gst_sdp_message_parse_uri(uri: *const c_char, msg: *mut GstSDPMessage) -> GstSDPResult; + + //========================================================================= + // GstSDPTime + //========================================================================= + pub fn gst_sdp_time_clear(t: *mut GstSDPTime) -> GstSDPResult; + pub fn gst_sdp_time_set( + t: *mut GstSDPTime, + start: *const c_char, + stop: *const c_char, + repeat: *mut *const c_char, + ) -> GstSDPResult; + + //========================================================================= + // GstSDPZone + //========================================================================= + pub fn gst_sdp_zone_clear(zone: *mut GstSDPZone) -> GstSDPResult; + pub fn gst_sdp_zone_set( + zone: *mut GstSDPZone, + adj_time: *const c_char, + typed_time: *const c_char, + ) -> GstSDPResult; + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_sdp_address_is_multicast( + nettype: *const c_char, + addrtype: *const c_char, + addr: *const c_char, + ) -> gboolean; + pub fn gst_sdp_make_keymgmt(uri: *const c_char, base64: *const c_char) -> *mut c_char; + +} diff --git a/sys/gstreamer-sdp-sys/tests/abi.rs b/sys/gstreamer-sdp-sys/tests/abi.rs new file mode 100644 index 000000000..c52c73b23 --- /dev/null +++ b/sys/gstreamer-sdp-sys/tests/abi.rs @@ -0,0 +1,548 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_sdp_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_sdp_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-sdp-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstMIKEYCacheType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYEncAlg", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYKVType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYKeyDataType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYMacAlg", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYMapSRTP", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYMapType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYMessage", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPRFFunc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayload", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadKEMAC", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadKeyData", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadPKE", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadRAND", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadSP", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadSPParam", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadT", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYPayloadType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYSecProto", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYSecSRTP", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYTSType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMIKEYType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPAttribute", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPBandwidth", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPConnection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPKey", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPMedia", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPMessage", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPOrigin", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPTime", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSDPZone", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(gint) GST_MIKEY_CACHE_ALWAYS", "1"), + ("(gint) GST_MIKEY_CACHE_FOR_CSB", "2"), + ("(gint) GST_MIKEY_CACHE_NONE", "0"), + ("(gint) GST_MIKEY_ENC_AES_CM_128", "1"), + ("(gint) GST_MIKEY_ENC_AES_GCM_128", "6"), + ("(gint) GST_MIKEY_ENC_AES_KW_128", "2"), + ("(gint) GST_MIKEY_ENC_NULL", "0"), + ("(gint) GST_MIKEY_KD_TEK", "2"), + ("(gint) GST_MIKEY_KD_TGK", "0"), + ("(gint) GST_MIKEY_KV_INTERVAL", "2"), + ("(gint) GST_MIKEY_KV_NULL", "0"), + ("(gint) GST_MIKEY_KV_SPI", "1"), + ("(gint) GST_MIKEY_MAC_HMAC_SHA_1_160", "1"), + ("(gint) GST_MIKEY_MAC_NULL", "0"), + ("(gint) GST_MIKEY_MAP_TYPE_SRTP", "0"), + ("(gint) GST_MIKEY_PRF_MIKEY_1", "0"), + ("(gint) GST_MIKEY_PT_CERT", "7"), + ("(gint) GST_MIKEY_PT_CHASH", "8"), + ("(gint) GST_MIKEY_PT_DH", "3"), + ("(gint) GST_MIKEY_PT_ERR", "12"), + ("(gint) GST_MIKEY_PT_GEN_EXT", "21"), + ("(gint) GST_MIKEY_PT_ID", "6"), + ("(gint) GST_MIKEY_PT_KEMAC", "1"), + ("(gint) GST_MIKEY_PT_KEY_DATA", "20"), + ("(gint) GST_MIKEY_PT_LAST", "0"), + ("(gint) GST_MIKEY_PT_PKE", "2"), + ("(gint) GST_MIKEY_PT_RAND", "11"), + ("(gint) GST_MIKEY_PT_SIGN", "4"), + ("(gint) GST_MIKEY_PT_SP", "10"), + ("(gint) GST_MIKEY_PT_T", "5"), + ("(gint) GST_MIKEY_PT_V", "9"), + ("(gint) GST_MIKEY_SEC_PROTO_SRTP", "0"), + ("(gint) GST_MIKEY_SP_SRTP_AEAD_AUTH_TAG_LEN", "20"), + ("(gint) GST_MIKEY_SP_SRTP_AUTH_ALG", "2"), + ("(gint) GST_MIKEY_SP_SRTP_AUTH_KEY_LEN", "3"), + ("(gint) GST_MIKEY_SP_SRTP_AUTH_TAG_LEN", "11"), + ("(gint) GST_MIKEY_SP_SRTP_ENC_ALG", "0"), + ("(gint) GST_MIKEY_SP_SRTP_ENC_KEY_LEN", "1"), + ("(gint) GST_MIKEY_SP_SRTP_FEC_ORDER", "9"), + ("(gint) GST_MIKEY_SP_SRTP_KEY_DERIV_RATE", "6"), + ("(gint) GST_MIKEY_SP_SRTP_PRF", "5"), + ("(gint) GST_MIKEY_SP_SRTP_SALT_KEY_LEN", "4"), + ("(gint) GST_MIKEY_SP_SRTP_SRTCP_ENC", "8"), + ("(gint) GST_MIKEY_SP_SRTP_SRTP_AUTH", "10"), + ("(gint) GST_MIKEY_SP_SRTP_SRTP_ENC", "7"), + ("(gint) GST_MIKEY_SP_SRTP_SRTP_PREFIX_LEN", "12"), + ("(gint) GST_MIKEY_TS_TYPE_COUNTER", "2"), + ("(gint) GST_MIKEY_TS_TYPE_NTP", "1"), + ("(gint) GST_MIKEY_TS_TYPE_NTP_UTC", "0"), + ("(gint) GST_MIKEY_TYPE_DH_INIT", "4"), + ("(gint) GST_MIKEY_TYPE_DH_RESP", "5"), + ("(gint) GST_MIKEY_TYPE_ERROR", "6"), + ("(gint) GST_MIKEY_TYPE_INVALID", "-1"), + ("(gint) GST_MIKEY_TYPE_PK_INIT", "2"), + ("(gint) GST_MIKEY_TYPE_PK_VERIFY", "3"), + ("(gint) GST_MIKEY_TYPE_PSK_INIT", "0"), + ("(gint) GST_MIKEY_TYPE_PSK_VERIFY", "1"), + ("GST_MIKEY_VERSION", "1"), + ("GST_SDP_BWTYPE_AS", "AS"), + ("GST_SDP_BWTYPE_CT", "CT"), + ("GST_SDP_BWTYPE_EXT_PREFIX", "X-"), + ("GST_SDP_BWTYPE_RR", "RR"), + ("GST_SDP_BWTYPE_RS", "RS"), + ("GST_SDP_BWTYPE_TIAS", "TIAS"), + ("(gint) GST_SDP_EINVAL", "-1"), + ("(gint) GST_SDP_OK", "0"), +]; diff --git a/sys/gstreamer-sdp-sys/tests/constant.c b/sys/gstreamer-sdp-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-sdp-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-sdp-sys/tests/layout.c b/sys/gstreamer-sdp-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-sdp-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-sdp-sys/tests/manual.h b/sys/gstreamer-sdp-sys/tests/manual.h new file mode 100644 index 000000000..fc92e3dbe --- /dev/null +++ b/sys/gstreamer-sdp-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-sys/CHANGELOG.md b/sys/gstreamer-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-sys/Cargo.lock b/sys/gstreamer-sys/Cargo.lock new file mode 100644 index 000000000..1320f03eb --- /dev/null +++ b/sys/gstreamer-sys/Cargo.lock @@ -0,0 +1,59 @@ +[root] +name = "gstreamer-sys" +version = "0.1.0" +dependencies = [ + "bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "gobject-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bitflags" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bitflags" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "glib-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gobject-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glib-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "libc" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pkg-config" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[metadata] +"checksum bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dead7461c1127cf637931a1e50934eb6eee8bff2f74433ac7909e9afcee04a3" +"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4" +"checksum glib-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "77a135c2e3849ac2833960025e36c6d0176257d56fa17905dee9d93a1ccd9fee" +"checksum gobject-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c4dba1fb528396780577574ab2fe0e1a364e1f9d8f444dec1e4f319728577a24" +"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135" +"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" diff --git a/sys/gstreamer-sys/Cargo.toml b/sys/gstreamer-sys/Cargo.toml new file mode 100644 index 000000000..8835a497e --- /dev/null +++ b/sys/gstreamer-sys/Cargo.toml @@ -0,0 +1,60 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_0_10 = [] +v1_2 = [] +v1_2_3 = ["v1_2"] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12_1"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] +v1_12_1 = ["v1_12"] + +[lib] +name = "gstreamer_sys" + +[package] +authors = ["Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstreamer-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstreamer-1.0" +name = "gstreamer-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_1_0] +name = "gstreamer-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" +v1_12_1 = "1.12.1" diff --git a/sys/gstreamer-sys/LICENSE b/sys/gstreamer-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-sys/README.md b/sys/gstreamer-sys/README.md new file mode 100644 index 000000000..8932e987a --- /dev/null +++ b/sys/gstreamer-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sys.svg)](https://crates.io/crates/gstreamer-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-sys/build.rs b/sys/gstreamer-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-sys/src/lib.rs b/sys/gstreamer-sys/src/lib.rs new file mode 100644 index 000000000..7ecaef703 --- /dev/null +++ b/sys/gstreamer-sys/src/lib.rs @@ -0,0 +1,8804 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Aliases +pub type GstClockID = gpointer; +pub type GstClockTime = u64; +pub type GstClockTimeDiff = i64; +pub type GstElementFactoryListType = u64; + +// Enums +pub type GstBufferingMode = c_int; +pub const GST_BUFFERING_STREAM: GstBufferingMode = 0; +pub const GST_BUFFERING_DOWNLOAD: GstBufferingMode = 1; +pub const GST_BUFFERING_TIMESHIFT: GstBufferingMode = 2; +pub const GST_BUFFERING_LIVE: GstBufferingMode = 3; + +pub type GstBusSyncReply = c_int; +pub const GST_BUS_DROP: GstBusSyncReply = 0; +pub const GST_BUS_PASS: GstBusSyncReply = 1; +pub const GST_BUS_ASYNC: GstBusSyncReply = 2; + +pub type GstCapsIntersectMode = c_int; +pub const GST_CAPS_INTERSECT_ZIG_ZAG: GstCapsIntersectMode = 0; +pub const GST_CAPS_INTERSECT_FIRST: GstCapsIntersectMode = 1; + +pub type GstClockEntryType = c_int; +pub const GST_CLOCK_ENTRY_SINGLE: GstClockEntryType = 0; +pub const GST_CLOCK_ENTRY_PERIODIC: GstClockEntryType = 1; + +pub type GstClockReturn = c_int; +pub const GST_CLOCK_OK: GstClockReturn = 0; +pub const GST_CLOCK_EARLY: GstClockReturn = 1; +pub const GST_CLOCK_UNSCHEDULED: GstClockReturn = 2; +pub const GST_CLOCK_BUSY: GstClockReturn = 3; +pub const GST_CLOCK_BADTIME: GstClockReturn = 4; +pub const GST_CLOCK_ERROR: GstClockReturn = 5; +pub const GST_CLOCK_UNSUPPORTED: GstClockReturn = 6; +pub const GST_CLOCK_DONE: GstClockReturn = 7; + +pub type GstClockType = c_int; +pub const GST_CLOCK_TYPE_REALTIME: GstClockType = 0; +pub const GST_CLOCK_TYPE_MONOTONIC: GstClockType = 1; +pub const GST_CLOCK_TYPE_OTHER: GstClockType = 2; +pub const GST_CLOCK_TYPE_TAI: GstClockType = 3; + +pub type GstCoreError = c_int; +pub const GST_CORE_ERROR_FAILED: GstCoreError = 1; +pub const GST_CORE_ERROR_TOO_LAZY: GstCoreError = 2; +pub const GST_CORE_ERROR_NOT_IMPLEMENTED: GstCoreError = 3; +pub const GST_CORE_ERROR_STATE_CHANGE: GstCoreError = 4; +pub const GST_CORE_ERROR_PAD: GstCoreError = 5; +pub const GST_CORE_ERROR_THREAD: GstCoreError = 6; +pub const GST_CORE_ERROR_NEGOTIATION: GstCoreError = 7; +pub const GST_CORE_ERROR_EVENT: GstCoreError = 8; +pub const GST_CORE_ERROR_SEEK: GstCoreError = 9; +pub const GST_CORE_ERROR_CAPS: GstCoreError = 10; +pub const GST_CORE_ERROR_TAG: GstCoreError = 11; +pub const GST_CORE_ERROR_MISSING_PLUGIN: GstCoreError = 12; +pub const GST_CORE_ERROR_CLOCK: GstCoreError = 13; +pub const GST_CORE_ERROR_DISABLED: GstCoreError = 14; +pub const GST_CORE_ERROR_NUM_ERRORS: GstCoreError = 15; + +pub type GstDebugColorMode = c_int; +pub const GST_DEBUG_COLOR_MODE_OFF: GstDebugColorMode = 0; +pub const GST_DEBUG_COLOR_MODE_ON: GstDebugColorMode = 1; +pub const GST_DEBUG_COLOR_MODE_UNIX: GstDebugColorMode = 2; + +pub type GstDebugLevel = c_int; +pub const GST_LEVEL_NONE: GstDebugLevel = 0; +pub const GST_LEVEL_ERROR: GstDebugLevel = 1; +pub const GST_LEVEL_WARNING: GstDebugLevel = 2; +pub const GST_LEVEL_FIXME: GstDebugLevel = 3; +pub const GST_LEVEL_INFO: GstDebugLevel = 4; +pub const GST_LEVEL_DEBUG: GstDebugLevel = 5; +pub const GST_LEVEL_LOG: GstDebugLevel = 6; +pub const GST_LEVEL_TRACE: GstDebugLevel = 7; +pub const GST_LEVEL_MEMDUMP: GstDebugLevel = 9; +pub const GST_LEVEL_COUNT: GstDebugLevel = 10; + +pub type GstEventType = c_int; +pub const GST_EVENT_UNKNOWN: GstEventType = 0; +pub const GST_EVENT_FLUSH_START: GstEventType = 2563; +pub const GST_EVENT_FLUSH_STOP: GstEventType = 5127; +pub const GST_EVENT_STREAM_START: GstEventType = 10254; +pub const GST_EVENT_CAPS: GstEventType = 12814; +pub const GST_EVENT_SEGMENT: GstEventType = 17934; +pub const GST_EVENT_STREAM_COLLECTION: GstEventType = 19230; +pub const GST_EVENT_TAG: GstEventType = 20510; +pub const GST_EVENT_BUFFERSIZE: GstEventType = 23054; +pub const GST_EVENT_SINK_MESSAGE: GstEventType = 25630; +pub const GST_EVENT_STREAM_GROUP_DONE: GstEventType = 26894; +pub const GST_EVENT_EOS: GstEventType = 28174; +pub const GST_EVENT_TOC: GstEventType = 30750; +pub const GST_EVENT_PROTECTION: GstEventType = 33310; +pub const GST_EVENT_SEGMENT_DONE: GstEventType = 38406; +pub const GST_EVENT_GAP: GstEventType = 40966; +pub const GST_EVENT_INSTANT_RATE_CHANGE: GstEventType = 46090; +pub const GST_EVENT_QOS: GstEventType = 48641; +pub const GST_EVENT_SEEK: GstEventType = 51201; +pub const GST_EVENT_NAVIGATION: GstEventType = 53761; +pub const GST_EVENT_LATENCY: GstEventType = 56321; +pub const GST_EVENT_STEP: GstEventType = 58881; +pub const GST_EVENT_RECONFIGURE: GstEventType = 61441; +pub const GST_EVENT_TOC_SELECT: GstEventType = 64001; +pub const GST_EVENT_SELECT_STREAMS: GstEventType = 66561; +pub const GST_EVENT_INSTANT_RATE_SYNC_TIME: GstEventType = 66817; +pub const GST_EVENT_CUSTOM_UPSTREAM: GstEventType = 69121; +pub const GST_EVENT_CUSTOM_DOWNSTREAM: GstEventType = 71686; +pub const GST_EVENT_CUSTOM_DOWNSTREAM_OOB: GstEventType = 74242; +pub const GST_EVENT_CUSTOM_DOWNSTREAM_STICKY: GstEventType = 76830; +pub const GST_EVENT_CUSTOM_BOTH: GstEventType = 79367; +pub const GST_EVENT_CUSTOM_BOTH_OOB: GstEventType = 81923; + +pub type GstFlowReturn = c_int; +pub const GST_FLOW_CUSTOM_SUCCESS_2: GstFlowReturn = 102; +pub const GST_FLOW_CUSTOM_SUCCESS_1: GstFlowReturn = 101; +pub const GST_FLOW_CUSTOM_SUCCESS: GstFlowReturn = 100; +pub const GST_FLOW_OK: GstFlowReturn = 0; +pub const GST_FLOW_NOT_LINKED: GstFlowReturn = -1; +pub const GST_FLOW_FLUSHING: GstFlowReturn = -2; +pub const GST_FLOW_EOS: GstFlowReturn = -3; +pub const GST_FLOW_NOT_NEGOTIATED: GstFlowReturn = -4; +pub const GST_FLOW_ERROR: GstFlowReturn = -5; +pub const GST_FLOW_NOT_SUPPORTED: GstFlowReturn = -6; +pub const GST_FLOW_CUSTOM_ERROR: GstFlowReturn = -100; +pub const GST_FLOW_CUSTOM_ERROR_1: GstFlowReturn = -101; +pub const GST_FLOW_CUSTOM_ERROR_2: GstFlowReturn = -102; + +pub type GstFormat = c_int; +pub const GST_FORMAT_UNDEFINED: GstFormat = 0; +pub const GST_FORMAT_DEFAULT: GstFormat = 1; +pub const GST_FORMAT_BYTES: GstFormat = 2; +pub const GST_FORMAT_TIME: GstFormat = 3; +pub const GST_FORMAT_BUFFERS: GstFormat = 4; +pub const GST_FORMAT_PERCENT: GstFormat = 5; + +pub type GstIteratorItem = c_int; +pub const GST_ITERATOR_ITEM_SKIP: GstIteratorItem = 0; +pub const GST_ITERATOR_ITEM_PASS: GstIteratorItem = 1; +pub const GST_ITERATOR_ITEM_END: GstIteratorItem = 2; + +pub type GstIteratorResult = c_int; +pub const GST_ITERATOR_DONE: GstIteratorResult = 0; +pub const GST_ITERATOR_OK: GstIteratorResult = 1; +pub const GST_ITERATOR_RESYNC: GstIteratorResult = 2; +pub const GST_ITERATOR_ERROR: GstIteratorResult = 3; + +pub type GstLibraryError = c_int; +pub const GST_LIBRARY_ERROR_FAILED: GstLibraryError = 1; +pub const GST_LIBRARY_ERROR_TOO_LAZY: GstLibraryError = 2; +pub const GST_LIBRARY_ERROR_INIT: GstLibraryError = 3; +pub const GST_LIBRARY_ERROR_SHUTDOWN: GstLibraryError = 4; +pub const GST_LIBRARY_ERROR_SETTINGS: GstLibraryError = 5; +pub const GST_LIBRARY_ERROR_ENCODE: GstLibraryError = 6; +pub const GST_LIBRARY_ERROR_NUM_ERRORS: GstLibraryError = 7; + +pub type GstPadDirection = c_int; +pub const GST_PAD_UNKNOWN: GstPadDirection = 0; +pub const GST_PAD_SRC: GstPadDirection = 1; +pub const GST_PAD_SINK: GstPadDirection = 2; + +pub type GstPadLinkReturn = c_int; +pub const GST_PAD_LINK_OK: GstPadLinkReturn = 0; +pub const GST_PAD_LINK_WRONG_HIERARCHY: GstPadLinkReturn = -1; +pub const GST_PAD_LINK_WAS_LINKED: GstPadLinkReturn = -2; +pub const GST_PAD_LINK_WRONG_DIRECTION: GstPadLinkReturn = -3; +pub const GST_PAD_LINK_NOFORMAT: GstPadLinkReturn = -4; +pub const GST_PAD_LINK_NOSCHED: GstPadLinkReturn = -5; +pub const GST_PAD_LINK_REFUSED: GstPadLinkReturn = -6; + +pub type GstPadMode = c_int; +pub const GST_PAD_MODE_NONE: GstPadMode = 0; +pub const GST_PAD_MODE_PUSH: GstPadMode = 1; +pub const GST_PAD_MODE_PULL: GstPadMode = 2; + +pub type GstPadPresence = c_int; +pub const GST_PAD_ALWAYS: GstPadPresence = 0; +pub const GST_PAD_SOMETIMES: GstPadPresence = 1; +pub const GST_PAD_REQUEST: GstPadPresence = 2; + +pub type GstPadProbeReturn = c_int; +pub const GST_PAD_PROBE_DROP: GstPadProbeReturn = 0; +pub const GST_PAD_PROBE_OK: GstPadProbeReturn = 1; +pub const GST_PAD_PROBE_REMOVE: GstPadProbeReturn = 2; +pub const GST_PAD_PROBE_PASS: GstPadProbeReturn = 3; +pub const GST_PAD_PROBE_HANDLED: GstPadProbeReturn = 4; + +pub type GstParseError = c_int; +pub const GST_PARSE_ERROR_SYNTAX: GstParseError = 0; +pub const GST_PARSE_ERROR_NO_SUCH_ELEMENT: GstParseError = 1; +pub const GST_PARSE_ERROR_NO_SUCH_PROPERTY: GstParseError = 2; +pub const GST_PARSE_ERROR_LINK: GstParseError = 3; +pub const GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY: GstParseError = 4; +pub const GST_PARSE_ERROR_EMPTY_BIN: GstParseError = 5; +pub const GST_PARSE_ERROR_EMPTY: GstParseError = 6; +pub const GST_PARSE_ERROR_DELAYED_LINK: GstParseError = 7; + +pub type GstPluginError = c_int; +pub const GST_PLUGIN_ERROR_MODULE: GstPluginError = 0; +pub const GST_PLUGIN_ERROR_DEPENDENCIES: GstPluginError = 1; +pub const GST_PLUGIN_ERROR_NAME_MISMATCH: GstPluginError = 2; + +pub type GstProgressType = c_int; +pub const GST_PROGRESS_TYPE_START: GstProgressType = 0; +pub const GST_PROGRESS_TYPE_CONTINUE: GstProgressType = 1; +pub const GST_PROGRESS_TYPE_COMPLETE: GstProgressType = 2; +pub const GST_PROGRESS_TYPE_CANCELED: GstProgressType = 3; +pub const GST_PROGRESS_TYPE_ERROR: GstProgressType = 4; + +pub type GstPromiseResult = c_int; +pub const GST_PROMISE_RESULT_PENDING: GstPromiseResult = 0; +pub const GST_PROMISE_RESULT_INTERRUPTED: GstPromiseResult = 1; +pub const GST_PROMISE_RESULT_REPLIED: GstPromiseResult = 2; +pub const GST_PROMISE_RESULT_EXPIRED: GstPromiseResult = 3; + +pub type GstQOSType = c_int; +pub const GST_QOS_TYPE_OVERFLOW: GstQOSType = 0; +pub const GST_QOS_TYPE_UNDERFLOW: GstQOSType = 1; +pub const GST_QOS_TYPE_THROTTLE: GstQOSType = 2; + +pub type GstQueryType = c_int; +pub const GST_QUERY_UNKNOWN: GstQueryType = 0; +pub const GST_QUERY_POSITION: GstQueryType = 2563; +pub const GST_QUERY_DURATION: GstQueryType = 5123; +pub const GST_QUERY_LATENCY: GstQueryType = 7683; +pub const GST_QUERY_JITTER: GstQueryType = 10243; +pub const GST_QUERY_RATE: GstQueryType = 12803; +pub const GST_QUERY_SEEKING: GstQueryType = 15363; +pub const GST_QUERY_SEGMENT: GstQueryType = 17923; +pub const GST_QUERY_CONVERT: GstQueryType = 20483; +pub const GST_QUERY_FORMATS: GstQueryType = 23043; +pub const GST_QUERY_BUFFERING: GstQueryType = 28163; +pub const GST_QUERY_CUSTOM: GstQueryType = 30723; +pub const GST_QUERY_URI: GstQueryType = 33283; +pub const GST_QUERY_ALLOCATION: GstQueryType = 35846; +pub const GST_QUERY_SCHEDULING: GstQueryType = 38401; +pub const GST_QUERY_ACCEPT_CAPS: GstQueryType = 40963; +pub const GST_QUERY_CAPS: GstQueryType = 43523; +pub const GST_QUERY_DRAIN: GstQueryType = 46086; +pub const GST_QUERY_CONTEXT: GstQueryType = 48643; +pub const GST_QUERY_BITRATE: GstQueryType = 51202; + +pub type GstRank = c_int; +pub const GST_RANK_NONE: GstRank = 0; +pub const GST_RANK_MARGINAL: GstRank = 64; +pub const GST_RANK_SECONDARY: GstRank = 128; +pub const GST_RANK_PRIMARY: GstRank = 256; + +pub type GstResourceError = c_int; +pub const GST_RESOURCE_ERROR_FAILED: GstResourceError = 1; +pub const GST_RESOURCE_ERROR_TOO_LAZY: GstResourceError = 2; +pub const GST_RESOURCE_ERROR_NOT_FOUND: GstResourceError = 3; +pub const GST_RESOURCE_ERROR_BUSY: GstResourceError = 4; +pub const GST_RESOURCE_ERROR_OPEN_READ: GstResourceError = 5; +pub const GST_RESOURCE_ERROR_OPEN_WRITE: GstResourceError = 6; +pub const GST_RESOURCE_ERROR_OPEN_READ_WRITE: GstResourceError = 7; +pub const GST_RESOURCE_ERROR_CLOSE: GstResourceError = 8; +pub const GST_RESOURCE_ERROR_READ: GstResourceError = 9; +pub const GST_RESOURCE_ERROR_WRITE: GstResourceError = 10; +pub const GST_RESOURCE_ERROR_SEEK: GstResourceError = 11; +pub const GST_RESOURCE_ERROR_SYNC: GstResourceError = 12; +pub const GST_RESOURCE_ERROR_SETTINGS: GstResourceError = 13; +pub const GST_RESOURCE_ERROR_NO_SPACE_LEFT: GstResourceError = 14; +pub const GST_RESOURCE_ERROR_NOT_AUTHORIZED: GstResourceError = 15; +pub const GST_RESOURCE_ERROR_NUM_ERRORS: GstResourceError = 16; + +pub type GstSearchMode = c_int; +pub const GST_SEARCH_MODE_EXACT: GstSearchMode = 0; +pub const GST_SEARCH_MODE_BEFORE: GstSearchMode = 1; +pub const GST_SEARCH_MODE_AFTER: GstSearchMode = 2; + +pub type GstSeekType = c_int; +pub const GST_SEEK_TYPE_NONE: GstSeekType = 0; +pub const GST_SEEK_TYPE_SET: GstSeekType = 1; +pub const GST_SEEK_TYPE_END: GstSeekType = 2; + +pub type GstState = c_int; +pub const GST_STATE_VOID_PENDING: GstState = 0; +pub const GST_STATE_NULL: GstState = 1; +pub const GST_STATE_READY: GstState = 2; +pub const GST_STATE_PAUSED: GstState = 3; +pub const GST_STATE_PLAYING: GstState = 4; + +pub type GstStateChange = c_int; +pub const GST_STATE_CHANGE_NULL_TO_READY: GstStateChange = 10; +pub const GST_STATE_CHANGE_READY_TO_PAUSED: GstStateChange = 19; +pub const GST_STATE_CHANGE_PAUSED_TO_PLAYING: GstStateChange = 28; +pub const GST_STATE_CHANGE_PLAYING_TO_PAUSED: GstStateChange = 35; +pub const GST_STATE_CHANGE_PAUSED_TO_READY: GstStateChange = 26; +pub const GST_STATE_CHANGE_READY_TO_NULL: GstStateChange = 17; +pub const GST_STATE_CHANGE_NULL_TO_NULL: GstStateChange = 9; +pub const GST_STATE_CHANGE_READY_TO_READY: GstStateChange = 18; +pub const GST_STATE_CHANGE_PAUSED_TO_PAUSED: GstStateChange = 27; +pub const GST_STATE_CHANGE_PLAYING_TO_PLAYING: GstStateChange = 36; + +pub type GstStateChangeReturn = c_int; +pub const GST_STATE_CHANGE_FAILURE: GstStateChangeReturn = 0; +pub const GST_STATE_CHANGE_SUCCESS: GstStateChangeReturn = 1; +pub const GST_STATE_CHANGE_ASYNC: GstStateChangeReturn = 2; +pub const GST_STATE_CHANGE_NO_PREROLL: GstStateChangeReturn = 3; + +pub type GstStreamError = c_int; +pub const GST_STREAM_ERROR_FAILED: GstStreamError = 1; +pub const GST_STREAM_ERROR_TOO_LAZY: GstStreamError = 2; +pub const GST_STREAM_ERROR_NOT_IMPLEMENTED: GstStreamError = 3; +pub const GST_STREAM_ERROR_TYPE_NOT_FOUND: GstStreamError = 4; +pub const GST_STREAM_ERROR_WRONG_TYPE: GstStreamError = 5; +pub const GST_STREAM_ERROR_CODEC_NOT_FOUND: GstStreamError = 6; +pub const GST_STREAM_ERROR_DECODE: GstStreamError = 7; +pub const GST_STREAM_ERROR_ENCODE: GstStreamError = 8; +pub const GST_STREAM_ERROR_DEMUX: GstStreamError = 9; +pub const GST_STREAM_ERROR_MUX: GstStreamError = 10; +pub const GST_STREAM_ERROR_FORMAT: GstStreamError = 11; +pub const GST_STREAM_ERROR_DECRYPT: GstStreamError = 12; +pub const GST_STREAM_ERROR_DECRYPT_NOKEY: GstStreamError = 13; +pub const GST_STREAM_ERROR_NUM_ERRORS: GstStreamError = 14; + +pub type GstStreamStatusType = c_int; +pub const GST_STREAM_STATUS_TYPE_CREATE: GstStreamStatusType = 0; +pub const GST_STREAM_STATUS_TYPE_ENTER: GstStreamStatusType = 1; +pub const GST_STREAM_STATUS_TYPE_LEAVE: GstStreamStatusType = 2; +pub const GST_STREAM_STATUS_TYPE_DESTROY: GstStreamStatusType = 3; +pub const GST_STREAM_STATUS_TYPE_START: GstStreamStatusType = 8; +pub const GST_STREAM_STATUS_TYPE_PAUSE: GstStreamStatusType = 9; +pub const GST_STREAM_STATUS_TYPE_STOP: GstStreamStatusType = 10; + +pub type GstStructureChangeType = c_int; +pub const GST_STRUCTURE_CHANGE_TYPE_PAD_LINK: GstStructureChangeType = 0; +pub const GST_STRUCTURE_CHANGE_TYPE_PAD_UNLINK: GstStructureChangeType = 1; + +pub type GstTagFlag = c_int; +pub const GST_TAG_FLAG_UNDEFINED: GstTagFlag = 0; +pub const GST_TAG_FLAG_META: GstTagFlag = 1; +pub const GST_TAG_FLAG_ENCODED: GstTagFlag = 2; +pub const GST_TAG_FLAG_DECODED: GstTagFlag = 3; +pub const GST_TAG_FLAG_COUNT: GstTagFlag = 4; + +pub type GstTagMergeMode = c_int; +pub const GST_TAG_MERGE_UNDEFINED: GstTagMergeMode = 0; +pub const GST_TAG_MERGE_REPLACE_ALL: GstTagMergeMode = 1; +pub const GST_TAG_MERGE_REPLACE: GstTagMergeMode = 2; +pub const GST_TAG_MERGE_APPEND: GstTagMergeMode = 3; +pub const GST_TAG_MERGE_PREPEND: GstTagMergeMode = 4; +pub const GST_TAG_MERGE_KEEP: GstTagMergeMode = 5; +pub const GST_TAG_MERGE_KEEP_ALL: GstTagMergeMode = 6; +pub const GST_TAG_MERGE_COUNT: GstTagMergeMode = 7; + +pub type GstTagScope = c_int; +pub const GST_TAG_SCOPE_STREAM: GstTagScope = 0; +pub const GST_TAG_SCOPE_GLOBAL: GstTagScope = 1; + +pub type GstTaskState = c_int; +pub const GST_TASK_STARTED: GstTaskState = 0; +pub const GST_TASK_STOPPED: GstTaskState = 1; +pub const GST_TASK_PAUSED: GstTaskState = 2; + +pub type GstTocEntryType = c_int; +pub const GST_TOC_ENTRY_TYPE_ANGLE: GstTocEntryType = -3; +pub const GST_TOC_ENTRY_TYPE_VERSION: GstTocEntryType = -2; +pub const GST_TOC_ENTRY_TYPE_EDITION: GstTocEntryType = -1; +pub const GST_TOC_ENTRY_TYPE_INVALID: GstTocEntryType = 0; +pub const GST_TOC_ENTRY_TYPE_TITLE: GstTocEntryType = 1; +pub const GST_TOC_ENTRY_TYPE_TRACK: GstTocEntryType = 2; +pub const GST_TOC_ENTRY_TYPE_CHAPTER: GstTocEntryType = 3; + +pub type GstTocLoopType = c_int; +pub const GST_TOC_LOOP_NONE: GstTocLoopType = 0; +pub const GST_TOC_LOOP_FORWARD: GstTocLoopType = 1; +pub const GST_TOC_LOOP_REVERSE: GstTocLoopType = 2; +pub const GST_TOC_LOOP_PING_PONG: GstTocLoopType = 3; + +pub type GstTocScope = c_int; +pub const GST_TOC_SCOPE_GLOBAL: GstTocScope = 1; +pub const GST_TOC_SCOPE_CURRENT: GstTocScope = 2; + +pub type GstTracerValueScope = c_int; +pub const GST_TRACER_VALUE_SCOPE_PROCESS: GstTracerValueScope = 0; +pub const GST_TRACER_VALUE_SCOPE_THREAD: GstTracerValueScope = 1; +pub const GST_TRACER_VALUE_SCOPE_ELEMENT: GstTracerValueScope = 2; +pub const GST_TRACER_VALUE_SCOPE_PAD: GstTracerValueScope = 3; + +pub type GstTypeFindProbability = c_int; +pub const GST_TYPE_FIND_NONE: GstTypeFindProbability = 0; +pub const GST_TYPE_FIND_MINIMUM: GstTypeFindProbability = 1; +pub const GST_TYPE_FIND_POSSIBLE: GstTypeFindProbability = 50; +pub const GST_TYPE_FIND_LIKELY: GstTypeFindProbability = 80; +pub const GST_TYPE_FIND_NEARLY_CERTAIN: GstTypeFindProbability = 99; +pub const GST_TYPE_FIND_MAXIMUM: GstTypeFindProbability = 100; + +pub type GstURIError = c_int; +pub const GST_URI_ERROR_UNSUPPORTED_PROTOCOL: GstURIError = 0; +pub const GST_URI_ERROR_BAD_URI: GstURIError = 1; +pub const GST_URI_ERROR_BAD_STATE: GstURIError = 2; +pub const GST_URI_ERROR_BAD_REFERENCE: GstURIError = 3; + +pub type GstURIType = c_int; +pub const GST_URI_UNKNOWN: GstURIType = 0; +pub const GST_URI_SINK: GstURIType = 1; +pub const GST_URI_SRC: GstURIType = 2; + +// Constants +pub const GST_ALLOCATOR_SYSMEM: *const c_char = b"SystemMemory\0" as *const u8 as *const c_char; +pub const GST_BUFFER_COPY_ALL: GstBufferCopyFlags = 15; +pub const GST_BUFFER_COPY_METADATA: GstBufferCopyFlags = 7; +pub const GST_BUFFER_OFFSET_NONE: u64 = 18446744073709551615; +pub const GST_CAN_INLINE: c_int = 1; +pub const GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY: *const c_char = + b"memory:SystemMemory\0" as *const u8 as *const c_char; +pub const GST_CLOCK_TIME_NONE: GstClockTime = 18446744073709551615; +pub const GST_DEBUG_BG_MASK: c_int = 240; +pub const GST_DEBUG_FG_MASK: c_int = 15; +pub const GST_DEBUG_FORMAT_MASK: c_int = 65280; +pub const GST_ELEMENT_FACTORY_KLASS_DECODER: *const c_char = + b"Decoder\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_DECRYPTOR: *const c_char = + b"Decryptor\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_DEMUXER: *const c_char = + b"Demuxer\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_DEPAYLOADER: *const c_char = + b"Depayloader\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_ENCODER: *const c_char = + b"Encoder\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_ENCRYPTOR: *const c_char = + b"Encryptor\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_FORMATTER: *const c_char = + b"Formatter\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_HARDWARE: *const c_char = + b"Hardware\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_AUDIO: *const c_char = + b"Audio\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_IMAGE: *const c_char = + b"Image\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_METADATA: *const c_char = + b"Metadata\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE: *const c_char = + b"Subtitle\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_MEDIA_VIDEO: *const c_char = + b"Video\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_MUXER: *const c_char = b"Muxer\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_PARSER: *const c_char = + b"Parser\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_PAYLOADER: *const c_char = + b"Payloader\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_SINK: *const c_char = b"Sink\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_KLASS_SRC: *const c_char = b"Source\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_FACTORY_TYPE_ANY: GstElementFactoryListType = 562949953421311; +pub const GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS: GstElementFactoryListType = 3940649673949188; +pub const GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER: GstElementFactoryListType = 1125899906842626; +pub const GST_ELEMENT_FACTORY_TYPE_DECODABLE: GstElementFactoryListType = 1377; +pub const GST_ELEMENT_FACTORY_TYPE_DECODER: GstElementFactoryListType = 1; +pub const GST_ELEMENT_FACTORY_TYPE_DECRYPTOR: GstElementFactoryListType = 1024; +pub const GST_ELEMENT_FACTORY_TYPE_DEMUXER: GstElementFactoryListType = 32; +pub const GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER: GstElementFactoryListType = 256; +pub const GST_ELEMENT_FACTORY_TYPE_ENCODER: GstElementFactoryListType = 2; +pub const GST_ELEMENT_FACTORY_TYPE_ENCRYPTOR: GstElementFactoryListType = 2048; +pub const GST_ELEMENT_FACTORY_TYPE_FORMATTER: GstElementFactoryListType = 512; +pub const GST_ELEMENT_FACTORY_TYPE_HARDWARE: GstElementFactoryListType = 4096; +pub const GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS: GstElementFactoryListType = 281474976710656; +pub const GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY: GstElementFactoryListType = 18446462598732840960; +pub const GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO: GstElementFactoryListType = 1125899906842624; +pub const GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE: GstElementFactoryListType = 2251799813685248; +pub const GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA: GstElementFactoryListType = 9007199254740992; +pub const GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE: GstElementFactoryListType = 4503599627370496; +pub const GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO: GstElementFactoryListType = 562949953421312; +pub const GST_ELEMENT_FACTORY_TYPE_MUXER: GstElementFactoryListType = 16; +pub const GST_ELEMENT_FACTORY_TYPE_PARSER: GstElementFactoryListType = 64; +pub const GST_ELEMENT_FACTORY_TYPE_PAYLOADER: GstElementFactoryListType = 128; +pub const GST_ELEMENT_FACTORY_TYPE_SINK: GstElementFactoryListType = 4; +pub const GST_ELEMENT_FACTORY_TYPE_SRC: GstElementFactoryListType = 8; +pub const GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER: GstElementFactoryListType = 2814749767106562; +pub const GST_ELEMENT_METADATA_AUTHOR: *const c_char = b"author\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_METADATA_DESCRIPTION: *const c_char = + b"description\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_METADATA_DOC_URI: *const c_char = b"doc-uri\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_METADATA_ICON_NAME: *const c_char = + b"icon-name\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_METADATA_KLASS: *const c_char = b"klass\0" as *const u8 as *const c_char; +pub const GST_ELEMENT_METADATA_LONGNAME: *const c_char = + b"long-name\0" as *const u8 as *const c_char; +pub const GST_EVENT_NUM_SHIFT: c_int = 8; +pub const GST_EVENT_TYPE_BOTH: GstEventTypeFlags = 3; +pub const GST_FLAG_SET_MASK_EXACT: c_uint = 4294967295; +pub const GST_FORMAT_PERCENT_MAX: i64 = 1000000; +pub const GST_FORMAT_PERCENT_SCALE: i64 = 10000; +pub const GST_GROUP_ID_INVALID: c_int = 0; +pub const GST_LICENSE_UNKNOWN: *const c_char = b"unknown\0" as *const u8 as *const c_char; +pub const GST_LOCK_FLAG_READWRITE: GstLockFlags = 3; +pub const GST_MAP_READWRITE: GstMapFlags = 3; +pub const GST_META_TAG_MEMORY_STR: *const c_char = b"memory\0" as *const u8 as *const c_char; +pub const GST_MSECOND: GstClockTimeDiff = 1000000; +pub const GST_NSECOND: GstClockTimeDiff = 1; +pub const GST_PARAM_CONDITIONALLY_AVAILABLE: c_int = 16384; +pub const GST_PARAM_CONTROLLABLE: c_int = 512; +pub const GST_PARAM_DOC_SHOW_DEFAULT: c_int = 8192; +pub const GST_PARAM_MUTABLE_PAUSED: c_int = 2048; +pub const GST_PARAM_MUTABLE_PLAYING: c_int = 4096; +pub const GST_PARAM_MUTABLE_READY: c_int = 1024; +pub const GST_PARAM_USER_SHIFT: c_int = 65536; +pub const GST_PROTECTION_SYSTEM_ID_CAPS_FIELD: *const c_char = + b"protection-system\0" as *const u8 as *const c_char; +pub const GST_PROTECTION_UNSPECIFIED_SYSTEM_ID: *const c_char = + b"unspecified-system-id\0" as *const u8 as *const c_char; +pub const GST_QUERY_NUM_SHIFT: c_int = 8; +pub const GST_QUERY_TYPE_BOTH: GstQueryTypeFlags = 3; +pub const GST_SECOND: GstClockTimeDiff = 1000000000; +pub const GST_SEGMENT_INSTANT_FLAGS: c_int = 912; +pub const GST_SEQNUM_INVALID: c_int = 0; +pub const GST_TAG_ALBUM: *const c_char = b"album\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_ARTIST: *const c_char = b"album-artist\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_ARTIST_SORTNAME: *const c_char = + b"album-artist-sortname\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_GAIN: *const c_char = + b"replaygain-album-gain\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_PEAK: *const c_char = + b"replaygain-album-peak\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_SORTNAME: *const c_char = b"album-sortname\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_VOLUME_COUNT: *const c_char = + b"album-disc-count\0" as *const u8 as *const c_char; +pub const GST_TAG_ALBUM_VOLUME_NUMBER: *const c_char = + b"album-disc-number\0" as *const u8 as *const c_char; +pub const GST_TAG_APPLICATION_DATA: *const c_char = + b"application-data\0" as *const u8 as *const c_char; +pub const GST_TAG_APPLICATION_NAME: *const c_char = + b"application-name\0" as *const u8 as *const c_char; +pub const GST_TAG_ARTIST: *const c_char = b"artist\0" as *const u8 as *const c_char; +pub const GST_TAG_ARTIST_SORTNAME: *const c_char = + b"artist-sortname\0" as *const u8 as *const c_char; +pub const GST_TAG_ATTACHMENT: *const c_char = b"attachment\0" as *const u8 as *const c_char; +pub const GST_TAG_AUDIO_CODEC: *const c_char = b"audio-codec\0" as *const u8 as *const c_char; +pub const GST_TAG_BEATS_PER_MINUTE: *const c_char = + b"beats-per-minute\0" as *const u8 as *const c_char; +pub const GST_TAG_BITRATE: *const c_char = b"bitrate\0" as *const u8 as *const c_char; +pub const GST_TAG_CODEC: *const c_char = b"codec\0" as *const u8 as *const c_char; +pub const GST_TAG_COMMENT: *const c_char = b"comment\0" as *const u8 as *const c_char; +pub const GST_TAG_COMPOSER: *const c_char = b"composer\0" as *const u8 as *const c_char; +pub const GST_TAG_COMPOSER_SORTNAME: *const c_char = + b"composer-sortname\0" as *const u8 as *const c_char; +pub const GST_TAG_CONDUCTOR: *const c_char = b"conductor\0" as *const u8 as *const c_char; +pub const GST_TAG_CONTACT: *const c_char = b"contact\0" as *const u8 as *const c_char; +pub const GST_TAG_CONTAINER_FORMAT: *const c_char = + b"container-format\0" as *const u8 as *const c_char; +pub const GST_TAG_COPYRIGHT: *const c_char = b"copyright\0" as *const u8 as *const c_char; +pub const GST_TAG_COPYRIGHT_URI: *const c_char = b"copyright-uri\0" as *const u8 as *const c_char; +pub const GST_TAG_DATE: *const c_char = b"date\0" as *const u8 as *const c_char; +pub const GST_TAG_DATE_TIME: *const c_char = b"datetime\0" as *const u8 as *const c_char; +pub const GST_TAG_DESCRIPTION: *const c_char = b"description\0" as *const u8 as *const c_char; +pub const GST_TAG_DEVICE_MANUFACTURER: *const c_char = + b"device-manufacturer\0" as *const u8 as *const c_char; +pub const GST_TAG_DEVICE_MODEL: *const c_char = b"device-model\0" as *const u8 as *const c_char; +pub const GST_TAG_DURATION: *const c_char = b"duration\0" as *const u8 as *const c_char; +pub const GST_TAG_ENCODED_BY: *const c_char = b"encoded-by\0" as *const u8 as *const c_char; +pub const GST_TAG_ENCODER: *const c_char = b"encoder\0" as *const u8 as *const c_char; +pub const GST_TAG_ENCODER_VERSION: *const c_char = + b"encoder-version\0" as *const u8 as *const c_char; +pub const GST_TAG_EXTENDED_COMMENT: *const c_char = + b"extended-comment\0" as *const u8 as *const c_char; +pub const GST_TAG_GENRE: *const c_char = b"genre\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION: *const c_char = + b"geo-location-capture-direction\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_CITY: *const c_char = + b"geo-location-city\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_COUNTRY: *const c_char = + b"geo-location-country\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_ELEVATION: *const c_char = + b"geo-location-elevation\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR: *const c_char = + b"geo-location-horizontal-error\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_LATITUDE: *const c_char = + b"geo-location-latitude\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_LONGITUDE: *const c_char = + b"geo-location-longitude\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION: *const c_char = + b"geo-location-movement-direction\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_MOVEMENT_SPEED: *const c_char = + b"geo-location-movement-speed\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_NAME: *const c_char = + b"geo-location-name\0" as *const u8 as *const c_char; +pub const GST_TAG_GEO_LOCATION_SUBLOCATION: *const c_char = + b"geo-location-sublocation\0" as *const u8 as *const c_char; +pub const GST_TAG_GROUPING: *const c_char = b"grouping\0" as *const u8 as *const c_char; +pub const GST_TAG_HOMEPAGE: *const c_char = b"homepage\0" as *const u8 as *const c_char; +pub const GST_TAG_IMAGE: *const c_char = b"image\0" as *const u8 as *const c_char; +pub const GST_TAG_IMAGE_ORIENTATION: *const c_char = + b"image-orientation\0" as *const u8 as *const c_char; +pub const GST_TAG_INTERPRETED_BY: *const c_char = b"interpreted-by\0" as *const u8 as *const c_char; +pub const GST_TAG_ISRC: *const c_char = b"isrc\0" as *const u8 as *const c_char; +pub const GST_TAG_KEYWORDS: *const c_char = b"keywords\0" as *const u8 as *const c_char; +pub const GST_TAG_LANGUAGE_CODE: *const c_char = b"language-code\0" as *const u8 as *const c_char; +pub const GST_TAG_LANGUAGE_NAME: *const c_char = b"language-name\0" as *const u8 as *const c_char; +pub const GST_TAG_LICENSE: *const c_char = b"license\0" as *const u8 as *const c_char; +pub const GST_TAG_LICENSE_URI: *const c_char = b"license-uri\0" as *const u8 as *const c_char; +pub const GST_TAG_LOCATION: *const c_char = b"location\0" as *const u8 as *const c_char; +pub const GST_TAG_LYRICS: *const c_char = b"lyrics\0" as *const u8 as *const c_char; +pub const GST_TAG_MAXIMUM_BITRATE: *const c_char = + b"maximum-bitrate\0" as *const u8 as *const c_char; +pub const GST_TAG_MIDI_BASE_NOTE: *const c_char = b"midi-base-note\0" as *const u8 as *const c_char; +pub const GST_TAG_MINIMUM_BITRATE: *const c_char = + b"minimum-bitrate\0" as *const u8 as *const c_char; +pub const GST_TAG_NOMINAL_BITRATE: *const c_char = + b"nominal-bitrate\0" as *const u8 as *const c_char; +pub const GST_TAG_ORGANIZATION: *const c_char = b"organization\0" as *const u8 as *const c_char; +pub const GST_TAG_PERFORMER: *const c_char = b"performer\0" as *const u8 as *const c_char; +pub const GST_TAG_PREVIEW_IMAGE: *const c_char = b"preview-image\0" as *const u8 as *const c_char; +pub const GST_TAG_PRIVATE_DATA: *const c_char = b"private-data\0" as *const u8 as *const c_char; +pub const GST_TAG_PUBLISHER: *const c_char = b"publisher\0" as *const u8 as *const c_char; +pub const GST_TAG_REFERENCE_LEVEL: *const c_char = + b"replaygain-reference-level\0" as *const u8 as *const c_char; +pub const GST_TAG_SERIAL: *const c_char = b"serial\0" as *const u8 as *const c_char; +pub const GST_TAG_SHOW_EPISODE_NUMBER: *const c_char = + b"show-episode-number\0" as *const u8 as *const c_char; +pub const GST_TAG_SHOW_NAME: *const c_char = b"show-name\0" as *const u8 as *const c_char; +pub const GST_TAG_SHOW_SEASON_NUMBER: *const c_char = + b"show-season-number\0" as *const u8 as *const c_char; +pub const GST_TAG_SHOW_SORTNAME: *const c_char = b"show-sortname\0" as *const u8 as *const c_char; +pub const GST_TAG_SUBTITLE_CODEC: *const c_char = b"subtitle-codec\0" as *const u8 as *const c_char; +pub const GST_TAG_TITLE: *const c_char = b"title\0" as *const u8 as *const c_char; +pub const GST_TAG_TITLE_SORTNAME: *const c_char = b"title-sortname\0" as *const u8 as *const c_char; +pub const GST_TAG_TRACK_COUNT: *const c_char = b"track-count\0" as *const u8 as *const c_char; +pub const GST_TAG_TRACK_GAIN: *const c_char = + b"replaygain-track-gain\0" as *const u8 as *const c_char; +pub const GST_TAG_TRACK_NUMBER: *const c_char = b"track-number\0" as *const u8 as *const c_char; +pub const GST_TAG_TRACK_PEAK: *const c_char = + b"replaygain-track-peak\0" as *const u8 as *const c_char; +pub const GST_TAG_USER_RATING: *const c_char = b"user-rating\0" as *const u8 as *const c_char; +pub const GST_TAG_VERSION: *const c_char = b"version\0" as *const u8 as *const c_char; +pub const GST_TAG_VIDEO_CODEC: *const c_char = b"video-codec\0" as *const u8 as *const c_char; +pub const GST_TOC_REPEAT_COUNT_INFINITE: c_int = -1; +pub const GST_URI_NO_PORT: c_int = 0; +pub const GST_USECOND: GstClockTimeDiff = 1000; +pub const GST_VALUE_EQUAL: c_int = 0; +pub const GST_VALUE_GREATER_THAN: c_int = 1; +pub const GST_VALUE_LESS_THAN: c_int = -1; +pub const GST_VALUE_UNORDERED: c_int = 2; + +// Flags +pub type GstAllocatorFlags = c_uint; +pub const GST_ALLOCATOR_FLAG_CUSTOM_ALLOC: GstAllocatorFlags = 16; +pub const GST_ALLOCATOR_FLAG_LAST: GstAllocatorFlags = 1048576; + +pub type GstBinFlags = c_uint; +pub const GST_BIN_FLAG_NO_RESYNC: GstBinFlags = 16384; +pub const GST_BIN_FLAG_STREAMS_AWARE: GstBinFlags = 32768; +pub const GST_BIN_FLAG_LAST: GstBinFlags = 524288; + +pub type GstBufferCopyFlags = c_uint; +pub const GST_BUFFER_COPY_NONE: GstBufferCopyFlags = 0; +pub const GST_BUFFER_COPY_FLAGS: GstBufferCopyFlags = 1; +pub const GST_BUFFER_COPY_TIMESTAMPS: GstBufferCopyFlags = 2; +pub const GST_BUFFER_COPY_META: GstBufferCopyFlags = 4; +pub const GST_BUFFER_COPY_MEMORY: GstBufferCopyFlags = 8; +pub const GST_BUFFER_COPY_MERGE: GstBufferCopyFlags = 16; +pub const GST_BUFFER_COPY_DEEP: GstBufferCopyFlags = 32; + +pub type GstBufferFlags = c_uint; +pub const GST_BUFFER_FLAG_LIVE: GstBufferFlags = 16; +pub const GST_BUFFER_FLAG_DECODE_ONLY: GstBufferFlags = 32; +pub const GST_BUFFER_FLAG_DISCONT: GstBufferFlags = 64; +pub const GST_BUFFER_FLAG_RESYNC: GstBufferFlags = 128; +pub const GST_BUFFER_FLAG_CORRUPTED: GstBufferFlags = 256; +pub const GST_BUFFER_FLAG_MARKER: GstBufferFlags = 512; +pub const GST_BUFFER_FLAG_HEADER: GstBufferFlags = 1024; +pub const GST_BUFFER_FLAG_GAP: GstBufferFlags = 2048; +pub const GST_BUFFER_FLAG_DROPPABLE: GstBufferFlags = 4096; +pub const GST_BUFFER_FLAG_DELTA_UNIT: GstBufferFlags = 8192; +pub const GST_BUFFER_FLAG_TAG_MEMORY: GstBufferFlags = 16384; +pub const GST_BUFFER_FLAG_SYNC_AFTER: GstBufferFlags = 32768; +pub const GST_BUFFER_FLAG_NON_DROPPABLE: GstBufferFlags = 65536; +pub const GST_BUFFER_FLAG_LAST: GstBufferFlags = 1048576; + +pub type GstBufferPoolAcquireFlags = c_uint; +pub const GST_BUFFER_POOL_ACQUIRE_FLAG_NONE: GstBufferPoolAcquireFlags = 0; +pub const GST_BUFFER_POOL_ACQUIRE_FLAG_KEY_UNIT: GstBufferPoolAcquireFlags = 1; +pub const GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT: GstBufferPoolAcquireFlags = 2; +pub const GST_BUFFER_POOL_ACQUIRE_FLAG_DISCONT: GstBufferPoolAcquireFlags = 4; +pub const GST_BUFFER_POOL_ACQUIRE_FLAG_LAST: GstBufferPoolAcquireFlags = 65536; + +pub type GstBusFlags = c_uint; +pub const GST_BUS_FLUSHING: GstBusFlags = 16; +pub const GST_BUS_FLAG_LAST: GstBusFlags = 32; + +pub type GstCapsFlags = c_uint; +pub const GST_CAPS_FLAG_ANY: GstCapsFlags = 16; + +pub type GstClockFlags = c_uint; +pub const GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC: GstClockFlags = 16; +pub const GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC: GstClockFlags = 32; +pub const GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC: GstClockFlags = 64; +pub const GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC: GstClockFlags = 128; +pub const GST_CLOCK_FLAG_CAN_SET_RESOLUTION: GstClockFlags = 256; +pub const GST_CLOCK_FLAG_CAN_SET_MASTER: GstClockFlags = 512; +pub const GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC: GstClockFlags = 1024; +pub const GST_CLOCK_FLAG_LAST: GstClockFlags = 4096; + +pub type GstDebugColorFlags = c_uint; +pub const GST_DEBUG_FG_BLACK: GstDebugColorFlags = 0; +pub const GST_DEBUG_FG_RED: GstDebugColorFlags = 1; +pub const GST_DEBUG_FG_GREEN: GstDebugColorFlags = 2; +pub const GST_DEBUG_FG_YELLOW: GstDebugColorFlags = 3; +pub const GST_DEBUG_FG_BLUE: GstDebugColorFlags = 4; +pub const GST_DEBUG_FG_MAGENTA: GstDebugColorFlags = 5; +pub const GST_DEBUG_FG_CYAN: GstDebugColorFlags = 6; +pub const GST_DEBUG_FG_WHITE: GstDebugColorFlags = 7; +pub const GST_DEBUG_BG_BLACK: GstDebugColorFlags = 0; +pub const GST_DEBUG_BG_RED: GstDebugColorFlags = 16; +pub const GST_DEBUG_BG_GREEN: GstDebugColorFlags = 32; +pub const GST_DEBUG_BG_YELLOW: GstDebugColorFlags = 48; +pub const GST_DEBUG_BG_BLUE: GstDebugColorFlags = 64; +pub const GST_DEBUG_BG_MAGENTA: GstDebugColorFlags = 80; +pub const GST_DEBUG_BG_CYAN: GstDebugColorFlags = 96; +pub const GST_DEBUG_BG_WHITE: GstDebugColorFlags = 112; +pub const GST_DEBUG_BOLD: GstDebugColorFlags = 256; +pub const GST_DEBUG_UNDERLINE: GstDebugColorFlags = 512; + +pub type GstDebugGraphDetails = c_uint; +pub const GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE: GstDebugGraphDetails = 1; +pub const GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS: GstDebugGraphDetails = 2; +pub const GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS: GstDebugGraphDetails = 4; +pub const GST_DEBUG_GRAPH_SHOW_STATES: GstDebugGraphDetails = 8; +pub const GST_DEBUG_GRAPH_SHOW_FULL_PARAMS: GstDebugGraphDetails = 16; +pub const GST_DEBUG_GRAPH_SHOW_ALL: GstDebugGraphDetails = 15; +pub const GST_DEBUG_GRAPH_SHOW_VERBOSE: GstDebugGraphDetails = 4294967295; + +pub type GstElementFlags = c_uint; +pub const GST_ELEMENT_FLAG_LOCKED_STATE: GstElementFlags = 16; +pub const GST_ELEMENT_FLAG_SINK: GstElementFlags = 32; +pub const GST_ELEMENT_FLAG_SOURCE: GstElementFlags = 64; +pub const GST_ELEMENT_FLAG_PROVIDE_CLOCK: GstElementFlags = 128; +pub const GST_ELEMENT_FLAG_REQUIRE_CLOCK: GstElementFlags = 256; +pub const GST_ELEMENT_FLAG_INDEXABLE: GstElementFlags = 512; +pub const GST_ELEMENT_FLAG_LAST: GstElementFlags = 16384; + +pub type GstEventTypeFlags = c_uint; +pub const GST_EVENT_TYPE_UPSTREAM: GstEventTypeFlags = 1; +pub const GST_EVENT_TYPE_DOWNSTREAM: GstEventTypeFlags = 2; +pub const GST_EVENT_TYPE_SERIALIZED: GstEventTypeFlags = 4; +pub const GST_EVENT_TYPE_STICKY: GstEventTypeFlags = 8; +pub const GST_EVENT_TYPE_STICKY_MULTI: GstEventTypeFlags = 16; + +pub type GstLockFlags = c_uint; +pub const GST_LOCK_FLAG_READ: GstLockFlags = 1; +pub const GST_LOCK_FLAG_WRITE: GstLockFlags = 2; +pub const GST_LOCK_FLAG_EXCLUSIVE: GstLockFlags = 4; +pub const GST_LOCK_FLAG_LAST: GstLockFlags = 256; + +pub type GstMapFlags = c_uint; +pub const GST_MAP_READ: GstMapFlags = 1; +pub const GST_MAP_WRITE: GstMapFlags = 2; +pub const GST_MAP_FLAG_LAST: GstMapFlags = 65536; + +pub type GstMemoryFlags = c_uint; +pub const GST_MEMORY_FLAG_READONLY: GstMemoryFlags = 2; +pub const GST_MEMORY_FLAG_NO_SHARE: GstMemoryFlags = 16; +pub const GST_MEMORY_FLAG_ZERO_PREFIXED: GstMemoryFlags = 32; +pub const GST_MEMORY_FLAG_ZERO_PADDED: GstMemoryFlags = 64; +pub const GST_MEMORY_FLAG_PHYSICALLY_CONTIGUOUS: GstMemoryFlags = 128; +pub const GST_MEMORY_FLAG_NOT_MAPPABLE: GstMemoryFlags = 256; +pub const GST_MEMORY_FLAG_LAST: GstMemoryFlags = 1048576; + +pub type GstMessageType = c_uint; +pub const GST_MESSAGE_UNKNOWN: GstMessageType = 0; +pub const GST_MESSAGE_EOS: GstMessageType = 1; +pub const GST_MESSAGE_ERROR: GstMessageType = 2; +pub const GST_MESSAGE_WARNING: GstMessageType = 4; +pub const GST_MESSAGE_INFO: GstMessageType = 8; +pub const GST_MESSAGE_TAG: GstMessageType = 16; +pub const GST_MESSAGE_BUFFERING: GstMessageType = 32; +pub const GST_MESSAGE_STATE_CHANGED: GstMessageType = 64; +pub const GST_MESSAGE_STATE_DIRTY: GstMessageType = 128; +pub const GST_MESSAGE_STEP_DONE: GstMessageType = 256; +pub const GST_MESSAGE_CLOCK_PROVIDE: GstMessageType = 512; +pub const GST_MESSAGE_CLOCK_LOST: GstMessageType = 1024; +pub const GST_MESSAGE_NEW_CLOCK: GstMessageType = 2048; +pub const GST_MESSAGE_STRUCTURE_CHANGE: GstMessageType = 4096; +pub const GST_MESSAGE_STREAM_STATUS: GstMessageType = 8192; +pub const GST_MESSAGE_APPLICATION: GstMessageType = 16384; +pub const GST_MESSAGE_ELEMENT: GstMessageType = 32768; +pub const GST_MESSAGE_SEGMENT_START: GstMessageType = 65536; +pub const GST_MESSAGE_SEGMENT_DONE: GstMessageType = 131072; +pub const GST_MESSAGE_DURATION_CHANGED: GstMessageType = 262144; +pub const GST_MESSAGE_LATENCY: GstMessageType = 524288; +pub const GST_MESSAGE_ASYNC_START: GstMessageType = 1048576; +pub const GST_MESSAGE_ASYNC_DONE: GstMessageType = 2097152; +pub const GST_MESSAGE_REQUEST_STATE: GstMessageType = 4194304; +pub const GST_MESSAGE_STEP_START: GstMessageType = 8388608; +pub const GST_MESSAGE_QOS: GstMessageType = 16777216; +pub const GST_MESSAGE_PROGRESS: GstMessageType = 33554432; +pub const GST_MESSAGE_TOC: GstMessageType = 67108864; +pub const GST_MESSAGE_RESET_TIME: GstMessageType = 134217728; +pub const GST_MESSAGE_STREAM_START: GstMessageType = 268435456; +pub const GST_MESSAGE_NEED_CONTEXT: GstMessageType = 536870912; +pub const GST_MESSAGE_HAVE_CONTEXT: GstMessageType = 1073741824; +pub const GST_MESSAGE_EXTENDED: GstMessageType = 2147483648; +pub const GST_MESSAGE_DEVICE_ADDED: GstMessageType = 2147483649; +pub const GST_MESSAGE_DEVICE_REMOVED: GstMessageType = 2147483650; +pub const GST_MESSAGE_PROPERTY_NOTIFY: GstMessageType = 2147483651; +pub const GST_MESSAGE_STREAM_COLLECTION: GstMessageType = 2147483652; +pub const GST_MESSAGE_STREAMS_SELECTED: GstMessageType = 2147483653; +pub const GST_MESSAGE_REDIRECT: GstMessageType = 2147483654; +pub const GST_MESSAGE_DEVICE_CHANGED: GstMessageType = 2147483655; +pub const GST_MESSAGE_INSTANT_RATE_REQUEST: GstMessageType = 2147483656; +pub const GST_MESSAGE_ANY: GstMessageType = 4294967295; + +pub type GstMetaFlags = c_uint; +pub const GST_META_FLAG_NONE: GstMetaFlags = 0; +pub const GST_META_FLAG_READONLY: GstMetaFlags = 1; +pub const GST_META_FLAG_POOLED: GstMetaFlags = 2; +pub const GST_META_FLAG_LOCKED: GstMetaFlags = 4; +pub const GST_META_FLAG_LAST: GstMetaFlags = 65536; + +pub type GstMiniObjectFlags = c_uint; +pub const GST_MINI_OBJECT_FLAG_LOCKABLE: GstMiniObjectFlags = 1; +pub const GST_MINI_OBJECT_FLAG_LOCK_READONLY: GstMiniObjectFlags = 2; +pub const GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED: GstMiniObjectFlags = 4; +pub const GST_MINI_OBJECT_FLAG_LAST: GstMiniObjectFlags = 16; + +pub type GstObjectFlags = c_uint; +pub const GST_OBJECT_FLAG_MAY_BE_LEAKED: GstObjectFlags = 1; +pub const GST_OBJECT_FLAG_LAST: GstObjectFlags = 16; + +pub type GstPadFlags = c_uint; +pub const GST_PAD_FLAG_BLOCKED: GstPadFlags = 16; +pub const GST_PAD_FLAG_FLUSHING: GstPadFlags = 32; +pub const GST_PAD_FLAG_EOS: GstPadFlags = 64; +pub const GST_PAD_FLAG_BLOCKING: GstPadFlags = 128; +pub const GST_PAD_FLAG_NEED_PARENT: GstPadFlags = 256; +pub const GST_PAD_FLAG_NEED_RECONFIGURE: GstPadFlags = 512; +pub const GST_PAD_FLAG_PENDING_EVENTS: GstPadFlags = 1024; +pub const GST_PAD_FLAG_FIXED_CAPS: GstPadFlags = 2048; +pub const GST_PAD_FLAG_PROXY_CAPS: GstPadFlags = 4096; +pub const GST_PAD_FLAG_PROXY_ALLOCATION: GstPadFlags = 8192; +pub const GST_PAD_FLAG_PROXY_SCHEDULING: GstPadFlags = 16384; +pub const GST_PAD_FLAG_ACCEPT_INTERSECT: GstPadFlags = 32768; +pub const GST_PAD_FLAG_ACCEPT_TEMPLATE: GstPadFlags = 65536; +pub const GST_PAD_FLAG_LAST: GstPadFlags = 1048576; + +pub type GstPadLinkCheck = c_uint; +pub const GST_PAD_LINK_CHECK_NOTHING: GstPadLinkCheck = 0; +pub const GST_PAD_LINK_CHECK_HIERARCHY: GstPadLinkCheck = 1; +pub const GST_PAD_LINK_CHECK_TEMPLATE_CAPS: GstPadLinkCheck = 2; +pub const GST_PAD_LINK_CHECK_CAPS: GstPadLinkCheck = 4; +pub const GST_PAD_LINK_CHECK_NO_RECONFIGURE: GstPadLinkCheck = 8; +pub const GST_PAD_LINK_CHECK_DEFAULT: GstPadLinkCheck = 5; + +pub type GstPadProbeType = c_uint; +pub const GST_PAD_PROBE_TYPE_INVALID: GstPadProbeType = 0; +pub const GST_PAD_PROBE_TYPE_IDLE: GstPadProbeType = 1; +pub const GST_PAD_PROBE_TYPE_BLOCK: GstPadProbeType = 2; +pub const GST_PAD_PROBE_TYPE_BUFFER: GstPadProbeType = 16; +pub const GST_PAD_PROBE_TYPE_BUFFER_LIST: GstPadProbeType = 32; +pub const GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM: GstPadProbeType = 64; +pub const GST_PAD_PROBE_TYPE_EVENT_UPSTREAM: GstPadProbeType = 128; +pub const GST_PAD_PROBE_TYPE_EVENT_FLUSH: GstPadProbeType = 256; +pub const GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM: GstPadProbeType = 512; +pub const GST_PAD_PROBE_TYPE_QUERY_UPSTREAM: GstPadProbeType = 1024; +pub const GST_PAD_PROBE_TYPE_PUSH: GstPadProbeType = 4096; +pub const GST_PAD_PROBE_TYPE_PULL: GstPadProbeType = 8192; +pub const GST_PAD_PROBE_TYPE_BLOCKING: GstPadProbeType = 3; +pub const GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM: GstPadProbeType = 112; +pub const GST_PAD_PROBE_TYPE_DATA_UPSTREAM: GstPadProbeType = 128; +pub const GST_PAD_PROBE_TYPE_DATA_BOTH: GstPadProbeType = 240; +pub const GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM: GstPadProbeType = 114; +pub const GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM: GstPadProbeType = 130; +pub const GST_PAD_PROBE_TYPE_EVENT_BOTH: GstPadProbeType = 192; +pub const GST_PAD_PROBE_TYPE_QUERY_BOTH: GstPadProbeType = 1536; +pub const GST_PAD_PROBE_TYPE_ALL_BOTH: GstPadProbeType = 1776; +pub const GST_PAD_PROBE_TYPE_SCHEDULING: GstPadProbeType = 12288; + +pub type GstPadTemplateFlags = c_uint; +pub const GST_PAD_TEMPLATE_FLAG_LAST: GstPadTemplateFlags = 256; + +pub type GstParseFlags = c_uint; +pub const GST_PARSE_FLAG_NONE: GstParseFlags = 0; +pub const GST_PARSE_FLAG_FATAL_ERRORS: GstParseFlags = 1; +pub const GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS: GstParseFlags = 2; +pub const GST_PARSE_FLAG_PLACE_IN_BIN: GstParseFlags = 4; + +pub type GstPipelineFlags = c_uint; +pub const GST_PIPELINE_FLAG_FIXED_CLOCK: GstPipelineFlags = 524288; +pub const GST_PIPELINE_FLAG_LAST: GstPipelineFlags = 8388608; + +pub type GstPluginAPIFlags = c_uint; +pub const GST_PLUGIN_API_FLAG_IGNORE_ENUM_MEMBERS: GstPluginAPIFlags = 1; + +pub type GstPluginDependencyFlags = c_uint; +pub const GST_PLUGIN_DEPENDENCY_FLAG_NONE: GstPluginDependencyFlags = 0; +pub const GST_PLUGIN_DEPENDENCY_FLAG_RECURSE: GstPluginDependencyFlags = 1; +pub const GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY: GstPluginDependencyFlags = 2; +pub const GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX: GstPluginDependencyFlags = 4; +pub const GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX: GstPluginDependencyFlags = 8; +pub const GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE: GstPluginDependencyFlags = 16; + +pub type GstPluginFlags = c_uint; +pub const GST_PLUGIN_FLAG_CACHED: GstPluginFlags = 16; +pub const GST_PLUGIN_FLAG_BLACKLISTED: GstPluginFlags = 32; + +pub type GstQueryTypeFlags = c_uint; +pub const GST_QUERY_TYPE_UPSTREAM: GstQueryTypeFlags = 1; +pub const GST_QUERY_TYPE_DOWNSTREAM: GstQueryTypeFlags = 2; +pub const GST_QUERY_TYPE_SERIALIZED: GstQueryTypeFlags = 4; + +pub type GstSchedulingFlags = c_uint; +pub const GST_SCHEDULING_FLAG_SEEKABLE: GstSchedulingFlags = 1; +pub const GST_SCHEDULING_FLAG_SEQUENTIAL: GstSchedulingFlags = 2; +pub const GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED: GstSchedulingFlags = 4; + +pub type GstSeekFlags = c_uint; +pub const GST_SEEK_FLAG_NONE: GstSeekFlags = 0; +pub const GST_SEEK_FLAG_FLUSH: GstSeekFlags = 1; +pub const GST_SEEK_FLAG_ACCURATE: GstSeekFlags = 2; +pub const GST_SEEK_FLAG_KEY_UNIT: GstSeekFlags = 4; +pub const GST_SEEK_FLAG_SEGMENT: GstSeekFlags = 8; +pub const GST_SEEK_FLAG_TRICKMODE: GstSeekFlags = 16; +pub const GST_SEEK_FLAG_SKIP: GstSeekFlags = 16; +pub const GST_SEEK_FLAG_SNAP_BEFORE: GstSeekFlags = 32; +pub const GST_SEEK_FLAG_SNAP_AFTER: GstSeekFlags = 64; +pub const GST_SEEK_FLAG_SNAP_NEAREST: GstSeekFlags = 96; +pub const GST_SEEK_FLAG_TRICKMODE_KEY_UNITS: GstSeekFlags = 128; +pub const GST_SEEK_FLAG_TRICKMODE_NO_AUDIO: GstSeekFlags = 256; +pub const GST_SEEK_FLAG_TRICKMODE_FORWARD_PREDICTED: GstSeekFlags = 512; +pub const GST_SEEK_FLAG_INSTANT_RATE_CHANGE: GstSeekFlags = 1024; + +pub type GstSegmentFlags = c_uint; +pub const GST_SEGMENT_FLAG_NONE: GstSegmentFlags = 0; +pub const GST_SEGMENT_FLAG_RESET: GstSegmentFlags = 1; +pub const GST_SEGMENT_FLAG_TRICKMODE: GstSegmentFlags = 16; +pub const GST_SEGMENT_FLAG_SKIP: GstSegmentFlags = 16; +pub const GST_SEGMENT_FLAG_SEGMENT: GstSegmentFlags = 8; +pub const GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS: GstSegmentFlags = 128; +pub const GST_SEGMENT_FLAG_TRICKMODE_FORWARD_PREDICTED: GstSegmentFlags = 512; +pub const GST_SEGMENT_FLAG_TRICKMODE_NO_AUDIO: GstSegmentFlags = 256; + +pub type GstStackTraceFlags = c_uint; +pub const GST_STACK_TRACE_SHOW_NONE: GstStackTraceFlags = 0; +pub const GST_STACK_TRACE_SHOW_FULL: GstStackTraceFlags = 1; + +pub type GstStreamFlags = c_uint; +pub const GST_STREAM_FLAG_NONE: GstStreamFlags = 0; +pub const GST_STREAM_FLAG_SPARSE: GstStreamFlags = 1; +pub const GST_STREAM_FLAG_SELECT: GstStreamFlags = 2; +pub const GST_STREAM_FLAG_UNSELECT: GstStreamFlags = 4; + +pub type GstStreamType = c_uint; +pub const GST_STREAM_TYPE_UNKNOWN: GstStreamType = 1; +pub const GST_STREAM_TYPE_AUDIO: GstStreamType = 2; +pub const GST_STREAM_TYPE_VIDEO: GstStreamType = 4; +pub const GST_STREAM_TYPE_CONTAINER: GstStreamType = 8; +pub const GST_STREAM_TYPE_TEXT: GstStreamType = 16; + +pub type GstTracerValueFlags = c_uint; +pub const GST_TRACER_VALUE_FLAGS_NONE: GstTracerValueFlags = 0; +pub const GST_TRACER_VALUE_FLAGS_OPTIONAL: GstTracerValueFlags = 1; +pub const GST_TRACER_VALUE_FLAGS_AGGREGATED: GstTracerValueFlags = 2; + +// Unions +#[repr(C)] +#[derive(Copy, Clone)] +pub union GstControlBinding_ABI { + pub abi: GstControlBinding_ABI_abi, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstControlBinding_ABI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstControlBinding_ABI @ {:?}", self as *const _)) + .field("abi", unsafe { &self.abi }) + .field("_gst_reserved", unsafe { &self._gst_reserved }) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub union GstPadProbeInfo_ABI { + pub _gst_reserved: [gpointer; 4], + pub abi: GstPadProbeInfo_ABI_abi, +} + +impl ::std::fmt::Debug for GstPadProbeInfo_ABI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPadProbeInfo_ABI @ {:?}", self as *const _)) + .field("_gst_reserved", unsafe { &self._gst_reserved }) + .field("abi", unsafe { &self.abi }) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub union GstPadTemplate_ABI { + pub _gst_reserved: [gpointer; 4], + pub abi: GstPadTemplate_ABI_abi, +} + +impl ::std::fmt::Debug for GstPadTemplate_ABI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPadTemplate_ABI @ {:?}", self as *const _)) + .field("_gst_reserved", unsafe { &self._gst_reserved }) + .field("abi", unsafe { &self.abi }) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub union GstPad_ABI { + pub _gst_reserved: [gpointer; 4], + pub abi: GstPad_ABI_abi, +} + +impl ::std::fmt::Debug for GstPad_ABI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPad_ABI @ {:?}", self as *const _)) + .field("_gst_reserved", unsafe { &self._gst_reserved }) + .field("abi", unsafe { &self.abi }) + .finish() + } +} + +// Callbacks +pub type GstBufferForeachMetaFunc = + Option gboolean>; +pub type GstBufferListFunc = + Option gboolean>; +pub type GstBusFunc = + Option gboolean>; +pub type GstBusSyncHandler = + Option GstBusSyncReply>; +pub type GstCapsFilterMapFunc = + Option gboolean>; +pub type GstCapsForeachFunc = + Option gboolean>; +pub type GstCapsMapFunc = + Option gboolean>; +pub type GstClockCallback = + Option gboolean>; +pub type GstControlBindingConvert = + Option; +pub type GstControlSourceGetValue = + Option gboolean>; +pub type GstControlSourceGetValueArray = Option< + unsafe extern "C" fn( + *mut GstControlSource, + GstClockTime, + GstClockTime, + c_uint, + *mut c_double, + ) -> gboolean, +>; +pub type GstDebugFuncPtr = Option; +pub type GstElementCallAsyncFunc = Option; +pub type GstElementForeachPadFunc = + Option gboolean>; +pub type GstIteratorCopyFunction = + Option; +pub type GstIteratorFoldFunction = Option< + unsafe extern "C" fn(*const gobject::GValue, *mut gobject::GValue, gpointer) -> gboolean, +>; +pub type GstIteratorForeachFunction = + Option; +pub type GstIteratorFreeFunction = Option; +pub type GstIteratorItemFunction = + Option GstIteratorItem>; +pub type GstIteratorNextFunction = + Option GstIteratorResult>; +pub type GstIteratorResyncFunction = Option; +pub type GstLogFunction = Option< + unsafe extern "C" fn( + *mut GstDebugCategory, + GstDebugLevel, + *const c_char, + *const c_char, + c_int, + *mut gobject::GObject, + *mut GstDebugMessage, + gpointer, + ), +>; +pub type GstMemoryCopyFunction = + Option *mut GstMemory>; +pub type GstMemoryIsSpanFunction = + Option gboolean>; +pub type GstMemoryMapFullFunction = + Option gpointer>; +pub type GstMemoryMapFunction = + Option gpointer>; +pub type GstMemoryShareFunction = + Option *mut GstMemory>; +pub type GstMemoryUnmapFullFunction = Option; +pub type GstMemoryUnmapFunction = Option; +pub type GstMetaFreeFunction = Option; +pub type GstMetaInitFunction = + Option gboolean>; +pub type GstMetaTransformFunction = Option< + unsafe extern "C" fn( + *mut GstBuffer, + *mut GstMeta, + *mut GstBuffer, + glib::GQuark, + gpointer, + ) -> gboolean, +>; +pub type GstMiniObjectCopyFunction = + Option *mut GstMiniObject>; +pub type GstMiniObjectDisposeFunction = + Option gboolean>; +pub type GstMiniObjectFreeFunction = Option; +pub type GstMiniObjectNotify = Option; +pub type GstPadActivateFunction = + Option gboolean>; +pub type GstPadActivateModeFunction = + Option gboolean>; +pub type GstPadChainFunction = + Option GstFlowReturn>; +pub type GstPadChainListFunction = + Option GstFlowReturn>; +pub type GstPadEventFullFunction = + Option GstFlowReturn>; +pub type GstPadEventFunction = + Option gboolean>; +pub type GstPadForwardFunction = Option gboolean>; +pub type GstPadGetRangeFunction = Option< + unsafe extern "C" fn( + *mut GstPad, + *mut GstObject, + u64, + c_uint, + *mut *mut GstBuffer, + ) -> GstFlowReturn, +>; +pub type GstPadIterIntLinkFunction = + Option *mut GstIterator>; +pub type GstPadLinkFunction = + Option GstPadLinkReturn>; +pub type GstPadProbeCallback = + Option GstPadProbeReturn>; +pub type GstPadQueryFunction = + Option gboolean>; +pub type GstPadStickyEventsForeachFunction = + Option gboolean>; +pub type GstPadUnlinkFunction = Option; +pub type GstPluginFeatureFilter = + Option gboolean>; +pub type GstPluginFilter = Option gboolean>; +pub type GstPluginInitFullFunc = Option gboolean>; +pub type GstPluginInitFunc = Option gboolean>; +pub type GstPromiseChangeFunc = Option; +pub type GstStructureFilterMapFunc = + Option gboolean>; +pub type GstStructureForeachFunc = + Option gboolean>; +pub type GstStructureMapFunc = + Option gboolean>; +pub type GstTagForeachFunc = + Option; +pub type GstTagMergeFunc = + Option; +pub type GstTaskFunction = Option; +pub type GstTaskPoolFunction = Option; +pub type GstTaskThreadFunc = + Option; +pub type GstTypeFindFunction = Option; +pub type GstValueCompareFunc = + Option c_int>; +pub type GstValueDeserializeFunc = + Option gboolean>; +pub type GstValueSerializeFunc = + Option *mut c_char>; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAllocationParams { + pub flags: GstMemoryFlags, + pub align: size_t, + pub prefix: size_t, + pub padding: size_t, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAllocationParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAllocationParams @ {:?}", self as *const _)) + .field("flags", &self.flags) + .field("align", &self.align) + .field("prefix", &self.prefix) + .field("padding", &self.padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAllocatorClass { + pub object_class: GstObjectClass, + pub alloc: Option< + unsafe extern "C" fn(*mut GstAllocator, size_t, *mut GstAllocationParams) -> *mut GstMemory, + >, + pub free: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstAllocatorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAllocatorClass @ {:?}", self as *const _)) + .field("object_class", &self.object_class) + .field("alloc", &self.alloc) + .field("free", &self.free) + .finish() + } +} + +#[repr(C)] +pub struct _GstAllocatorPrivate(c_void); + +pub type GstAllocatorPrivate = *mut _GstAllocatorPrivate; + +#[repr(C)] +pub struct GstAtomicQueue(c_void); + +impl ::std::fmt::Debug for GstAtomicQueue { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAtomicQueue @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBinClass { + pub parent_class: GstElementClass, + pub pool: *mut glib::GThreadPool, + pub element_added: Option, + pub element_removed: Option, + pub add_element: Option gboolean>, + pub remove_element: Option gboolean>, + pub handle_message: Option, + pub do_latency: Option gboolean>, + pub deep_element_added: Option, + pub deep_element_removed: + Option, + pub _gst_reserved: [gpointer; 2], +} + +impl ::std::fmt::Debug for GstBinClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBinClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("element_added", &self.element_added) + .field("element_removed", &self.element_removed) + .field("add_element", &self.add_element) + .field("remove_element", &self.remove_element) + .field("handle_message", &self.handle_message) + .field("do_latency", &self.do_latency) + .field("deep_element_added", &self.deep_element_added) + .field("deep_element_removed", &self.deep_element_removed) + .finish() + } +} + +#[repr(C)] +pub struct _GstBinPrivate(c_void); + +pub type GstBinPrivate = *mut _GstBinPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBuffer { + pub mini_object: GstMiniObject, + pub pool: *mut GstBufferPool, + pub pts: GstClockTime, + pub dts: GstClockTime, + pub duration: GstClockTime, + pub offset: u64, + pub offset_end: u64, +} + +impl ::std::fmt::Debug for GstBuffer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBuffer @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .field("pool", &self.pool) + .field("pts", &self.pts) + .field("dts", &self.dts) + .field("duration", &self.duration) + .field("offset", &self.offset) + .field("offset_end", &self.offset_end) + .finish() + } +} + +#[repr(C)] +pub struct GstBufferList(c_void); + +impl ::std::fmt::Debug for GstBufferList { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBufferList @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBufferPoolAcquireParams { + pub format: GstFormat, + pub start: i64, + pub stop: i64, + pub flags: GstBufferPoolAcquireFlags, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstBufferPoolAcquireParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstBufferPoolAcquireParams @ {:?}", + self as *const _ + )) + .field("format", &self.format) + .field("start", &self.start) + .field("stop", &self.stop) + .field("flags", &self.flags) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBufferPoolClass { + pub object_class: GstObjectClass, + pub get_options: Option *mut *const c_char>, + pub set_config: Option gboolean>, + pub start: Option gboolean>, + pub stop: Option gboolean>, + pub acquire_buffer: Option< + unsafe extern "C" fn( + *mut GstBufferPool, + *mut *mut GstBuffer, + *mut GstBufferPoolAcquireParams, + ) -> GstFlowReturn, + >, + pub alloc_buffer: Option< + unsafe extern "C" fn( + *mut GstBufferPool, + *mut *mut GstBuffer, + *mut GstBufferPoolAcquireParams, + ) -> GstFlowReturn, + >, + pub reset_buffer: Option, + pub release_buffer: Option, + pub free_buffer: Option, + pub flush_start: Option, + pub flush_stop: Option, + pub _gst_reserved: [gpointer; 2], +} + +impl ::std::fmt::Debug for GstBufferPoolClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBufferPoolClass @ {:?}", self as *const _)) + .field("object_class", &self.object_class) + .field("get_options", &self.get_options) + .field("set_config", &self.set_config) + .field("start", &self.start) + .field("stop", &self.stop) + .field("acquire_buffer", &self.acquire_buffer) + .field("alloc_buffer", &self.alloc_buffer) + .field("reset_buffer", &self.reset_buffer) + .field("release_buffer", &self.release_buffer) + .field("free_buffer", &self.free_buffer) + .field("flush_start", &self.flush_start) + .field("flush_stop", &self.flush_stop) + .finish() + } +} + +#[repr(C)] +pub struct _GstBufferPoolPrivate(c_void); + +pub type GstBufferPoolPrivate = *mut _GstBufferPoolPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBusClass { + pub parent_class: GstObjectClass, + pub message: Option, + pub sync_message: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstBusClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBusClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("message", &self.message) + .field("sync_message", &self.sync_message) + .finish() + } +} + +#[repr(C)] +pub struct _GstBusPrivate(c_void); + +pub type GstBusPrivate = *mut _GstBusPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstCaps { + pub mini_object: GstMiniObject, +} + +impl ::std::fmt::Debug for GstCaps { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstCaps @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .finish() + } +} + +#[repr(C)] +pub struct GstCapsFeatures(c_void); + +impl ::std::fmt::Debug for GstCapsFeatures { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstCapsFeatures @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstChildProxyInterface { + pub parent: gobject::GTypeInterface, + pub get_child_by_name: + Option *mut gobject::GObject>, + pub get_child_by_index: + Option *mut gobject::GObject>, + pub get_children_count: Option c_uint>, + pub child_added: + Option, + pub child_removed: + Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstChildProxyInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstChildProxyInterface @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("get_child_by_name", &self.get_child_by_name) + .field("get_child_by_index", &self.get_child_by_index) + .field("get_children_count", &self.get_children_count) + .field("child_added", &self.child_added) + .field("child_removed", &self.child_removed) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstClockClass { + pub parent_class: GstObjectClass, + pub change_resolution: + Option GstClockTime>, + pub get_resolution: Option GstClockTime>, + pub get_internal_time: Option GstClockTime>, + pub wait: Option< + unsafe extern "C" fn( + *mut GstClock, + *mut GstClockEntry, + *mut GstClockTimeDiff, + ) -> GstClockReturn, + >, + pub wait_async: + Option GstClockReturn>, + pub unschedule: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstClockClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstClockClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("change_resolution", &self.change_resolution) + .field("get_resolution", &self.get_resolution) + .field("get_internal_time", &self.get_internal_time) + .field("wait", &self.wait) + .field("wait_async", &self.wait_async) + .field("unschedule", &self.unschedule) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstClockEntry { + pub refcount: c_int, + pub clock: *mut GstClock, + pub type_: GstClockEntryType, + pub time: GstClockTime, + pub interval: GstClockTime, + pub status: GstClockReturn, + pub func: GstClockCallback, + pub user_data: gpointer, + pub destroy_data: glib::GDestroyNotify, + pub unscheduled: gboolean, + pub woken_up: gboolean, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstClockEntry { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstClockEntry @ {:?}", self as *const _)) + .field("refcount", &self.refcount) + .field("clock", &self.clock) + .field("type_", &self.type_) + .field("time", &self.time) + .field("interval", &self.interval) + .field("status", &self.status) + .field("func", &self.func) + .field("user_data", &self.user_data) + .field("destroy_data", &self.destroy_data) + .field("unscheduled", &self.unscheduled) + .field("woken_up", &self.woken_up) + .finish() + } +} + +#[repr(C)] +pub struct _GstClockPrivate(c_void); + +pub type GstClockPrivate = *mut _GstClockPrivate; + +#[repr(C)] +pub struct GstContext(c_void); + +impl ::std::fmt::Debug for GstContext { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstContext @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstControlBindingClass { + pub parent_class: GstObjectClass, + pub sync_values: Option< + unsafe extern "C" fn( + *mut GstControlBinding, + *mut GstObject, + GstClockTime, + GstClockTime, + ) -> gboolean, + >, + pub get_value: + Option *mut gobject::GValue>, + pub get_value_array: Option< + unsafe extern "C" fn( + *mut GstControlBinding, + GstClockTime, + GstClockTime, + c_uint, + gpointer, + ) -> gboolean, + >, + pub get_g_value_array: Option< + unsafe extern "C" fn( + *mut GstControlBinding, + GstClockTime, + GstClockTime, + c_uint, + *mut gobject::GValue, + ) -> gboolean, + >, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstControlBindingClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstControlBindingClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("sync_values", &self.sync_values) + .field("get_value", &self.get_value) + .field("get_value_array", &self.get_value_array) + .field("get_g_value_array", &self.get_g_value_array) + .finish() + } +} + +#[repr(C)] +pub struct _GstControlBindingPrivate(c_void); + +pub type GstControlBindingPrivate = *mut _GstControlBindingPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstControlBinding_ABI_abi { + pub priv_: *mut GstControlBindingPrivate, +} + +impl ::std::fmt::Debug for GstControlBinding_ABI_abi { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstControlBinding_ABI_abi @ {:?}", + self as *const _ + )) + .field("priv_", &self.priv_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstControlSourceClass { + pub parent_class: GstObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstControlSourceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstControlSourceClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct GstDateTime(c_void); + +impl ::std::fmt::Debug for GstDateTime { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDateTime @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDebugCategory { + pub threshold: c_int, + pub color: c_uint, + pub name: *const c_char, + pub description: *const c_char, +} + +impl ::std::fmt::Debug for GstDebugCategory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDebugCategory @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct _GstDebugMessage(c_void); + +pub type GstDebugMessage = *mut _GstDebugMessage; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDeviceClass { + pub parent_class: GstObjectClass, + pub create_element: + Option *mut GstElement>, + pub reconfigure_element: + Option gboolean>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDeviceClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDeviceClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("create_element", &self.create_element) + .field("reconfigure_element", &self.reconfigure_element) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDeviceMonitorClass { + pub parent_class: GstObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDeviceMonitorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDeviceMonitorClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstDeviceMonitorPrivate(c_void); + +pub type GstDeviceMonitorPrivate = *mut _GstDeviceMonitorPrivate; + +#[repr(C)] +pub struct _GstDevicePrivate(c_void); + +pub type GstDevicePrivate = *mut _GstDevicePrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDeviceProviderClass { + pub parent_class: GstObjectClass, + pub factory: *mut GstDeviceProviderFactory, + pub probe: Option *mut glib::GList>, + pub start: Option gboolean>, + pub stop: Option, + pub metadata: gpointer, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDeviceProviderClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDeviceProviderClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("factory", &self.factory) + .field("probe", &self.probe) + .field("start", &self.start) + .field("stop", &self.stop) + .finish() + } +} + +#[repr(C)] +pub struct _GstDeviceProviderFactoryClass(c_void); + +pub type GstDeviceProviderFactoryClass = *mut _GstDeviceProviderFactoryClass; + +#[repr(C)] +pub struct _GstDeviceProviderPrivate(c_void); + +pub type GstDeviceProviderPrivate = *mut _GstDeviceProviderPrivate; + +#[repr(C)] +pub struct _GstDynamicTypeFactoryClass(c_void); + +pub type GstDynamicTypeFactoryClass = *mut _GstDynamicTypeFactoryClass; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstElementClass { + pub parent_class: GstObjectClass, + pub metadata: gpointer, + pub elementfactory: *mut GstElementFactory, + pub padtemplates: *mut glib::GList, + pub numpadtemplates: c_int, + pub pad_templ_cookie: u32, + pub pad_added: Option, + pub pad_removed: Option, + pub no_more_pads: Option, + pub request_new_pad: Option< + unsafe extern "C" fn( + *mut GstElement, + *mut GstPadTemplate, + *const c_char, + *const GstCaps, + ) -> *mut GstPad, + >, + pub release_pad: Option, + pub get_state: Option< + unsafe extern "C" fn( + *mut GstElement, + *mut GstState, + *mut GstState, + GstClockTime, + ) -> GstStateChangeReturn, + >, + pub set_state: Option GstStateChangeReturn>, + pub change_state: + Option GstStateChangeReturn>, + pub state_changed: Option, + pub set_bus: Option, + pub provide_clock: Option *mut GstClock>, + pub set_clock: Option gboolean>, + pub send_event: Option gboolean>, + pub query: Option gboolean>, + pub post_message: Option gboolean>, + pub set_context: Option, + pub _gst_reserved: [gpointer; 18], +} + +impl ::std::fmt::Debug for GstElementClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstElementClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("metadata", &self.metadata) + .field("elementfactory", &self.elementfactory) + .field("padtemplates", &self.padtemplates) + .field("numpadtemplates", &self.numpadtemplates) + .field("pad_templ_cookie", &self.pad_templ_cookie) + .field("pad_added", &self.pad_added) + .field("pad_removed", &self.pad_removed) + .field("no_more_pads", &self.no_more_pads) + .field("request_new_pad", &self.request_new_pad) + .field("release_pad", &self.release_pad) + .field("get_state", &self.get_state) + .field("set_state", &self.set_state) + .field("change_state", &self.change_state) + .field("state_changed", &self.state_changed) + .field("set_bus", &self.set_bus) + .field("provide_clock", &self.provide_clock) + .field("set_clock", &self.set_clock) + .field("send_event", &self.send_event) + .field("query", &self.query) + .field("post_message", &self.post_message) + .field("set_context", &self.set_context) + .finish() + } +} + +#[repr(C)] +pub struct _GstElementFactoryClass(c_void); + +pub type GstElementFactoryClass = *mut _GstElementFactoryClass; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstEvent { + pub mini_object: GstMiniObject, + pub type_: GstEventType, + pub timestamp: u64, + pub seqnum: u32, +} + +impl ::std::fmt::Debug for GstEvent { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstEvent @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .field("type_", &self.type_) + .field("timestamp", &self.timestamp) + .field("seqnum", &self.seqnum) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstFormatDefinition { + pub value: GstFormat, + pub nick: *const c_char, + pub description: *const c_char, + pub quark: glib::GQuark, +} + +impl ::std::fmt::Debug for GstFormatDefinition { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstFormatDefinition @ {:?}", self as *const _)) + .field("value", &self.value) + .field("nick", &self.nick) + .field("description", &self.description) + .field("quark", &self.quark) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGhostPadClass { + pub parent_class: GstProxyPadClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstGhostPadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGhostPadClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstGhostPadPrivate(c_void); + +pub type GstGhostPadPrivate = *mut _GstGhostPadPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstIterator { + pub copy: GstIteratorCopyFunction, + pub next: GstIteratorNextFunction, + pub item: GstIteratorItemFunction, + pub resync: GstIteratorResyncFunction, + pub free: GstIteratorFreeFunction, + pub pushed: *mut GstIterator, + pub type_: GType, + pub lock: *mut glib::GMutex, + pub cookie: u32, + pub master_cookie: *mut u32, + pub size: c_uint, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstIterator { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstIterator @ {:?}", self as *const _)) + .field("copy", &self.copy) + .field("next", &self.next) + .field("item", &self.item) + .field("resync", &self.resync) + .field("free", &self.free) + .field("pushed", &self.pushed) + .field("type_", &self.type_) + .field("lock", &self.lock) + .field("cookie", &self.cookie) + .field("master_cookie", &self.master_cookie) + .field("size", &self.size) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMapInfo { + pub memory: *mut GstMemory, + pub flags: GstMapFlags, + pub data: *mut u8, + pub size: size_t, + pub maxsize: size_t, + pub user_data: [gpointer; 4], + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstMapInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMapInfo @ {:?}", self as *const _)) + .field("memory", &self.memory) + .field("flags", &self.flags) + .field("data", &self.data) + .field("size", &self.size) + .field("maxsize", &self.maxsize) + .field("user_data", &self.user_data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMemory { + pub mini_object: GstMiniObject, + pub allocator: *mut GstAllocator, + pub parent: *mut GstMemory, + pub maxsize: size_t, + pub align: size_t, + pub offset: size_t, + pub size: size_t, +} + +impl ::std::fmt::Debug for GstMemory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMemory @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .field("allocator", &self.allocator) + .field("parent", &self.parent) + .field("maxsize", &self.maxsize) + .field("align", &self.align) + .field("offset", &self.offset) + .field("size", &self.size) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMessage { + pub mini_object: GstMiniObject, + pub type_: GstMessageType, + pub timestamp: u64, + pub src: *mut GstObject, + pub seqnum: u32, + pub lock: glib::GMutex, + pub cond: glib::GCond, +} + +impl ::std::fmt::Debug for GstMessage { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMessage @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .field("type_", &self.type_) + .field("timestamp", &self.timestamp) + .field("src", &self.src) + .field("seqnum", &self.seqnum) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMeta { + pub flags: GstMetaFlags, + pub info: *const GstMetaInfo, +} + +impl ::std::fmt::Debug for GstMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMeta @ {:?}", self as *const _)) + .field("flags", &self.flags) + .field("info", &self.info) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMetaInfo { + pub api: GType, + pub type_: GType, + pub size: size_t, + pub init_func: GstMetaInitFunction, + pub free_func: GstMetaFreeFunction, + pub transform_func: GstMetaTransformFunction, +} + +impl ::std::fmt::Debug for GstMetaInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMetaInfo @ {:?}", self as *const _)) + .field("api", &self.api) + .field("type_", &self.type_) + .field("size", &self.size) + .field("init_func", &self.init_func) + .field("free_func", &self.free_func) + .field("transform_func", &self.transform_func) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMetaTransformCopy { + pub region: gboolean, + pub offset: size_t, + pub size: size_t, +} + +impl ::std::fmt::Debug for GstMetaTransformCopy { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMetaTransformCopy @ {:?}", self as *const _)) + .field("region", &self.region) + .field("offset", &self.offset) + .field("size", &self.size) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMiniObject { + pub type_: GType, + pub refcount: c_int, + pub lockstate: c_int, + pub flags: c_uint, + pub copy: GstMiniObjectCopyFunction, + pub dispose: GstMiniObjectDisposeFunction, + pub free: GstMiniObjectFreeFunction, + pub priv_uint: c_uint, + pub priv_pointer: gpointer, +} + +impl ::std::fmt::Debug for GstMiniObject { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMiniObject @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("refcount", &self.refcount) + .field("lockstate", &self.lockstate) + .field("flags", &self.flags) + .field("copy", &self.copy) + .field("dispose", &self.dispose) + .field("free", &self.free) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstObjectClass { + pub parent_class: gobject::GInitiallyUnownedClass, + pub path_string_separator: *const c_char, + pub deep_notify: + Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstObjectClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstObjectClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("path_string_separator", &self.path_string_separator) + .field("deep_notify", &self.deep_notify) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPadClass { + pub parent_class: GstObjectClass, + pub linked: Option, + pub unlinked: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstPadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPadClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("linked", &self.linked) + .field("unlinked", &self.unlinked) + .finish() + } +} + +#[repr(C)] +pub struct _GstPadPrivate(c_void); + +pub type GstPadPrivate = *mut _GstPadPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPadProbeInfo { + pub type_: GstPadProbeType, + pub id: c_ulong, + pub data: gpointer, + pub offset: u64, + pub size: c_uint, + pub ABI: GstPadProbeInfo_ABI, +} + +impl ::std::fmt::Debug for GstPadProbeInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPadProbeInfo @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("id", &self.id) + .field("data", &self.data) + .field("offset", &self.offset) + .field("size", &self.size) + .field("ABI", &self.ABI) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPadProbeInfo_ABI_abi { + pub flow_ret: GstFlowReturn, +} + +impl ::std::fmt::Debug for GstPadProbeInfo_ABI_abi { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPadProbeInfo_ABI_abi @ {:?}", self as *const _)) + .field("flow_ret", &self.flow_ret) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPadTemplateClass { + pub parent_class: GstObjectClass, + pub pad_created: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstPadTemplateClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPadTemplateClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("pad_created", &self.pad_created) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPadTemplate_ABI_abi { + pub gtype: GType, + pub documentation_caps: *mut GstCaps, +} + +impl ::std::fmt::Debug for GstPadTemplate_ABI_abi { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPadTemplate_ABI_abi @ {:?}", self as *const _)) + .field("gtype", &self.gtype) + .field("documentation_caps", &self.documentation_caps) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPad_ABI_abi { + pub last_flowret: GstFlowReturn, + pub eventfullfunc: GstPadEventFullFunction, +} + +impl ::std::fmt::Debug for GstPad_ABI_abi { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPad_ABI_abi @ {:?}", self as *const _)) + .field("last_flowret", &self.last_flowret) + .field("eventfullfunc", &self.eventfullfunc) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstParamSpecArray { + pub parent_instance: gobject::GParamSpec, + pub element_spec: *mut gobject::GParamSpec, +} + +impl ::std::fmt::Debug for GstParamSpecArray { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstParamSpecArray @ {:?}", self as *const _)) + .field("parent_instance", &self.parent_instance) + .field("element_spec", &self.element_spec) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstParamSpecFraction { + pub parent_instance: gobject::GParamSpec, + pub min_num: c_int, + pub min_den: c_int, + pub max_num: c_int, + pub max_den: c_int, + pub def_num: c_int, + pub def_den: c_int, +} + +impl ::std::fmt::Debug for GstParamSpecFraction { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstParamSpecFraction @ {:?}", self as *const _)) + .field("parent_instance", &self.parent_instance) + .field("min_num", &self.min_num) + .field("min_den", &self.min_den) + .field("max_num", &self.max_num) + .field("max_den", &self.max_den) + .field("def_num", &self.def_num) + .field("def_den", &self.def_den) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstParentBufferMeta { + pub parent: GstMeta, + pub buffer: *mut GstBuffer, +} + +impl ::std::fmt::Debug for GstParentBufferMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstParentBufferMeta @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("buffer", &self.buffer) + .finish() + } +} + +#[repr(C)] +pub struct GstParseContext(c_void); + +impl ::std::fmt::Debug for GstParseContext { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstParseContext @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPipelineClass { + pub parent_class: GstBinClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstPipelineClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPipelineClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstPipelinePrivate(c_void); + +pub type GstPipelinePrivate = *mut _GstPipelinePrivate; + +#[repr(C)] +pub struct _GstPluginClass(c_void); + +pub type GstPluginClass = *mut _GstPluginClass; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPluginDesc { + pub major_version: c_int, + pub minor_version: c_int, + pub name: *const c_char, + pub description: *const c_char, + pub plugin_init: GstPluginInitFunc, + pub version: *const c_char, + pub license: *const c_char, + pub source: *const c_char, + pub package: *const c_char, + pub origin: *const c_char, + pub release_datetime: *const c_char, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstPluginDesc { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPluginDesc @ {:?}", self as *const _)) + .field("major_version", &self.major_version) + .field("minor_version", &self.minor_version) + .field("name", &self.name) + .field("description", &self.description) + .field("plugin_init", &self.plugin_init) + .field("version", &self.version) + .field("license", &self.license) + .field("source", &self.source) + .field("package", &self.package) + .field("origin", &self.origin) + .field("release_datetime", &self.release_datetime) + .finish() + } +} + +#[repr(C)] +pub struct _GstPluginFeatureClass(c_void); + +pub type GstPluginFeatureClass = *mut _GstPluginFeatureClass; + +#[repr(C)] +pub struct _GstPoll(c_void); + +pub type GstPoll = *mut _GstPoll; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPollFD { + pub fd: c_int, + pub idx: c_int, +} + +impl ::std::fmt::Debug for GstPollFD { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPollFD @ {:?}", self as *const _)) + .field("fd", &self.fd) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPresetInterface { + pub parent: gobject::GTypeInterface, + pub get_preset_names: Option *mut *mut c_char>, + pub get_property_names: Option *mut *mut c_char>, + pub load_preset: Option gboolean>, + pub save_preset: Option gboolean>, + pub rename_preset: + Option gboolean>, + pub delete_preset: Option gboolean>, + pub set_meta: Option< + unsafe extern "C" fn( + *mut GstPreset, + *const c_char, + *const c_char, + *mut *mut c_char, + ) -> gboolean, + >, + pub get_meta: Option< + unsafe extern "C" fn( + *mut GstPreset, + *const c_char, + *const c_char, + *mut *mut c_char, + ) -> gboolean, + >, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstPresetInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPresetInterface @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("get_preset_names", &self.get_preset_names) + .field("get_property_names", &self.get_property_names) + .field("load_preset", &self.load_preset) + .field("save_preset", &self.save_preset) + .field("rename_preset", &self.rename_preset) + .field("delete_preset", &self.delete_preset) + .field("set_meta", &self.set_meta) + .field("get_meta", &self.get_meta) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPromise { + pub parent: GstMiniObject, +} + +impl ::std::fmt::Debug for GstPromise { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPromise @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstProtectionMeta { + pub meta: GstMeta, + pub info: *mut GstStructure, +} + +impl ::std::fmt::Debug for GstProtectionMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstProtectionMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("info", &self.info) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstProxyPadClass { + pub parent_class: GstPadClass, + pub _gst_reserved: [gpointer; 1], +} + +impl ::std::fmt::Debug for GstProxyPadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstProxyPadClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstProxyPadPrivate(c_void); + +pub type GstProxyPadPrivate = *mut _GstProxyPadPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstQuery { + pub mini_object: GstMiniObject, + pub type_: GstQueryType, +} + +impl ::std::fmt::Debug for GstQuery { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstQuery @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .field("type_", &self.type_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstReferenceTimestampMeta { + pub parent: GstMeta, + pub reference: *mut GstCaps, + pub timestamp: GstClockTime, + pub duration: GstClockTime, +} + +impl ::std::fmt::Debug for GstReferenceTimestampMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstReferenceTimestampMeta @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("reference", &self.reference) + .field("timestamp", &self.timestamp) + .field("duration", &self.duration) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRegistryClass { + pub parent_class: GstObjectClass, +} + +impl ::std::fmt::Debug for GstRegistryClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRegistryClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstRegistryPrivate(c_void); + +pub type GstRegistryPrivate = *mut _GstRegistryPrivate; + +#[repr(C)] +pub struct GstSample(c_void); + +impl ::std::fmt::Debug for GstSample { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSample @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSegment { + pub flags: GstSegmentFlags, + pub rate: c_double, + pub applied_rate: c_double, + pub format: GstFormat, + pub base: u64, + pub offset: u64, + pub start: u64, + pub stop: u64, + pub time: u64, + pub position: u64, + pub duration: u64, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstSegment { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSegment @ {:?}", self as *const _)) + .field("flags", &self.flags) + .field("rate", &self.rate) + .field("applied_rate", &self.applied_rate) + .field("format", &self.format) + .field("base", &self.base) + .field("offset", &self.offset) + .field("start", &self.start) + .field("stop", &self.stop) + .field("time", &self.time) + .field("position", &self.position) + .field("duration", &self.duration) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstStaticCaps { + pub caps: *mut GstCaps, + pub string: *const c_char, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstStaticCaps { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstStaticCaps @ {:?}", self as *const _)) + .field("caps", &self.caps) + .field("string", &self.string) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstStaticPadTemplate { + pub name_template: *const c_char, + pub direction: GstPadDirection, + pub presence: GstPadPresence, + pub static_caps: GstStaticCaps, +} + +impl ::std::fmt::Debug for GstStaticPadTemplate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstStaticPadTemplate @ {:?}", self as *const _)) + .field("name_template", &self.name_template) + .field("direction", &self.direction) + .field("presence", &self.presence) + .field("static_caps", &self.static_caps) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstStreamClass { + pub parent_class: GstObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstStreamClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstStreamClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstStreamCollectionClass { + pub parent_class: GstObjectClass, + pub stream_notify: Option< + unsafe extern "C" fn(*mut GstStreamCollection, *mut GstStream, *mut gobject::GParamSpec), + >, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstStreamCollectionClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstStreamCollectionClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("stream_notify", &self.stream_notify) + .finish() + } +} + +#[repr(C)] +pub struct _GstStreamCollectionPrivate(c_void); + +pub type GstStreamCollectionPrivate = *mut _GstStreamCollectionPrivate; + +#[repr(C)] +pub struct _GstStreamPrivate(c_void); + +pub type GstStreamPrivate = *mut _GstStreamPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstStructure { + pub type_: GType, + pub name: glib::GQuark, +} + +impl ::std::fmt::Debug for GstStructure { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstStructure @ {:?}", self as *const _)) + .field("type_", &self.type_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSystemClockClass { + pub parent_class: GstClockClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstSystemClockClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSystemClockClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstSystemClockPrivate(c_void); + +pub type GstSystemClockPrivate = *mut _GstSystemClockPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTagList { + pub mini_object: GstMiniObject, +} + +impl ::std::fmt::Debug for GstTagList { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTagList @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTagSetterInterface { + pub g_iface: gobject::GTypeInterface, +} + +impl ::std::fmt::Debug for GstTagSetterInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTagSetterInterface @ {:?}", self as *const _)) + .field("g_iface", &self.g_iface) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTaskClass { + pub parent_class: GstObjectClass, + pub pool: *mut GstTaskPool, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTaskClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTaskClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTaskPoolClass { + pub parent_class: GstObjectClass, + pub prepare: Option, + pub cleanup: Option, + pub push: Option< + unsafe extern "C" fn( + *mut GstTaskPool, + GstTaskPoolFunction, + gpointer, + *mut *mut glib::GError, + ) -> gpointer, + >, + pub join: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTaskPoolClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTaskPoolClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("prepare", &self.prepare) + .field("cleanup", &self.cleanup) + .field("push", &self.push) + .field("join", &self.join) + .finish() + } +} + +#[repr(C)] +pub struct _GstTaskPrivate(c_void); + +pub type GstTaskPrivate = *mut _GstTaskPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTimedValue { + pub timestamp: GstClockTime, + pub value: c_double, +} + +impl ::std::fmt::Debug for GstTimedValue { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTimedValue @ {:?}", self as *const _)) + .field("timestamp", &self.timestamp) + .field("value", &self.value) + .finish() + } +} + +#[repr(C)] +pub struct GstToc(c_void); + +impl ::std::fmt::Debug for GstToc { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstToc @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstTocEntry(c_void); + +impl ::std::fmt::Debug for GstTocEntry { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTocEntry @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTocSetterInterface { + pub g_iface: gobject::GTypeInterface, +} + +impl ::std::fmt::Debug for GstTocSetterInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTocSetterInterface @ {:?}", self as *const _)) + .field("g_iface", &self.g_iface) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTracerClass { + pub parent_class: GstObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTracerClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTracerClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstTracerFactoryClass(c_void); + +pub type GstTracerFactoryClass = *mut _GstTracerFactoryClass; + +#[repr(C)] +pub struct _GstTracerPrivate(c_void); + +pub type GstTracerPrivate = *mut _GstTracerPrivate; + +#[repr(C)] +pub struct _GstTracerRecordClass(c_void); + +pub type GstTracerRecordClass = *mut _GstTracerRecordClass; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTypeFind { + pub peek: Option *const u8>, + pub suggest: Option, + pub data: gpointer, + pub get_length: Option u64>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTypeFind { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTypeFind @ {:?}", self as *const _)) + .field("peek", &self.peek) + .field("suggest", &self.suggest) + .field("data", &self.data) + .field("get_length", &self.get_length) + .finish() + } +} + +#[repr(C)] +pub struct _GstTypeFindFactoryClass(c_void); + +pub type GstTypeFindFactoryClass = *mut _GstTypeFindFactoryClass; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstURIHandlerInterface { + pub parent: gobject::GTypeInterface, + pub get_type: Option GstURIType>, + pub get_protocols: Option *const *const c_char>, + pub get_uri: Option *mut c_char>, + pub set_uri: Option< + unsafe extern "C" fn(*mut GstURIHandler, *const c_char, *mut *mut glib::GError) -> gboolean, + >, +} + +impl ::std::fmt::Debug for GstURIHandlerInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstURIHandlerInterface @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("get_type", &self.get_type) + .field("get_protocols", &self.get_protocols) + .field("get_uri", &self.get_uri) + .field("set_uri", &self.set_uri) + .finish() + } +} + +#[repr(C)] +pub struct GstUri(c_void); + +impl ::std::fmt::Debug for GstUri { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstUri @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstValueTable { + pub type_: GType, + pub compare: GstValueCompareFunc, + pub serialize: GstValueSerializeFunc, + pub deserialize: GstValueDeserializeFunc, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstValueTable { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstValueTable @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("compare", &self.compare) + .field("serialize", &self.serialize) + .field("deserialize", &self.deserialize) + .finish() + } +} + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstAllocator { + pub object: GstObject, + pub mem_type: *const c_char, + pub mem_map: GstMemoryMapFunction, + pub mem_unmap: GstMemoryUnmapFunction, + pub mem_copy: GstMemoryCopyFunction, + pub mem_share: GstMemoryShareFunction, + pub mem_is_span: GstMemoryIsSpanFunction, + pub mem_map_full: GstMemoryMapFullFunction, + pub mem_unmap_full: GstMemoryUnmapFullFunction, + pub _gst_reserved: [gpointer; 2], + pub priv_: *mut GstAllocatorPrivate, +} + +impl ::std::fmt::Debug for GstAllocator { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstAllocator @ {:?}", self as *const _)) + .field("object", &self.object) + .field("mem_type", &self.mem_type) + .field("mem_map", &self.mem_map) + .field("mem_unmap", &self.mem_unmap) + .field("mem_copy", &self.mem_copy) + .field("mem_share", &self.mem_share) + .field("mem_is_span", &self.mem_is_span) + .field("mem_map_full", &self.mem_map_full) + .field("mem_unmap_full", &self.mem_unmap_full) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBin { + pub element: GstElement, + pub numchildren: c_int, + pub children: *mut glib::GList, + pub children_cookie: u32, + pub child_bus: *mut GstBus, + pub messages: *mut glib::GList, + pub polling: gboolean, + pub state_dirty: gboolean, + pub clock_dirty: gboolean, + pub provided_clock: *mut GstClock, + pub clock_provider: *mut GstElement, + pub priv_: *mut GstBinPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstBin { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBin @ {:?}", self as *const _)) + .field("element", &self.element) + .field("numchildren", &self.numchildren) + .field("children", &self.children) + .field("children_cookie", &self.children_cookie) + .field("child_bus", &self.child_bus) + .field("messages", &self.messages) + .field("polling", &self.polling) + .field("state_dirty", &self.state_dirty) + .field("clock_dirty", &self.clock_dirty) + .field("provided_clock", &self.provided_clock) + .field("clock_provider", &self.clock_provider) + .finish() + } +} + +#[repr(C)] +pub struct GstBitmask(c_void); + +impl ::std::fmt::Debug for GstBitmask { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBitmask @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBufferPool { + pub object: GstObject, + pub flushing: c_int, + pub priv_: *mut GstBufferPoolPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstBufferPool { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBufferPool @ {:?}", self as *const _)) + .field("object", &self.object) + .field("flushing", &self.flushing) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstBus { + pub object: GstObject, + pub priv_: *mut GstBusPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstBus { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstBus @ {:?}", self as *const _)) + .field("object", &self.object) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstClock { + pub object: GstObject, + pub priv_: *mut GstClockPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstClock { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstClock @ {:?}", self as *const _)) + .field("object", &self.object) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstControlBinding { + pub parent: GstObject, + pub name: *mut c_char, + pub pspec: *mut gobject::GParamSpec, + pub object: *mut GstObject, + pub disabled: gboolean, + pub ABI: GstControlBinding_ABI, +} + +impl ::std::fmt::Debug for GstControlBinding { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstControlBinding @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("name", &self.name) + .field("pspec", &self.pspec) + .field("ABI", &self.ABI) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstControlSource { + pub parent: GstObject, + pub get_value: GstControlSourceGetValue, + pub get_value_array: GstControlSourceGetValueArray, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstControlSource { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstControlSource @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("get_value", &self.get_value) + .field("get_value_array", &self.get_value_array) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDevice { + pub parent: GstObject, + pub priv_: *mut GstDevicePrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDevice { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDevice @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDeviceMonitor { + pub parent: GstObject, + pub priv_: *mut GstDeviceMonitorPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDeviceMonitor { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDeviceMonitor @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstDeviceProvider { + pub parent: GstObject, + pub devices: *mut glib::GList, + pub priv_: *mut GstDeviceProviderPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstDeviceProvider { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDeviceProvider @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("devices", &self.devices) + .finish() + } +} + +#[repr(C)] +pub struct GstDeviceProviderFactory(c_void); + +impl ::std::fmt::Debug for GstDeviceProviderFactory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstDeviceProviderFactory @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +pub struct GstDoubleRange(c_void); + +impl ::std::fmt::Debug for GstDoubleRange { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDoubleRange @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstDynamicTypeFactory(c_void); + +impl ::std::fmt::Debug for GstDynamicTypeFactory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstDynamicTypeFactory @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstElement { + pub object: GstObject, + pub state_lock: glib::GRecMutex, + pub state_cond: glib::GCond, + pub state_cookie: u32, + pub target_state: GstState, + pub current_state: GstState, + pub next_state: GstState, + pub pending_state: GstState, + pub last_return: GstStateChangeReturn, + pub bus: *mut GstBus, + pub clock: *mut GstClock, + pub base_time: GstClockTimeDiff, + pub start_time: GstClockTime, + pub numpads: u16, + pub pads: *mut glib::GList, + pub numsrcpads: u16, + pub srcpads: *mut glib::GList, + pub numsinkpads: u16, + pub sinkpads: *mut glib::GList, + pub pads_cookie: u32, + pub contexts: *mut glib::GList, + pub _gst_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GstElement { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstElement @ {:?}", self as *const _)) + .field("object", &self.object) + .field("state_lock", &self.state_lock) + .field("state_cond", &self.state_cond) + .field("state_cookie", &self.state_cookie) + .field("target_state", &self.target_state) + .field("current_state", &self.current_state) + .field("next_state", &self.next_state) + .field("pending_state", &self.pending_state) + .field("last_return", &self.last_return) + .field("bus", &self.bus) + .field("clock", &self.clock) + .field("base_time", &self.base_time) + .field("start_time", &self.start_time) + .field("numpads", &self.numpads) + .field("pads", &self.pads) + .field("numsrcpads", &self.numsrcpads) + .field("srcpads", &self.srcpads) + .field("numsinkpads", &self.numsinkpads) + .field("sinkpads", &self.sinkpads) + .field("pads_cookie", &self.pads_cookie) + .field("contexts", &self.contexts) + .finish() + } +} + +#[repr(C)] +pub struct GstElementFactory(c_void); + +impl ::std::fmt::Debug for GstElementFactory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstElementFactory @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstFlagSet(c_void); + +impl ::std::fmt::Debug for GstFlagSet { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstFlagSet @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstFraction(c_void); + +impl ::std::fmt::Debug for GstFraction { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstFraction @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstFractionRange(c_void); + +impl ::std::fmt::Debug for GstFractionRange { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstFractionRange @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstGhostPad { + pub pad: GstProxyPad, + pub priv_: *mut GstGhostPadPrivate, +} + +impl ::std::fmt::Debug for GstGhostPad { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstGhostPad @ {:?}", self as *const _)) + .field("pad", &self.pad) + .finish() + } +} + +#[repr(C)] +pub struct GstInt64Range(c_void); + +impl ::std::fmt::Debug for GstInt64Range { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstInt64Range @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstIntRange(c_void); + +impl ::std::fmt::Debug for GstIntRange { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstIntRange @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstObject { + pub object: gobject::GInitiallyUnowned, + pub lock: glib::GMutex, + pub name: *mut c_char, + pub parent: *mut GstObject, + pub flags: u32, + pub control_bindings: *mut glib::GList, + pub control_rate: u64, + pub last_sync: u64, + pub _gst_reserved: gpointer, +} + +impl ::std::fmt::Debug for GstObject { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstObject @ {:?}", self as *const _)) + .field("object", &self.object) + .field("lock", &self.lock) + .field("name", &self.name) + .field("parent", &self.parent) + .field("flags", &self.flags) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPad { + pub object: GstObject, + pub element_private: gpointer, + pub padtemplate: *mut GstPadTemplate, + pub direction: GstPadDirection, + pub stream_rec_lock: glib::GRecMutex, + pub task: *mut GstTask, + pub block_cond: glib::GCond, + pub probes: glib::GHookList, + pub mode: GstPadMode, + pub activatefunc: GstPadActivateFunction, + pub activatedata: gpointer, + pub activatenotify: glib::GDestroyNotify, + pub activatemodefunc: GstPadActivateModeFunction, + pub activatemodedata: gpointer, + pub activatemodenotify: glib::GDestroyNotify, + pub peer: *mut GstPad, + pub linkfunc: GstPadLinkFunction, + pub linkdata: gpointer, + pub linknotify: glib::GDestroyNotify, + pub unlinkfunc: GstPadUnlinkFunction, + pub unlinkdata: gpointer, + pub unlinknotify: glib::GDestroyNotify, + pub chainfunc: GstPadChainFunction, + pub chaindata: gpointer, + pub chainnotify: glib::GDestroyNotify, + pub chainlistfunc: GstPadChainListFunction, + pub chainlistdata: gpointer, + pub chainlistnotify: glib::GDestroyNotify, + pub getrangefunc: GstPadGetRangeFunction, + pub getrangedata: gpointer, + pub getrangenotify: glib::GDestroyNotify, + pub eventfunc: GstPadEventFunction, + pub eventdata: gpointer, + pub eventnotify: glib::GDestroyNotify, + pub offset: i64, + pub queryfunc: GstPadQueryFunction, + pub querydata: gpointer, + pub querynotify: glib::GDestroyNotify, + pub iterintlinkfunc: GstPadIterIntLinkFunction, + pub iterintlinkdata: gpointer, + pub iterintlinknotify: glib::GDestroyNotify, + pub num_probes: c_int, + pub num_blocked: c_int, + pub priv_: *mut GstPadPrivate, + pub ABI: GstPad_ABI, +} + +impl ::std::fmt::Debug for GstPad { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPad @ {:?}", self as *const _)) + .field("object", &self.object) + .field("element_private", &self.element_private) + .field("padtemplate", &self.padtemplate) + .field("direction", &self.direction) + .field("ABI", &self.ABI) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPadTemplate { + pub object: GstObject, + pub name_template: *mut c_char, + pub direction: GstPadDirection, + pub presence: GstPadPresence, + pub caps: *mut GstCaps, + pub ABI: GstPadTemplate_ABI, +} + +impl ::std::fmt::Debug for GstPadTemplate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPadTemplate @ {:?}", self as *const _)) + .field("object", &self.object) + .field("name_template", &self.name_template) + .field("direction", &self.direction) + .field("presence", &self.presence) + .field("caps", &self.caps) + .field("ABI", &self.ABI) + .finish() + } +} + +#[repr(C)] +pub struct GstParamArray(c_void); + +impl ::std::fmt::Debug for GstParamArray { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstParamArray @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstParamFraction(c_void); + +impl ::std::fmt::Debug for GstParamFraction { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstParamFraction @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstPipeline { + pub bin: GstBin, + pub fixed_clock: *mut GstClock, + pub stream_time: GstClockTime, + pub delay: GstClockTime, + pub priv_: *mut GstPipelinePrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstPipeline { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPipeline @ {:?}", self as *const _)) + .field("bin", &self.bin) + .field("fixed_clock", &self.fixed_clock) + .field("stream_time", &self.stream_time) + .field("delay", &self.delay) + .finish() + } +} + +#[repr(C)] +pub struct GstPlugin(c_void); + +impl ::std::fmt::Debug for GstPlugin { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPlugin @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstPluginFeature(c_void); + +impl ::std::fmt::Debug for GstPluginFeature { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstPluginFeature @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstProxyPad { + pub pad: GstPad, + pub priv_: *mut GstProxyPadPrivate, +} + +impl ::std::fmt::Debug for GstProxyPad { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstProxyPad @ {:?}", self as *const _)) + .field("pad", &self.pad) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRegistry { + pub object: GstObject, + pub priv_: *mut GstRegistryPrivate, +} + +impl ::std::fmt::Debug for GstRegistry { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRegistry @ {:?}", self as *const _)) + .field("object", &self.object) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstStream { + pub object: GstObject, + pub stream_id: *const c_char, + pub priv_: *mut GstStreamPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstStream { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstStream @ {:?}", self as *const _)) + .field("stream_id", &self.stream_id) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstStreamCollection { + pub object: GstObject, + pub upstream_id: *mut c_char, + pub priv_: *mut GstStreamCollectionPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstStreamCollection { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstStreamCollection @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSystemClock { + pub clock: GstClock, + pub priv_: *mut GstSystemClockPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstSystemClock { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSystemClock @ {:?}", self as *const _)) + .field("clock", &self.clock) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTask { + pub object: GstObject, + pub state: GstTaskState, + pub cond: glib::GCond, + pub lock: *mut glib::GRecMutex, + pub func: GstTaskFunction, + pub user_data: gpointer, + pub notify: glib::GDestroyNotify, + pub running: gboolean, + pub thread: *mut glib::GThread, + pub priv_: *mut GstTaskPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTask { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTask @ {:?}", self as *const _)) + .field("object", &self.object) + .field("state", &self.state) + .field("cond", &self.cond) + .field("lock", &self.lock) + .field("func", &self.func) + .field("user_data", &self.user_data) + .field("notify", &self.notify) + .field("running", &self.running) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTaskPool { + pub object: GstObject, + pub pool: *mut glib::GThreadPool, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTaskPool { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTaskPool @ {:?}", self as *const _)) + .field("object", &self.object) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTracer { + pub parent: GstObject, + pub priv_: *mut GstTracerPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTracer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTracer @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +pub struct GstTracerFactory(c_void); + +impl ::std::fmt::Debug for GstTracerFactory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTracerFactory @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstTracerRecord(c_void); + +impl ::std::fmt::Debug for GstTracerRecord { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTracerRecord @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstTypeFindFactory(c_void); + +impl ::std::fmt::Debug for GstTypeFindFactory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTypeFindFactory @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstValueArray(c_void); + +impl ::std::fmt::Debug for GstValueArray { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstValueArray @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstValueList(c_void); + +impl ::std::fmt::Debug for GstValueList { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstValueList @ {:?}", self as *const _)) + .finish() + } +} + +// Interfaces +#[repr(C)] +pub struct GstChildProxy(c_void); + +impl ::std::fmt::Debug for GstChildProxy { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstChildProxy @ {:?}", self as *const _) + } +} + +#[repr(C)] +pub struct GstPreset(c_void); + +impl ::std::fmt::Debug for GstPreset { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstPreset @ {:?}", self as *const _) + } +} + +#[repr(C)] +pub struct GstTagSetter(c_void); + +impl ::std::fmt::Debug for GstTagSetter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstTagSetter @ {:?}", self as *const _) + } +} + +#[repr(C)] +pub struct GstTocSetter(c_void); + +impl ::std::fmt::Debug for GstTocSetter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstTocSetter @ {:?}", self as *const _) + } +} + +#[repr(C)] +pub struct GstURIHandler(c_void); + +impl ::std::fmt::Debug for GstURIHandler { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstURIHandler @ {:?}", self as *const _) + } +} + +#[link(name = "gstreamer-1.0")] +extern "C" { + + //========================================================================= + // GstBufferingMode + //========================================================================= + pub fn gst_buffering_mode_get_type() -> GType; + + //========================================================================= + // GstBusSyncReply + //========================================================================= + pub fn gst_bus_sync_reply_get_type() -> GType; + + //========================================================================= + // GstCapsIntersectMode + //========================================================================= + pub fn gst_caps_intersect_mode_get_type() -> GType; + + //========================================================================= + // GstClockEntryType + //========================================================================= + pub fn gst_clock_entry_type_get_type() -> GType; + + //========================================================================= + // GstClockReturn + //========================================================================= + pub fn gst_clock_return_get_type() -> GType; + + //========================================================================= + // GstClockType + //========================================================================= + pub fn gst_clock_type_get_type() -> GType; + + //========================================================================= + // GstCoreError + //========================================================================= + pub fn gst_core_error_get_type() -> GType; + pub fn gst_core_error_quark() -> glib::GQuark; + + //========================================================================= + // GstDebugColorMode + //========================================================================= + pub fn gst_debug_color_mode_get_type() -> GType; + + //========================================================================= + // GstDebugLevel + //========================================================================= + pub fn gst_debug_level_get_type() -> GType; + pub fn gst_debug_level_get_name(level: GstDebugLevel) -> *const c_char; + + //========================================================================= + // GstEventType + //========================================================================= + pub fn gst_event_type_get_type() -> GType; + pub fn gst_event_type_get_flags(type_: GstEventType) -> GstEventTypeFlags; + pub fn gst_event_type_get_name(type_: GstEventType) -> *const c_char; + pub fn gst_event_type_to_quark(type_: GstEventType) -> glib::GQuark; + + //========================================================================= + // GstFlowReturn + //========================================================================= + pub fn gst_flow_return_get_type() -> GType; + + //========================================================================= + // GstFormat + //========================================================================= + pub fn gst_format_get_type() -> GType; + pub fn gst_format_get_by_nick(nick: *const c_char) -> GstFormat; + pub fn gst_format_get_details(format: GstFormat) -> *const GstFormatDefinition; + pub fn gst_format_get_name(format: GstFormat) -> *const c_char; + pub fn gst_format_iterate_definitions() -> *mut GstIterator; + pub fn gst_format_register(nick: *const c_char, description: *const c_char) -> GstFormat; + pub fn gst_format_to_quark(format: GstFormat) -> glib::GQuark; + + //========================================================================= + // GstIteratorItem + //========================================================================= + pub fn gst_iterator_item_get_type() -> GType; + + //========================================================================= + // GstIteratorResult + //========================================================================= + pub fn gst_iterator_result_get_type() -> GType; + + //========================================================================= + // GstLibraryError + //========================================================================= + pub fn gst_library_error_get_type() -> GType; + pub fn gst_library_error_quark() -> glib::GQuark; + + //========================================================================= + // GstPadDirection + //========================================================================= + pub fn gst_pad_direction_get_type() -> GType; + + //========================================================================= + // GstPadLinkReturn + //========================================================================= + pub fn gst_pad_link_return_get_type() -> GType; + + //========================================================================= + // GstPadMode + //========================================================================= + pub fn gst_pad_mode_get_type() -> GType; + pub fn gst_pad_mode_get_name(mode: GstPadMode) -> *const c_char; + + //========================================================================= + // GstPadPresence + //========================================================================= + pub fn gst_pad_presence_get_type() -> GType; + + //========================================================================= + // GstPadProbeReturn + //========================================================================= + pub fn gst_pad_probe_return_get_type() -> GType; + + //========================================================================= + // GstParseError + //========================================================================= + pub fn gst_parse_error_get_type() -> GType; + pub fn gst_parse_error_quark() -> glib::GQuark; + + //========================================================================= + // GstPluginError + //========================================================================= + pub fn gst_plugin_error_get_type() -> GType; + pub fn gst_plugin_error_quark() -> glib::GQuark; + + //========================================================================= + // GstProgressType + //========================================================================= + pub fn gst_progress_type_get_type() -> GType; + + //========================================================================= + // GstPromiseResult + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_promise_result_get_type() -> GType; + + //========================================================================= + // GstQOSType + //========================================================================= + pub fn gst_qos_type_get_type() -> GType; + + //========================================================================= + // GstQueryType + //========================================================================= + pub fn gst_query_type_get_type() -> GType; + pub fn gst_query_type_get_flags(type_: GstQueryType) -> GstQueryTypeFlags; + pub fn gst_query_type_get_name(type_: GstQueryType) -> *const c_char; + pub fn gst_query_type_to_quark(type_: GstQueryType) -> glib::GQuark; + + //========================================================================= + // GstRank + //========================================================================= + pub fn gst_rank_get_type() -> GType; + + //========================================================================= + // GstResourceError + //========================================================================= + pub fn gst_resource_error_get_type() -> GType; + pub fn gst_resource_error_quark() -> glib::GQuark; + + //========================================================================= + // GstSearchMode + //========================================================================= + pub fn gst_search_mode_get_type() -> GType; + + //========================================================================= + // GstSeekType + //========================================================================= + pub fn gst_seek_type_get_type() -> GType; + + //========================================================================= + // GstState + //========================================================================= + pub fn gst_state_get_type() -> GType; + + //========================================================================= + // GstStateChange + //========================================================================= + pub fn gst_state_change_get_type() -> GType; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_state_change_get_name(transition: GstStateChange) -> *const c_char; + + //========================================================================= + // GstStateChangeReturn + //========================================================================= + pub fn gst_state_change_return_get_type() -> GType; + + //========================================================================= + // GstStreamError + //========================================================================= + pub fn gst_stream_error_get_type() -> GType; + pub fn gst_stream_error_quark() -> glib::GQuark; + + //========================================================================= + // GstStreamStatusType + //========================================================================= + pub fn gst_stream_status_type_get_type() -> GType; + + //========================================================================= + // GstStructureChangeType + //========================================================================= + pub fn gst_structure_change_type_get_type() -> GType; + + //========================================================================= + // GstTagFlag + //========================================================================= + pub fn gst_tag_flag_get_type() -> GType; + + //========================================================================= + // GstTagMergeMode + //========================================================================= + pub fn gst_tag_merge_mode_get_type() -> GType; + + //========================================================================= + // GstTagScope + //========================================================================= + pub fn gst_tag_scope_get_type() -> GType; + + //========================================================================= + // GstTaskState + //========================================================================= + pub fn gst_task_state_get_type() -> GType; + + //========================================================================= + // GstTocEntryType + //========================================================================= + pub fn gst_toc_entry_type_get_type() -> GType; + pub fn gst_toc_entry_type_get_nick(type_: GstTocEntryType) -> *const c_char; + + //========================================================================= + // GstTocLoopType + //========================================================================= + pub fn gst_toc_loop_type_get_type() -> GType; + + //========================================================================= + // GstTocScope + //========================================================================= + pub fn gst_toc_scope_get_type() -> GType; + + //========================================================================= + // GstTracerValueScope + //========================================================================= + pub fn gst_tracer_value_scope_get_type() -> GType; + + //========================================================================= + // GstTypeFindProbability + //========================================================================= + pub fn gst_type_find_probability_get_type() -> GType; + + //========================================================================= + // GstURIError + //========================================================================= + pub fn gst_uri_error_get_type() -> GType; + pub fn gst_uri_error_quark() -> glib::GQuark; + + //========================================================================= + // GstURIType + //========================================================================= + pub fn gst_uri_type_get_type() -> GType; + + //========================================================================= + // GstAllocatorFlags + //========================================================================= + pub fn gst_allocator_flags_get_type() -> GType; + + //========================================================================= + // GstBinFlags + //========================================================================= + pub fn gst_bin_flags_get_type() -> GType; + + //========================================================================= + // GstBufferCopyFlags + //========================================================================= + pub fn gst_buffer_copy_flags_get_type() -> GType; + + //========================================================================= + // GstBufferFlags + //========================================================================= + pub fn gst_buffer_flags_get_type() -> GType; + + //========================================================================= + // GstBufferPoolAcquireFlags + //========================================================================= + pub fn gst_buffer_pool_acquire_flags_get_type() -> GType; + + //========================================================================= + // GstBusFlags + //========================================================================= + pub fn gst_bus_flags_get_type() -> GType; + + //========================================================================= + // GstCapsFlags + //========================================================================= + pub fn gst_caps_flags_get_type() -> GType; + + //========================================================================= + // GstClockFlags + //========================================================================= + pub fn gst_clock_flags_get_type() -> GType; + + //========================================================================= + // GstDebugColorFlags + //========================================================================= + pub fn gst_debug_color_flags_get_type() -> GType; + + //========================================================================= + // GstDebugGraphDetails + //========================================================================= + pub fn gst_debug_graph_details_get_type() -> GType; + + //========================================================================= + // GstElementFlags + //========================================================================= + pub fn gst_element_flags_get_type() -> GType; + + //========================================================================= + // GstEventTypeFlags + //========================================================================= + pub fn gst_event_type_flags_get_type() -> GType; + + //========================================================================= + // GstLockFlags + //========================================================================= + pub fn gst_lock_flags_get_type() -> GType; + + //========================================================================= + // GstMapFlags + //========================================================================= + pub fn gst_map_flags_get_type() -> GType; + + //========================================================================= + // GstMemoryFlags + //========================================================================= + pub fn gst_memory_flags_get_type() -> GType; + + //========================================================================= + // GstMessageType + //========================================================================= + pub fn gst_message_type_get_type() -> GType; + pub fn gst_message_type_get_name(type_: GstMessageType) -> *const c_char; + pub fn gst_message_type_to_quark(type_: GstMessageType) -> glib::GQuark; + + //========================================================================= + // GstMetaFlags + //========================================================================= + pub fn gst_meta_flags_get_type() -> GType; + + //========================================================================= + // GstMiniObjectFlags + //========================================================================= + pub fn gst_mini_object_flags_get_type() -> GType; + + //========================================================================= + // GstObjectFlags + //========================================================================= + pub fn gst_object_flags_get_type() -> GType; + + //========================================================================= + // GstPadFlags + //========================================================================= + pub fn gst_pad_flags_get_type() -> GType; + + //========================================================================= + // GstPadLinkCheck + //========================================================================= + pub fn gst_pad_link_check_get_type() -> GType; + + //========================================================================= + // GstPadProbeType + //========================================================================= + pub fn gst_pad_probe_type_get_type() -> GType; + + //========================================================================= + // GstPadTemplateFlags + //========================================================================= + pub fn gst_pad_template_flags_get_type() -> GType; + + //========================================================================= + // GstParseFlags + //========================================================================= + pub fn gst_parse_flags_get_type() -> GType; + + //========================================================================= + // GstPipelineFlags + //========================================================================= + pub fn gst_pipeline_flags_get_type() -> GType; + + //========================================================================= + // GstPluginAPIFlags + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_plugin_api_flags_get_type() -> GType; + + //========================================================================= + // GstPluginDependencyFlags + //========================================================================= + pub fn gst_plugin_dependency_flags_get_type() -> GType; + + //========================================================================= + // GstPluginFlags + //========================================================================= + pub fn gst_plugin_flags_get_type() -> GType; + + //========================================================================= + // GstQueryTypeFlags + //========================================================================= + pub fn gst_query_type_flags_get_type() -> GType; + + //========================================================================= + // GstSchedulingFlags + //========================================================================= + pub fn gst_scheduling_flags_get_type() -> GType; + + //========================================================================= + // GstSeekFlags + //========================================================================= + pub fn gst_seek_flags_get_type() -> GType; + + //========================================================================= + // GstSegmentFlags + //========================================================================= + pub fn gst_segment_flags_get_type() -> GType; + + //========================================================================= + // GstStackTraceFlags + //========================================================================= + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_stack_trace_flags_get_type() -> GType; + + //========================================================================= + // GstStreamFlags + //========================================================================= + pub fn gst_stream_flags_get_type() -> GType; + + //========================================================================= + // GstStreamType + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_type_get_type() -> GType; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_type_get_name(stype: GstStreamType) -> *const c_char; + + //========================================================================= + // GstTracerValueFlags + //========================================================================= + pub fn gst_tracer_value_flags_get_type() -> GType; + + //========================================================================= + // GstAllocationParams + //========================================================================= + pub fn gst_allocation_params_get_type() -> GType; + pub fn gst_allocation_params_copy( + params: *const GstAllocationParams, + ) -> *mut GstAllocationParams; + pub fn gst_allocation_params_free(params: *mut GstAllocationParams); + pub fn gst_allocation_params_init(params: *mut GstAllocationParams); + + //========================================================================= + // GstAtomicQueue + //========================================================================= + pub fn gst_atomic_queue_get_type() -> GType; + pub fn gst_atomic_queue_new(initial_size: c_uint) -> *mut GstAtomicQueue; + pub fn gst_atomic_queue_length(queue: *mut GstAtomicQueue) -> c_uint; + pub fn gst_atomic_queue_peek(queue: *mut GstAtomicQueue) -> gpointer; + pub fn gst_atomic_queue_pop(queue: *mut GstAtomicQueue) -> gpointer; + pub fn gst_atomic_queue_push(queue: *mut GstAtomicQueue, data: gpointer); + pub fn gst_atomic_queue_ref(queue: *mut GstAtomicQueue); + pub fn gst_atomic_queue_unref(queue: *mut GstAtomicQueue); + + //========================================================================= + // GstBuffer + //========================================================================= + pub fn gst_buffer_get_type() -> GType; + pub fn gst_buffer_new() -> *mut GstBuffer; + pub fn gst_buffer_new_allocate( + allocator: *mut GstAllocator, + size: size_t, + params: *mut GstAllocationParams, + ) -> *mut GstBuffer; + pub fn gst_buffer_new_wrapped(data: gpointer, size: size_t) -> *mut GstBuffer; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_buffer_new_wrapped_bytes(bytes: *mut glib::GBytes) -> *mut GstBuffer; + pub fn gst_buffer_new_wrapped_full( + flags: GstMemoryFlags, + data: gpointer, + maxsize: size_t, + offset: size_t, + size: size_t, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstBuffer; + pub fn gst_buffer_add_meta( + buffer: *mut GstBuffer, + info: *const GstMetaInfo, + params: gpointer, + ) -> *mut GstMeta; + pub fn gst_buffer_add_parent_buffer_meta( + buffer: *mut GstBuffer, + ref_: *mut GstBuffer, + ) -> *mut GstParentBufferMeta; + pub fn gst_buffer_add_protection_meta( + buffer: *mut GstBuffer, + info: *mut GstStructure, + ) -> *mut GstProtectionMeta; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_buffer_add_reference_timestamp_meta( + buffer: *mut GstBuffer, + reference: *mut GstCaps, + timestamp: GstClockTime, + duration: GstClockTime, + ) -> *mut GstReferenceTimestampMeta; + pub fn gst_buffer_append(buf1: *mut GstBuffer, buf2: *mut GstBuffer) -> *mut GstBuffer; + pub fn gst_buffer_append_memory(buffer: *mut GstBuffer, mem: *mut GstMemory); + pub fn gst_buffer_append_region( + buf1: *mut GstBuffer, + buf2: *mut GstBuffer, + offset: ssize_t, + size: ssize_t, + ) -> *mut GstBuffer; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_buffer_copy(buf: *const GstBuffer) -> *mut GstBuffer; + pub fn gst_buffer_copy_deep(buf: *const GstBuffer) -> *mut GstBuffer; + pub fn gst_buffer_copy_into( + dest: *mut GstBuffer, + src: *mut GstBuffer, + flags: GstBufferCopyFlags, + offset: size_t, + size: size_t, + ) -> gboolean; + pub fn gst_buffer_copy_region( + parent: *mut GstBuffer, + flags: GstBufferCopyFlags, + offset: size_t, + size: size_t, + ) -> *mut GstBuffer; + pub fn gst_buffer_extract( + buffer: *mut GstBuffer, + offset: size_t, + dest: gpointer, + size: size_t, + ) -> size_t; + pub fn gst_buffer_extract_dup( + buffer: *mut GstBuffer, + offset: size_t, + size: size_t, + dest: *mut u8, + dest_size: *mut size_t, + ); + pub fn gst_buffer_fill( + buffer: *mut GstBuffer, + offset: size_t, + src: gconstpointer, + size: size_t, + ) -> size_t; + pub fn gst_buffer_find_memory( + buffer: *mut GstBuffer, + offset: size_t, + size: size_t, + idx: *mut c_uint, + length: *mut c_uint, + skip: *mut size_t, + ) -> gboolean; + pub fn gst_buffer_foreach_meta( + buffer: *mut GstBuffer, + func: GstBufferForeachMetaFunc, + user_data: gpointer, + ) -> gboolean; + pub fn gst_buffer_get_all_memory(buffer: *mut GstBuffer) -> *mut GstMemory; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_buffer_get_flags(buffer: *mut GstBuffer) -> GstBufferFlags; + pub fn gst_buffer_get_memory(buffer: *mut GstBuffer, idx: c_uint) -> *mut GstMemory; + pub fn gst_buffer_get_memory_range( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + ) -> *mut GstMemory; + pub fn gst_buffer_get_meta(buffer: *mut GstBuffer, api: GType) -> *mut GstMeta; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_buffer_get_n_meta(buffer: *mut GstBuffer, api_type: GType) -> c_uint; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_buffer_get_reference_timestamp_meta( + buffer: *mut GstBuffer, + reference: *mut GstCaps, + ) -> *mut GstReferenceTimestampMeta; + pub fn gst_buffer_get_size(buffer: *mut GstBuffer) -> size_t; + pub fn gst_buffer_get_sizes( + buffer: *mut GstBuffer, + offset: *mut size_t, + maxsize: *mut size_t, + ) -> size_t; + pub fn gst_buffer_get_sizes_range( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + offset: *mut size_t, + maxsize: *mut size_t, + ) -> size_t; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_buffer_has_flags(buffer: *mut GstBuffer, flags: GstBufferFlags) -> gboolean; + pub fn gst_buffer_insert_memory(buffer: *mut GstBuffer, idx: c_int, mem: *mut GstMemory); + pub fn gst_buffer_is_all_memory_writable(buffer: *mut GstBuffer) -> gboolean; + pub fn gst_buffer_is_memory_range_writable( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + ) -> gboolean; + pub fn gst_buffer_iterate_meta(buffer: *mut GstBuffer, state: *mut gpointer) -> *mut GstMeta; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_buffer_iterate_meta_filtered( + buffer: *mut GstBuffer, + state: *mut gpointer, + meta_api_type: GType, + ) -> *mut GstMeta; + pub fn gst_buffer_map( + buffer: *mut GstBuffer, + info: *mut GstMapInfo, + flags: GstMapFlags, + ) -> gboolean; + pub fn gst_buffer_map_range( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + info: *mut GstMapInfo, + flags: GstMapFlags, + ) -> gboolean; + pub fn gst_buffer_memcmp( + buffer: *mut GstBuffer, + offset: size_t, + mem: gconstpointer, + size: size_t, + ) -> c_int; + pub fn gst_buffer_memset( + buffer: *mut GstBuffer, + offset: size_t, + val: u8, + size: size_t, + ) -> size_t; + pub fn gst_buffer_n_memory(buffer: *mut GstBuffer) -> c_uint; + pub fn gst_buffer_peek_memory(buffer: *mut GstBuffer, idx: c_uint) -> *mut GstMemory; + pub fn gst_buffer_prepend_memory(buffer: *mut GstBuffer, mem: *mut GstMemory); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_buffer_ref(buf: *mut GstBuffer) -> *mut GstBuffer; + pub fn gst_buffer_remove_all_memory(buffer: *mut GstBuffer); + pub fn gst_buffer_remove_memory(buffer: *mut GstBuffer, idx: c_uint); + pub fn gst_buffer_remove_memory_range(buffer: *mut GstBuffer, idx: c_uint, length: c_int); + pub fn gst_buffer_remove_meta(buffer: *mut GstBuffer, meta: *mut GstMeta) -> gboolean; + pub fn gst_buffer_replace_all_memory(buffer: *mut GstBuffer, mem: *mut GstMemory); + pub fn gst_buffer_replace_memory(buffer: *mut GstBuffer, idx: c_uint, mem: *mut GstMemory); + pub fn gst_buffer_replace_memory_range( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + mem: *mut GstMemory, + ); + pub fn gst_buffer_resize(buffer: *mut GstBuffer, offset: ssize_t, size: ssize_t); + pub fn gst_buffer_resize_range( + buffer: *mut GstBuffer, + idx: c_uint, + length: c_int, + offset: ssize_t, + size: ssize_t, + ) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_buffer_set_flags(buffer: *mut GstBuffer, flags: GstBufferFlags) -> gboolean; + pub fn gst_buffer_set_size(buffer: *mut GstBuffer, size: ssize_t); + pub fn gst_buffer_unmap(buffer: *mut GstBuffer, info: *mut GstMapInfo); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_buffer_unref(buf: *mut GstBuffer); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_buffer_unset_flags(buffer: *mut GstBuffer, flags: GstBufferFlags) -> gboolean; + pub fn gst_buffer_get_max_memory() -> c_uint; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_buffer_replace(obuf: *mut *mut GstBuffer, nbuf: *mut GstBuffer) -> gboolean; + + //========================================================================= + // GstBufferList + //========================================================================= + pub fn gst_buffer_list_get_type() -> GType; + pub fn gst_buffer_list_new() -> *mut GstBufferList; + pub fn gst_buffer_list_new_sized(size: c_uint) -> *mut GstBufferList; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_buffer_list_calculate_size(list: *mut GstBufferList) -> size_t; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_buffer_list_copy(list: *const GstBufferList) -> *mut GstBufferList; + pub fn gst_buffer_list_copy_deep(list: *const GstBufferList) -> *mut GstBufferList; + pub fn gst_buffer_list_foreach( + list: *mut GstBufferList, + func: GstBufferListFunc, + user_data: gpointer, + ) -> gboolean; + pub fn gst_buffer_list_get(list: *mut GstBufferList, idx: c_uint) -> *mut GstBuffer; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_buffer_list_get_writable(list: *mut GstBufferList, idx: c_uint) -> *mut GstBuffer; + pub fn gst_buffer_list_insert(list: *mut GstBufferList, idx: c_int, buffer: *mut GstBuffer); + pub fn gst_buffer_list_length(list: *mut GstBufferList) -> c_uint; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_buffer_list_ref(list: *mut GstBufferList) -> *mut GstBufferList; + pub fn gst_buffer_list_remove(list: *mut GstBufferList, idx: c_uint, length: c_uint); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_buffer_list_unref(list: *mut GstBufferList); + + //========================================================================= + // GstCaps + //========================================================================= + pub fn gst_caps_get_type() -> GType; + pub fn gst_caps_new_any() -> *mut GstCaps; + pub fn gst_caps_new_empty() -> *mut GstCaps; + pub fn gst_caps_new_empty_simple(media_type: *const c_char) -> *mut GstCaps; + pub fn gst_caps_new_full(struct1: *mut GstStructure, ...) -> *mut GstCaps; + //pub fn gst_caps_new_full_valist(structure: *mut GstStructure, var_args: /*Unimplemented*/va_list) -> *mut GstCaps; + pub fn gst_caps_new_simple( + media_type: *const c_char, + fieldname: *const c_char, + ... + ) -> *mut GstCaps; + pub fn gst_caps_append(caps1: *mut GstCaps, caps2: *mut GstCaps); + pub fn gst_caps_append_structure(caps: *mut GstCaps, structure: *mut GstStructure); + pub fn gst_caps_append_structure_full( + caps: *mut GstCaps, + structure: *mut GstStructure, + features: *mut GstCapsFeatures, + ); + pub fn gst_caps_can_intersect(caps1: *const GstCaps, caps2: *const GstCaps) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_caps_copy(caps: *const GstCaps) -> *mut GstCaps; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_caps_copy_nth(caps: *const GstCaps, nth: c_uint) -> *mut GstCaps; + pub fn gst_caps_filter_and_map_in_place( + caps: *mut GstCaps, + func: GstCapsFilterMapFunc, + user_data: gpointer, + ); + pub fn gst_caps_fixate(caps: *mut GstCaps) -> *mut GstCaps; + pub fn gst_caps_foreach( + caps: *const GstCaps, + func: GstCapsForeachFunc, + user_data: gpointer, + ) -> gboolean; + pub fn gst_caps_get_features(caps: *const GstCaps, index: c_uint) -> *mut GstCapsFeatures; + pub fn gst_caps_get_size(caps: *const GstCaps) -> c_uint; + pub fn gst_caps_get_structure(caps: *const GstCaps, index: c_uint) -> *mut GstStructure; + pub fn gst_caps_intersect(caps1: *mut GstCaps, caps2: *mut GstCaps) -> *mut GstCaps; + pub fn gst_caps_intersect_full( + caps1: *mut GstCaps, + caps2: *mut GstCaps, + mode: GstCapsIntersectMode, + ) -> *mut GstCaps; + pub fn gst_caps_is_always_compatible(caps1: *const GstCaps, caps2: *const GstCaps) -> gboolean; + pub fn gst_caps_is_any(caps: *const GstCaps) -> gboolean; + pub fn gst_caps_is_empty(caps: *const GstCaps) -> gboolean; + pub fn gst_caps_is_equal(caps1: *const GstCaps, caps2: *const GstCaps) -> gboolean; + pub fn gst_caps_is_equal_fixed(caps1: *const GstCaps, caps2: *const GstCaps) -> gboolean; + pub fn gst_caps_is_fixed(caps: *const GstCaps) -> gboolean; + pub fn gst_caps_is_strictly_equal(caps1: *const GstCaps, caps2: *const GstCaps) -> gboolean; + pub fn gst_caps_is_subset(subset: *const GstCaps, superset: *const GstCaps) -> gboolean; + pub fn gst_caps_is_subset_structure( + caps: *const GstCaps, + structure: *const GstStructure, + ) -> gboolean; + pub fn gst_caps_is_subset_structure_full( + caps: *const GstCaps, + structure: *const GstStructure, + features: *const GstCapsFeatures, + ) -> gboolean; + pub fn gst_caps_map_in_place( + caps: *mut GstCaps, + func: GstCapsMapFunc, + user_data: gpointer, + ) -> gboolean; + pub fn gst_caps_merge(caps1: *mut GstCaps, caps2: *mut GstCaps) -> *mut GstCaps; + pub fn gst_caps_merge_structure( + caps: *mut GstCaps, + structure: *mut GstStructure, + ) -> *mut GstCaps; + pub fn gst_caps_merge_structure_full( + caps: *mut GstCaps, + structure: *mut GstStructure, + features: *mut GstCapsFeatures, + ) -> *mut GstCaps; + pub fn gst_caps_normalize(caps: *mut GstCaps) -> *mut GstCaps; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_caps_ref(caps: *mut GstCaps) -> *mut GstCaps; + pub fn gst_caps_remove_structure(caps: *mut GstCaps, idx: c_uint); + pub fn gst_caps_set_features(caps: *mut GstCaps, index: c_uint, features: *mut GstCapsFeatures); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_caps_set_features_simple(caps: *mut GstCaps, features: *mut GstCapsFeatures); + pub fn gst_caps_set_simple(caps: *mut GstCaps, field: *const c_char, ...); + //pub fn gst_caps_set_simple_valist(caps: *mut GstCaps, field: *const c_char, varargs: /*Unimplemented*/va_list); + pub fn gst_caps_set_value( + caps: *mut GstCaps, + field: *const c_char, + value: *const gobject::GValue, + ); + pub fn gst_caps_simplify(caps: *mut GstCaps) -> *mut GstCaps; + pub fn gst_caps_steal_structure(caps: *mut GstCaps, index: c_uint) -> *mut GstStructure; + pub fn gst_caps_subtract(minuend: *mut GstCaps, subtrahend: *mut GstCaps) -> *mut GstCaps; + pub fn gst_caps_to_string(caps: *const GstCaps) -> *mut c_char; + pub fn gst_caps_truncate(caps: *mut GstCaps) -> *mut GstCaps; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_caps_unref(caps: *mut GstCaps); + pub fn gst_caps_from_string(string: *const c_char) -> *mut GstCaps; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_caps_replace(old_caps: *mut *mut GstCaps, new_caps: *mut GstCaps) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_caps_take(old_caps: *mut *mut GstCaps, new_caps: *mut GstCaps) -> gboolean; + + //========================================================================= + // GstCapsFeatures + //========================================================================= + pub fn gst_caps_features_get_type() -> GType; + pub fn gst_caps_features_new(feature1: *const c_char, ...) -> *mut GstCapsFeatures; + pub fn gst_caps_features_new_any() -> *mut GstCapsFeatures; + pub fn gst_caps_features_new_empty() -> *mut GstCapsFeatures; + pub fn gst_caps_features_new_id(feature1: glib::GQuark, ...) -> *mut GstCapsFeatures; + //pub fn gst_caps_features_new_id_valist(feature1: glib::GQuark, varargs: /*Unimplemented*/va_list) -> *mut GstCapsFeatures; + //pub fn gst_caps_features_new_valist(feature1: *const c_char, varargs: /*Unimplemented*/va_list) -> *mut GstCapsFeatures; + pub fn gst_caps_features_add(features: *mut GstCapsFeatures, feature: *const c_char); + pub fn gst_caps_features_add_id(features: *mut GstCapsFeatures, feature: glib::GQuark); + pub fn gst_caps_features_contains( + features: *const GstCapsFeatures, + feature: *const c_char, + ) -> gboolean; + pub fn gst_caps_features_contains_id( + features: *const GstCapsFeatures, + feature: glib::GQuark, + ) -> gboolean; + pub fn gst_caps_features_copy(features: *const GstCapsFeatures) -> *mut GstCapsFeatures; + pub fn gst_caps_features_free(features: *mut GstCapsFeatures); + pub fn gst_caps_features_get_nth(features: *const GstCapsFeatures, i: c_uint) -> *const c_char; + pub fn gst_caps_features_get_nth_id( + features: *const GstCapsFeatures, + i: c_uint, + ) -> glib::GQuark; + pub fn gst_caps_features_get_size(features: *const GstCapsFeatures) -> c_uint; + pub fn gst_caps_features_is_any(features: *const GstCapsFeatures) -> gboolean; + pub fn gst_caps_features_is_equal( + features1: *const GstCapsFeatures, + features2: *const GstCapsFeatures, + ) -> gboolean; + pub fn gst_caps_features_remove(features: *mut GstCapsFeatures, feature: *const c_char); + pub fn gst_caps_features_remove_id(features: *mut GstCapsFeatures, feature: glib::GQuark); + pub fn gst_caps_features_set_parent_refcount( + features: *mut GstCapsFeatures, + refcount: *mut c_int, + ) -> gboolean; + pub fn gst_caps_features_to_string(features: *const GstCapsFeatures) -> *mut c_char; + pub fn gst_caps_features_from_string(features: *const c_char) -> *mut GstCapsFeatures; + + //========================================================================= + // GstContext + //========================================================================= + pub fn gst_context_get_type() -> GType; + pub fn gst_context_new(context_type: *const c_char, persistent: gboolean) -> *mut GstContext; + pub fn gst_context_get_context_type(context: *const GstContext) -> *const c_char; + pub fn gst_context_get_structure(context: *const GstContext) -> *const GstStructure; + pub fn gst_context_has_context_type( + context: *const GstContext, + context_type: *const c_char, + ) -> gboolean; + pub fn gst_context_is_persistent(context: *const GstContext) -> gboolean; + pub fn gst_context_writable_structure(context: *mut GstContext) -> *mut GstStructure; + + //========================================================================= + // GstDateTime + //========================================================================= + pub fn gst_date_time_get_type() -> GType; + pub fn gst_date_time_new( + tzoffset: c_float, + year: c_int, + month: c_int, + day: c_int, + hour: c_int, + minute: c_int, + seconds: c_double, + ) -> *mut GstDateTime; + pub fn gst_date_time_new_from_g_date_time(dt: *mut glib::GDateTime) -> *mut GstDateTime; + pub fn gst_date_time_new_from_iso8601_string(string: *const c_char) -> *mut GstDateTime; + pub fn gst_date_time_new_from_unix_epoch_local_time(secs: i64) -> *mut GstDateTime; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_date_time_new_from_unix_epoch_local_time_usecs(usecs: i64) -> *mut GstDateTime; + pub fn gst_date_time_new_from_unix_epoch_utc(secs: i64) -> *mut GstDateTime; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_date_time_new_from_unix_epoch_utc_usecs(usecs: i64) -> *mut GstDateTime; + pub fn gst_date_time_new_local_time( + year: c_int, + month: c_int, + day: c_int, + hour: c_int, + minute: c_int, + seconds: c_double, + ) -> *mut GstDateTime; + pub fn gst_date_time_new_now_local_time() -> *mut GstDateTime; + pub fn gst_date_time_new_now_utc() -> *mut GstDateTime; + pub fn gst_date_time_new_y(year: c_int) -> *mut GstDateTime; + pub fn gst_date_time_new_ym(year: c_int, month: c_int) -> *mut GstDateTime; + pub fn gst_date_time_new_ymd(year: c_int, month: c_int, day: c_int) -> *mut GstDateTime; + pub fn gst_date_time_get_day(datetime: *const GstDateTime) -> c_int; + pub fn gst_date_time_get_hour(datetime: *const GstDateTime) -> c_int; + pub fn gst_date_time_get_microsecond(datetime: *const GstDateTime) -> c_int; + pub fn gst_date_time_get_minute(datetime: *const GstDateTime) -> c_int; + pub fn gst_date_time_get_month(datetime: *const GstDateTime) -> c_int; + pub fn gst_date_time_get_second(datetime: *const GstDateTime) -> c_int; + pub fn gst_date_time_get_time_zone_offset(datetime: *const GstDateTime) -> c_float; + pub fn gst_date_time_get_year(datetime: *const GstDateTime) -> c_int; + pub fn gst_date_time_has_day(datetime: *const GstDateTime) -> gboolean; + pub fn gst_date_time_has_month(datetime: *const GstDateTime) -> gboolean; + pub fn gst_date_time_has_second(datetime: *const GstDateTime) -> gboolean; + pub fn gst_date_time_has_time(datetime: *const GstDateTime) -> gboolean; + pub fn gst_date_time_has_year(datetime: *const GstDateTime) -> gboolean; + pub fn gst_date_time_ref(datetime: *mut GstDateTime) -> *mut GstDateTime; + pub fn gst_date_time_to_g_date_time(datetime: *mut GstDateTime) -> *mut glib::GDateTime; + pub fn gst_date_time_to_iso8601_string(datetime: *mut GstDateTime) -> *mut c_char; + pub fn gst_date_time_unref(datetime: *mut GstDateTime); + + //========================================================================= + // GstDebugCategory + //========================================================================= + pub fn gst_debug_category_free(category: *mut GstDebugCategory); + pub fn gst_debug_category_get_color(category: *mut GstDebugCategory) -> c_uint; + pub fn gst_debug_category_get_description(category: *mut GstDebugCategory) -> *const c_char; + pub fn gst_debug_category_get_name(category: *mut GstDebugCategory) -> *const c_char; + pub fn gst_debug_category_get_threshold(category: *mut GstDebugCategory) -> GstDebugLevel; + pub fn gst_debug_category_reset_threshold(category: *mut GstDebugCategory); + pub fn gst_debug_category_set_threshold(category: *mut GstDebugCategory, level: GstDebugLevel); + + //========================================================================= + // GstDebugMessage + //========================================================================= + pub fn gst_debug_message_get(message: *mut GstDebugMessage) -> *const c_char; + + //========================================================================= + // GstDeviceProviderClass + //========================================================================= + pub fn gst_device_provider_class_add_metadata( + klass: *mut GstDeviceProviderClass, + key: *const c_char, + value: *const c_char, + ); + pub fn gst_device_provider_class_add_static_metadata( + klass: *mut GstDeviceProviderClass, + key: *const c_char, + value: *const c_char, + ); + pub fn gst_device_provider_class_get_metadata( + klass: *mut GstDeviceProviderClass, + key: *const c_char, + ) -> *const c_char; + pub fn gst_device_provider_class_set_metadata( + klass: *mut GstDeviceProviderClass, + longname: *const c_char, + classification: *const c_char, + description: *const c_char, + author: *const c_char, + ); + pub fn gst_device_provider_class_set_static_metadata( + klass: *mut GstDeviceProviderClass, + longname: *const c_char, + classification: *const c_char, + description: *const c_char, + author: *const c_char, + ); + + //========================================================================= + // GstElementClass + //========================================================================= + pub fn gst_element_class_add_metadata( + klass: *mut GstElementClass, + key: *const c_char, + value: *const c_char, + ); + pub fn gst_element_class_add_pad_template( + klass: *mut GstElementClass, + templ: *mut GstPadTemplate, + ); + pub fn gst_element_class_add_static_metadata( + klass: *mut GstElementClass, + key: *const c_char, + value: *const c_char, + ); + pub fn gst_element_class_add_static_pad_template( + klass: *mut GstElementClass, + static_templ: *mut GstStaticPadTemplate, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_element_class_add_static_pad_template_with_gtype( + klass: *mut GstElementClass, + static_templ: *mut GstStaticPadTemplate, + pad_type: GType, + ); + pub fn gst_element_class_get_metadata( + klass: *mut GstElementClass, + key: *const c_char, + ) -> *const c_char; + pub fn gst_element_class_get_pad_template( + element_class: *mut GstElementClass, + name: *const c_char, + ) -> *mut GstPadTemplate; + pub fn gst_element_class_get_pad_template_list( + element_class: *mut GstElementClass, + ) -> *mut glib::GList; + pub fn gst_element_class_set_metadata( + klass: *mut GstElementClass, + longname: *const c_char, + classification: *const c_char, + description: *const c_char, + author: *const c_char, + ); + pub fn gst_element_class_set_static_metadata( + klass: *mut GstElementClass, + longname: *const c_char, + classification: *const c_char, + description: *const c_char, + author: *const c_char, + ); + + //========================================================================= + // GstEvent + //========================================================================= + pub fn gst_event_get_type() -> GType; + pub fn gst_event_new_buffer_size( + format: GstFormat, + minsize: i64, + maxsize: i64, + async: gboolean, + ) -> *mut GstEvent; + pub fn gst_event_new_caps(caps: *mut GstCaps) -> *mut GstEvent; + pub fn gst_event_new_custom(type_: GstEventType, structure: *mut GstStructure) + -> *mut GstEvent; + pub fn gst_event_new_eos() -> *mut GstEvent; + pub fn gst_event_new_flush_start() -> *mut GstEvent; + pub fn gst_event_new_flush_stop(reset_time: gboolean) -> *mut GstEvent; + pub fn gst_event_new_gap(timestamp: GstClockTime, duration: GstClockTime) -> *mut GstEvent; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_event_new_instant_rate_change( + rate_multiplier: c_double, + new_flags: GstSegmentFlags, + ) -> *mut GstEvent; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_event_new_instant_rate_sync_time( + rate_multiplier: c_double, + running_time: GstClockTime, + upstream_running_time: GstClockTime, + ) -> *mut GstEvent; + pub fn gst_event_new_latency(latency: GstClockTime) -> *mut GstEvent; + pub fn gst_event_new_navigation(structure: *mut GstStructure) -> *mut GstEvent; + pub fn gst_event_new_protection( + system_id: *const c_char, + data: *mut GstBuffer, + origin: *const c_char, + ) -> *mut GstEvent; + pub fn gst_event_new_qos( + type_: GstQOSType, + proportion: c_double, + diff: GstClockTimeDiff, + timestamp: GstClockTime, + ) -> *mut GstEvent; + pub fn gst_event_new_reconfigure() -> *mut GstEvent; + pub fn gst_event_new_seek( + rate: c_double, + format: GstFormat, + flags: GstSeekFlags, + start_type: GstSeekType, + start: i64, + stop_type: GstSeekType, + stop: i64, + ) -> *mut GstEvent; + pub fn gst_event_new_segment(segment: *const GstSegment) -> *mut GstEvent; + pub fn gst_event_new_segment_done(format: GstFormat, position: i64) -> *mut GstEvent; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_event_new_select_streams(streams: *mut glib::GList) -> *mut GstEvent; + pub fn gst_event_new_sink_message(name: *const c_char, msg: *mut GstMessage) -> *mut GstEvent; + pub fn gst_event_new_step( + format: GstFormat, + amount: u64, + rate: c_double, + flush: gboolean, + intermediate: gboolean, + ) -> *mut GstEvent; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_event_new_stream_collection(collection: *mut GstStreamCollection) -> *mut GstEvent; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_event_new_stream_group_done(group_id: c_uint) -> *mut GstEvent; + pub fn gst_event_new_stream_start(stream_id: *const c_char) -> *mut GstEvent; + pub fn gst_event_new_tag(taglist: *mut GstTagList) -> *mut GstEvent; + pub fn gst_event_new_toc(toc: *mut GstToc, updated: gboolean) -> *mut GstEvent; + pub fn gst_event_new_toc_select(uid: *const c_char) -> *mut GstEvent; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_event_copy(event: *const GstEvent) -> *mut GstEvent; + pub fn gst_event_copy_segment(event: *mut GstEvent, segment: *mut GstSegment); + pub fn gst_event_get_running_time_offset(event: *mut GstEvent) -> i64; + pub fn gst_event_get_seqnum(event: *mut GstEvent) -> u32; + pub fn gst_event_get_structure(event: *mut GstEvent) -> *const GstStructure; + pub fn gst_event_has_name(event: *mut GstEvent, name: *const c_char) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_event_has_name_id(event: *mut GstEvent, name: glib::GQuark) -> gboolean; + pub fn gst_event_parse_buffer_size( + event: *mut GstEvent, + format: *mut GstFormat, + minsize: *mut i64, + maxsize: *mut i64, + async: *mut gboolean, + ); + pub fn gst_event_parse_caps(event: *mut GstEvent, caps: *mut *mut GstCaps); + pub fn gst_event_parse_flush_stop(event: *mut GstEvent, reset_time: *mut gboolean); + pub fn gst_event_parse_gap( + event: *mut GstEvent, + timestamp: *mut GstClockTime, + duration: *mut GstClockTime, + ); + pub fn gst_event_parse_group_id(event: *mut GstEvent, group_id: *mut c_uint) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_event_parse_instant_rate_change( + event: *mut GstEvent, + rate_multiplier: *mut c_double, + new_flags: *mut GstSegmentFlags, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_event_parse_instant_rate_sync_time( + event: *mut GstEvent, + rate_multiplier: *mut c_double, + running_time: *mut GstClockTime, + upstream_running_time: *mut GstClockTime, + ); + pub fn gst_event_parse_latency(event: *mut GstEvent, latency: *mut GstClockTime); + pub fn gst_event_parse_protection( + event: *mut GstEvent, + system_id: *mut *const c_char, + data: *mut *mut GstBuffer, + origin: *mut *const c_char, + ); + pub fn gst_event_parse_qos( + event: *mut GstEvent, + type_: *mut GstQOSType, + proportion: *mut c_double, + diff: *mut GstClockTimeDiff, + timestamp: *mut GstClockTime, + ); + pub fn gst_event_parse_seek( + event: *mut GstEvent, + rate: *mut c_double, + format: *mut GstFormat, + flags: *mut GstSeekFlags, + start_type: *mut GstSeekType, + start: *mut i64, + stop_type: *mut GstSeekType, + stop: *mut i64, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_event_parse_seek_trickmode_interval( + event: *mut GstEvent, + interval: *mut GstClockTime, + ); + pub fn gst_event_parse_segment(event: *mut GstEvent, segment: *mut *const GstSegment); + pub fn gst_event_parse_segment_done( + event: *mut GstEvent, + format: *mut GstFormat, + position: *mut i64, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_event_parse_select_streams(event: *mut GstEvent, streams: *mut *mut glib::GList); + pub fn gst_event_parse_sink_message(event: *mut GstEvent, msg: *mut *mut GstMessage); + pub fn gst_event_parse_step( + event: *mut GstEvent, + format: *mut GstFormat, + amount: *mut u64, + rate: *mut c_double, + flush: *mut gboolean, + intermediate: *mut gboolean, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_event_parse_stream(event: *mut GstEvent, stream: *mut *mut GstStream); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_event_parse_stream_collection( + event: *mut GstEvent, + collection: *mut *mut GstStreamCollection, + ); + pub fn gst_event_parse_stream_flags(event: *mut GstEvent, flags: *mut GstStreamFlags); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_event_parse_stream_group_done(event: *mut GstEvent, group_id: *mut c_uint); + pub fn gst_event_parse_stream_start(event: *mut GstEvent, stream_id: *mut *const c_char); + pub fn gst_event_parse_tag(event: *mut GstEvent, taglist: *mut *mut GstTagList); + pub fn gst_event_parse_toc(event: *mut GstEvent, toc: *mut *mut GstToc, updated: *mut gboolean); + pub fn gst_event_parse_toc_select(event: *mut GstEvent, uid: *mut *mut c_char); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_event_ref(event: *mut GstEvent) -> *mut GstEvent; + pub fn gst_event_set_group_id(event: *mut GstEvent, group_id: c_uint); + pub fn gst_event_set_running_time_offset(event: *mut GstEvent, offset: i64); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_event_set_seek_trickmode_interval(event: *mut GstEvent, interval: GstClockTime); + pub fn gst_event_set_seqnum(event: *mut GstEvent, seqnum: u32); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_event_set_stream(event: *mut GstEvent, stream: *mut GstStream); + pub fn gst_event_set_stream_flags(event: *mut GstEvent, flags: GstStreamFlags); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_event_unref(event: *mut GstEvent); + pub fn gst_event_writable_structure(event: *mut GstEvent) -> *mut GstStructure; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_event_replace(old_event: *mut *mut GstEvent, new_event: *mut GstEvent) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_event_steal(old_event: *mut *mut GstEvent) -> *mut GstEvent; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_event_take(old_event: *mut *mut GstEvent, new_event: *mut GstEvent) -> gboolean; + + //========================================================================= + // GstIterator + //========================================================================= + pub fn gst_iterator_get_type() -> GType; + pub fn gst_iterator_new( + size: c_uint, + type_: GType, + lock: *mut glib::GMutex, + master_cookie: *mut u32, + copy: GstIteratorCopyFunction, + next: GstIteratorNextFunction, + item: GstIteratorItemFunction, + resync: GstIteratorResyncFunction, + free: GstIteratorFreeFunction, + ) -> *mut GstIterator; + pub fn gst_iterator_new_list( + type_: GType, + lock: *mut glib::GMutex, + master_cookie: *mut u32, + list: *mut *mut glib::GList, + owner: *mut gobject::GObject, + item: GstIteratorItemFunction, + ) -> *mut GstIterator; + pub fn gst_iterator_new_single( + type_: GType, + object: *const gobject::GValue, + ) -> *mut GstIterator; + pub fn gst_iterator_copy(it: *const GstIterator) -> *mut GstIterator; + pub fn gst_iterator_filter( + it: *mut GstIterator, + func: glib::GCompareFunc, + user_data: *const gobject::GValue, + ) -> *mut GstIterator; + pub fn gst_iterator_find_custom( + it: *mut GstIterator, + func: glib::GCompareFunc, + elem: *mut gobject::GValue, + user_data: gpointer, + ) -> gboolean; + pub fn gst_iterator_fold( + it: *mut GstIterator, + func: GstIteratorFoldFunction, + ret: *mut gobject::GValue, + user_data: gpointer, + ) -> GstIteratorResult; + pub fn gst_iterator_foreach( + it: *mut GstIterator, + func: GstIteratorForeachFunction, + user_data: gpointer, + ) -> GstIteratorResult; + pub fn gst_iterator_free(it: *mut GstIterator); + pub fn gst_iterator_next(it: *mut GstIterator, elem: *mut gobject::GValue) + -> GstIteratorResult; + pub fn gst_iterator_push(it: *mut GstIterator, other: *mut GstIterator); + pub fn gst_iterator_resync(it: *mut GstIterator); + + //========================================================================= + // GstMemory + //========================================================================= + pub fn gst_memory_get_type() -> GType; + pub fn gst_memory_new_wrapped( + flags: GstMemoryFlags, + data: gpointer, + maxsize: size_t, + offset: size_t, + size: size_t, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstMemory; + pub fn gst_memory_copy(mem: *mut GstMemory, offset: ssize_t, size: ssize_t) -> *mut GstMemory; + pub fn gst_memory_get_sizes( + mem: *mut GstMemory, + offset: *mut size_t, + maxsize: *mut size_t, + ) -> size_t; + pub fn gst_memory_init( + mem: *mut GstMemory, + flags: GstMemoryFlags, + allocator: *mut GstAllocator, + parent: *mut GstMemory, + maxsize: size_t, + align: size_t, + offset: size_t, + size: size_t, + ); + pub fn gst_memory_is_span( + mem1: *mut GstMemory, + mem2: *mut GstMemory, + offset: *mut size_t, + ) -> gboolean; + pub fn gst_memory_is_type(mem: *mut GstMemory, mem_type: *const c_char) -> gboolean; + pub fn gst_memory_make_mapped( + mem: *mut GstMemory, + info: *mut GstMapInfo, + flags: GstMapFlags, + ) -> *mut GstMemory; + pub fn gst_memory_map( + mem: *mut GstMemory, + info: *mut GstMapInfo, + flags: GstMapFlags, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_memory_ref(memory: *mut GstMemory) -> *mut GstMemory; + pub fn gst_memory_resize(mem: *mut GstMemory, offset: ssize_t, size: size_t); + pub fn gst_memory_share(mem: *mut GstMemory, offset: ssize_t, size: ssize_t) -> *mut GstMemory; + pub fn gst_memory_unmap(mem: *mut GstMemory, info: *mut GstMapInfo); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_memory_unref(memory: *mut GstMemory); + + //========================================================================= + // GstMessage + //========================================================================= + pub fn gst_message_get_type() -> GType; + pub fn gst_message_new_application( + src: *mut GstObject, + structure: *mut GstStructure, + ) -> *mut GstMessage; + pub fn gst_message_new_async_done( + src: *mut GstObject, + running_time: GstClockTime, + ) -> *mut GstMessage; + pub fn gst_message_new_async_start(src: *mut GstObject) -> *mut GstMessage; + pub fn gst_message_new_buffering(src: *mut GstObject, percent: c_int) -> *mut GstMessage; + pub fn gst_message_new_clock_lost(src: *mut GstObject, clock: *mut GstClock) + -> *mut GstMessage; + pub fn gst_message_new_clock_provide( + src: *mut GstObject, + clock: *mut GstClock, + ready: gboolean, + ) -> *mut GstMessage; + pub fn gst_message_new_custom( + type_: GstMessageType, + src: *mut GstObject, + structure: *mut GstStructure, + ) -> *mut GstMessage; + pub fn gst_message_new_device_added( + src: *mut GstObject, + device: *mut GstDevice, + ) -> *mut GstMessage; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_message_new_device_changed( + src: *mut GstObject, + device: *mut GstDevice, + changed_device: *mut GstDevice, + ) -> *mut GstMessage; + pub fn gst_message_new_device_removed( + src: *mut GstObject, + device: *mut GstDevice, + ) -> *mut GstMessage; + pub fn gst_message_new_duration_changed(src: *mut GstObject) -> *mut GstMessage; + pub fn gst_message_new_element( + src: *mut GstObject, + structure: *mut GstStructure, + ) -> *mut GstMessage; + pub fn gst_message_new_eos(src: *mut GstObject) -> *mut GstMessage; + pub fn gst_message_new_error( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + ) -> *mut GstMessage; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_new_error_with_details( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + details: *mut GstStructure, + ) -> *mut GstMessage; + pub fn gst_message_new_have_context( + src: *mut GstObject, + context: *mut GstContext, + ) -> *mut GstMessage; + pub fn gst_message_new_info( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + ) -> *mut GstMessage; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_new_info_with_details( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + details: *mut GstStructure, + ) -> *mut GstMessage; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_message_new_instant_rate_request( + src: *mut GstObject, + rate_multiplier: c_double, + ) -> *mut GstMessage; + pub fn gst_message_new_latency(src: *mut GstObject) -> *mut GstMessage; + pub fn gst_message_new_need_context( + src: *mut GstObject, + context_type: *const c_char, + ) -> *mut GstMessage; + pub fn gst_message_new_new_clock(src: *mut GstObject, clock: *mut GstClock) -> *mut GstMessage; + pub fn gst_message_new_progress( + src: *mut GstObject, + type_: GstProgressType, + code: *const c_char, + text: *const c_char, + ) -> *mut GstMessage; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_new_property_notify( + src: *mut GstObject, + property_name: *const c_char, + val: *mut gobject::GValue, + ) -> *mut GstMessage; + pub fn gst_message_new_qos( + src: *mut GstObject, + live: gboolean, + running_time: u64, + stream_time: u64, + timestamp: u64, + duration: u64, + ) -> *mut GstMessage; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_new_redirect( + src: *mut GstObject, + location: *const c_char, + tag_list: *mut GstTagList, + entry_struct: *const GstStructure, + ) -> *mut GstMessage; + pub fn gst_message_new_request_state(src: *mut GstObject, state: GstState) -> *mut GstMessage; + pub fn gst_message_new_reset_time( + src: *mut GstObject, + running_time: GstClockTime, + ) -> *mut GstMessage; + pub fn gst_message_new_segment_done( + src: *mut GstObject, + format: GstFormat, + position: i64, + ) -> *mut GstMessage; + pub fn gst_message_new_segment_start( + src: *mut GstObject, + format: GstFormat, + position: i64, + ) -> *mut GstMessage; + pub fn gst_message_new_state_changed( + src: *mut GstObject, + oldstate: GstState, + newstate: GstState, + pending: GstState, + ) -> *mut GstMessage; + pub fn gst_message_new_state_dirty(src: *mut GstObject) -> *mut GstMessage; + pub fn gst_message_new_step_done( + src: *mut GstObject, + format: GstFormat, + amount: u64, + rate: c_double, + flush: gboolean, + intermediate: gboolean, + duration: u64, + eos: gboolean, + ) -> *mut GstMessage; + pub fn gst_message_new_step_start( + src: *mut GstObject, + active: gboolean, + format: GstFormat, + amount: u64, + rate: c_double, + flush: gboolean, + intermediate: gboolean, + ) -> *mut GstMessage; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_new_stream_collection( + src: *mut GstObject, + collection: *mut GstStreamCollection, + ) -> *mut GstMessage; + pub fn gst_message_new_stream_start(src: *mut GstObject) -> *mut GstMessage; + pub fn gst_message_new_stream_status( + src: *mut GstObject, + type_: GstStreamStatusType, + owner: *mut GstElement, + ) -> *mut GstMessage; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_new_streams_selected( + src: *mut GstObject, + collection: *mut GstStreamCollection, + ) -> *mut GstMessage; + pub fn gst_message_new_structure_change( + src: *mut GstObject, + type_: GstStructureChangeType, + owner: *mut GstElement, + busy: gboolean, + ) -> *mut GstMessage; + pub fn gst_message_new_tag(src: *mut GstObject, tag_list: *mut GstTagList) -> *mut GstMessage; + pub fn gst_message_new_toc( + src: *mut GstObject, + toc: *mut GstToc, + updated: gboolean, + ) -> *mut GstMessage; + pub fn gst_message_new_warning( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + ) -> *mut GstMessage; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_new_warning_with_details( + src: *mut GstObject, + error: *mut glib::GError, + debug: *const c_char, + details: *mut GstStructure, + ) -> *mut GstMessage; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_add_redirect_entry( + message: *mut GstMessage, + location: *const c_char, + tag_list: *mut GstTagList, + entry_struct: *const GstStructure, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_message_copy(msg: *const GstMessage) -> *mut GstMessage; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_get_num_redirect_entries(message: *mut GstMessage) -> size_t; + pub fn gst_message_get_seqnum(message: *mut GstMessage) -> u32; + pub fn gst_message_get_stream_status_object(message: *mut GstMessage) + -> *const gobject::GValue; + pub fn gst_message_get_structure(message: *mut GstMessage) -> *const GstStructure; + pub fn gst_message_has_name(message: *mut GstMessage, name: *const c_char) -> gboolean; + pub fn gst_message_parse_async_done(message: *mut GstMessage, running_time: *mut GstClockTime); + pub fn gst_message_parse_buffering(message: *mut GstMessage, percent: *mut c_int); + pub fn gst_message_parse_buffering_stats( + message: *mut GstMessage, + mode: *mut GstBufferingMode, + avg_in: *mut c_int, + avg_out: *mut c_int, + buffering_left: *mut i64, + ); + pub fn gst_message_parse_clock_lost(message: *mut GstMessage, clock: *mut *mut GstClock); + pub fn gst_message_parse_clock_provide( + message: *mut GstMessage, + clock: *mut *mut GstClock, + ready: *mut gboolean, + ); + pub fn gst_message_parse_context_type( + message: *mut GstMessage, + context_type: *mut *const c_char, + ) -> gboolean; + pub fn gst_message_parse_device_added(message: *mut GstMessage, device: *mut *mut GstDevice); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_message_parse_device_changed( + message: *mut GstMessage, + device: *mut *mut GstDevice, + changed_device: *mut *mut GstDevice, + ); + pub fn gst_message_parse_device_removed(message: *mut GstMessage, device: *mut *mut GstDevice); + pub fn gst_message_parse_error( + message: *mut GstMessage, + gerror: *mut *mut glib::GError, + debug: *mut *mut c_char, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_parse_error_details( + message: *mut GstMessage, + structure: *mut *const GstStructure, + ); + pub fn gst_message_parse_group_id(message: *mut GstMessage, group_id: *mut c_uint) -> gboolean; + pub fn gst_message_parse_have_context(message: *mut GstMessage, context: *mut *mut GstContext); + pub fn gst_message_parse_info( + message: *mut GstMessage, + gerror: *mut *mut glib::GError, + debug: *mut *mut c_char, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_parse_info_details( + message: *mut GstMessage, + structure: *mut *const GstStructure, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_message_parse_instant_rate_request( + message: *mut GstMessage, + rate_multiplier: *mut c_double, + ); + pub fn gst_message_parse_new_clock(message: *mut GstMessage, clock: *mut *mut GstClock); + pub fn gst_message_parse_progress( + message: *mut GstMessage, + type_: *mut GstProgressType, + code: *mut *mut c_char, + text: *mut *mut c_char, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_parse_property_notify( + message: *mut GstMessage, + object: *mut *mut GstObject, + property_name: *mut *const c_char, + property_value: *mut *const gobject::GValue, + ); + pub fn gst_message_parse_qos( + message: *mut GstMessage, + live: *mut gboolean, + running_time: *mut u64, + stream_time: *mut u64, + timestamp: *mut u64, + duration: *mut u64, + ); + pub fn gst_message_parse_qos_stats( + message: *mut GstMessage, + format: *mut GstFormat, + processed: *mut u64, + dropped: *mut u64, + ); + pub fn gst_message_parse_qos_values( + message: *mut GstMessage, + jitter: *mut i64, + proportion: *mut c_double, + quality: *mut c_int, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_parse_redirect_entry( + message: *mut GstMessage, + entry_index: size_t, + location: *mut *const c_char, + tag_list: *mut *mut GstTagList, + entry_struct: *mut *const GstStructure, + ); + pub fn gst_message_parse_request_state(message: *mut GstMessage, state: *mut GstState); + pub fn gst_message_parse_reset_time(message: *mut GstMessage, running_time: *mut GstClockTime); + pub fn gst_message_parse_segment_done( + message: *mut GstMessage, + format: *mut GstFormat, + position: *mut i64, + ); + pub fn gst_message_parse_segment_start( + message: *mut GstMessage, + format: *mut GstFormat, + position: *mut i64, + ); + pub fn gst_message_parse_state_changed( + message: *mut GstMessage, + oldstate: *mut GstState, + newstate: *mut GstState, + pending: *mut GstState, + ); + pub fn gst_message_parse_step_done( + message: *mut GstMessage, + format: *mut GstFormat, + amount: *mut u64, + rate: *mut c_double, + flush: *mut gboolean, + intermediate: *mut gboolean, + duration: *mut u64, + eos: *mut gboolean, + ); + pub fn gst_message_parse_step_start( + message: *mut GstMessage, + active: *mut gboolean, + format: *mut GstFormat, + amount: *mut u64, + rate: *mut c_double, + flush: *mut gboolean, + intermediate: *mut gboolean, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_parse_stream_collection( + message: *mut GstMessage, + collection: *mut *mut GstStreamCollection, + ); + pub fn gst_message_parse_stream_status( + message: *mut GstMessage, + type_: *mut GstStreamStatusType, + owner: *mut *mut GstElement, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_parse_streams_selected( + message: *mut GstMessage, + collection: *mut *mut GstStreamCollection, + ); + pub fn gst_message_parse_structure_change( + message: *mut GstMessage, + type_: *mut GstStructureChangeType, + owner: *mut *mut GstElement, + busy: *mut gboolean, + ); + pub fn gst_message_parse_tag(message: *mut GstMessage, tag_list: *mut *mut GstTagList); + pub fn gst_message_parse_toc( + message: *mut GstMessage, + toc: *mut *mut GstToc, + updated: *mut gboolean, + ); + pub fn gst_message_parse_warning( + message: *mut GstMessage, + gerror: *mut *mut glib::GError, + debug: *mut *mut c_char, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_parse_warning_details( + message: *mut GstMessage, + structure: *mut *const GstStructure, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_message_ref(msg: *mut GstMessage) -> *mut GstMessage; + pub fn gst_message_set_buffering_stats( + message: *mut GstMessage, + mode: GstBufferingMode, + avg_in: c_int, + avg_out: c_int, + buffering_left: i64, + ); + pub fn gst_message_set_group_id(message: *mut GstMessage, group_id: c_uint); + pub fn gst_message_set_qos_stats( + message: *mut GstMessage, + format: GstFormat, + processed: u64, + dropped: u64, + ); + pub fn gst_message_set_qos_values( + message: *mut GstMessage, + jitter: i64, + proportion: c_double, + quality: c_int, + ); + pub fn gst_message_set_seqnum(message: *mut GstMessage, seqnum: u32); + pub fn gst_message_set_stream_status_object( + message: *mut GstMessage, + object: *const gobject::GValue, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_streams_selected_add(message: *mut GstMessage, stream: *mut GstStream); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_streams_selected_get_size(message: *mut GstMessage) -> c_uint; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_message_streams_selected_get_stream( + message: *mut GstMessage, + idx: c_uint, + ) -> *mut GstStream; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_message_unref(msg: *mut GstMessage); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_message_writable_structure(message: *mut GstMessage) -> *mut GstStructure; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_message_replace( + old_message: *mut *mut GstMessage, + new_message: *mut GstMessage, + ) -> gboolean; + + //========================================================================= + // GstMeta + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_meta_compare_seqnum(meta1: *const GstMeta, meta2: *const GstMeta) -> c_int; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_meta_get_seqnum(meta: *const GstMeta) -> u64; + pub fn gst_meta_api_type_get_tags(api: GType) -> *const *const c_char; + pub fn gst_meta_api_type_has_tag(api: GType, tag: glib::GQuark) -> gboolean; + pub fn gst_meta_api_type_register(api: *const c_char, tags: *mut *const c_char) -> GType; + pub fn gst_meta_get_info(impl_: *const c_char) -> *const GstMetaInfo; + pub fn gst_meta_register( + api: GType, + impl_: *const c_char, + size: size_t, + init_func: GstMetaInitFunction, + free_func: GstMetaFreeFunction, + transform_func: GstMetaTransformFunction, + ) -> *const GstMetaInfo; + + //========================================================================= + // GstMiniObject + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_mini_object_add_parent(object: *mut GstMiniObject, parent: *mut GstMiniObject); + pub fn gst_mini_object_copy(mini_object: *const GstMiniObject) -> *mut GstMiniObject; + pub fn gst_mini_object_get_qdata(object: *mut GstMiniObject, quark: glib::GQuark) -> gpointer; + pub fn gst_mini_object_init( + mini_object: *mut GstMiniObject, + flags: c_uint, + type_: GType, + copy_func: GstMiniObjectCopyFunction, + dispose_func: GstMiniObjectDisposeFunction, + free_func: GstMiniObjectFreeFunction, + ); + pub fn gst_mini_object_is_writable(mini_object: *const GstMiniObject) -> gboolean; + pub fn gst_mini_object_lock(object: *mut GstMiniObject, flags: GstLockFlags) -> gboolean; + pub fn gst_mini_object_make_writable(mini_object: *mut GstMiniObject) -> *mut GstMiniObject; + pub fn gst_mini_object_ref(mini_object: *mut GstMiniObject) -> *mut GstMiniObject; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_mini_object_remove_parent(object: *mut GstMiniObject, parent: *mut GstMiniObject); + pub fn gst_mini_object_set_qdata( + object: *mut GstMiniObject, + quark: glib::GQuark, + data: gpointer, + destroy: glib::GDestroyNotify, + ); + pub fn gst_mini_object_steal_qdata(object: *mut GstMiniObject, quark: glib::GQuark) + -> gpointer; + pub fn gst_mini_object_unlock(object: *mut GstMiniObject, flags: GstLockFlags); + pub fn gst_mini_object_unref(mini_object: *mut GstMiniObject); + pub fn gst_mini_object_weak_ref( + object: *mut GstMiniObject, + notify: GstMiniObjectNotify, + data: gpointer, + ); + pub fn gst_mini_object_weak_unref( + object: *mut GstMiniObject, + notify: GstMiniObjectNotify, + data: gpointer, + ); + pub fn gst_mini_object_replace( + olddata: *mut *mut GstMiniObject, + newdata: *mut GstMiniObject, + ) -> gboolean; + pub fn gst_mini_object_steal(olddata: *mut *mut GstMiniObject) -> *mut GstMiniObject; + pub fn gst_mini_object_take( + olddata: *mut *mut GstMiniObject, + newdata: *mut GstMiniObject, + ) -> gboolean; + + //========================================================================= + // GstPadProbeInfo + //========================================================================= + pub fn gst_pad_probe_info_get_buffer(info: *mut GstPadProbeInfo) -> *mut GstBuffer; + pub fn gst_pad_probe_info_get_buffer_list(info: *mut GstPadProbeInfo) -> *mut GstBufferList; + pub fn gst_pad_probe_info_get_event(info: *mut GstPadProbeInfo) -> *mut GstEvent; + pub fn gst_pad_probe_info_get_query(info: *mut GstPadProbeInfo) -> *mut GstQuery; + + //========================================================================= + // GstParentBufferMeta + //========================================================================= + pub fn gst_parent_buffer_meta_get_info() -> *const GstMetaInfo; + + //========================================================================= + // GstParseContext + //========================================================================= + pub fn gst_parse_context_get_type() -> GType; + pub fn gst_parse_context_new() -> *mut GstParseContext; + #[cfg(any(feature = "v1_12_1", feature = "dox"))] + pub fn gst_parse_context_copy(context: *const GstParseContext) -> *mut GstParseContext; + pub fn gst_parse_context_free(context: *mut GstParseContext); + pub fn gst_parse_context_get_missing_elements( + context: *mut GstParseContext, + ) -> *mut *mut c_char; + + //========================================================================= + // GstPoll + //========================================================================= + pub fn gst_poll_add_fd(set: *mut GstPoll, fd: *mut GstPollFD) -> gboolean; + pub fn gst_poll_fd_can_read(set: *const GstPoll, fd: *mut GstPollFD) -> gboolean; + pub fn gst_poll_fd_can_write(set: *const GstPoll, fd: *mut GstPollFD) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_poll_fd_ctl_pri(set: *mut GstPoll, fd: *mut GstPollFD, active: gboolean) + -> gboolean; + pub fn gst_poll_fd_ctl_read( + set: *mut GstPoll, + fd: *mut GstPollFD, + active: gboolean, + ) -> gboolean; + pub fn gst_poll_fd_ctl_write( + set: *mut GstPoll, + fd: *mut GstPollFD, + active: gboolean, + ) -> gboolean; + pub fn gst_poll_fd_has_closed(set: *const GstPoll, fd: *mut GstPollFD) -> gboolean; + pub fn gst_poll_fd_has_error(set: *const GstPoll, fd: *mut GstPollFD) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_poll_fd_has_pri(set: *const GstPoll, fd: *mut GstPollFD) -> gboolean; + pub fn gst_poll_fd_ignored(set: *mut GstPoll, fd: *mut GstPollFD); + pub fn gst_poll_free(set: *mut GstPoll); + pub fn gst_poll_get_read_gpollfd(set: *mut GstPoll, fd: *mut glib::GPollFD); + pub fn gst_poll_read_control(set: *mut GstPoll) -> gboolean; + pub fn gst_poll_remove_fd(set: *mut GstPoll, fd: *mut GstPollFD) -> gboolean; + pub fn gst_poll_restart(set: *mut GstPoll); + pub fn gst_poll_set_controllable(set: *mut GstPoll, controllable: gboolean) -> gboolean; + pub fn gst_poll_set_flushing(set: *mut GstPoll, flushing: gboolean); + pub fn gst_poll_wait(set: *mut GstPoll, timeout: GstClockTime) -> c_int; + pub fn gst_poll_write_control(set: *mut GstPoll) -> gboolean; + pub fn gst_poll_new(controllable: gboolean) -> *mut GstPoll; + pub fn gst_poll_new_timer() -> *mut GstPoll; + + //========================================================================= + // GstPollFD + //========================================================================= + pub fn gst_poll_fd_init(fd: *mut GstPollFD); + + //========================================================================= + // GstPromise + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_promise_get_type() -> GType; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_promise_new() -> *mut GstPromise; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_promise_new_with_change_func( + func: GstPromiseChangeFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstPromise; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_promise_expire(promise: *mut GstPromise); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_promise_get_reply(promise: *mut GstPromise) -> *const GstStructure; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_promise_interrupt(promise: *mut GstPromise); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_promise_reply(promise: *mut GstPromise, s: *mut GstStructure); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_promise_wait(promise: *mut GstPromise) -> GstPromiseResult; + + //========================================================================= + // GstProtectionMeta + //========================================================================= + pub fn gst_protection_meta_get_info() -> *const GstMetaInfo; + + //========================================================================= + // GstQuery + //========================================================================= + pub fn gst_query_get_type() -> GType; + pub fn gst_query_new_accept_caps(caps: *mut GstCaps) -> *mut GstQuery; + pub fn gst_query_new_allocation(caps: *mut GstCaps, need_pool: gboolean) -> *mut GstQuery; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_query_new_bitrate() -> *mut GstQuery; + pub fn gst_query_new_buffering(format: GstFormat) -> *mut GstQuery; + pub fn gst_query_new_caps(filter: *mut GstCaps) -> *mut GstQuery; + pub fn gst_query_new_context(context_type: *const c_char) -> *mut GstQuery; + pub fn gst_query_new_convert( + src_format: GstFormat, + value: i64, + dest_format: GstFormat, + ) -> *mut GstQuery; + pub fn gst_query_new_custom(type_: GstQueryType, structure: *mut GstStructure) + -> *mut GstQuery; + pub fn gst_query_new_drain() -> *mut GstQuery; + pub fn gst_query_new_duration(format: GstFormat) -> *mut GstQuery; + pub fn gst_query_new_formats() -> *mut GstQuery; + pub fn gst_query_new_latency() -> *mut GstQuery; + pub fn gst_query_new_position(format: GstFormat) -> *mut GstQuery; + pub fn gst_query_new_scheduling() -> *mut GstQuery; + pub fn gst_query_new_seeking(format: GstFormat) -> *mut GstQuery; + pub fn gst_query_new_segment(format: GstFormat) -> *mut GstQuery; + pub fn gst_query_new_uri() -> *mut GstQuery; + pub fn gst_query_add_allocation_meta( + query: *mut GstQuery, + api: GType, + params: *const GstStructure, + ); + pub fn gst_query_add_allocation_param( + query: *mut GstQuery, + allocator: *mut GstAllocator, + params: *const GstAllocationParams, + ); + pub fn gst_query_add_allocation_pool( + query: *mut GstQuery, + pool: *mut GstBufferPool, + size: c_uint, + min_buffers: c_uint, + max_buffers: c_uint, + ); + pub fn gst_query_add_buffering_range(query: *mut GstQuery, start: i64, stop: i64) -> gboolean; + pub fn gst_query_add_scheduling_mode(query: *mut GstQuery, mode: GstPadMode); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_query_copy(q: *const GstQuery) -> *mut GstQuery; + pub fn gst_query_find_allocation_meta( + query: *mut GstQuery, + api: GType, + index: *mut c_uint, + ) -> gboolean; + pub fn gst_query_get_n_allocation_metas(query: *mut GstQuery) -> c_uint; + pub fn gst_query_get_n_allocation_params(query: *mut GstQuery) -> c_uint; + pub fn gst_query_get_n_allocation_pools(query: *mut GstQuery) -> c_uint; + pub fn gst_query_get_n_buffering_ranges(query: *mut GstQuery) -> c_uint; + pub fn gst_query_get_n_scheduling_modes(query: *mut GstQuery) -> c_uint; + pub fn gst_query_get_structure(query: *mut GstQuery) -> *const GstStructure; + pub fn gst_query_has_scheduling_mode(query: *mut GstQuery, mode: GstPadMode) -> gboolean; + pub fn gst_query_has_scheduling_mode_with_flags( + query: *mut GstQuery, + mode: GstPadMode, + flags: GstSchedulingFlags, + ) -> gboolean; + pub fn gst_query_parse_accept_caps(query: *mut GstQuery, caps: *mut *mut GstCaps); + pub fn gst_query_parse_accept_caps_result(query: *mut GstQuery, result: *mut gboolean); + pub fn gst_query_parse_allocation( + query: *mut GstQuery, + caps: *mut *mut GstCaps, + need_pool: *mut gboolean, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_query_parse_bitrate(query: *mut GstQuery, nominal_bitrate: *mut c_uint); + pub fn gst_query_parse_buffering_percent( + query: *mut GstQuery, + busy: *mut gboolean, + percent: *mut c_int, + ); + pub fn gst_query_parse_buffering_range( + query: *mut GstQuery, + format: *mut GstFormat, + start: *mut i64, + stop: *mut i64, + estimated_total: *mut i64, + ); + pub fn gst_query_parse_buffering_stats( + query: *mut GstQuery, + mode: *mut GstBufferingMode, + avg_in: *mut c_int, + avg_out: *mut c_int, + buffering_left: *mut i64, + ); + pub fn gst_query_parse_caps(query: *mut GstQuery, filter: *mut *mut GstCaps); + pub fn gst_query_parse_caps_result(query: *mut GstQuery, caps: *mut *mut GstCaps); + pub fn gst_query_parse_context(query: *mut GstQuery, context: *mut *mut GstContext); + pub fn gst_query_parse_context_type( + query: *mut GstQuery, + context_type: *mut *const c_char, + ) -> gboolean; + pub fn gst_query_parse_convert( + query: *mut GstQuery, + src_format: *mut GstFormat, + src_value: *mut i64, + dest_format: *mut GstFormat, + dest_value: *mut i64, + ); + pub fn gst_query_parse_duration( + query: *mut GstQuery, + format: *mut GstFormat, + duration: *mut i64, + ); + pub fn gst_query_parse_latency( + query: *mut GstQuery, + live: *mut gboolean, + min_latency: *mut GstClockTime, + max_latency: *mut GstClockTime, + ); + pub fn gst_query_parse_n_formats(query: *mut GstQuery, n_formats: *mut c_uint); + pub fn gst_query_parse_nth_allocation_meta( + query: *mut GstQuery, + index: c_uint, + params: *mut *const GstStructure, + ) -> GType; + pub fn gst_query_parse_nth_allocation_param( + query: *mut GstQuery, + index: c_uint, + allocator: *mut *mut GstAllocator, + params: *mut GstAllocationParams, + ); + pub fn gst_query_parse_nth_allocation_pool( + query: *mut GstQuery, + index: c_uint, + pool: *mut *mut GstBufferPool, + size: *mut c_uint, + min_buffers: *mut c_uint, + max_buffers: *mut c_uint, + ); + pub fn gst_query_parse_nth_buffering_range( + query: *mut GstQuery, + index: c_uint, + start: *mut i64, + stop: *mut i64, + ) -> gboolean; + pub fn gst_query_parse_nth_format(query: *mut GstQuery, nth: c_uint, format: *mut GstFormat); + pub fn gst_query_parse_nth_scheduling_mode(query: *mut GstQuery, index: c_uint) -> GstPadMode; + pub fn gst_query_parse_position(query: *mut GstQuery, format: *mut GstFormat, cur: *mut i64); + pub fn gst_query_parse_scheduling( + query: *mut GstQuery, + flags: *mut GstSchedulingFlags, + minsize: *mut c_int, + maxsize: *mut c_int, + align: *mut c_int, + ); + pub fn gst_query_parse_seeking( + query: *mut GstQuery, + format: *mut GstFormat, + seekable: *mut gboolean, + segment_start: *mut i64, + segment_end: *mut i64, + ); + pub fn gst_query_parse_segment( + query: *mut GstQuery, + rate: *mut c_double, + format: *mut GstFormat, + start_value: *mut i64, + stop_value: *mut i64, + ); + pub fn gst_query_parse_uri(query: *mut GstQuery, uri: *mut *mut c_char); + pub fn gst_query_parse_uri_redirection(query: *mut GstQuery, uri: *mut *mut c_char); + pub fn gst_query_parse_uri_redirection_permanent( + query: *mut GstQuery, + permanent: *mut gboolean, + ); + pub fn gst_query_remove_nth_allocation_meta(query: *mut GstQuery, index: c_uint); + pub fn gst_query_remove_nth_allocation_param(query: *mut GstQuery, index: c_uint); + pub fn gst_query_remove_nth_allocation_pool(query: *mut GstQuery, index: c_uint); + pub fn gst_query_set_accept_caps_result(query: *mut GstQuery, result: gboolean); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_query_set_bitrate(query: *mut GstQuery, nominal_bitrate: c_uint); + pub fn gst_query_set_buffering_percent(query: *mut GstQuery, busy: gboolean, percent: c_int); + pub fn gst_query_set_buffering_range( + query: *mut GstQuery, + format: GstFormat, + start: i64, + stop: i64, + estimated_total: i64, + ); + pub fn gst_query_set_buffering_stats( + query: *mut GstQuery, + mode: GstBufferingMode, + avg_in: c_int, + avg_out: c_int, + buffering_left: i64, + ); + pub fn gst_query_set_caps_result(query: *mut GstQuery, caps: *mut GstCaps); + pub fn gst_query_set_context(query: *mut GstQuery, context: *mut GstContext); + pub fn gst_query_set_convert( + query: *mut GstQuery, + src_format: GstFormat, + src_value: i64, + dest_format: GstFormat, + dest_value: i64, + ); + pub fn gst_query_set_duration(query: *mut GstQuery, format: GstFormat, duration: i64); + pub fn gst_query_set_formats(query: *mut GstQuery, n_formats: c_int, ...); + pub fn gst_query_set_formatsv( + query: *mut GstQuery, + n_formats: c_int, + formats: *const GstFormat, + ); + pub fn gst_query_set_latency( + query: *mut GstQuery, + live: gboolean, + min_latency: GstClockTime, + max_latency: GstClockTime, + ); + pub fn gst_query_set_nth_allocation_param( + query: *mut GstQuery, + index: c_uint, + allocator: *mut GstAllocator, + params: *const GstAllocationParams, + ); + pub fn gst_query_set_nth_allocation_pool( + query: *mut GstQuery, + index: c_uint, + pool: *mut GstBufferPool, + size: c_uint, + min_buffers: c_uint, + max_buffers: c_uint, + ); + pub fn gst_query_set_position(query: *mut GstQuery, format: GstFormat, cur: i64); + pub fn gst_query_set_scheduling( + query: *mut GstQuery, + flags: GstSchedulingFlags, + minsize: c_int, + maxsize: c_int, + align: c_int, + ); + pub fn gst_query_set_seeking( + query: *mut GstQuery, + format: GstFormat, + seekable: gboolean, + segment_start: i64, + segment_end: i64, + ); + pub fn gst_query_set_segment( + query: *mut GstQuery, + rate: c_double, + format: GstFormat, + start_value: i64, + stop_value: i64, + ); + pub fn gst_query_set_uri(query: *mut GstQuery, uri: *const c_char); + pub fn gst_query_set_uri_redirection(query: *mut GstQuery, uri: *const c_char); + pub fn gst_query_set_uri_redirection_permanent(query: *mut GstQuery, permanent: gboolean); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_query_unref(q: *mut GstQuery); + pub fn gst_query_writable_structure(query: *mut GstQuery) -> *mut GstStructure; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_query_replace(old_query: *mut *mut GstQuery, new_query: *mut GstQuery) -> gboolean; + + //========================================================================= + // GstReferenceTimestampMeta + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_reference_timestamp_meta_get_info() -> *const GstMetaInfo; + + //========================================================================= + // GstSample + //========================================================================= + pub fn gst_sample_get_type() -> GType; + pub fn gst_sample_new( + buffer: *mut GstBuffer, + caps: *mut GstCaps, + segment: *const GstSegment, + info: *mut GstStructure, + ) -> *mut GstSample; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_sample_copy(buf: *const GstSample) -> *mut GstSample; + pub fn gst_sample_get_buffer(sample: *mut GstSample) -> *mut GstBuffer; + pub fn gst_sample_get_buffer_list(sample: *mut GstSample) -> *mut GstBufferList; + pub fn gst_sample_get_caps(sample: *mut GstSample) -> *mut GstCaps; + pub fn gst_sample_get_info(sample: *mut GstSample) -> *const GstStructure; + pub fn gst_sample_get_segment(sample: *mut GstSample) -> *mut GstSegment; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_sample_ref(sample: *mut GstSample) -> *mut GstSample; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_sample_set_buffer(sample: *mut GstSample, buffer: *mut GstBuffer); + pub fn gst_sample_set_buffer_list(sample: *mut GstSample, buffer_list: *mut GstBufferList); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_sample_set_caps(sample: *mut GstSample, caps: *mut GstCaps); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_sample_set_info(sample: *mut GstSample, info: *mut GstStructure) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_sample_set_segment(sample: *mut GstSample, segment: *const GstSegment); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_sample_unref(sample: *mut GstSample); + + //========================================================================= + // GstSegment + //========================================================================= + pub fn gst_segment_get_type() -> GType; + pub fn gst_segment_new() -> *mut GstSegment; + pub fn gst_segment_clip( + segment: *const GstSegment, + format: GstFormat, + start: u64, + stop: u64, + clip_start: *mut u64, + clip_stop: *mut u64, + ) -> gboolean; + pub fn gst_segment_copy(segment: *const GstSegment) -> *mut GstSegment; + pub fn gst_segment_copy_into(src: *const GstSegment, dest: *mut GstSegment); + pub fn gst_segment_do_seek( + segment: *mut GstSegment, + rate: c_double, + format: GstFormat, + flags: GstSeekFlags, + start_type: GstSeekType, + start: u64, + stop_type: GstSeekType, + stop: u64, + update: *mut gboolean, + ) -> gboolean; + pub fn gst_segment_free(segment: *mut GstSegment); + pub fn gst_segment_init(segment: *mut GstSegment, format: GstFormat); + pub fn gst_segment_is_equal(s0: *const GstSegment, s1: *const GstSegment) -> gboolean; + pub fn gst_segment_offset_running_time( + segment: *mut GstSegment, + format: GstFormat, + offset: i64, + ) -> gboolean; + pub fn gst_segment_position_from_running_time( + segment: *const GstSegment, + format: GstFormat, + running_time: u64, + ) -> u64; + pub fn gst_segment_position_from_running_time_full( + segment: *const GstSegment, + format: GstFormat, + running_time: u64, + position: *mut u64, + ) -> c_int; + pub fn gst_segment_position_from_stream_time( + segment: *const GstSegment, + format: GstFormat, + stream_time: u64, + ) -> u64; + pub fn gst_segment_position_from_stream_time_full( + segment: *const GstSegment, + format: GstFormat, + stream_time: u64, + position: *mut u64, + ) -> c_int; + pub fn gst_segment_set_running_time( + segment: *mut GstSegment, + format: GstFormat, + running_time: u64, + ) -> gboolean; + pub fn gst_segment_to_position( + segment: *const GstSegment, + format: GstFormat, + running_time: u64, + ) -> u64; + pub fn gst_segment_to_running_time( + segment: *const GstSegment, + format: GstFormat, + position: u64, + ) -> u64; + pub fn gst_segment_to_running_time_full( + segment: *const GstSegment, + format: GstFormat, + position: u64, + running_time: *mut u64, + ) -> c_int; + pub fn gst_segment_to_stream_time( + segment: *const GstSegment, + format: GstFormat, + position: u64, + ) -> u64; + pub fn gst_segment_to_stream_time_full( + segment: *const GstSegment, + format: GstFormat, + position: u64, + stream_time: *mut u64, + ) -> c_int; + + //========================================================================= + // GstStaticCaps + //========================================================================= + pub fn gst_static_caps_cleanup(static_caps: *mut GstStaticCaps); + pub fn gst_static_caps_get(static_caps: *mut GstStaticCaps) -> *mut GstCaps; + + //========================================================================= + // GstStaticPadTemplate + //========================================================================= + pub fn gst_static_pad_template_get( + pad_template: *mut GstStaticPadTemplate, + ) -> *mut GstPadTemplate; + pub fn gst_static_pad_template_get_caps(templ: *mut GstStaticPadTemplate) -> *mut GstCaps; + + //========================================================================= + // GstStructure + //========================================================================= + pub fn gst_structure_get_type() -> GType; + pub fn gst_structure_from_string( + string: *const c_char, + end: *mut *mut c_char, + ) -> *mut GstStructure; + pub fn gst_structure_new( + name: *const c_char, + firstfield: *const c_char, + ... + ) -> *mut GstStructure; + pub fn gst_structure_new_empty(name: *const c_char) -> *mut GstStructure; + pub fn gst_structure_new_from_string(string: *const c_char) -> *mut GstStructure; + pub fn gst_structure_new_id( + name_quark: glib::GQuark, + field_quark: glib::GQuark, + ... + ) -> *mut GstStructure; + pub fn gst_structure_new_id_empty(quark: glib::GQuark) -> *mut GstStructure; + //pub fn gst_structure_new_valist(name: *const c_char, firstfield: *const c_char, varargs: /*Unimplemented*/va_list) -> *mut GstStructure; + pub fn gst_structure_can_intersect( + struct1: *const GstStructure, + struct2: *const GstStructure, + ) -> gboolean; + pub fn gst_structure_copy(structure: *const GstStructure) -> *mut GstStructure; + pub fn gst_structure_filter_and_map_in_place( + structure: *mut GstStructure, + func: GstStructureFilterMapFunc, + user_data: gpointer, + ); + pub fn gst_structure_fixate(structure: *mut GstStructure); + pub fn gst_structure_fixate_field( + structure: *mut GstStructure, + field_name: *const c_char, + ) -> gboolean; + pub fn gst_structure_fixate_field_boolean( + structure: *mut GstStructure, + field_name: *const c_char, + target: gboolean, + ) -> gboolean; + pub fn gst_structure_fixate_field_nearest_double( + structure: *mut GstStructure, + field_name: *const c_char, + target: c_double, + ) -> gboolean; + pub fn gst_structure_fixate_field_nearest_fraction( + structure: *mut GstStructure, + field_name: *const c_char, + target_numerator: c_int, + target_denominator: c_int, + ) -> gboolean; + pub fn gst_structure_fixate_field_nearest_int( + structure: *mut GstStructure, + field_name: *const c_char, + target: c_int, + ) -> gboolean; + pub fn gst_structure_fixate_field_string( + structure: *mut GstStructure, + field_name: *const c_char, + target: *const c_char, + ) -> gboolean; + pub fn gst_structure_foreach( + structure: *const GstStructure, + func: GstStructureForeachFunc, + user_data: gpointer, + ) -> gboolean; + pub fn gst_structure_free(structure: *mut GstStructure); + pub fn gst_structure_get( + structure: *const GstStructure, + first_fieldname: *const c_char, + ... + ) -> gboolean; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_structure_get_array( + structure: *mut GstStructure, + fieldname: *const c_char, + array: *mut *mut gobject::GValueArray, + ) -> gboolean; + pub fn gst_structure_get_boolean( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut gboolean, + ) -> gboolean; + pub fn gst_structure_get_clock_time( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut GstClockTime, + ) -> gboolean; + pub fn gst_structure_get_date( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut *mut glib::GDate, + ) -> gboolean; + pub fn gst_structure_get_date_time( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut *mut GstDateTime, + ) -> gboolean; + pub fn gst_structure_get_double( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut c_double, + ) -> gboolean; + pub fn gst_structure_get_enum( + structure: *const GstStructure, + fieldname: *const c_char, + enumtype: GType, + value: *mut c_int, + ) -> gboolean; + pub fn gst_structure_get_field_type( + structure: *const GstStructure, + fieldname: *const c_char, + ) -> GType; + pub fn gst_structure_get_flagset( + structure: *const GstStructure, + fieldname: *const c_char, + value_flags: *mut c_uint, + value_mask: *mut c_uint, + ) -> gboolean; + pub fn gst_structure_get_fraction( + structure: *const GstStructure, + fieldname: *const c_char, + value_numerator: *mut c_int, + value_denominator: *mut c_int, + ) -> gboolean; + pub fn gst_structure_get_int( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut c_int, + ) -> gboolean; + pub fn gst_structure_get_int64( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut i64, + ) -> gboolean; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_structure_get_list( + structure: *mut GstStructure, + fieldname: *const c_char, + array: *mut *mut gobject::GValueArray, + ) -> gboolean; + pub fn gst_structure_get_name(structure: *const GstStructure) -> *const c_char; + pub fn gst_structure_get_name_id(structure: *const GstStructure) -> glib::GQuark; + pub fn gst_structure_get_string( + structure: *const GstStructure, + fieldname: *const c_char, + ) -> *const c_char; + pub fn gst_structure_get_uint( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut c_uint, + ) -> gboolean; + pub fn gst_structure_get_uint64( + structure: *const GstStructure, + fieldname: *const c_char, + value: *mut u64, + ) -> gboolean; + //pub fn gst_structure_get_valist(structure: *const GstStructure, first_fieldname: *const c_char, args: /*Unimplemented*/va_list) -> gboolean; + pub fn gst_structure_get_value( + structure: *const GstStructure, + fieldname: *const c_char, + ) -> *const gobject::GValue; + pub fn gst_structure_has_field( + structure: *const GstStructure, + fieldname: *const c_char, + ) -> gboolean; + pub fn gst_structure_has_field_typed( + structure: *const GstStructure, + fieldname: *const c_char, + type_: GType, + ) -> gboolean; + pub fn gst_structure_has_name(structure: *const GstStructure, name: *const c_char) -> gboolean; + pub fn gst_structure_id_get( + structure: *const GstStructure, + first_field_id: glib::GQuark, + ... + ) -> gboolean; + //pub fn gst_structure_id_get_valist(structure: *const GstStructure, first_field_id: glib::GQuark, args: /*Unimplemented*/va_list) -> gboolean; + pub fn gst_structure_id_get_value( + structure: *const GstStructure, + field: glib::GQuark, + ) -> *const gobject::GValue; + pub fn gst_structure_id_has_field( + structure: *const GstStructure, + field: glib::GQuark, + ) -> gboolean; + pub fn gst_structure_id_has_field_typed( + structure: *const GstStructure, + field: glib::GQuark, + type_: GType, + ) -> gboolean; + pub fn gst_structure_id_set(structure: *mut GstStructure, fieldname: glib::GQuark, ...); + //pub fn gst_structure_id_set_valist(structure: *mut GstStructure, fieldname: glib::GQuark, varargs: /*Unimplemented*/va_list); + pub fn gst_structure_id_set_value( + structure: *mut GstStructure, + field: glib::GQuark, + value: *const gobject::GValue, + ); + pub fn gst_structure_id_take_value( + structure: *mut GstStructure, + field: glib::GQuark, + value: *mut gobject::GValue, + ); + pub fn gst_structure_intersect( + struct1: *const GstStructure, + struct2: *const GstStructure, + ) -> *mut GstStructure; + pub fn gst_structure_is_equal( + structure1: *const GstStructure, + structure2: *const GstStructure, + ) -> gboolean; + pub fn gst_structure_is_subset( + subset: *const GstStructure, + superset: *const GstStructure, + ) -> gboolean; + pub fn gst_structure_map_in_place( + structure: *mut GstStructure, + func: GstStructureMapFunc, + user_data: gpointer, + ) -> gboolean; + pub fn gst_structure_n_fields(structure: *const GstStructure) -> c_int; + pub fn gst_structure_nth_field_name( + structure: *const GstStructure, + index: c_uint, + ) -> *const c_char; + pub fn gst_structure_remove_all_fields(structure: *mut GstStructure); + pub fn gst_structure_remove_field(structure: *mut GstStructure, fieldname: *const c_char); + pub fn gst_structure_remove_fields(structure: *mut GstStructure, fieldname: *const c_char, ...); + //pub fn gst_structure_remove_fields_valist(structure: *mut GstStructure, fieldname: *const c_char, varargs: /*Unimplemented*/va_list); + pub fn gst_structure_set(structure: *mut GstStructure, fieldname: *const c_char, ...); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_structure_set_array( + structure: *mut GstStructure, + fieldname: *const c_char, + array: *const gobject::GValueArray, + ); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_structure_set_list( + structure: *mut GstStructure, + fieldname: *const c_char, + array: *const gobject::GValueArray, + ); + pub fn gst_structure_set_name(structure: *mut GstStructure, name: *const c_char); + pub fn gst_structure_set_parent_refcount( + structure: *mut GstStructure, + refcount: *mut c_int, + ) -> gboolean; + //pub fn gst_structure_set_valist(structure: *mut GstStructure, fieldname: *const c_char, varargs: /*Unimplemented*/va_list); + pub fn gst_structure_set_value( + structure: *mut GstStructure, + fieldname: *const c_char, + value: *const gobject::GValue, + ); + pub fn gst_structure_take_value( + structure: *mut GstStructure, + fieldname: *const c_char, + value: *mut gobject::GValue, + ); + pub fn gst_structure_to_string(structure: *const GstStructure) -> *mut c_char; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_structure_take( + oldstr_ptr: *mut *mut GstStructure, + newstr: *mut GstStructure, + ) -> gboolean; + + //========================================================================= + // GstTagList + //========================================================================= + pub fn gst_tag_list_get_type() -> GType; + pub fn gst_tag_list_new(tag: *const c_char, ...) -> *mut GstTagList; + pub fn gst_tag_list_new_empty() -> *mut GstTagList; + pub fn gst_tag_list_new_from_string(str: *const c_char) -> *mut GstTagList; + //pub fn gst_tag_list_new_valist(var_args: /*Unimplemented*/va_list) -> *mut GstTagList; + pub fn gst_tag_list_add(list: *mut GstTagList, mode: GstTagMergeMode, tag: *const c_char, ...); + //pub fn gst_tag_list_add_valist(list: *mut GstTagList, mode: GstTagMergeMode, tag: *const c_char, var_args: /*Unimplemented*/va_list); + //pub fn gst_tag_list_add_valist_values(list: *mut GstTagList, mode: GstTagMergeMode, tag: *const c_char, var_args: /*Unimplemented*/va_list); + pub fn gst_tag_list_add_value( + list: *mut GstTagList, + mode: GstTagMergeMode, + tag: *const c_char, + value: *const gobject::GValue, + ); + pub fn gst_tag_list_add_values( + list: *mut GstTagList, + mode: GstTagMergeMode, + tag: *const c_char, + ... + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_tag_list_copy(taglist: *const GstTagList) -> *mut GstTagList; + pub fn gst_tag_list_foreach( + list: *const GstTagList, + func: GstTagForeachFunc, + user_data: gpointer, + ); + pub fn gst_tag_list_get_boolean( + list: *const GstTagList, + tag: *const c_char, + value: *mut gboolean, + ) -> gboolean; + pub fn gst_tag_list_get_boolean_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut gboolean, + ) -> gboolean; + pub fn gst_tag_list_get_date( + list: *const GstTagList, + tag: *const c_char, + value: *mut *mut glib::GDate, + ) -> gboolean; + pub fn gst_tag_list_get_date_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut *mut glib::GDate, + ) -> gboolean; + pub fn gst_tag_list_get_date_time( + list: *const GstTagList, + tag: *const c_char, + value: *mut *mut GstDateTime, + ) -> gboolean; + pub fn gst_tag_list_get_date_time_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut *mut GstDateTime, + ) -> gboolean; + pub fn gst_tag_list_get_double( + list: *const GstTagList, + tag: *const c_char, + value: *mut c_double, + ) -> gboolean; + pub fn gst_tag_list_get_double_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut c_double, + ) -> gboolean; + pub fn gst_tag_list_get_float( + list: *const GstTagList, + tag: *const c_char, + value: *mut c_float, + ) -> gboolean; + pub fn gst_tag_list_get_float_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut c_float, + ) -> gboolean; + pub fn gst_tag_list_get_int( + list: *const GstTagList, + tag: *const c_char, + value: *mut c_int, + ) -> gboolean; + pub fn gst_tag_list_get_int64( + list: *const GstTagList, + tag: *const c_char, + value: *mut i64, + ) -> gboolean; + pub fn gst_tag_list_get_int64_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut i64, + ) -> gboolean; + pub fn gst_tag_list_get_int_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut c_int, + ) -> gboolean; + pub fn gst_tag_list_get_pointer( + list: *const GstTagList, + tag: *const c_char, + value: *mut gpointer, + ) -> gboolean; + pub fn gst_tag_list_get_pointer_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut gpointer, + ) -> gboolean; + pub fn gst_tag_list_get_sample( + list: *const GstTagList, + tag: *const c_char, + sample: *mut *mut GstSample, + ) -> gboolean; + pub fn gst_tag_list_get_sample_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + sample: *mut *mut GstSample, + ) -> gboolean; + pub fn gst_tag_list_get_scope(list: *const GstTagList) -> GstTagScope; + pub fn gst_tag_list_get_string( + list: *const GstTagList, + tag: *const c_char, + value: *mut *mut c_char, + ) -> gboolean; + pub fn gst_tag_list_get_string_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut *mut c_char, + ) -> gboolean; + pub fn gst_tag_list_get_tag_size(list: *const GstTagList, tag: *const c_char) -> c_uint; + pub fn gst_tag_list_get_uint( + list: *const GstTagList, + tag: *const c_char, + value: *mut c_uint, + ) -> gboolean; + pub fn gst_tag_list_get_uint64( + list: *const GstTagList, + tag: *const c_char, + value: *mut u64, + ) -> gboolean; + pub fn gst_tag_list_get_uint64_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut u64, + ) -> gboolean; + pub fn gst_tag_list_get_uint_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut c_uint, + ) -> gboolean; + pub fn gst_tag_list_get_value_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + ) -> *const gobject::GValue; + pub fn gst_tag_list_insert( + into: *mut GstTagList, + from: *const GstTagList, + mode: GstTagMergeMode, + ); + pub fn gst_tag_list_is_empty(list: *const GstTagList) -> gboolean; + pub fn gst_tag_list_is_equal(list1: *const GstTagList, list2: *const GstTagList) -> gboolean; + pub fn gst_tag_list_merge( + list1: *const GstTagList, + list2: *const GstTagList, + mode: GstTagMergeMode, + ) -> *mut GstTagList; + pub fn gst_tag_list_n_tags(list: *const GstTagList) -> c_int; + pub fn gst_tag_list_nth_tag_name(list: *const GstTagList, index: c_uint) -> *const c_char; + pub fn gst_tag_list_peek_string_index( + list: *const GstTagList, + tag: *const c_char, + index: c_uint, + value: *mut *const c_char, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_tag_list_ref(taglist: *mut GstTagList) -> *mut GstTagList; + pub fn gst_tag_list_remove_tag(list: *mut GstTagList, tag: *const c_char); + pub fn gst_tag_list_set_scope(list: *mut GstTagList, scope: GstTagScope); + pub fn gst_tag_list_to_string(list: *const GstTagList) -> *mut c_char; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_tag_list_unref(taglist: *mut GstTagList); + pub fn gst_tag_list_copy_value( + dest: *mut gobject::GValue, + list: *const GstTagList, + tag: *const c_char, + ) -> gboolean; + + //========================================================================= + // GstToc + //========================================================================= + pub fn gst_toc_get_type() -> GType; + pub fn gst_toc_new(scope: GstTocScope) -> *mut GstToc; + pub fn gst_toc_append_entry(toc: *mut GstToc, entry: *mut GstTocEntry); + pub fn gst_toc_dump(toc: *mut GstToc); + pub fn gst_toc_find_entry(toc: *const GstToc, uid: *const c_char) -> *mut GstTocEntry; + pub fn gst_toc_get_entries(toc: *const GstToc) -> *mut glib::GList; + pub fn gst_toc_get_scope(toc: *const GstToc) -> GstTocScope; + pub fn gst_toc_get_tags(toc: *const GstToc) -> *mut GstTagList; + pub fn gst_toc_merge_tags(toc: *mut GstToc, tags: *mut GstTagList, mode: GstTagMergeMode); + pub fn gst_toc_set_tags(toc: *mut GstToc, tags: *mut GstTagList); + + //========================================================================= + // GstTocEntry + //========================================================================= + pub fn gst_toc_entry_get_type() -> GType; + pub fn gst_toc_entry_new(type_: GstTocEntryType, uid: *const c_char) -> *mut GstTocEntry; + pub fn gst_toc_entry_append_sub_entry(entry: *mut GstTocEntry, subentry: *mut GstTocEntry); + pub fn gst_toc_entry_get_entry_type(entry: *const GstTocEntry) -> GstTocEntryType; + pub fn gst_toc_entry_get_loop( + entry: *const GstTocEntry, + loop_type: *mut GstTocLoopType, + repeat_count: *mut c_int, + ) -> gboolean; + pub fn gst_toc_entry_get_parent(entry: *mut GstTocEntry) -> *mut GstTocEntry; + pub fn gst_toc_entry_get_start_stop_times( + entry: *const GstTocEntry, + start: *mut i64, + stop: *mut i64, + ) -> gboolean; + pub fn gst_toc_entry_get_sub_entries(entry: *const GstTocEntry) -> *mut glib::GList; + pub fn gst_toc_entry_get_tags(entry: *const GstTocEntry) -> *mut GstTagList; + pub fn gst_toc_entry_get_toc(entry: *mut GstTocEntry) -> *mut GstToc; + pub fn gst_toc_entry_get_uid(entry: *const GstTocEntry) -> *const c_char; + pub fn gst_toc_entry_is_alternative(entry: *const GstTocEntry) -> gboolean; + pub fn gst_toc_entry_is_sequence(entry: *const GstTocEntry) -> gboolean; + pub fn gst_toc_entry_merge_tags( + entry: *mut GstTocEntry, + tags: *mut GstTagList, + mode: GstTagMergeMode, + ); + pub fn gst_toc_entry_set_loop( + entry: *mut GstTocEntry, + loop_type: GstTocLoopType, + repeat_count: c_int, + ); + pub fn gst_toc_entry_set_start_stop_times(entry: *mut GstTocEntry, start: i64, stop: i64); + pub fn gst_toc_entry_set_tags(entry: *mut GstTocEntry, tags: *mut GstTagList); + + //========================================================================= + // GstTypeFind + //========================================================================= + pub fn gst_type_find_get_length(find: *mut GstTypeFind) -> u64; + pub fn gst_type_find_peek(find: *mut GstTypeFind, offset: i64, size: c_uint) -> *const u8; + pub fn gst_type_find_suggest(find: *mut GstTypeFind, probability: c_uint, caps: *mut GstCaps); + pub fn gst_type_find_suggest_simple( + find: *mut GstTypeFind, + probability: c_uint, + media_type: *const c_char, + fieldname: *const c_char, + ... + ); + pub fn gst_type_find_register( + plugin: *mut GstPlugin, + name: *const c_char, + rank: c_uint, + func: GstTypeFindFunction, + extensions: *const c_char, + possible_caps: *mut GstCaps, + data: gpointer, + data_notify: glib::GDestroyNotify, + ) -> gboolean; + + //========================================================================= + // GstUri + //========================================================================= + pub fn gst_uri_get_type() -> GType; + pub fn gst_uri_new( + scheme: *const c_char, + userinfo: *const c_char, + host: *const c_char, + port: c_uint, + path: *const c_char, + query: *const c_char, + fragment: *const c_char, + ) -> *mut GstUri; + pub fn gst_uri_append_path(uri: *mut GstUri, relative_path: *const c_char) -> gboolean; + pub fn gst_uri_append_path_segment(uri: *mut GstUri, path_segment: *const c_char) -> gboolean; + pub fn gst_uri_equal(first: *const GstUri, second: *const GstUri) -> gboolean; + pub fn gst_uri_from_string_with_base(base: *mut GstUri, uri: *const c_char) -> *mut GstUri; + pub fn gst_uri_get_fragment(uri: *const GstUri) -> *const c_char; + pub fn gst_uri_get_host(uri: *const GstUri) -> *const c_char; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_uri_get_media_fragment_table(uri: *const GstUri) -> *mut glib::GHashTable; + pub fn gst_uri_get_path(uri: *const GstUri) -> *mut c_char; + pub fn gst_uri_get_path_segments(uri: *const GstUri) -> *mut glib::GList; + pub fn gst_uri_get_path_string(uri: *const GstUri) -> *mut c_char; + pub fn gst_uri_get_port(uri: *const GstUri) -> c_uint; + pub fn gst_uri_get_query_keys(uri: *const GstUri) -> *mut glib::GList; + pub fn gst_uri_get_query_string(uri: *const GstUri) -> *mut c_char; + pub fn gst_uri_get_query_table(uri: *const GstUri) -> *mut glib::GHashTable; + pub fn gst_uri_get_query_value(uri: *const GstUri, query_key: *const c_char) -> *const c_char; + pub fn gst_uri_get_scheme(uri: *const GstUri) -> *const c_char; + pub fn gst_uri_get_userinfo(uri: *const GstUri) -> *const c_char; + pub fn gst_uri_is_normalized(uri: *const GstUri) -> gboolean; + pub fn gst_uri_is_writable(uri: *const GstUri) -> gboolean; + pub fn gst_uri_join(base_uri: *mut GstUri, ref_uri: *mut GstUri) -> *mut GstUri; + pub fn gst_uri_make_writable(uri: *mut GstUri) -> *mut GstUri; + pub fn gst_uri_new_with_base( + base: *mut GstUri, + scheme: *const c_char, + userinfo: *const c_char, + host: *const c_char, + port: c_uint, + path: *const c_char, + query: *const c_char, + fragment: *const c_char, + ) -> *mut GstUri; + pub fn gst_uri_normalize(uri: *mut GstUri) -> gboolean; + pub fn gst_uri_query_has_key(uri: *const GstUri, query_key: *const c_char) -> gboolean; + pub fn gst_uri_remove_query_key(uri: *mut GstUri, query_key: *const c_char) -> gboolean; + pub fn gst_uri_set_fragment(uri: *mut GstUri, fragment: *const c_char) -> gboolean; + pub fn gst_uri_set_host(uri: *mut GstUri, host: *const c_char) -> gboolean; + pub fn gst_uri_set_path(uri: *mut GstUri, path: *const c_char) -> gboolean; + pub fn gst_uri_set_path_segments(uri: *mut GstUri, path_segments: *mut glib::GList) + -> gboolean; + pub fn gst_uri_set_path_string(uri: *mut GstUri, path: *const c_char) -> gboolean; + pub fn gst_uri_set_port(uri: *mut GstUri, port: c_uint) -> gboolean; + pub fn gst_uri_set_query_string(uri: *mut GstUri, query: *const c_char) -> gboolean; + pub fn gst_uri_set_query_table( + uri: *mut GstUri, + query_table: *mut glib::GHashTable, + ) -> gboolean; + pub fn gst_uri_set_query_value( + uri: *mut GstUri, + query_key: *const c_char, + query_value: *const c_char, + ) -> gboolean; + pub fn gst_uri_set_scheme(uri: *mut GstUri, scheme: *const c_char) -> gboolean; + pub fn gst_uri_set_userinfo(uri: *mut GstUri, userinfo: *const c_char) -> gboolean; + pub fn gst_uri_to_string(uri: *const GstUri) -> *mut c_char; + pub fn gst_uri_construct(protocol: *const c_char, location: *const c_char) -> *mut c_char; + pub fn gst_uri_from_string(uri: *const c_char) -> *mut GstUri; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_uri_from_string_escaped(uri: *const c_char) -> *mut GstUri; + pub fn gst_uri_get_location(uri: *const c_char) -> *mut c_char; + pub fn gst_uri_get_protocol(uri: *const c_char) -> *mut c_char; + pub fn gst_uri_has_protocol(uri: *const c_char, protocol: *const c_char) -> gboolean; + pub fn gst_uri_is_valid(uri: *const c_char) -> gboolean; + pub fn gst_uri_join_strings(base_uri: *const c_char, ref_uri: *const c_char) -> *mut c_char; + pub fn gst_uri_protocol_is_supported(type_: GstURIType, protocol: *const c_char) -> gboolean; + pub fn gst_uri_protocol_is_valid(protocol: *const c_char) -> gboolean; + + //========================================================================= + // GstAllocator + //========================================================================= + pub fn gst_allocator_get_type() -> GType; + pub fn gst_allocator_find(name: *const c_char) -> *mut GstAllocator; + pub fn gst_allocator_register(name: *const c_char, allocator: *mut GstAllocator); + pub fn gst_allocator_alloc( + allocator: *mut GstAllocator, + size: size_t, + params: *mut GstAllocationParams, + ) -> *mut GstMemory; + pub fn gst_allocator_free(allocator: *mut GstAllocator, memory: *mut GstMemory); + pub fn gst_allocator_set_default(allocator: *mut GstAllocator); + + //========================================================================= + // GstBin + //========================================================================= + pub fn gst_bin_get_type() -> GType; + pub fn gst_bin_new(name: *const c_char) -> *mut GstElement; + pub fn gst_bin_add(bin: *mut GstBin, element: *mut GstElement) -> gboolean; + pub fn gst_bin_add_many(bin: *mut GstBin, element_1: *mut GstElement, ...); + pub fn gst_bin_find_unlinked_pad(bin: *mut GstBin, direction: GstPadDirection) -> *mut GstPad; + pub fn gst_bin_get_by_interface(bin: *mut GstBin, iface: GType) -> *mut GstElement; + pub fn gst_bin_get_by_name(bin: *mut GstBin, name: *const c_char) -> *mut GstElement; + pub fn gst_bin_get_by_name_recurse_up(bin: *mut GstBin, name: *const c_char) + -> *mut GstElement; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_bin_get_suppressed_flags(bin: *mut GstBin) -> GstElementFlags; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_bin_iterate_all_by_element_factory_name( + bin: *mut GstBin, + factory_name: *const c_char, + ) -> *mut GstIterator; + pub fn gst_bin_iterate_all_by_interface(bin: *mut GstBin, iface: GType) -> *mut GstIterator; + pub fn gst_bin_iterate_elements(bin: *mut GstBin) -> *mut GstIterator; + pub fn gst_bin_iterate_recurse(bin: *mut GstBin) -> *mut GstIterator; + pub fn gst_bin_iterate_sinks(bin: *mut GstBin) -> *mut GstIterator; + pub fn gst_bin_iterate_sorted(bin: *mut GstBin) -> *mut GstIterator; + pub fn gst_bin_iterate_sources(bin: *mut GstBin) -> *mut GstIterator; + pub fn gst_bin_recalculate_latency(bin: *mut GstBin) -> gboolean; + pub fn gst_bin_remove(bin: *mut GstBin, element: *mut GstElement) -> gboolean; + pub fn gst_bin_remove_many(bin: *mut GstBin, element_1: *mut GstElement, ...); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_bin_set_suppressed_flags(bin: *mut GstBin, flags: GstElementFlags); + pub fn gst_bin_sync_children_states(bin: *mut GstBin) -> gboolean; + + //========================================================================= + // GstBitmask + //========================================================================= + pub fn gst_bitmask_get_type() -> GType; + + //========================================================================= + // GstBufferPool + //========================================================================= + pub fn gst_buffer_pool_get_type() -> GType; + pub fn gst_buffer_pool_new() -> *mut GstBufferPool; + pub fn gst_buffer_pool_config_add_option(config: *mut GstStructure, option: *const c_char); + pub fn gst_buffer_pool_config_get_allocator( + config: *mut GstStructure, + allocator: *mut *mut GstAllocator, + params: *mut GstAllocationParams, + ) -> gboolean; + pub fn gst_buffer_pool_config_get_option( + config: *mut GstStructure, + index: c_uint, + ) -> *const c_char; + pub fn gst_buffer_pool_config_get_params( + config: *mut GstStructure, + caps: *mut *mut GstCaps, + size: *mut c_uint, + min_buffers: *mut c_uint, + max_buffers: *mut c_uint, + ) -> gboolean; + pub fn gst_buffer_pool_config_has_option( + config: *mut GstStructure, + option: *const c_char, + ) -> gboolean; + pub fn gst_buffer_pool_config_n_options(config: *mut GstStructure) -> c_uint; + pub fn gst_buffer_pool_config_set_allocator( + config: *mut GstStructure, + allocator: *mut GstAllocator, + params: *const GstAllocationParams, + ); + pub fn gst_buffer_pool_config_set_params( + config: *mut GstStructure, + caps: *mut GstCaps, + size: c_uint, + min_buffers: c_uint, + max_buffers: c_uint, + ); + pub fn gst_buffer_pool_config_validate_params( + config: *mut GstStructure, + caps: *mut GstCaps, + size: c_uint, + min_buffers: c_uint, + max_buffers: c_uint, + ) -> gboolean; + pub fn gst_buffer_pool_acquire_buffer( + pool: *mut GstBufferPool, + buffer: *mut *mut GstBuffer, + params: *mut GstBufferPoolAcquireParams, + ) -> GstFlowReturn; + pub fn gst_buffer_pool_get_config(pool: *mut GstBufferPool) -> *mut GstStructure; + pub fn gst_buffer_pool_get_options(pool: *mut GstBufferPool) -> *mut *const c_char; + pub fn gst_buffer_pool_has_option(pool: *mut GstBufferPool, option: *const c_char) -> gboolean; + pub fn gst_buffer_pool_is_active(pool: *mut GstBufferPool) -> gboolean; + pub fn gst_buffer_pool_release_buffer(pool: *mut GstBufferPool, buffer: *mut GstBuffer); + pub fn gst_buffer_pool_set_active(pool: *mut GstBufferPool, active: gboolean) -> gboolean; + pub fn gst_buffer_pool_set_config( + pool: *mut GstBufferPool, + config: *mut GstStructure, + ) -> gboolean; + pub fn gst_buffer_pool_set_flushing(pool: *mut GstBufferPool, flushing: gboolean); + + //========================================================================= + // GstBus + //========================================================================= + pub fn gst_bus_get_type() -> GType; + pub fn gst_bus_new() -> *mut GstBus; + pub fn gst_bus_add_signal_watch(bus: *mut GstBus); + pub fn gst_bus_add_signal_watch_full(bus: *mut GstBus, priority: c_int); + pub fn gst_bus_add_watch(bus: *mut GstBus, func: GstBusFunc, user_data: gpointer) -> c_uint; + pub fn gst_bus_add_watch_full( + bus: *mut GstBus, + priority: c_int, + func: GstBusFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> c_uint; + pub fn gst_bus_async_signal_func( + bus: *mut GstBus, + message: *mut GstMessage, + data: gpointer, + ) -> gboolean; + pub fn gst_bus_create_watch(bus: *mut GstBus) -> *mut glib::GSource; + pub fn gst_bus_disable_sync_message_emission(bus: *mut GstBus); + pub fn gst_bus_enable_sync_message_emission(bus: *mut GstBus); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_bus_get_pollfd(bus: *mut GstBus, fd: *mut glib::GPollFD); + pub fn gst_bus_have_pending(bus: *mut GstBus) -> gboolean; + pub fn gst_bus_peek(bus: *mut GstBus) -> *mut GstMessage; + pub fn gst_bus_poll( + bus: *mut GstBus, + events: GstMessageType, + timeout: GstClockTime, + ) -> *mut GstMessage; + pub fn gst_bus_pop(bus: *mut GstBus) -> *mut GstMessage; + pub fn gst_bus_pop_filtered(bus: *mut GstBus, types: GstMessageType) -> *mut GstMessage; + pub fn gst_bus_post(bus: *mut GstBus, message: *mut GstMessage) -> gboolean; + pub fn gst_bus_remove_signal_watch(bus: *mut GstBus); + pub fn gst_bus_remove_watch(bus: *mut GstBus) -> gboolean; + pub fn gst_bus_set_flushing(bus: *mut GstBus, flushing: gboolean); + pub fn gst_bus_set_sync_handler( + bus: *mut GstBus, + func: GstBusSyncHandler, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_bus_sync_signal_handler( + bus: *mut GstBus, + message: *mut GstMessage, + data: gpointer, + ) -> GstBusSyncReply; + pub fn gst_bus_timed_pop(bus: *mut GstBus, timeout: GstClockTime) -> *mut GstMessage; + pub fn gst_bus_timed_pop_filtered( + bus: *mut GstBus, + timeout: GstClockTime, + types: GstMessageType, + ) -> *mut GstMessage; + + //========================================================================= + // GstClock + //========================================================================= + pub fn gst_clock_get_type() -> GType; + pub fn gst_clock_id_compare_func(id1: gconstpointer, id2: gconstpointer) -> c_int; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_clock_id_get_clock(id: GstClockID) -> *mut GstClock; + pub fn gst_clock_id_get_time(id: GstClockID) -> GstClockTime; + pub fn gst_clock_id_ref(id: GstClockID) -> GstClockID; + pub fn gst_clock_id_unref(id: GstClockID); + pub fn gst_clock_id_unschedule(id: GstClockID); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_clock_id_uses_clock(id: GstClockID, clock: *mut GstClock) -> gboolean; + pub fn gst_clock_id_wait(id: GstClockID, jitter: *mut GstClockTimeDiff) -> GstClockReturn; + pub fn gst_clock_id_wait_async( + id: GstClockID, + func: GstClockCallback, + user_data: gpointer, + destroy_data: glib::GDestroyNotify, + ) -> GstClockReturn; + pub fn gst_clock_add_observation( + clock: *mut GstClock, + slave: GstClockTime, + master: GstClockTime, + r_squared: *mut c_double, + ) -> gboolean; + pub fn gst_clock_add_observation_unapplied( + clock: *mut GstClock, + slave: GstClockTime, + master: GstClockTime, + r_squared: *mut c_double, + internal: *mut GstClockTime, + external: *mut GstClockTime, + rate_num: *mut GstClockTime, + rate_denom: *mut GstClockTime, + ) -> gboolean; + pub fn gst_clock_adjust_unlocked(clock: *mut GstClock, internal: GstClockTime) -> GstClockTime; + pub fn gst_clock_adjust_with_calibration( + clock: *mut GstClock, + internal_target: GstClockTime, + cinternal: GstClockTime, + cexternal: GstClockTime, + cnum: GstClockTime, + cdenom: GstClockTime, + ) -> GstClockTime; + pub fn gst_clock_get_calibration( + clock: *mut GstClock, + internal: *mut GstClockTime, + external: *mut GstClockTime, + rate_num: *mut GstClockTime, + rate_denom: *mut GstClockTime, + ); + pub fn gst_clock_get_internal_time(clock: *mut GstClock) -> GstClockTime; + pub fn gst_clock_get_master(clock: *mut GstClock) -> *mut GstClock; + pub fn gst_clock_get_resolution(clock: *mut GstClock) -> GstClockTime; + pub fn gst_clock_get_time(clock: *mut GstClock) -> GstClockTime; + pub fn gst_clock_get_timeout(clock: *mut GstClock) -> GstClockTime; + pub fn gst_clock_is_synced(clock: *mut GstClock) -> gboolean; + pub fn gst_clock_new_periodic_id( + clock: *mut GstClock, + start_time: GstClockTime, + interval: GstClockTime, + ) -> GstClockID; + pub fn gst_clock_new_single_shot_id(clock: *mut GstClock, time: GstClockTime) -> GstClockID; + pub fn gst_clock_periodic_id_reinit( + clock: *mut GstClock, + id: GstClockID, + start_time: GstClockTime, + interval: GstClockTime, + ) -> gboolean; + pub fn gst_clock_set_calibration( + clock: *mut GstClock, + internal: GstClockTime, + external: GstClockTime, + rate_num: GstClockTime, + rate_denom: GstClockTime, + ); + pub fn gst_clock_set_master(clock: *mut GstClock, master: *mut GstClock) -> gboolean; + pub fn gst_clock_set_resolution(clock: *mut GstClock, resolution: GstClockTime) + -> GstClockTime; + pub fn gst_clock_set_synced(clock: *mut GstClock, synced: gboolean); + pub fn gst_clock_set_timeout(clock: *mut GstClock, timeout: GstClockTime); + pub fn gst_clock_single_shot_id_reinit( + clock: *mut GstClock, + id: GstClockID, + time: GstClockTime, + ) -> gboolean; + pub fn gst_clock_unadjust_unlocked( + clock: *mut GstClock, + external: GstClockTime, + ) -> GstClockTime; + pub fn gst_clock_unadjust_with_calibration( + clock: *mut GstClock, + external_target: GstClockTime, + cinternal: GstClockTime, + cexternal: GstClockTime, + cnum: GstClockTime, + cdenom: GstClockTime, + ) -> GstClockTime; + pub fn gst_clock_wait_for_sync(clock: *mut GstClock, timeout: GstClockTime) -> gboolean; + + //========================================================================= + // GstControlBinding + //========================================================================= + pub fn gst_control_binding_get_type() -> GType; + pub fn gst_control_binding_get_g_value_array( + binding: *mut GstControlBinding, + timestamp: GstClockTime, + interval: GstClockTime, + n_values: c_uint, + values: *mut gobject::GValue, + ) -> gboolean; + pub fn gst_control_binding_get_value( + binding: *mut GstControlBinding, + timestamp: GstClockTime, + ) -> *mut gobject::GValue; + pub fn gst_control_binding_get_value_array( + binding: *mut GstControlBinding, + timestamp: GstClockTime, + interval: GstClockTime, + n_values: c_uint, + values: gpointer, + ) -> gboolean; + pub fn gst_control_binding_is_disabled(binding: *mut GstControlBinding) -> gboolean; + pub fn gst_control_binding_set_disabled(binding: *mut GstControlBinding, disabled: gboolean); + pub fn gst_control_binding_sync_values( + binding: *mut GstControlBinding, + object: *mut GstObject, + timestamp: GstClockTime, + last_sync: GstClockTime, + ) -> gboolean; + + //========================================================================= + // GstControlSource + //========================================================================= + pub fn gst_control_source_get_type() -> GType; + pub fn gst_control_source_get_value( + self_: *mut GstControlSource, + timestamp: GstClockTime, + value: *mut c_double, + ) -> gboolean; + pub fn gst_control_source_get_value_array( + self_: *mut GstControlSource, + timestamp: GstClockTime, + interval: GstClockTime, + n_values: c_uint, + values: *mut c_double, + ) -> gboolean; + + //========================================================================= + // GstDevice + //========================================================================= + pub fn gst_device_get_type() -> GType; + pub fn gst_device_create_element( + device: *mut GstDevice, + name: *const c_char, + ) -> *mut GstElement; + pub fn gst_device_get_caps(device: *mut GstDevice) -> *mut GstCaps; + pub fn gst_device_get_device_class(device: *mut GstDevice) -> *mut c_char; + pub fn gst_device_get_display_name(device: *mut GstDevice) -> *mut c_char; + pub fn gst_device_get_properties(device: *mut GstDevice) -> *mut GstStructure; + pub fn gst_device_has_classes(device: *mut GstDevice, classes: *const c_char) -> gboolean; + pub fn gst_device_has_classesv(device: *mut GstDevice, classes: *mut *mut c_char) -> gboolean; + pub fn gst_device_reconfigure_element( + device: *mut GstDevice, + element: *mut GstElement, + ) -> gboolean; + + //========================================================================= + // GstDeviceMonitor + //========================================================================= + pub fn gst_device_monitor_get_type() -> GType; + pub fn gst_device_monitor_new() -> *mut GstDeviceMonitor; + pub fn gst_device_monitor_add_filter( + monitor: *mut GstDeviceMonitor, + classes: *const c_char, + caps: *mut GstCaps, + ) -> c_uint; + pub fn gst_device_monitor_get_bus(monitor: *mut GstDeviceMonitor) -> *mut GstBus; + pub fn gst_device_monitor_get_devices(monitor: *mut GstDeviceMonitor) -> *mut glib::GList; + pub fn gst_device_monitor_get_providers(monitor: *mut GstDeviceMonitor) -> *mut *mut c_char; + pub fn gst_device_monitor_get_show_all_devices(monitor: *mut GstDeviceMonitor) -> gboolean; + pub fn gst_device_monitor_remove_filter( + monitor: *mut GstDeviceMonitor, + filter_id: c_uint, + ) -> gboolean; + pub fn gst_device_monitor_set_show_all_devices( + monitor: *mut GstDeviceMonitor, + show_all: gboolean, + ); + pub fn gst_device_monitor_start(monitor: *mut GstDeviceMonitor) -> gboolean; + pub fn gst_device_monitor_stop(monitor: *mut GstDeviceMonitor); + + //========================================================================= + // GstDeviceProvider + //========================================================================= + pub fn gst_device_provider_get_type() -> GType; + pub fn gst_device_provider_register( + plugin: *mut GstPlugin, + name: *const c_char, + rank: c_uint, + type_: GType, + ) -> gboolean; + pub fn gst_device_provider_can_monitor(provider: *mut GstDeviceProvider) -> gboolean; + pub fn gst_device_provider_device_add(provider: *mut GstDeviceProvider, device: *mut GstDevice); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_device_provider_device_changed( + provider: *mut GstDeviceProvider, + device: *mut GstDevice, + changed_device: *mut GstDevice, + ); + pub fn gst_device_provider_device_remove( + provider: *mut GstDeviceProvider, + device: *mut GstDevice, + ); + pub fn gst_device_provider_get_bus(provider: *mut GstDeviceProvider) -> *mut GstBus; + pub fn gst_device_provider_get_devices(provider: *mut GstDeviceProvider) -> *mut glib::GList; + pub fn gst_device_provider_get_factory( + provider: *mut GstDeviceProvider, + ) -> *mut GstDeviceProviderFactory; + pub fn gst_device_provider_get_hidden_providers( + provider: *mut GstDeviceProvider, + ) -> *mut *mut c_char; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_device_provider_get_metadata( + provider: *mut GstDeviceProvider, + key: *const c_char, + ) -> *const c_char; + pub fn gst_device_provider_hide_provider(provider: *mut GstDeviceProvider, name: *const c_char); + pub fn gst_device_provider_start(provider: *mut GstDeviceProvider) -> gboolean; + pub fn gst_device_provider_stop(provider: *mut GstDeviceProvider); + pub fn gst_device_provider_unhide_provider( + provider: *mut GstDeviceProvider, + name: *const c_char, + ); + + //========================================================================= + // GstDeviceProviderFactory + //========================================================================= + pub fn gst_device_provider_factory_get_type() -> GType; + pub fn gst_device_provider_factory_find(name: *const c_char) -> *mut GstDeviceProviderFactory; + pub fn gst_device_provider_factory_get_by_name( + factoryname: *const c_char, + ) -> *mut GstDeviceProvider; + pub fn gst_device_provider_factory_list_get_device_providers( + minrank: GstRank, + ) -> *mut glib::GList; + pub fn gst_device_provider_factory_get( + factory: *mut GstDeviceProviderFactory, + ) -> *mut GstDeviceProvider; + pub fn gst_device_provider_factory_get_device_provider_type( + factory: *mut GstDeviceProviderFactory, + ) -> GType; + pub fn gst_device_provider_factory_get_metadata( + factory: *mut GstDeviceProviderFactory, + key: *const c_char, + ) -> *const c_char; + pub fn gst_device_provider_factory_get_metadata_keys( + factory: *mut GstDeviceProviderFactory, + ) -> *mut *mut c_char; + pub fn gst_device_provider_factory_has_classes( + factory: *mut GstDeviceProviderFactory, + classes: *const c_char, + ) -> gboolean; + pub fn gst_device_provider_factory_has_classesv( + factory: *mut GstDeviceProviderFactory, + classes: *mut *mut c_char, + ) -> gboolean; + + //========================================================================= + // GstDoubleRange + //========================================================================= + pub fn gst_double_range_get_type() -> GType; + + //========================================================================= + // GstDynamicTypeFactory + //========================================================================= + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_dynamic_type_factory_get_type() -> GType; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_dynamic_type_factory_load(factoryname: *const c_char) -> GType; + + //========================================================================= + // GstElement + //========================================================================= + pub fn gst_element_get_type() -> GType; + pub fn gst_element_make_from_uri( + type_: GstURIType, + uri: *const c_char, + elementname: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstElement; + pub fn gst_element_register( + plugin: *mut GstPlugin, + name: *const c_char, + rank: c_uint, + type_: GType, + ) -> gboolean; + pub fn gst_element_state_change_return_get_name( + state_ret: GstStateChangeReturn, + ) -> *const c_char; + pub fn gst_element_state_get_name(state: GstState) -> *const c_char; + pub fn gst_element_abort_state(element: *mut GstElement); + pub fn gst_element_add_pad(element: *mut GstElement, pad: *mut GstPad) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_element_add_property_deep_notify_watch( + element: *mut GstElement, + property_name: *const c_char, + include_value: gboolean, + ) -> c_ulong; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_element_add_property_notify_watch( + element: *mut GstElement, + property_name: *const c_char, + include_value: gboolean, + ) -> c_ulong; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_element_call_async( + element: *mut GstElement, + func: GstElementCallAsyncFunc, + user_data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); + pub fn gst_element_change_state( + element: *mut GstElement, + transition: GstStateChange, + ) -> GstStateChangeReturn; + pub fn gst_element_continue_state( + element: *mut GstElement, + ret: GstStateChangeReturn, + ) -> GstStateChangeReturn; + pub fn gst_element_create_all_pads(element: *mut GstElement); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_element_foreach_pad( + element: *mut GstElement, + func: GstElementForeachPadFunc, + user_data: gpointer, + ) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_element_foreach_sink_pad( + element: *mut GstElement, + func: GstElementForeachPadFunc, + user_data: gpointer, + ) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_element_foreach_src_pad( + element: *mut GstElement, + func: GstElementForeachPadFunc, + user_data: gpointer, + ) -> gboolean; + pub fn gst_element_get_base_time(element: *mut GstElement) -> GstClockTime; + pub fn gst_element_get_bus(element: *mut GstElement) -> *mut GstBus; + pub fn gst_element_get_clock(element: *mut GstElement) -> *mut GstClock; + pub fn gst_element_get_compatible_pad( + element: *mut GstElement, + pad: *mut GstPad, + caps: *mut GstCaps, + ) -> *mut GstPad; + pub fn gst_element_get_compatible_pad_template( + element: *mut GstElement, + compattempl: *mut GstPadTemplate, + ) -> *mut GstPadTemplate; + pub fn gst_element_get_context( + element: *mut GstElement, + context_type: *const c_char, + ) -> *mut GstContext; + pub fn gst_element_get_context_unlocked( + element: *mut GstElement, + context_type: *const c_char, + ) -> *mut GstContext; + pub fn gst_element_get_contexts(element: *mut GstElement) -> *mut glib::GList; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_element_get_current_clock_time(element: *mut GstElement) -> GstClockTime; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_element_get_current_running_time(element: *mut GstElement) -> GstClockTime; + pub fn gst_element_get_factory(element: *mut GstElement) -> *mut GstElementFactory; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_element_get_metadata(element: *mut GstElement, key: *const c_char) -> *const c_char; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_element_get_pad_template( + element: *mut GstElement, + name: *const c_char, + ) -> *mut GstPadTemplate; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_element_get_pad_template_list(element: *mut GstElement) -> *mut glib::GList; + pub fn gst_element_get_request_pad( + element: *mut GstElement, + name: *const c_char, + ) -> *mut GstPad; + pub fn gst_element_get_start_time(element: *mut GstElement) -> GstClockTime; + pub fn gst_element_get_state( + element: *mut GstElement, + state: *mut GstState, + pending: *mut GstState, + timeout: GstClockTime, + ) -> GstStateChangeReturn; + pub fn gst_element_get_static_pad(element: *mut GstElement, name: *const c_char) + -> *mut GstPad; + pub fn gst_element_is_locked_state(element: *mut GstElement) -> gboolean; + pub fn gst_element_iterate_pads(element: *mut GstElement) -> *mut GstIterator; + pub fn gst_element_iterate_sink_pads(element: *mut GstElement) -> *mut GstIterator; + pub fn gst_element_iterate_src_pads(element: *mut GstElement) -> *mut GstIterator; + pub fn gst_element_link(src: *mut GstElement, dest: *mut GstElement) -> gboolean; + pub fn gst_element_link_filtered( + src: *mut GstElement, + dest: *mut GstElement, + filter: *mut GstCaps, + ) -> gboolean; + pub fn gst_element_link_many( + element_1: *mut GstElement, + element_2: *mut GstElement, + ... + ) -> gboolean; + pub fn gst_element_link_pads( + src: *mut GstElement, + srcpadname: *const c_char, + dest: *mut GstElement, + destpadname: *const c_char, + ) -> gboolean; + pub fn gst_element_link_pads_filtered( + src: *mut GstElement, + srcpadname: *const c_char, + dest: *mut GstElement, + destpadname: *const c_char, + filter: *mut GstCaps, + ) -> gboolean; + pub fn gst_element_link_pads_full( + src: *mut GstElement, + srcpadname: *const c_char, + dest: *mut GstElement, + destpadname: *const c_char, + flags: GstPadLinkCheck, + ) -> gboolean; + pub fn gst_element_lost_state(element: *mut GstElement); + pub fn gst_element_message_full( + element: *mut GstElement, + type_: GstMessageType, + domain: glib::GQuark, + code: c_int, + text: *mut c_char, + debug: *mut c_char, + file: *const c_char, + function: *const c_char, + line: c_int, + ); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_element_message_full_with_details( + element: *mut GstElement, + type_: GstMessageType, + domain: glib::GQuark, + code: c_int, + text: *mut c_char, + debug: *mut c_char, + file: *const c_char, + function: *const c_char, + line: c_int, + structure: *mut GstStructure, + ); + pub fn gst_element_no_more_pads(element: *mut GstElement); + pub fn gst_element_post_message(element: *mut GstElement, message: *mut GstMessage) + -> gboolean; + pub fn gst_element_provide_clock(element: *mut GstElement) -> *mut GstClock; + pub fn gst_element_query(element: *mut GstElement, query: *mut GstQuery) -> gboolean; + pub fn gst_element_query_convert( + element: *mut GstElement, + src_format: GstFormat, + src_val: i64, + dest_format: GstFormat, + dest_val: *mut i64, + ) -> gboolean; + pub fn gst_element_query_duration( + element: *mut GstElement, + format: GstFormat, + duration: *mut i64, + ) -> gboolean; + pub fn gst_element_query_position( + element: *mut GstElement, + format: GstFormat, + cur: *mut i64, + ) -> gboolean; + pub fn gst_element_release_request_pad(element: *mut GstElement, pad: *mut GstPad); + pub fn gst_element_remove_pad(element: *mut GstElement, pad: *mut GstPad) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_element_remove_property_notify_watch(element: *mut GstElement, watch_id: c_ulong); + pub fn gst_element_request_pad( + element: *mut GstElement, + templ: *mut GstPadTemplate, + name: *const c_char, + caps: *const GstCaps, + ) -> *mut GstPad; + pub fn gst_element_seek( + element: *mut GstElement, + rate: c_double, + format: GstFormat, + flags: GstSeekFlags, + start_type: GstSeekType, + start: i64, + stop_type: GstSeekType, + stop: i64, + ) -> gboolean; + pub fn gst_element_seek_simple( + element: *mut GstElement, + format: GstFormat, + seek_flags: GstSeekFlags, + seek_pos: i64, + ) -> gboolean; + pub fn gst_element_send_event(element: *mut GstElement, event: *mut GstEvent) -> gboolean; + pub fn gst_element_set_base_time(element: *mut GstElement, time: GstClockTime); + pub fn gst_element_set_bus(element: *mut GstElement, bus: *mut GstBus); + pub fn gst_element_set_clock(element: *mut GstElement, clock: *mut GstClock) -> gboolean; + pub fn gst_element_set_context(element: *mut GstElement, context: *mut GstContext); + pub fn gst_element_set_locked_state( + element: *mut GstElement, + locked_state: gboolean, + ) -> gboolean; + pub fn gst_element_set_start_time(element: *mut GstElement, time: GstClockTime); + pub fn gst_element_set_state(element: *mut GstElement, state: GstState) + -> GstStateChangeReturn; + pub fn gst_element_sync_state_with_parent(element: *mut GstElement) -> gboolean; + pub fn gst_element_unlink(src: *mut GstElement, dest: *mut GstElement); + pub fn gst_element_unlink_many(element_1: *mut GstElement, element_2: *mut GstElement, ...); + pub fn gst_element_unlink_pads( + src: *mut GstElement, + srcpadname: *const c_char, + dest: *mut GstElement, + destpadname: *const c_char, + ); + + //========================================================================= + // GstElementFactory + //========================================================================= + pub fn gst_element_factory_get_type() -> GType; + pub fn gst_element_factory_find(name: *const c_char) -> *mut GstElementFactory; + pub fn gst_element_factory_list_filter( + list: *mut glib::GList, + caps: *const GstCaps, + direction: GstPadDirection, + subsetonly: gboolean, + ) -> *mut glib::GList; + pub fn gst_element_factory_list_get_elements( + type_: GstElementFactoryListType, + minrank: GstRank, + ) -> *mut glib::GList; + pub fn gst_element_factory_make( + factoryname: *const c_char, + name: *const c_char, + ) -> *mut GstElement; + pub fn gst_element_factory_can_sink_all_caps( + factory: *mut GstElementFactory, + caps: *const GstCaps, + ) -> gboolean; + pub fn gst_element_factory_can_sink_any_caps( + factory: *mut GstElementFactory, + caps: *const GstCaps, + ) -> gboolean; + pub fn gst_element_factory_can_src_all_caps( + factory: *mut GstElementFactory, + caps: *const GstCaps, + ) -> gboolean; + pub fn gst_element_factory_can_src_any_caps( + factory: *mut GstElementFactory, + caps: *const GstCaps, + ) -> gboolean; + pub fn gst_element_factory_create( + factory: *mut GstElementFactory, + name: *const c_char, + ) -> *mut GstElement; + pub fn gst_element_factory_get_element_type(factory: *mut GstElementFactory) -> GType; + pub fn gst_element_factory_get_metadata( + factory: *mut GstElementFactory, + key: *const c_char, + ) -> *const c_char; + pub fn gst_element_factory_get_metadata_keys( + factory: *mut GstElementFactory, + ) -> *mut *mut c_char; + pub fn gst_element_factory_get_num_pad_templates(factory: *mut GstElementFactory) -> c_uint; + pub fn gst_element_factory_get_static_pad_templates( + factory: *mut GstElementFactory, + ) -> *const glib::GList; + pub fn gst_element_factory_get_uri_protocols( + factory: *mut GstElementFactory, + ) -> *const *const c_char; + pub fn gst_element_factory_get_uri_type(factory: *mut GstElementFactory) -> GstURIType; + pub fn gst_element_factory_has_interface( + factory: *mut GstElementFactory, + interfacename: *const c_char, + ) -> gboolean; + pub fn gst_element_factory_list_is_type( + factory: *mut GstElementFactory, + type_: GstElementFactoryListType, + ) -> gboolean; + + //========================================================================= + // GstFlagSet + //========================================================================= + pub fn gst_flagset_get_type() -> GType; + pub fn gst_flagset_register(flags_type: GType) -> GType; + + //========================================================================= + // GstFraction + //========================================================================= + pub fn gst_fraction_get_type() -> GType; + + //========================================================================= + // GstFractionRange + //========================================================================= + pub fn gst_fraction_range_get_type() -> GType; + + //========================================================================= + // GstGhostPad + //========================================================================= + pub fn gst_ghost_pad_get_type() -> GType; + pub fn gst_ghost_pad_new(name: *const c_char, target: *mut GstPad) -> *mut GstPad; + pub fn gst_ghost_pad_new_from_template( + name: *const c_char, + target: *mut GstPad, + templ: *mut GstPadTemplate, + ) -> *mut GstPad; + pub fn gst_ghost_pad_new_no_target(name: *const c_char, dir: GstPadDirection) -> *mut GstPad; + pub fn gst_ghost_pad_new_no_target_from_template( + name: *const c_char, + templ: *mut GstPadTemplate, + ) -> *mut GstPad; + pub fn gst_ghost_pad_activate_mode_default( + pad: *mut GstPad, + parent: *mut GstObject, + mode: GstPadMode, + active: gboolean, + ) -> gboolean; + pub fn gst_ghost_pad_internal_activate_mode_default( + pad: *mut GstPad, + parent: *mut GstObject, + mode: GstPadMode, + active: gboolean, + ) -> gboolean; + pub fn gst_ghost_pad_construct(gpad: *mut GstGhostPad) -> gboolean; + pub fn gst_ghost_pad_get_target(gpad: *mut GstGhostPad) -> *mut GstPad; + pub fn gst_ghost_pad_set_target(gpad: *mut GstGhostPad, newtarget: *mut GstPad) -> gboolean; + + //========================================================================= + // GstInt64Range + //========================================================================= + pub fn gst_int64_range_get_type() -> GType; + + //========================================================================= + // GstIntRange + //========================================================================= + pub fn gst_int_range_get_type() -> GType; + + //========================================================================= + // GstObject + //========================================================================= + pub fn gst_object_get_type() -> GType; + pub fn gst_object_check_uniqueness(list: *mut glib::GList, name: *const c_char) -> gboolean; + pub fn gst_object_default_deep_notify( + object: *mut gobject::GObject, + orig: *mut GstObject, + pspec: *mut gobject::GParamSpec, + excluded_props: *mut *mut c_char, + ); + pub fn gst_object_ref_sink(object: gpointer) -> gpointer; + pub fn gst_object_replace(oldobj: *mut *mut GstObject, newobj: *mut GstObject) -> gboolean; + pub fn gst_object_add_control_binding( + object: *mut GstObject, + binding: *mut GstControlBinding, + ) -> gboolean; + pub fn gst_object_default_error( + source: *mut GstObject, + error: *const glib::GError, + debug: *const c_char, + ); + pub fn gst_object_get_control_binding( + object: *mut GstObject, + property_name: *const c_char, + ) -> *mut GstControlBinding; + pub fn gst_object_get_control_rate(object: *mut GstObject) -> GstClockTime; + pub fn gst_object_get_g_value_array( + object: *mut GstObject, + property_name: *const c_char, + timestamp: GstClockTime, + interval: GstClockTime, + n_values: c_uint, + values: *mut gobject::GValue, + ) -> gboolean; + pub fn gst_object_get_name(object: *mut GstObject) -> *mut c_char; + pub fn gst_object_get_parent(object: *mut GstObject) -> *mut GstObject; + pub fn gst_object_get_path_string(object: *mut GstObject) -> *mut c_char; + pub fn gst_object_get_value( + object: *mut GstObject, + property_name: *const c_char, + timestamp: GstClockTime, + ) -> *mut gobject::GValue; + pub fn gst_object_get_value_array( + object: *mut GstObject, + property_name: *const c_char, + timestamp: GstClockTime, + interval: GstClockTime, + n_values: c_uint, + values: gpointer, + ) -> gboolean; + pub fn gst_object_has_active_control_bindings(object: *mut GstObject) -> gboolean; + pub fn gst_object_has_ancestor(object: *mut GstObject, ancestor: *mut GstObject) -> gboolean; + pub fn gst_object_has_as_ancestor(object: *mut GstObject, ancestor: *mut GstObject) + -> gboolean; + pub fn gst_object_has_as_parent(object: *mut GstObject, parent: *mut GstObject) -> gboolean; + pub fn gst_object_ref(object: *mut GstObject) -> *mut GstObject; + pub fn gst_object_remove_control_binding( + object: *mut GstObject, + binding: *mut GstControlBinding, + ) -> gboolean; + pub fn gst_object_set_control_binding_disabled( + object: *mut GstObject, + property_name: *const c_char, + disabled: gboolean, + ); + pub fn gst_object_set_control_bindings_disabled(object: *mut GstObject, disabled: gboolean); + pub fn gst_object_set_control_rate(object: *mut GstObject, control_rate: GstClockTime); + pub fn gst_object_set_name(object: *mut GstObject, name: *const c_char) -> gboolean; + pub fn gst_object_set_parent(object: *mut GstObject, parent: *mut GstObject) -> gboolean; + pub fn gst_object_suggest_next_sync(object: *mut GstObject) -> GstClockTime; + pub fn gst_object_sync_values(object: *mut GstObject, timestamp: GstClockTime) -> gboolean; + pub fn gst_object_unparent(object: *mut GstObject); + pub fn gst_object_unref(object: *mut GstObject); + + //========================================================================= + // GstPad + //========================================================================= + pub fn gst_pad_get_type() -> GType; + pub fn gst_pad_new(name: *const c_char, direction: GstPadDirection) -> *mut GstPad; + pub fn gst_pad_new_from_static_template( + templ: *mut GstStaticPadTemplate, + name: *const c_char, + ) -> *mut GstPad; + pub fn gst_pad_new_from_template( + templ: *mut GstPadTemplate, + name: *const c_char, + ) -> *mut GstPad; + pub fn gst_pad_link_get_name(ret: GstPadLinkReturn) -> *const c_char; + pub fn gst_pad_activate_mode(pad: *mut GstPad, mode: GstPadMode, active: gboolean) -> gboolean; + pub fn gst_pad_add_probe( + pad: *mut GstPad, + mask: GstPadProbeType, + callback: GstPadProbeCallback, + user_data: gpointer, + destroy_data: glib::GDestroyNotify, + ) -> c_ulong; + pub fn gst_pad_can_link(srcpad: *mut GstPad, sinkpad: *mut GstPad) -> gboolean; + pub fn gst_pad_chain(pad: *mut GstPad, buffer: *mut GstBuffer) -> GstFlowReturn; + pub fn gst_pad_chain_list(pad: *mut GstPad, list: *mut GstBufferList) -> GstFlowReturn; + pub fn gst_pad_check_reconfigure(pad: *mut GstPad) -> gboolean; + pub fn gst_pad_create_stream_id( + pad: *mut GstPad, + parent: *mut GstElement, + stream_id: *const c_char, + ) -> *mut c_char; + pub fn gst_pad_create_stream_id_printf( + pad: *mut GstPad, + parent: *mut GstElement, + stream_id: *const c_char, + ... + ) -> *mut c_char; + //pub fn gst_pad_create_stream_id_printf_valist(pad: *mut GstPad, parent: *mut GstElement, stream_id: *const c_char, var_args: /*Unimplemented*/va_list) -> *mut c_char; + pub fn gst_pad_event_default( + pad: *mut GstPad, + parent: *mut GstObject, + event: *mut GstEvent, + ) -> gboolean; + pub fn gst_pad_forward( + pad: *mut GstPad, + forward: GstPadForwardFunction, + user_data: gpointer, + ) -> gboolean; + pub fn gst_pad_get_allowed_caps(pad: *mut GstPad) -> *mut GstCaps; + pub fn gst_pad_get_current_caps(pad: *mut GstPad) -> *mut GstCaps; + pub fn gst_pad_get_direction(pad: *mut GstPad) -> GstPadDirection; + pub fn gst_pad_get_element_private(pad: *mut GstPad) -> gpointer; + pub fn gst_pad_get_last_flow_return(pad: *mut GstPad) -> GstFlowReturn; + pub fn gst_pad_get_offset(pad: *mut GstPad) -> i64; + pub fn gst_pad_get_pad_template(pad: *mut GstPad) -> *mut GstPadTemplate; + pub fn gst_pad_get_pad_template_caps(pad: *mut GstPad) -> *mut GstCaps; + pub fn gst_pad_get_parent_element(pad: *mut GstPad) -> *mut GstElement; + pub fn gst_pad_get_peer(pad: *mut GstPad) -> *mut GstPad; + pub fn gst_pad_get_range( + pad: *mut GstPad, + offset: u64, + size: c_uint, + buffer: *mut *mut GstBuffer, + ) -> GstFlowReturn; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_pad_get_single_internal_link(pad: *mut GstPad) -> *mut GstPad; + pub fn gst_pad_get_sticky_event( + pad: *mut GstPad, + event_type: GstEventType, + idx: c_uint, + ) -> *mut GstEvent; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_pad_get_stream(pad: *mut GstPad) -> *mut GstStream; + pub fn gst_pad_get_stream_id(pad: *mut GstPad) -> *mut c_char; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_pad_get_task_state(pad: *mut GstPad) -> GstTaskState; + pub fn gst_pad_has_current_caps(pad: *mut GstPad) -> gboolean; + pub fn gst_pad_is_active(pad: *mut GstPad) -> gboolean; + pub fn gst_pad_is_blocked(pad: *mut GstPad) -> gboolean; + pub fn gst_pad_is_blocking(pad: *mut GstPad) -> gboolean; + pub fn gst_pad_is_linked(pad: *mut GstPad) -> gboolean; + pub fn gst_pad_iterate_internal_links(pad: *mut GstPad) -> *mut GstIterator; + pub fn gst_pad_iterate_internal_links_default( + pad: *mut GstPad, + parent: *mut GstObject, + ) -> *mut GstIterator; + pub fn gst_pad_link(srcpad: *mut GstPad, sinkpad: *mut GstPad) -> GstPadLinkReturn; + pub fn gst_pad_link_full( + srcpad: *mut GstPad, + sinkpad: *mut GstPad, + flags: GstPadLinkCheck, + ) -> GstPadLinkReturn; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_pad_link_maybe_ghosting(src: *mut GstPad, sink: *mut GstPad) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_pad_link_maybe_ghosting_full( + src: *mut GstPad, + sink: *mut GstPad, + flags: GstPadLinkCheck, + ) -> gboolean; + pub fn gst_pad_mark_reconfigure(pad: *mut GstPad); + pub fn gst_pad_needs_reconfigure(pad: *mut GstPad) -> gboolean; + pub fn gst_pad_pause_task(pad: *mut GstPad) -> gboolean; + pub fn gst_pad_peer_query(pad: *mut GstPad, query: *mut GstQuery) -> gboolean; + pub fn gst_pad_peer_query_accept_caps(pad: *mut GstPad, caps: *mut GstCaps) -> gboolean; + pub fn gst_pad_peer_query_caps(pad: *mut GstPad, filter: *mut GstCaps) -> *mut GstCaps; + pub fn gst_pad_peer_query_convert( + pad: *mut GstPad, + src_format: GstFormat, + src_val: i64, + dest_format: GstFormat, + dest_val: *mut i64, + ) -> gboolean; + pub fn gst_pad_peer_query_duration( + pad: *mut GstPad, + format: GstFormat, + duration: *mut i64, + ) -> gboolean; + pub fn gst_pad_peer_query_position( + pad: *mut GstPad, + format: GstFormat, + cur: *mut i64, + ) -> gboolean; + pub fn gst_pad_proxy_query_accept_caps(pad: *mut GstPad, query: *mut GstQuery) -> gboolean; + pub fn gst_pad_proxy_query_caps(pad: *mut GstPad, query: *mut GstQuery) -> gboolean; + pub fn gst_pad_pull_range( + pad: *mut GstPad, + offset: u64, + size: c_uint, + buffer: *mut *mut GstBuffer, + ) -> GstFlowReturn; + pub fn gst_pad_push(pad: *mut GstPad, buffer: *mut GstBuffer) -> GstFlowReturn; + pub fn gst_pad_push_event(pad: *mut GstPad, event: *mut GstEvent) -> gboolean; + pub fn gst_pad_push_list(pad: *mut GstPad, list: *mut GstBufferList) -> GstFlowReturn; + pub fn gst_pad_query(pad: *mut GstPad, query: *mut GstQuery) -> gboolean; + pub fn gst_pad_query_accept_caps(pad: *mut GstPad, caps: *mut GstCaps) -> gboolean; + pub fn gst_pad_query_caps(pad: *mut GstPad, filter: *mut GstCaps) -> *mut GstCaps; + pub fn gst_pad_query_convert( + pad: *mut GstPad, + src_format: GstFormat, + src_val: i64, + dest_format: GstFormat, + dest_val: *mut i64, + ) -> gboolean; + pub fn gst_pad_query_default( + pad: *mut GstPad, + parent: *mut GstObject, + query: *mut GstQuery, + ) -> gboolean; + pub fn gst_pad_query_duration( + pad: *mut GstPad, + format: GstFormat, + duration: *mut i64, + ) -> gboolean; + pub fn gst_pad_query_position(pad: *mut GstPad, format: GstFormat, cur: *mut i64) -> gboolean; + pub fn gst_pad_remove_probe(pad: *mut GstPad, id: c_ulong); + pub fn gst_pad_send_event(pad: *mut GstPad, event: *mut GstEvent) -> gboolean; + pub fn gst_pad_set_activate_function_full( + pad: *mut GstPad, + activate: GstPadActivateFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_activatemode_function_full( + pad: *mut GstPad, + activatemode: GstPadActivateModeFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_active(pad: *mut GstPad, active: gboolean) -> gboolean; + pub fn gst_pad_set_chain_function_full( + pad: *mut GstPad, + chain: GstPadChainFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_chain_list_function_full( + pad: *mut GstPad, + chainlist: GstPadChainListFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_element_private(pad: *mut GstPad, priv_: gpointer); + pub fn gst_pad_set_event_full_function_full( + pad: *mut GstPad, + event: GstPadEventFullFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_event_function_full( + pad: *mut GstPad, + event: GstPadEventFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_getrange_function_full( + pad: *mut GstPad, + get: GstPadGetRangeFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_iterate_internal_links_function_full( + pad: *mut GstPad, + iterintlink: GstPadIterIntLinkFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_link_function_full( + pad: *mut GstPad, + link: GstPadLinkFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_offset(pad: *mut GstPad, offset: i64); + pub fn gst_pad_set_query_function_full( + pad: *mut GstPad, + query: GstPadQueryFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_set_unlink_function_full( + pad: *mut GstPad, + unlink: GstPadUnlinkFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_pad_start_task( + pad: *mut GstPad, + func: GstTaskFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> gboolean; + pub fn gst_pad_sticky_events_foreach( + pad: *mut GstPad, + foreach_func: GstPadStickyEventsForeachFunction, + user_data: gpointer, + ); + pub fn gst_pad_stop_task(pad: *mut GstPad) -> gboolean; + pub fn gst_pad_store_sticky_event(pad: *mut GstPad, event: *mut GstEvent) -> GstFlowReturn; + pub fn gst_pad_unlink(srcpad: *mut GstPad, sinkpad: *mut GstPad) -> gboolean; + pub fn gst_pad_use_fixed_caps(pad: *mut GstPad); + + //========================================================================= + // GstPadTemplate + //========================================================================= + pub fn gst_pad_template_get_type() -> GType; + pub fn gst_pad_template_new( + name_template: *const c_char, + direction: GstPadDirection, + presence: GstPadPresence, + caps: *mut GstCaps, + ) -> *mut GstPadTemplate; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_pad_template_new_from_static_pad_template_with_gtype( + pad_template: *mut GstStaticPadTemplate, + pad_type: GType, + ) -> *mut GstPadTemplate; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_pad_template_new_with_gtype( + name_template: *const c_char, + direction: GstPadDirection, + presence: GstPadPresence, + caps: *mut GstCaps, + pad_type: GType, + ) -> *mut GstPadTemplate; + pub fn gst_pad_template_get_caps(templ: *mut GstPadTemplate) -> *mut GstCaps; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_pad_template_get_documentation_caps(templ: *mut GstPadTemplate) -> *mut GstCaps; + pub fn gst_pad_template_pad_created(templ: *mut GstPadTemplate, pad: *mut GstPad); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_pad_template_set_documentation_caps(templ: *mut GstPadTemplate, caps: *mut GstCaps); + + //========================================================================= + // GstParamArray + //========================================================================= + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_param_spec_array_get_type() -> GType; + + //========================================================================= + // GstParamFraction + //========================================================================= + pub fn gst_param_spec_fraction_get_type() -> GType; + + //========================================================================= + // GstPipeline + //========================================================================= + pub fn gst_pipeline_get_type() -> GType; + pub fn gst_pipeline_new(name: *const c_char) -> *mut GstElement; + pub fn gst_pipeline_auto_clock(pipeline: *mut GstPipeline); + pub fn gst_pipeline_get_auto_flush_bus(pipeline: *mut GstPipeline) -> gboolean; + pub fn gst_pipeline_get_bus(pipeline: *mut GstPipeline) -> *mut GstBus; + pub fn gst_pipeline_get_clock(pipeline: *mut GstPipeline) -> *mut GstClock; + pub fn gst_pipeline_get_delay(pipeline: *mut GstPipeline) -> GstClockTime; + pub fn gst_pipeline_get_latency(pipeline: *mut GstPipeline) -> GstClockTime; + pub fn gst_pipeline_get_pipeline_clock(pipeline: *mut GstPipeline) -> *mut GstClock; + pub fn gst_pipeline_set_auto_flush_bus(pipeline: *mut GstPipeline, auto_flush: gboolean); + pub fn gst_pipeline_set_clock(pipeline: *mut GstPipeline, clock: *mut GstClock) -> gboolean; + pub fn gst_pipeline_set_delay(pipeline: *mut GstPipeline, delay: GstClockTime); + pub fn gst_pipeline_set_latency(pipeline: *mut GstPipeline, latency: GstClockTime); + pub fn gst_pipeline_use_clock(pipeline: *mut GstPipeline, clock: *mut GstClock); + + //========================================================================= + // GstPlugin + //========================================================================= + pub fn gst_plugin_get_type() -> GType; + pub fn gst_plugin_list_free(list: *mut glib::GList); + pub fn gst_plugin_load_by_name(name: *const c_char) -> *mut GstPlugin; + pub fn gst_plugin_load_file( + filename: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstPlugin; + pub fn gst_plugin_register_static( + major_version: c_int, + minor_version: c_int, + name: *const c_char, + description: *const c_char, + init_func: GstPluginInitFunc, + version: *const c_char, + license: *const c_char, + source: *const c_char, + package: *const c_char, + origin: *const c_char, + ) -> gboolean; + pub fn gst_plugin_register_static_full( + major_version: c_int, + minor_version: c_int, + name: *const c_char, + description: *const c_char, + init_full_func: GstPluginInitFullFunc, + version: *const c_char, + license: *const c_char, + source: *const c_char, + package: *const c_char, + origin: *const c_char, + user_data: gpointer, + ) -> gboolean; + pub fn gst_plugin_add_dependency( + plugin: *mut GstPlugin, + env_vars: *mut *const c_char, + paths: *mut *const c_char, + names: *mut *const c_char, + flags: GstPluginDependencyFlags, + ); + pub fn gst_plugin_add_dependency_simple( + plugin: *mut GstPlugin, + env_vars: *const c_char, + paths: *const c_char, + names: *const c_char, + flags: GstPluginDependencyFlags, + ); + pub fn gst_plugin_get_cache_data(plugin: *mut GstPlugin) -> *const GstStructure; + pub fn gst_plugin_get_description(plugin: *mut GstPlugin) -> *const c_char; + pub fn gst_plugin_get_filename(plugin: *mut GstPlugin) -> *const c_char; + pub fn gst_plugin_get_license(plugin: *mut GstPlugin) -> *const c_char; + pub fn gst_plugin_get_name(plugin: *mut GstPlugin) -> *const c_char; + pub fn gst_plugin_get_origin(plugin: *mut GstPlugin) -> *const c_char; + pub fn gst_plugin_get_package(plugin: *mut GstPlugin) -> *const c_char; + pub fn gst_plugin_get_release_date_string(plugin: *mut GstPlugin) -> *const c_char; + pub fn gst_plugin_get_source(plugin: *mut GstPlugin) -> *const c_char; + pub fn gst_plugin_get_version(plugin: *mut GstPlugin) -> *const c_char; + pub fn gst_plugin_is_loaded(plugin: *mut GstPlugin) -> gboolean; + pub fn gst_plugin_load(plugin: *mut GstPlugin) -> *mut GstPlugin; + pub fn gst_plugin_set_cache_data(plugin: *mut GstPlugin, cache_data: *mut GstStructure); + + //========================================================================= + // GstPluginFeature + //========================================================================= + pub fn gst_plugin_feature_get_type() -> GType; + pub fn gst_plugin_feature_list_copy(list: *mut glib::GList) -> *mut glib::GList; + pub fn gst_plugin_feature_list_debug(list: *mut glib::GList); + pub fn gst_plugin_feature_list_free(list: *mut glib::GList); + pub fn gst_plugin_feature_rank_compare_func(p1: gconstpointer, p2: gconstpointer) -> c_int; + pub fn gst_plugin_feature_check_version( + feature: *mut GstPluginFeature, + min_major: c_uint, + min_minor: c_uint, + min_micro: c_uint, + ) -> gboolean; + pub fn gst_plugin_feature_get_plugin(feature: *mut GstPluginFeature) -> *mut GstPlugin; + pub fn gst_plugin_feature_get_plugin_name(feature: *mut GstPluginFeature) -> *const c_char; + pub fn gst_plugin_feature_get_rank(feature: *mut GstPluginFeature) -> c_uint; + pub fn gst_plugin_feature_load(feature: *mut GstPluginFeature) -> *mut GstPluginFeature; + pub fn gst_plugin_feature_set_rank(feature: *mut GstPluginFeature, rank: c_uint); + + //========================================================================= + // GstProxyPad + //========================================================================= + pub fn gst_proxy_pad_get_type() -> GType; + pub fn gst_proxy_pad_chain_default( + pad: *mut GstPad, + parent: *mut GstObject, + buffer: *mut GstBuffer, + ) -> GstFlowReturn; + pub fn gst_proxy_pad_chain_list_default( + pad: *mut GstPad, + parent: *mut GstObject, + list: *mut GstBufferList, + ) -> GstFlowReturn; + pub fn gst_proxy_pad_getrange_default( + pad: *mut GstPad, + parent: *mut GstObject, + offset: u64, + size: c_uint, + buffer: *mut *mut GstBuffer, + ) -> GstFlowReturn; + pub fn gst_proxy_pad_iterate_internal_links_default( + pad: *mut GstPad, + parent: *mut GstObject, + ) -> *mut GstIterator; + pub fn gst_proxy_pad_get_internal(pad: *mut GstProxyPad) -> *mut GstProxyPad; + + //========================================================================= + // GstRegistry + //========================================================================= + pub fn gst_registry_get_type() -> GType; + pub fn gst_registry_fork_is_enabled() -> gboolean; + pub fn gst_registry_fork_set_enabled(enabled: gboolean); + pub fn gst_registry_get() -> *mut GstRegistry; + pub fn gst_registry_add_feature( + registry: *mut GstRegistry, + feature: *mut GstPluginFeature, + ) -> gboolean; + pub fn gst_registry_add_plugin(registry: *mut GstRegistry, plugin: *mut GstPlugin) -> gboolean; + pub fn gst_registry_check_feature_version( + registry: *mut GstRegistry, + feature_name: *const c_char, + min_major: c_uint, + min_minor: c_uint, + min_micro: c_uint, + ) -> gboolean; + pub fn gst_registry_feature_filter( + registry: *mut GstRegistry, + filter: GstPluginFeatureFilter, + first: gboolean, + user_data: gpointer, + ) -> *mut glib::GList; + pub fn gst_registry_find_feature( + registry: *mut GstRegistry, + name: *const c_char, + type_: GType, + ) -> *mut GstPluginFeature; + pub fn gst_registry_find_plugin( + registry: *mut GstRegistry, + name: *const c_char, + ) -> *mut GstPlugin; + pub fn gst_registry_get_feature_list( + registry: *mut GstRegistry, + type_: GType, + ) -> *mut glib::GList; + pub fn gst_registry_get_feature_list_by_plugin( + registry: *mut GstRegistry, + name: *const c_char, + ) -> *mut glib::GList; + pub fn gst_registry_get_feature_list_cookie(registry: *mut GstRegistry) -> u32; + pub fn gst_registry_get_plugin_list(registry: *mut GstRegistry) -> *mut glib::GList; + pub fn gst_registry_lookup( + registry: *mut GstRegistry, + filename: *const c_char, + ) -> *mut GstPlugin; + pub fn gst_registry_lookup_feature( + registry: *mut GstRegistry, + name: *const c_char, + ) -> *mut GstPluginFeature; + pub fn gst_registry_plugin_filter( + registry: *mut GstRegistry, + filter: GstPluginFilter, + first: gboolean, + user_data: gpointer, + ) -> *mut glib::GList; + pub fn gst_registry_remove_feature(registry: *mut GstRegistry, feature: *mut GstPluginFeature); + pub fn gst_registry_remove_plugin(registry: *mut GstRegistry, plugin: *mut GstPlugin); + pub fn gst_registry_scan_path(registry: *mut GstRegistry, path: *const c_char) -> gboolean; + + //========================================================================= + // GstStream + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_get_type() -> GType; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_new( + stream_id: *const c_char, + caps: *mut GstCaps, + type_: GstStreamType, + flags: GstStreamFlags, + ) -> *mut GstStream; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_get_caps(stream: *mut GstStream) -> *mut GstCaps; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_get_stream_flags(stream: *mut GstStream) -> GstStreamFlags; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_get_stream_id(stream: *mut GstStream) -> *const c_char; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_get_stream_type(stream: *mut GstStream) -> GstStreamType; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_get_tags(stream: *mut GstStream) -> *mut GstTagList; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_set_caps(stream: *mut GstStream, caps: *mut GstCaps); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_set_stream_flags(stream: *mut GstStream, flags: GstStreamFlags); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_set_stream_type(stream: *mut GstStream, stream_type: GstStreamType); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_set_tags(stream: *mut GstStream, tags: *mut GstTagList); + + //========================================================================= + // GstStreamCollection + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_collection_get_type() -> GType; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_collection_new(upstream_id: *const c_char) -> *mut GstStreamCollection; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_collection_add_stream( + collection: *mut GstStreamCollection, + stream: *mut GstStream, + ) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_collection_get_size(collection: *mut GstStreamCollection) -> c_uint; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_collection_get_stream( + collection: *mut GstStreamCollection, + index: c_uint, + ) -> *mut GstStream; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_stream_collection_get_upstream_id( + collection: *mut GstStreamCollection, + ) -> *const c_char; + + //========================================================================= + // GstSystemClock + //========================================================================= + pub fn gst_system_clock_get_type() -> GType; + pub fn gst_system_clock_obtain() -> *mut GstClock; + pub fn gst_system_clock_set_default(new_clock: *mut GstClock); + + //========================================================================= + // GstTask + //========================================================================= + pub fn gst_task_get_type() -> GType; + pub fn gst_task_new( + func: GstTaskFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ) -> *mut GstTask; + pub fn gst_task_cleanup_all(); + pub fn gst_task_get_pool(task: *mut GstTask) -> *mut GstTaskPool; + pub fn gst_task_get_state(task: *mut GstTask) -> GstTaskState; + pub fn gst_task_join(task: *mut GstTask) -> gboolean; + pub fn gst_task_pause(task: *mut GstTask) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_task_resume(task: *mut GstTask) -> gboolean; + pub fn gst_task_set_enter_callback( + task: *mut GstTask, + enter_func: GstTaskThreadFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_task_set_leave_callback( + task: *mut GstTask, + leave_func: GstTaskThreadFunc, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_task_set_lock(task: *mut GstTask, mutex: *mut glib::GRecMutex); + pub fn gst_task_set_pool(task: *mut GstTask, pool: *mut GstTaskPool); + pub fn gst_task_set_state(task: *mut GstTask, state: GstTaskState) -> gboolean; + pub fn gst_task_start(task: *mut GstTask) -> gboolean; + pub fn gst_task_stop(task: *mut GstTask) -> gboolean; + + //========================================================================= + // GstTaskPool + //========================================================================= + pub fn gst_task_pool_get_type() -> GType; + pub fn gst_task_pool_new() -> *mut GstTaskPool; + pub fn gst_task_pool_cleanup(pool: *mut GstTaskPool); + pub fn gst_task_pool_join(pool: *mut GstTaskPool, id: gpointer); + pub fn gst_task_pool_prepare(pool: *mut GstTaskPool, error: *mut *mut glib::GError); + pub fn gst_task_pool_push( + pool: *mut GstTaskPool, + func: GstTaskPoolFunction, + user_data: gpointer, + error: *mut *mut glib::GError, + ) -> gpointer; + + //========================================================================= + // GstTracer + //========================================================================= + pub fn gst_tracer_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_tracer_register( + plugin: *mut GstPlugin, + name: *const c_char, + type_: GType, + ) -> gboolean; + + //========================================================================= + // GstTracerFactory + //========================================================================= + pub fn gst_tracer_factory_get_type() -> GType; + pub fn gst_tracer_factory_get_list() -> *mut glib::GList; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_tracer_factory_get_tracer_type(factory: *mut GstTracerFactory) -> GType; + + //========================================================================= + // GstTracerRecord + //========================================================================= + pub fn gst_tracer_record_get_type() -> GType; + pub fn gst_tracer_record_new( + name: *const c_char, + firstfield: *const c_char, + ... + ) -> *mut GstTracerRecord; + pub fn gst_tracer_record_log(self_: *mut GstTracerRecord, ...); + + //========================================================================= + // GstTypeFindFactory + //========================================================================= + pub fn gst_type_find_factory_get_type() -> GType; + pub fn gst_type_find_factory_get_list() -> *mut glib::GList; + pub fn gst_type_find_factory_call_function( + factory: *mut GstTypeFindFactory, + find: *mut GstTypeFind, + ); + pub fn gst_type_find_factory_get_caps(factory: *mut GstTypeFindFactory) -> *mut GstCaps; + pub fn gst_type_find_factory_get_extensions( + factory: *mut GstTypeFindFactory, + ) -> *const *const c_char; + pub fn gst_type_find_factory_has_function(factory: *mut GstTypeFindFactory) -> gboolean; + + //========================================================================= + // GstValueArray + //========================================================================= + pub fn gst_value_array_get_type() -> GType; + pub fn gst_value_array_append_and_take_value( + value: *mut gobject::GValue, + append_value: *mut gobject::GValue, + ); + pub fn gst_value_array_append_value( + value: *mut gobject::GValue, + append_value: *const gobject::GValue, + ); + pub fn gst_value_array_get_size(value: *const gobject::GValue) -> c_uint; + pub fn gst_value_array_get_value( + value: *const gobject::GValue, + index: c_uint, + ) -> *const gobject::GValue; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_value_array_init( + value: *mut gobject::GValue, + prealloc: c_uint, + ) -> *mut gobject::GValue; + pub fn gst_value_array_prepend_value( + value: *mut gobject::GValue, + prepend_value: *const gobject::GValue, + ); + + //========================================================================= + // GstValueList + //========================================================================= + pub fn gst_value_list_get_type() -> GType; + pub fn gst_value_list_append_and_take_value( + value: *mut gobject::GValue, + append_value: *mut gobject::GValue, + ); + pub fn gst_value_list_append_value( + value: *mut gobject::GValue, + append_value: *const gobject::GValue, + ); + pub fn gst_value_list_concat( + dest: *mut gobject::GValue, + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ); + pub fn gst_value_list_get_size(value: *const gobject::GValue) -> c_uint; + pub fn gst_value_list_get_value( + value: *const gobject::GValue, + index: c_uint, + ) -> *const gobject::GValue; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_value_list_init( + value: *mut gobject::GValue, + prealloc: c_uint, + ) -> *mut gobject::GValue; + pub fn gst_value_list_merge( + dest: *mut gobject::GValue, + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ); + pub fn gst_value_list_prepend_value( + value: *mut gobject::GValue, + prepend_value: *const gobject::GValue, + ); + + //========================================================================= + // GstChildProxy + //========================================================================= + pub fn gst_child_proxy_get_type() -> GType; + pub fn gst_child_proxy_child_added( + parent: *mut GstChildProxy, + child: *mut gobject::GObject, + name: *const c_char, + ); + pub fn gst_child_proxy_child_removed( + parent: *mut GstChildProxy, + child: *mut gobject::GObject, + name: *const c_char, + ); + pub fn gst_child_proxy_get(object: *mut GstChildProxy, first_property_name: *const c_char, ...); + pub fn gst_child_proxy_get_child_by_index( + parent: *mut GstChildProxy, + index: c_uint, + ) -> *mut gobject::GObject; + pub fn gst_child_proxy_get_child_by_name( + parent: *mut GstChildProxy, + name: *const c_char, + ) -> *mut gobject::GObject; + pub fn gst_child_proxy_get_children_count(parent: *mut GstChildProxy) -> c_uint; + pub fn gst_child_proxy_get_property( + object: *mut GstChildProxy, + name: *const c_char, + value: *mut gobject::GValue, + ); + //pub fn gst_child_proxy_get_valist(object: *mut GstChildProxy, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); + pub fn gst_child_proxy_lookup( + object: *mut GstChildProxy, + name: *const c_char, + target: *mut *mut gobject::GObject, + pspec: *mut *mut gobject::GParamSpec, + ) -> gboolean; + pub fn gst_child_proxy_set(object: *mut GstChildProxy, first_property_name: *const c_char, ...); + pub fn gst_child_proxy_set_property( + object: *mut GstChildProxy, + name: *const c_char, + value: *const gobject::GValue, + ); + //pub fn gst_child_proxy_set_valist(object: *mut GstChildProxy, first_property_name: *const c_char, var_args: /*Unimplemented*/va_list); + + //========================================================================= + // GstPreset + //========================================================================= + pub fn gst_preset_get_type() -> GType; + pub fn gst_preset_get_app_dir() -> *const c_char; + pub fn gst_preset_set_app_dir(app_dir: *const c_char) -> gboolean; + pub fn gst_preset_delete_preset(preset: *mut GstPreset, name: *const c_char) -> gboolean; + pub fn gst_preset_get_meta( + preset: *mut GstPreset, + name: *const c_char, + tag: *const c_char, + value: *mut *mut c_char, + ) -> gboolean; + pub fn gst_preset_get_preset_names(preset: *mut GstPreset) -> *mut *mut c_char; + pub fn gst_preset_get_property_names(preset: *mut GstPreset) -> *mut *mut c_char; + pub fn gst_preset_is_editable(preset: *mut GstPreset) -> gboolean; + pub fn gst_preset_load_preset(preset: *mut GstPreset, name: *const c_char) -> gboolean; + pub fn gst_preset_rename_preset( + preset: *mut GstPreset, + old_name: *const c_char, + new_name: *const c_char, + ) -> gboolean; + pub fn gst_preset_save_preset(preset: *mut GstPreset, name: *const c_char) -> gboolean; + pub fn gst_preset_set_meta( + preset: *mut GstPreset, + name: *const c_char, + tag: *const c_char, + value: *const c_char, + ) -> gboolean; + + //========================================================================= + // GstTagSetter + //========================================================================= + pub fn gst_tag_setter_get_type() -> GType; + //pub fn gst_tag_setter_add_tag_valist(setter: *mut GstTagSetter, mode: GstTagMergeMode, tag: *const c_char, var_args: /*Unimplemented*/va_list); + //pub fn gst_tag_setter_add_tag_valist_values(setter: *mut GstTagSetter, mode: GstTagMergeMode, tag: *const c_char, var_args: /*Unimplemented*/va_list); + pub fn gst_tag_setter_add_tag_value( + setter: *mut GstTagSetter, + mode: GstTagMergeMode, + tag: *const c_char, + value: *const gobject::GValue, + ); + pub fn gst_tag_setter_add_tag_values( + setter: *mut GstTagSetter, + mode: GstTagMergeMode, + tag: *const c_char, + ... + ); + pub fn gst_tag_setter_add_tags( + setter: *mut GstTagSetter, + mode: GstTagMergeMode, + tag: *const c_char, + ... + ); + pub fn gst_tag_setter_get_tag_list(setter: *mut GstTagSetter) -> *const GstTagList; + pub fn gst_tag_setter_get_tag_merge_mode(setter: *mut GstTagSetter) -> GstTagMergeMode; + pub fn gst_tag_setter_merge_tags( + setter: *mut GstTagSetter, + list: *const GstTagList, + mode: GstTagMergeMode, + ); + pub fn gst_tag_setter_reset_tags(setter: *mut GstTagSetter); + pub fn gst_tag_setter_set_tag_merge_mode(setter: *mut GstTagSetter, mode: GstTagMergeMode); + + //========================================================================= + // GstTocSetter + //========================================================================= + pub fn gst_toc_setter_get_type() -> GType; + pub fn gst_toc_setter_get_toc(setter: *mut GstTocSetter) -> *mut GstToc; + pub fn gst_toc_setter_reset(setter: *mut GstTocSetter); + pub fn gst_toc_setter_set_toc(setter: *mut GstTocSetter, toc: *mut GstToc); + + //========================================================================= + // GstURIHandler + //========================================================================= + pub fn gst_uri_handler_get_type() -> GType; + pub fn gst_uri_handler_get_protocols(handler: *mut GstURIHandler) -> *const *const c_char; + pub fn gst_uri_handler_get_uri(handler: *mut GstURIHandler) -> *mut c_char; + pub fn gst_uri_handler_get_uri_type(handler: *mut GstURIHandler) -> GstURIType; + pub fn gst_uri_handler_set_uri( + handler: *mut GstURIHandler, + uri: *const c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + + //========================================================================= + // Other functions + //========================================================================= + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_calculate_linear_regression( + xy: *const GstClockTime, + temp: *mut GstClockTime, + n: c_uint, + m_num: *mut GstClockTime, + m_denom: *mut GstClockTime, + b: *mut GstClockTime, + xbase: *mut GstClockTime, + r_squared: *mut c_double, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_clear_mini_object(object_ptr: *mut *mut GstMiniObject); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_clear_object(object_ptr: *mut *mut GstObject); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_clear_structure(structure_ptr: *mut *mut GstStructure); + pub fn gst_debug_add_log_function( + func: GstLogFunction, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_debug_add_ring_buffer_logger(max_size_per_thread: c_uint, thread_timeout: c_uint); + pub fn gst_debug_bin_to_dot_data( + bin: *mut GstBin, + details: GstDebugGraphDetails, + ) -> *mut c_char; + pub fn gst_debug_bin_to_dot_file( + bin: *mut GstBin, + details: GstDebugGraphDetails, + file_name: *const c_char, + ); + pub fn gst_debug_bin_to_dot_file_with_ts( + bin: *mut GstBin, + details: GstDebugGraphDetails, + file_name: *const c_char, + ); + pub fn gst_debug_construct_term_color(colorinfo: c_uint) -> *mut c_char; + pub fn gst_debug_construct_win_color(colorinfo: c_uint) -> c_int; + pub fn gst_debug_get_all_categories() -> *mut glib::GSList; + pub fn gst_debug_get_color_mode() -> GstDebugColorMode; + pub fn gst_debug_get_default_threshold() -> GstDebugLevel; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_debug_get_stack_trace(flags: GstStackTraceFlags) -> *mut c_char; + pub fn gst_debug_is_active() -> gboolean; + pub fn gst_debug_is_colored() -> gboolean; + pub fn gst_debug_log( + category: *mut GstDebugCategory, + level: GstDebugLevel, + file: *const c_char, + function: *const c_char, + line: c_int, + object: *mut gobject::GObject, + format: *const c_char, + ... + ); + pub fn gst_debug_log_default( + category: *mut GstDebugCategory, + level: GstDebugLevel, + file: *const c_char, + function: *const c_char, + line: c_int, + object: *mut gobject::GObject, + message: *mut GstDebugMessage, + user_data: gpointer, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_debug_log_get_line( + category: *mut GstDebugCategory, + level: GstDebugLevel, + file: *const c_char, + function: *const c_char, + line: c_int, + object: *mut gobject::GObject, + message: *mut GstDebugMessage, + ) -> *mut c_char; + //pub fn gst_debug_log_valist(category: *mut GstDebugCategory, level: GstDebugLevel, file: *const c_char, function: *const c_char, line: c_int, object: *mut gobject::GObject, format: *const c_char, args: /*Unimplemented*/va_list); + pub fn gst_debug_print_stack_trace(); + pub fn gst_debug_remove_log_function(func: GstLogFunction) -> c_uint; + pub fn gst_debug_remove_log_function_by_data(data: gpointer) -> c_uint; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_debug_remove_ring_buffer_logger(); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_debug_ring_buffer_logger_get_logs() -> *mut *mut c_char; + pub fn gst_debug_set_active(active: gboolean); + pub fn gst_debug_set_color_mode(mode: GstDebugColorMode); + pub fn gst_debug_set_color_mode_from_string(mode: *const c_char); + pub fn gst_debug_set_colored(colored: gboolean); + pub fn gst_debug_set_default_threshold(level: GstDebugLevel); + pub fn gst_debug_set_threshold_for_name(name: *const c_char, level: GstDebugLevel); + pub fn gst_debug_set_threshold_from_string(list: *const c_char, reset: gboolean); + pub fn gst_debug_unset_threshold_for_name(name: *const c_char); + pub fn gst_deinit(); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_dynamic_type_register(plugin: *mut GstPlugin, type_: GType) -> gboolean; + pub fn gst_error_get_message(domain: glib::GQuark, code: c_int) -> *mut c_char; + pub fn gst_filename_to_uri( + filename: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut c_char; + pub fn gst_flow_get_name(ret: GstFlowReturn) -> *const c_char; + pub fn gst_flow_to_quark(ret: GstFlowReturn) -> glib::GQuark; + pub fn gst_formats_contains(formats: *const GstFormat, format: GstFormat) -> gboolean; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_get_main_executable_path() -> *const c_char; + pub fn gst_info_strdup_printf(format: *const c_char, ...) -> *mut c_char; + //pub fn gst_info_strdup_vprintf(format: *const c_char, args: /*Unimplemented*/va_list) -> *mut c_char; + //pub fn gst_info_vasprintf(result: *mut *mut c_char, format: *const c_char, args: /*Unimplemented*/va_list) -> c_int; + pub fn gst_init(argc: *mut c_int, argv: *mut *mut *mut c_char); + pub fn gst_init_check( + argc: *mut c_int, + argv: *mut *mut *mut c_char, + error: *mut *mut glib::GError, + ) -> gboolean; + pub fn gst_init_get_option_group() -> *mut glib::GOptionGroup; + pub fn gst_is_caps_features(obj: gconstpointer) -> gboolean; + pub fn gst_is_initialized() -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_make_element_message_details(name: *const c_char, ...) -> *mut GstStructure; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_param_spec_array( + name: *const c_char, + nick: *const c_char, + blurb: *const c_char, + element_spec: *mut gobject::GParamSpec, + flags: gobject::GParamFlags, + ) -> *mut gobject::GParamSpec; + pub fn gst_param_spec_fraction( + name: *const c_char, + nick: *const c_char, + blurb: *const c_char, + min_num: c_int, + min_denom: c_int, + max_num: c_int, + max_denom: c_int, + default_num: c_int, + default_denom: c_int, + flags: gobject::GParamFlags, + ) -> *mut gobject::GParamSpec; + pub fn gst_parent_buffer_meta_api_get_type() -> GType; + pub fn gst_parse_bin_from_description( + bin_description: *const c_char, + ghost_unlinked_pads: gboolean, + error: *mut *mut glib::GError, + ) -> *mut GstBin; + pub fn gst_parse_bin_from_description_full( + bin_description: *const c_char, + ghost_unlinked_pads: gboolean, + context: *mut GstParseContext, + flags: GstParseFlags, + error: *mut *mut glib::GError, + ) -> *mut GstElement; + pub fn gst_parse_launch( + pipeline_description: *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstElement; + pub fn gst_parse_launch_full( + pipeline_description: *const c_char, + context: *mut GstParseContext, + flags: GstParseFlags, + error: *mut *mut glib::GError, + ) -> *mut GstElement; + pub fn gst_parse_launchv( + argv: *mut *const c_char, + error: *mut *mut glib::GError, + ) -> *mut GstElement; + pub fn gst_parse_launchv_full( + argv: *mut *const c_char, + context: *mut GstParseContext, + flags: GstParseFlags, + error: *mut *mut glib::GError, + ) -> *mut GstElement; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_print(format: *const c_char, ...); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_printerr(format: *const c_char, ...); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_printerrln(format: *const c_char, ...); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_println(format: *const c_char, ...); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_protection_filter_systems_by_available_decryptors( + system_identifiers: *mut *const c_char, + ) -> *mut *mut c_char; + pub fn gst_protection_meta_api_get_type() -> GType; + pub fn gst_protection_select_system(system_identifiers: *mut *const c_char) -> *const c_char; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_reference_timestamp_meta_api_get_type() -> GType; + pub fn gst_segtrap_is_enabled() -> gboolean; + pub fn gst_segtrap_set_enabled(enabled: gboolean); + pub fn gst_static_caps_get_type() -> GType; + pub fn gst_static_pad_template_get_type() -> GType; + pub fn gst_tag_exists(tag: *const c_char) -> gboolean; + pub fn gst_tag_get_description(tag: *const c_char) -> *const c_char; + pub fn gst_tag_get_flag(tag: *const c_char) -> GstTagFlag; + pub fn gst_tag_get_nick(tag: *const c_char) -> *const c_char; + pub fn gst_tag_get_type(tag: *const c_char) -> GType; + pub fn gst_tag_is_fixed(tag: *const c_char) -> gboolean; + pub fn gst_tag_merge_strings_with_comma( + dest: *mut gobject::GValue, + src: *const gobject::GValue, + ); + pub fn gst_tag_merge_use_first(dest: *mut gobject::GValue, src: *const gobject::GValue); + pub fn gst_tag_register( + name: *const c_char, + flag: GstTagFlag, + type_: GType, + nick: *const c_char, + blurb: *const c_char, + func: GstTagMergeFunc, + ); + pub fn gst_tag_register_static( + name: *const c_char, + flag: GstTagFlag, + type_: GType, + nick: *const c_char, + blurb: *const c_char, + func: GstTagMergeFunc, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_tracing_get_active_tracers() -> *mut glib::GList; + pub fn gst_tracing_register_hook( + tracer: *mut GstTracer, + detail: *const c_char, + func: gobject::GCallback, + ); + pub fn gst_type_find_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_type_is_plugin_api(type_: GType, flags: *mut GstPluginAPIFlags) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_type_mark_as_plugin_api(type_: GType, flags: GstPluginAPIFlags); + pub fn gst_update_registry() -> gboolean; + pub fn gst_util_array_binary_search( + array: gpointer, + num_elements: c_uint, + element_size: size_t, + search_func: glib::GCompareDataFunc, + mode: GstSearchMode, + search_data: gconstpointer, + user_data: gpointer, + ) -> gpointer; + pub fn gst_util_double_to_fraction(src: c_double, dest_n: *mut c_int, dest_d: *mut c_int); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_util_dump_buffer(buf: *mut GstBuffer); + pub fn gst_util_dump_mem(mem: *const u8, size: c_uint); + pub fn gst_util_fraction_add( + a_n: c_int, + a_d: c_int, + b_n: c_int, + b_d: c_int, + res_n: *mut c_int, + res_d: *mut c_int, + ) -> gboolean; + pub fn gst_util_fraction_compare(a_n: c_int, a_d: c_int, b_n: c_int, b_d: c_int) -> c_int; + pub fn gst_util_fraction_multiply( + a_n: c_int, + a_d: c_int, + b_n: c_int, + b_d: c_int, + res_n: *mut c_int, + res_d: *mut c_int, + ) -> gboolean; + pub fn gst_util_fraction_to_double(src_n: c_int, src_d: c_int, dest: *mut c_double); + pub fn gst_util_gdouble_to_guint64(value: c_double) -> u64; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_util_get_object_array( + object: *mut gobject::GObject, + name: *const c_char, + array: *mut *mut gobject::GValueArray, + ) -> gboolean; + pub fn gst_util_get_timestamp() -> GstClockTime; + pub fn gst_util_greatest_common_divisor(a: c_int, b: c_int) -> c_int; + pub fn gst_util_greatest_common_divisor_int64(a: i64, b: i64) -> i64; + pub fn gst_util_group_id_next() -> c_uint; + pub fn gst_util_guint64_to_gdouble(value: u64) -> c_double; + pub fn gst_util_seqnum_compare(s1: u32, s2: u32) -> i32; + pub fn gst_util_seqnum_next() -> u32; + pub fn gst_util_set_object_arg( + object: *mut gobject::GObject, + name: *const c_char, + value: *const c_char, + ); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_util_set_object_array( + object: *mut gobject::GObject, + name: *const c_char, + array: *const gobject::GValueArray, + ) -> gboolean; + pub fn gst_util_set_value_from_string(value: *mut gobject::GValue, value_str: *const c_char); + pub fn gst_util_uint64_scale(val: u64, num: u64, denom: u64) -> u64; + pub fn gst_util_uint64_scale_ceil(val: u64, num: u64, denom: u64) -> u64; + pub fn gst_util_uint64_scale_int(val: u64, num: c_int, denom: c_int) -> u64; + pub fn gst_util_uint64_scale_int_ceil(val: u64, num: c_int, denom: c_int) -> u64; + pub fn gst_util_uint64_scale_int_round(val: u64, num: c_int, denom: c_int) -> u64; + pub fn gst_util_uint64_scale_round(val: u64, num: u64, denom: u64) -> u64; + pub fn gst_value_can_compare( + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_can_intersect( + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_can_subtract( + minuend: *const gobject::GValue, + subtrahend: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_can_union( + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_compare( + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> c_int; + pub fn gst_value_deserialize(dest: *mut gobject::GValue, src: *const c_char) -> gboolean; + pub fn gst_value_fixate(dest: *mut gobject::GValue, src: *const gobject::GValue) -> gboolean; + pub fn gst_value_fraction_multiply( + product: *mut gobject::GValue, + factor1: *const gobject::GValue, + factor2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_fraction_subtract( + dest: *mut gobject::GValue, + minuend: *const gobject::GValue, + subtrahend: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_get_bitmask(value: *const gobject::GValue) -> u64; + pub fn gst_value_get_caps(value: *const gobject::GValue) -> *const GstCaps; + pub fn gst_value_get_caps_features(value: *const gobject::GValue) -> *const GstCapsFeatures; + pub fn gst_value_get_double_range_max(value: *const gobject::GValue) -> c_double; + pub fn gst_value_get_double_range_min(value: *const gobject::GValue) -> c_double; + pub fn gst_value_get_flagset_flags(value: *const gobject::GValue) -> c_uint; + pub fn gst_value_get_flagset_mask(value: *const gobject::GValue) -> c_uint; + pub fn gst_value_get_fraction_denominator(value: *const gobject::GValue) -> c_int; + pub fn gst_value_get_fraction_numerator(value: *const gobject::GValue) -> c_int; + pub fn gst_value_get_fraction_range_max( + value: *const gobject::GValue, + ) -> *const gobject::GValue; + pub fn gst_value_get_fraction_range_min( + value: *const gobject::GValue, + ) -> *const gobject::GValue; + pub fn gst_value_get_int64_range_max(value: *const gobject::GValue) -> i64; + pub fn gst_value_get_int64_range_min(value: *const gobject::GValue) -> i64; + pub fn gst_value_get_int64_range_step(value: *const gobject::GValue) -> i64; + pub fn gst_value_get_int_range_max(value: *const gobject::GValue) -> c_int; + pub fn gst_value_get_int_range_min(value: *const gobject::GValue) -> c_int; + pub fn gst_value_get_int_range_step(value: *const gobject::GValue) -> c_int; + pub fn gst_value_get_structure(value: *const gobject::GValue) -> *const GstStructure; + pub fn gst_value_init_and_copy(dest: *mut gobject::GValue, src: *const gobject::GValue); + pub fn gst_value_intersect( + dest: *mut gobject::GValue, + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_is_fixed(value: *const gobject::GValue) -> gboolean; + pub fn gst_value_is_subset( + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_register(table: *const GstValueTable); + pub fn gst_value_serialize(value: *const gobject::GValue) -> *mut c_char; + pub fn gst_value_set_bitmask(value: *mut gobject::GValue, bitmask: u64); + pub fn gst_value_set_caps(value: *mut gobject::GValue, caps: *const GstCaps); + pub fn gst_value_set_caps_features( + value: *mut gobject::GValue, + features: *const GstCapsFeatures, + ); + pub fn gst_value_set_double_range(value: *mut gobject::GValue, start: c_double, end: c_double); + pub fn gst_value_set_flagset(value: *mut gobject::GValue, flags: c_uint, mask: c_uint); + pub fn gst_value_set_fraction( + value: *mut gobject::GValue, + numerator: c_int, + denominator: c_int, + ); + pub fn gst_value_set_fraction_range( + value: *mut gobject::GValue, + start: *const gobject::GValue, + end: *const gobject::GValue, + ); + pub fn gst_value_set_fraction_range_full( + value: *mut gobject::GValue, + numerator_start: c_int, + denominator_start: c_int, + numerator_end: c_int, + denominator_end: c_int, + ); + pub fn gst_value_set_int64_range(value: *mut gobject::GValue, start: i64, end: i64); + pub fn gst_value_set_int64_range_step( + value: *mut gobject::GValue, + start: i64, + end: i64, + step: i64, + ); + pub fn gst_value_set_int_range(value: *mut gobject::GValue, start: c_int, end: c_int); + pub fn gst_value_set_int_range_step( + value: *mut gobject::GValue, + start: c_int, + end: c_int, + step: c_int, + ); + pub fn gst_value_set_structure(value: *mut gobject::GValue, structure: *const GstStructure); + pub fn gst_value_subtract( + dest: *mut gobject::GValue, + minuend: *const gobject::GValue, + subtrahend: *const gobject::GValue, + ) -> gboolean; + pub fn gst_value_union( + dest: *mut gobject::GValue, + value1: *const gobject::GValue, + value2: *const gobject::GValue, + ) -> gboolean; + pub fn gst_version( + major: *mut c_uint, + minor: *mut c_uint, + micro: *mut c_uint, + nano: *mut c_uint, + ); + pub fn gst_version_string() -> *mut c_char; + +} diff --git a/sys/gstreamer-sys/tests/abi.rs b/sys/gstreamer-sys/tests/abi.rs new file mode 100644 index 000000000..79c731b8f --- /dev/null +++ b/sys/gstreamer-sys/tests/abi.rs @@ -0,0 +1,2240 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstAllocationParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAllocator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAllocatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstAllocatorFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBin", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBinClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBinFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBuffer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferCopyFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferPoolAcquireFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferPoolAcquireParams", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBufferingMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBus", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBusClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBusFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstBusSyncReply", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCaps", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCapsFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCapsIntersectMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstChildProxyInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockEntry", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockEntryType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockTime", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockTimeDiff", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstClockType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstControlBinding", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstControlBindingClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstControlSource", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstControlSourceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstCoreError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDebugCategory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDebugColorFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDebugColorMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDebugGraphDetails", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDebugLevel", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDevice", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDeviceClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDeviceMonitor", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDeviceMonitorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDeviceProvider", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstDeviceProviderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstElement", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstElementClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstElementFactoryListType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstElementFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstEvent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstEventType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstEventTypeFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstFlowReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstFormatDefinition", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGhostPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstGhostPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstIterator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstIteratorItem", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstIteratorResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstLibraryError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstLockFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMapFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMapInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMemory", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMemoryFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMessage", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMessageType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMetaFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMetaInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMetaTransformCopy", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMiniObject", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstMiniObjectFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstObject", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstObjectClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstObjectFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadDirection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadLinkCheck", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadLinkReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadPresence", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadProbeInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadProbeReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadProbeType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadTemplate", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadTemplateClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPadTemplateFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstParamSpecArray", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstParamSpecFraction", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstParentBufferMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstParseError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstParseFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPipeline", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPipelineClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPipelineFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPluginAPIFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPluginDependencyFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPluginDesc", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPluginError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPluginFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPollFD", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPresetInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstProgressType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPromise", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstPromiseResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstProtectionMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstProxyPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstProxyPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstQOSType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstQuery", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstQueryType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstQueryTypeFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRank", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstReferenceTimestampMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRegistry", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstRegistryClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstResourceError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSchedulingFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSearchMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSeekFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSeekType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSegment", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSegmentFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStackTraceFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStateChange", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStateChangeReturn", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStaticCaps", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStaticPadTemplate", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStream", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamCollection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamCollectionClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamStatusType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStreamType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStructure", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstStructureChangeType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSystemClock", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstSystemClockClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagFlag", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagList", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagMergeMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagScope", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagSetterInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTask", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTaskClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTaskPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTaskPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTaskState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTimedValue", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTocEntryType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTocLoopType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTocScope", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTocSetterInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTracer", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTracerClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTracerValueFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTracerValueScope", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTypeFind", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTypeFindProbability", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstURIError", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstURIHandlerInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstURIType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstValueTable", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(guint) GST_ALLOCATOR_FLAG_CUSTOM_ALLOC", "16"), + ("(guint) GST_ALLOCATOR_FLAG_LAST", "1048576"), + ("GST_ALLOCATOR_SYSMEM", "SystemMemory"), + ("(guint) GST_BIN_FLAG_LAST", "524288"), + ("(guint) GST_BIN_FLAG_NO_RESYNC", "16384"), + ("(guint) GST_BIN_FLAG_STREAMS_AWARE", "32768"), + ("(gint) GST_BUFFERING_DOWNLOAD", "1"), + ("(gint) GST_BUFFERING_LIVE", "3"), + ("(gint) GST_BUFFERING_STREAM", "0"), + ("(gint) GST_BUFFERING_TIMESHIFT", "2"), + ("GST_BUFFER_COPY_ALL", "15"), + ("(guint) GST_BUFFER_COPY_DEEP", "32"), + ("(guint) GST_BUFFER_COPY_FLAGS", "1"), + ("(guint) GST_BUFFER_COPY_MEMORY", "8"), + ("(guint) GST_BUFFER_COPY_MERGE", "16"), + ("(guint) GST_BUFFER_COPY_META", "4"), + ("GST_BUFFER_COPY_METADATA", "7"), + ("(guint) GST_BUFFER_COPY_NONE", "0"), + ("(guint) GST_BUFFER_COPY_TIMESTAMPS", "2"), + ("(guint) GST_BUFFER_FLAG_CORRUPTED", "256"), + ("(guint) GST_BUFFER_FLAG_DECODE_ONLY", "32"), + ("(guint) GST_BUFFER_FLAG_DELTA_UNIT", "8192"), + ("(guint) GST_BUFFER_FLAG_DISCONT", "64"), + ("(guint) GST_BUFFER_FLAG_DROPPABLE", "4096"), + ("(guint) GST_BUFFER_FLAG_GAP", "2048"), + ("(guint) GST_BUFFER_FLAG_HEADER", "1024"), + ("(guint) GST_BUFFER_FLAG_LAST", "1048576"), + ("(guint) GST_BUFFER_FLAG_LIVE", "16"), + ("(guint) GST_BUFFER_FLAG_MARKER", "512"), + ("(guint) GST_BUFFER_FLAG_NON_DROPPABLE", "65536"), + ("(guint) GST_BUFFER_FLAG_RESYNC", "128"), + ("(guint) GST_BUFFER_FLAG_SYNC_AFTER", "32768"), + ("(guint) GST_BUFFER_FLAG_TAG_MEMORY", "16384"), + ("GST_BUFFER_OFFSET_NONE", "18446744073709551615"), + ("(guint) GST_BUFFER_POOL_ACQUIRE_FLAG_DISCONT", "4"), + ("(guint) GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT", "2"), + ("(guint) GST_BUFFER_POOL_ACQUIRE_FLAG_KEY_UNIT", "1"), + ("(guint) GST_BUFFER_POOL_ACQUIRE_FLAG_LAST", "65536"), + ("(guint) GST_BUFFER_POOL_ACQUIRE_FLAG_NONE", "0"), + ("(gint) GST_BUS_ASYNC", "2"), + ("(gint) GST_BUS_DROP", "0"), + ("(guint) GST_BUS_FLAG_LAST", "32"), + ("(guint) GST_BUS_FLUSHING", "16"), + ("(gint) GST_BUS_PASS", "1"), + ("GST_CAN_INLINE", "1"), + ( + "GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY", + "memory:SystemMemory", + ), + ("(guint) GST_CAPS_FLAG_ANY", "16"), + ("(gint) GST_CAPS_INTERSECT_FIRST", "1"), + ("(gint) GST_CAPS_INTERSECT_ZIG_ZAG", "0"), + ("(gint) GST_CLOCK_BADTIME", "4"), + ("(gint) GST_CLOCK_BUSY", "3"), + ("(gint) GST_CLOCK_DONE", "7"), + ("(gint) GST_CLOCK_EARLY", "1"), + ("(gint) GST_CLOCK_ENTRY_PERIODIC", "1"), + ("(gint) GST_CLOCK_ENTRY_SINGLE", "0"), + ("(gint) GST_CLOCK_ERROR", "5"), + ("(guint) GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC", "128"), + ("(guint) GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC", "64"), + ("(guint) GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC", "32"), + ("(guint) GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC", "16"), + ("(guint) GST_CLOCK_FLAG_CAN_SET_MASTER", "512"), + ("(guint) GST_CLOCK_FLAG_CAN_SET_RESOLUTION", "256"), + ("(guint) GST_CLOCK_FLAG_LAST", "4096"), + ("(guint) GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC", "1024"), + ("(gint) GST_CLOCK_OK", "0"), + ("GST_CLOCK_TIME_NONE", "18446744073709551615"), + ("(gint) GST_CLOCK_TYPE_MONOTONIC", "1"), + ("(gint) GST_CLOCK_TYPE_OTHER", "2"), + ("(gint) GST_CLOCK_TYPE_REALTIME", "0"), + ("(gint) GST_CLOCK_TYPE_TAI", "3"), + ("(gint) GST_CLOCK_UNSCHEDULED", "2"), + ("(gint) GST_CLOCK_UNSUPPORTED", "6"), + ("(gint) GST_CORE_ERROR_CAPS", "10"), + ("(gint) GST_CORE_ERROR_CLOCK", "13"), + ("(gint) GST_CORE_ERROR_DISABLED", "14"), + ("(gint) GST_CORE_ERROR_EVENT", "8"), + ("(gint) GST_CORE_ERROR_FAILED", "1"), + ("(gint) GST_CORE_ERROR_MISSING_PLUGIN", "12"), + ("(gint) GST_CORE_ERROR_NEGOTIATION", "7"), + ("(gint) GST_CORE_ERROR_NOT_IMPLEMENTED", "3"), + ("(gint) GST_CORE_ERROR_NUM_ERRORS", "15"), + ("(gint) GST_CORE_ERROR_PAD", "5"), + ("(gint) GST_CORE_ERROR_SEEK", "9"), + ("(gint) GST_CORE_ERROR_STATE_CHANGE", "4"), + ("(gint) GST_CORE_ERROR_TAG", "11"), + ("(gint) GST_CORE_ERROR_THREAD", "6"), + ("(gint) GST_CORE_ERROR_TOO_LAZY", "2"), + ("(guint) GST_DEBUG_BG_BLACK", "0"), + ("(guint) GST_DEBUG_BG_BLUE", "64"), + ("(guint) GST_DEBUG_BG_CYAN", "96"), + ("(guint) GST_DEBUG_BG_GREEN", "32"), + ("(guint) GST_DEBUG_BG_MAGENTA", "80"), + ("GST_DEBUG_BG_MASK", "240"), + ("(guint) GST_DEBUG_BG_RED", "16"), + ("(guint) GST_DEBUG_BG_WHITE", "112"), + ("(guint) GST_DEBUG_BG_YELLOW", "48"), + ("(guint) GST_DEBUG_BOLD", "256"), + ("(gint) GST_DEBUG_COLOR_MODE_OFF", "0"), + ("(gint) GST_DEBUG_COLOR_MODE_ON", "1"), + ("(gint) GST_DEBUG_COLOR_MODE_UNIX", "2"), + ("(guint) GST_DEBUG_FG_BLACK", "0"), + ("(guint) GST_DEBUG_FG_BLUE", "4"), + ("(guint) GST_DEBUG_FG_CYAN", "6"), + ("(guint) GST_DEBUG_FG_GREEN", "2"), + ("(guint) GST_DEBUG_FG_MAGENTA", "5"), + ("GST_DEBUG_FG_MASK", "15"), + ("(guint) GST_DEBUG_FG_RED", "1"), + ("(guint) GST_DEBUG_FG_WHITE", "7"), + ("(guint) GST_DEBUG_FG_YELLOW", "3"), + ("GST_DEBUG_FORMAT_MASK", "65280"), + ("(guint) GST_DEBUG_GRAPH_SHOW_ALL", "15"), + ("(guint) GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS", "2"), + ("(guint) GST_DEBUG_GRAPH_SHOW_FULL_PARAMS", "16"), + ("(guint) GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE", "1"), + ("(guint) GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS", "4"), + ("(guint) GST_DEBUG_GRAPH_SHOW_STATES", "8"), + ("(guint) GST_DEBUG_GRAPH_SHOW_VERBOSE", "4294967295"), + ("(guint) GST_DEBUG_UNDERLINE", "512"), + ("GST_ELEMENT_FACTORY_KLASS_DECODER", "Decoder"), + ("GST_ELEMENT_FACTORY_KLASS_DECRYPTOR", "Decryptor"), + ("GST_ELEMENT_FACTORY_KLASS_DEMUXER", "Demuxer"), + ("GST_ELEMENT_FACTORY_KLASS_DEPAYLOADER", "Depayloader"), + ("GST_ELEMENT_FACTORY_KLASS_ENCODER", "Encoder"), + ("GST_ELEMENT_FACTORY_KLASS_ENCRYPTOR", "Encryptor"), + ("GST_ELEMENT_FACTORY_KLASS_FORMATTER", "Formatter"), + ("GST_ELEMENT_FACTORY_KLASS_HARDWARE", "Hardware"), + ("GST_ELEMENT_FACTORY_KLASS_MEDIA_AUDIO", "Audio"), + ("GST_ELEMENT_FACTORY_KLASS_MEDIA_IMAGE", "Image"), + ("GST_ELEMENT_FACTORY_KLASS_MEDIA_METADATA", "Metadata"), + ("GST_ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE", "Subtitle"), + ("GST_ELEMENT_FACTORY_KLASS_MEDIA_VIDEO", "Video"), + ("GST_ELEMENT_FACTORY_KLASS_MUXER", "Muxer"), + ("GST_ELEMENT_FACTORY_KLASS_PARSER", "Parser"), + ("GST_ELEMENT_FACTORY_KLASS_PAYLOADER", "Payloader"), + ("GST_ELEMENT_FACTORY_KLASS_SINK", "Sink"), + ("GST_ELEMENT_FACTORY_KLASS_SRC", "Source"), + ("GST_ELEMENT_FACTORY_TYPE_ANY", "562949953421311"), + ( + "GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS", + "3940649673949188", + ), + ("GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER", "1125899906842626"), + ("GST_ELEMENT_FACTORY_TYPE_DECODABLE", "1377"), + ("GST_ELEMENT_FACTORY_TYPE_DECODER", "1"), + ("GST_ELEMENT_FACTORY_TYPE_DECRYPTOR", "1024"), + ("GST_ELEMENT_FACTORY_TYPE_DEMUXER", "32"), + ("GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER", "256"), + ("GST_ELEMENT_FACTORY_TYPE_ENCODER", "2"), + ("GST_ELEMENT_FACTORY_TYPE_ENCRYPTOR", "2048"), + ("GST_ELEMENT_FACTORY_TYPE_FORMATTER", "512"), + ("GST_ELEMENT_FACTORY_TYPE_HARDWARE", "4096"), + ("GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS", "281474976710656"), + ("GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY", "18446462598732840960"), + ("GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO", "1125899906842624"), + ("GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE", "2251799813685248"), + ( + "GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA", + "9007199254740992", + ), + ( + "GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE", + "4503599627370496", + ), + ("GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO", "562949953421312"), + ("GST_ELEMENT_FACTORY_TYPE_MUXER", "16"), + ("GST_ELEMENT_FACTORY_TYPE_PARSER", "64"), + ("GST_ELEMENT_FACTORY_TYPE_PAYLOADER", "128"), + ("GST_ELEMENT_FACTORY_TYPE_SINK", "4"), + ("GST_ELEMENT_FACTORY_TYPE_SRC", "8"), + ("GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER", "2814749767106562"), + ("(guint) GST_ELEMENT_FLAG_INDEXABLE", "512"), + ("(guint) GST_ELEMENT_FLAG_LAST", "16384"), + ("(guint) GST_ELEMENT_FLAG_LOCKED_STATE", "16"), + ("(guint) GST_ELEMENT_FLAG_PROVIDE_CLOCK", "128"), + ("(guint) GST_ELEMENT_FLAG_REQUIRE_CLOCK", "256"), + ("(guint) GST_ELEMENT_FLAG_SINK", "32"), + ("(guint) GST_ELEMENT_FLAG_SOURCE", "64"), + ("GST_ELEMENT_METADATA_AUTHOR", "author"), + ("GST_ELEMENT_METADATA_DESCRIPTION", "description"), + ("GST_ELEMENT_METADATA_DOC_URI", "doc-uri"), + ("GST_ELEMENT_METADATA_ICON_NAME", "icon-name"), + ("GST_ELEMENT_METADATA_KLASS", "klass"), + ("GST_ELEMENT_METADATA_LONGNAME", "long-name"), + ("(gint) GST_EVENT_BUFFERSIZE", "23054"), + ("(gint) GST_EVENT_CAPS", "12814"), + ("(gint) GST_EVENT_CUSTOM_BOTH", "79367"), + ("(gint) GST_EVENT_CUSTOM_BOTH_OOB", "81923"), + ("(gint) GST_EVENT_CUSTOM_DOWNSTREAM", "71686"), + ("(gint) GST_EVENT_CUSTOM_DOWNSTREAM_OOB", "74242"), + ("(gint) GST_EVENT_CUSTOM_DOWNSTREAM_STICKY", "76830"), + ("(gint) GST_EVENT_CUSTOM_UPSTREAM", "69121"), + ("(gint) GST_EVENT_EOS", "28174"), + ("(gint) GST_EVENT_FLUSH_START", "2563"), + ("(gint) GST_EVENT_FLUSH_STOP", "5127"), + ("(gint) GST_EVENT_GAP", "40966"), + ("(gint) GST_EVENT_INSTANT_RATE_CHANGE", "46090"), + ("(gint) GST_EVENT_INSTANT_RATE_SYNC_TIME", "66817"), + ("(gint) GST_EVENT_LATENCY", "56321"), + ("(gint) GST_EVENT_NAVIGATION", "53761"), + ("GST_EVENT_NUM_SHIFT", "8"), + ("(gint) GST_EVENT_PROTECTION", "33310"), + ("(gint) GST_EVENT_QOS", "48641"), + ("(gint) GST_EVENT_RECONFIGURE", "61441"), + ("(gint) GST_EVENT_SEEK", "51201"), + ("(gint) GST_EVENT_SEGMENT", "17934"), + ("(gint) GST_EVENT_SEGMENT_DONE", "38406"), + ("(gint) GST_EVENT_SELECT_STREAMS", "66561"), + ("(gint) GST_EVENT_SINK_MESSAGE", "25630"), + ("(gint) GST_EVENT_STEP", "58881"), + ("(gint) GST_EVENT_STREAM_COLLECTION", "19230"), + ("(gint) GST_EVENT_STREAM_GROUP_DONE", "26894"), + ("(gint) GST_EVENT_STREAM_START", "10254"), + ("(gint) GST_EVENT_TAG", "20510"), + ("(gint) GST_EVENT_TOC", "30750"), + ("(gint) GST_EVENT_TOC_SELECT", "64001"), + ("GST_EVENT_TYPE_BOTH", "3"), + ("(guint) GST_EVENT_TYPE_DOWNSTREAM", "2"), + ("(guint) GST_EVENT_TYPE_SERIALIZED", "4"), + ("(guint) GST_EVENT_TYPE_STICKY", "8"), + ("(guint) GST_EVENT_TYPE_STICKY_MULTI", "16"), + ("(guint) GST_EVENT_TYPE_UPSTREAM", "1"), + ("(gint) GST_EVENT_UNKNOWN", "0"), + ("GST_FLAG_SET_MASK_EXACT", "4294967295"), + ("(gint) GST_FLOW_CUSTOM_ERROR", "-100"), + ("(gint) GST_FLOW_CUSTOM_ERROR_1", "-101"), + ("(gint) GST_FLOW_CUSTOM_ERROR_2", "-102"), + ("(gint) GST_FLOW_CUSTOM_SUCCESS", "100"), + ("(gint) GST_FLOW_CUSTOM_SUCCESS_1", "101"), + ("(gint) GST_FLOW_CUSTOM_SUCCESS_2", "102"), + ("(gint) GST_FLOW_EOS", "-3"), + ("(gint) GST_FLOW_ERROR", "-5"), + ("(gint) GST_FLOW_FLUSHING", "-2"), + ("(gint) GST_FLOW_NOT_LINKED", "-1"), + ("(gint) GST_FLOW_NOT_NEGOTIATED", "-4"), + ("(gint) GST_FLOW_NOT_SUPPORTED", "-6"), + ("(gint) GST_FLOW_OK", "0"), + ("(gint) GST_FORMAT_BUFFERS", "4"), + ("(gint) GST_FORMAT_BYTES", "2"), + ("(gint) GST_FORMAT_DEFAULT", "1"), + ("(gint) GST_FORMAT_PERCENT", "5"), + ("GST_FORMAT_PERCENT_MAX", "1000000"), + ("GST_FORMAT_PERCENT_SCALE", "10000"), + ("(gint) GST_FORMAT_TIME", "3"), + ("(gint) GST_FORMAT_UNDEFINED", "0"), + ("GST_GROUP_ID_INVALID", "0"), + ("(gint) GST_ITERATOR_DONE", "0"), + ("(gint) GST_ITERATOR_ERROR", "3"), + ("(gint) GST_ITERATOR_ITEM_END", "2"), + ("(gint) GST_ITERATOR_ITEM_PASS", "1"), + ("(gint) GST_ITERATOR_ITEM_SKIP", "0"), + ("(gint) GST_ITERATOR_OK", "1"), + ("(gint) GST_ITERATOR_RESYNC", "2"), + ("(gint) GST_LEVEL_COUNT", "10"), + ("(gint) GST_LEVEL_DEBUG", "5"), + ("(gint) GST_LEVEL_ERROR", "1"), + ("(gint) GST_LEVEL_FIXME", "3"), + ("(gint) GST_LEVEL_INFO", "4"), + ("(gint) GST_LEVEL_LOG", "6"), + ("(gint) GST_LEVEL_MEMDUMP", "9"), + ("(gint) GST_LEVEL_NONE", "0"), + ("(gint) GST_LEVEL_TRACE", "7"), + ("(gint) GST_LEVEL_WARNING", "2"), + ("(gint) GST_LIBRARY_ERROR_ENCODE", "6"), + ("(gint) GST_LIBRARY_ERROR_FAILED", "1"), + ("(gint) GST_LIBRARY_ERROR_INIT", "3"), + ("(gint) GST_LIBRARY_ERROR_NUM_ERRORS", "7"), + ("(gint) GST_LIBRARY_ERROR_SETTINGS", "5"), + ("(gint) GST_LIBRARY_ERROR_SHUTDOWN", "4"), + ("(gint) GST_LIBRARY_ERROR_TOO_LAZY", "2"), + ("GST_LICENSE_UNKNOWN", "unknown"), + ("(guint) GST_LOCK_FLAG_EXCLUSIVE", "4"), + ("(guint) GST_LOCK_FLAG_LAST", "256"), + ("(guint) GST_LOCK_FLAG_READ", "1"), + ("GST_LOCK_FLAG_READWRITE", "3"), + ("(guint) GST_LOCK_FLAG_WRITE", "2"), + ("(guint) GST_MAP_FLAG_LAST", "65536"), + ("(guint) GST_MAP_READ", "1"), + ("GST_MAP_READWRITE", "3"), + ("(guint) GST_MAP_WRITE", "2"), + ("(guint) GST_MEMORY_FLAG_LAST", "1048576"), + ("(guint) GST_MEMORY_FLAG_NOT_MAPPABLE", "256"), + ("(guint) GST_MEMORY_FLAG_NO_SHARE", "16"), + ("(guint) GST_MEMORY_FLAG_PHYSICALLY_CONTIGUOUS", "128"), + ("(guint) GST_MEMORY_FLAG_READONLY", "2"), + ("(guint) GST_MEMORY_FLAG_ZERO_PADDED", "64"), + ("(guint) GST_MEMORY_FLAG_ZERO_PREFIXED", "32"), + ("(guint) GST_MESSAGE_ANY", "4294967295"), + ("(guint) GST_MESSAGE_APPLICATION", "16384"), + ("(guint) GST_MESSAGE_ASYNC_DONE", "2097152"), + ("(guint) GST_MESSAGE_ASYNC_START", "1048576"), + ("(guint) GST_MESSAGE_BUFFERING", "32"), + ("(guint) GST_MESSAGE_CLOCK_LOST", "1024"), + ("(guint) GST_MESSAGE_CLOCK_PROVIDE", "512"), + ("(guint) GST_MESSAGE_DEVICE_ADDED", "2147483649"), + ("(guint) GST_MESSAGE_DEVICE_CHANGED", "2147483655"), + ("(guint) GST_MESSAGE_DEVICE_REMOVED", "2147483650"), + ("(guint) GST_MESSAGE_DURATION_CHANGED", "262144"), + ("(guint) GST_MESSAGE_ELEMENT", "32768"), + ("(guint) GST_MESSAGE_EOS", "1"), + ("(guint) GST_MESSAGE_ERROR", "2"), + ("(guint) GST_MESSAGE_EXTENDED", "2147483648"), + ("(guint) GST_MESSAGE_HAVE_CONTEXT", "1073741824"), + ("(guint) GST_MESSAGE_INFO", "8"), + ("(guint) GST_MESSAGE_INSTANT_RATE_REQUEST", "2147483656"), + ("(guint) GST_MESSAGE_LATENCY", "524288"), + ("(guint) GST_MESSAGE_NEED_CONTEXT", "536870912"), + ("(guint) GST_MESSAGE_NEW_CLOCK", "2048"), + ("(guint) GST_MESSAGE_PROGRESS", "33554432"), + ("(guint) GST_MESSAGE_PROPERTY_NOTIFY", "2147483651"), + ("(guint) GST_MESSAGE_QOS", "16777216"), + ("(guint) GST_MESSAGE_REDIRECT", "2147483654"), + ("(guint) GST_MESSAGE_REQUEST_STATE", "4194304"), + ("(guint) GST_MESSAGE_RESET_TIME", "134217728"), + ("(guint) GST_MESSAGE_SEGMENT_DONE", "131072"), + ("(guint) GST_MESSAGE_SEGMENT_START", "65536"), + ("(guint) GST_MESSAGE_STATE_CHANGED", "64"), + ("(guint) GST_MESSAGE_STATE_DIRTY", "128"), + ("(guint) GST_MESSAGE_STEP_DONE", "256"), + ("(guint) GST_MESSAGE_STEP_START", "8388608"), + ("(guint) GST_MESSAGE_STREAMS_SELECTED", "2147483653"), + ("(guint) GST_MESSAGE_STREAM_COLLECTION", "2147483652"), + ("(guint) GST_MESSAGE_STREAM_START", "268435456"), + ("(guint) GST_MESSAGE_STREAM_STATUS", "8192"), + ("(guint) GST_MESSAGE_STRUCTURE_CHANGE", "4096"), + ("(guint) GST_MESSAGE_TAG", "16"), + ("(guint) GST_MESSAGE_TOC", "67108864"), + ("(guint) GST_MESSAGE_UNKNOWN", "0"), + ("(guint) GST_MESSAGE_WARNING", "4"), + ("(guint) GST_META_FLAG_LAST", "65536"), + ("(guint) GST_META_FLAG_LOCKED", "4"), + ("(guint) GST_META_FLAG_NONE", "0"), + ("(guint) GST_META_FLAG_POOLED", "2"), + ("(guint) GST_META_FLAG_READONLY", "1"), + ("GST_META_TAG_MEMORY_STR", "memory"), + ("(guint) GST_MINI_OBJECT_FLAG_LAST", "16"), + ("(guint) GST_MINI_OBJECT_FLAG_LOCKABLE", "1"), + ("(guint) GST_MINI_OBJECT_FLAG_LOCK_READONLY", "2"), + ("(guint) GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED", "4"), + ("GST_MSECOND", "1000000"), + ("GST_NSECOND", "1"), + ("(guint) GST_OBJECT_FLAG_LAST", "16"), + ("(guint) GST_OBJECT_FLAG_MAY_BE_LEAKED", "1"), + ("(gint) GST_PAD_ALWAYS", "0"), + ("(guint) GST_PAD_FLAG_ACCEPT_INTERSECT", "32768"), + ("(guint) GST_PAD_FLAG_ACCEPT_TEMPLATE", "65536"), + ("(guint) GST_PAD_FLAG_BLOCKED", "16"), + ("(guint) GST_PAD_FLAG_BLOCKING", "128"), + ("(guint) GST_PAD_FLAG_EOS", "64"), + ("(guint) GST_PAD_FLAG_FIXED_CAPS", "2048"), + ("(guint) GST_PAD_FLAG_FLUSHING", "32"), + ("(guint) GST_PAD_FLAG_LAST", "1048576"), + ("(guint) GST_PAD_FLAG_NEED_PARENT", "256"), + ("(guint) GST_PAD_FLAG_NEED_RECONFIGURE", "512"), + ("(guint) GST_PAD_FLAG_PENDING_EVENTS", "1024"), + ("(guint) GST_PAD_FLAG_PROXY_ALLOCATION", "8192"), + ("(guint) GST_PAD_FLAG_PROXY_CAPS", "4096"), + ("(guint) GST_PAD_FLAG_PROXY_SCHEDULING", "16384"), + ("(guint) GST_PAD_LINK_CHECK_CAPS", "4"), + ("(guint) GST_PAD_LINK_CHECK_DEFAULT", "5"), + ("(guint) GST_PAD_LINK_CHECK_HIERARCHY", "1"), + ("(guint) GST_PAD_LINK_CHECK_NOTHING", "0"), + ("(guint) GST_PAD_LINK_CHECK_NO_RECONFIGURE", "8"), + ("(guint) GST_PAD_LINK_CHECK_TEMPLATE_CAPS", "2"), + ("(gint) GST_PAD_LINK_NOFORMAT", "-4"), + ("(gint) GST_PAD_LINK_NOSCHED", "-5"), + ("(gint) GST_PAD_LINK_OK", "0"), + ("(gint) GST_PAD_LINK_REFUSED", "-6"), + ("(gint) GST_PAD_LINK_WAS_LINKED", "-2"), + ("(gint) GST_PAD_LINK_WRONG_DIRECTION", "-3"), + ("(gint) GST_PAD_LINK_WRONG_HIERARCHY", "-1"), + ("(gint) GST_PAD_MODE_NONE", "0"), + ("(gint) GST_PAD_MODE_PULL", "2"), + ("(gint) GST_PAD_MODE_PUSH", "1"), + ("(gint) GST_PAD_PROBE_DROP", "0"), + ("(gint) GST_PAD_PROBE_HANDLED", "4"), + ("(gint) GST_PAD_PROBE_OK", "1"), + ("(gint) GST_PAD_PROBE_PASS", "3"), + ("(gint) GST_PAD_PROBE_REMOVE", "2"), + ("(guint) GST_PAD_PROBE_TYPE_ALL_BOTH", "1776"), + ("(guint) GST_PAD_PROBE_TYPE_BLOCK", "2"), + ("(guint) GST_PAD_PROBE_TYPE_BLOCKING", "3"), + ("(guint) GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM", "114"), + ("(guint) GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM", "130"), + ("(guint) GST_PAD_PROBE_TYPE_BUFFER", "16"), + ("(guint) GST_PAD_PROBE_TYPE_BUFFER_LIST", "32"), + ("(guint) GST_PAD_PROBE_TYPE_DATA_BOTH", "240"), + ("(guint) GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM", "112"), + ("(guint) GST_PAD_PROBE_TYPE_DATA_UPSTREAM", "128"), + ("(guint) GST_PAD_PROBE_TYPE_EVENT_BOTH", "192"), + ("(guint) GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM", "64"), + ("(guint) GST_PAD_PROBE_TYPE_EVENT_FLUSH", "256"), + ("(guint) GST_PAD_PROBE_TYPE_EVENT_UPSTREAM", "128"), + ("(guint) GST_PAD_PROBE_TYPE_IDLE", "1"), + ("(guint) GST_PAD_PROBE_TYPE_INVALID", "0"), + ("(guint) GST_PAD_PROBE_TYPE_PULL", "8192"), + ("(guint) GST_PAD_PROBE_TYPE_PUSH", "4096"), + ("(guint) GST_PAD_PROBE_TYPE_QUERY_BOTH", "1536"), + ("(guint) GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM", "512"), + ("(guint) GST_PAD_PROBE_TYPE_QUERY_UPSTREAM", "1024"), + ("(guint) GST_PAD_PROBE_TYPE_SCHEDULING", "12288"), + ("(gint) GST_PAD_REQUEST", "2"), + ("(gint) GST_PAD_SINK", "2"), + ("(gint) GST_PAD_SOMETIMES", "1"), + ("(gint) GST_PAD_SRC", "1"), + ("(guint) GST_PAD_TEMPLATE_FLAG_LAST", "256"), + ("(gint) GST_PAD_UNKNOWN", "0"), + ("GST_PARAM_CONDITIONALLY_AVAILABLE", "16384"), + ("GST_PARAM_CONTROLLABLE", "512"), + ("GST_PARAM_DOC_SHOW_DEFAULT", "8192"), + ("GST_PARAM_MUTABLE_PAUSED", "2048"), + ("GST_PARAM_MUTABLE_PLAYING", "4096"), + ("GST_PARAM_MUTABLE_READY", "1024"), + ("GST_PARAM_USER_SHIFT", "65536"), + ("(gint) GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY", "4"), + ("(gint) GST_PARSE_ERROR_DELAYED_LINK", "7"), + ("(gint) GST_PARSE_ERROR_EMPTY", "6"), + ("(gint) GST_PARSE_ERROR_EMPTY_BIN", "5"), + ("(gint) GST_PARSE_ERROR_LINK", "3"), + ("(gint) GST_PARSE_ERROR_NO_SUCH_ELEMENT", "1"), + ("(gint) GST_PARSE_ERROR_NO_SUCH_PROPERTY", "2"), + ("(gint) GST_PARSE_ERROR_SYNTAX", "0"), + ("(guint) GST_PARSE_FLAG_FATAL_ERRORS", "1"), + ("(guint) GST_PARSE_FLAG_NONE", "0"), + ("(guint) GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS", "2"), + ("(guint) GST_PARSE_FLAG_PLACE_IN_BIN", "4"), + ("(guint) GST_PIPELINE_FLAG_FIXED_CLOCK", "524288"), + ("(guint) GST_PIPELINE_FLAG_LAST", "8388608"), + ("(guint) GST_PLUGIN_API_FLAG_IGNORE_ENUM_MEMBERS", "1"), + ( + "(guint) GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX", + "8", + ), + ( + "(guint) GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX", + "4", + ), + ("(guint) GST_PLUGIN_DEPENDENCY_FLAG_NONE", "0"), + ( + "(guint) GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY", + "2", + ), + ( + "(guint) GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE", + "16", + ), + ("(guint) GST_PLUGIN_DEPENDENCY_FLAG_RECURSE", "1"), + ("(gint) GST_PLUGIN_ERROR_DEPENDENCIES", "1"), + ("(gint) GST_PLUGIN_ERROR_MODULE", "0"), + ("(gint) GST_PLUGIN_ERROR_NAME_MISMATCH", "2"), + ("(guint) GST_PLUGIN_FLAG_BLACKLISTED", "32"), + ("(guint) GST_PLUGIN_FLAG_CACHED", "16"), + ("(gint) GST_PROGRESS_TYPE_CANCELED", "3"), + ("(gint) GST_PROGRESS_TYPE_COMPLETE", "2"), + ("(gint) GST_PROGRESS_TYPE_CONTINUE", "1"), + ("(gint) GST_PROGRESS_TYPE_ERROR", "4"), + ("(gint) GST_PROGRESS_TYPE_START", "0"), + ("(gint) GST_PROMISE_RESULT_EXPIRED", "3"), + ("(gint) GST_PROMISE_RESULT_INTERRUPTED", "1"), + ("(gint) GST_PROMISE_RESULT_PENDING", "0"), + ("(gint) GST_PROMISE_RESULT_REPLIED", "2"), + ("GST_PROTECTION_SYSTEM_ID_CAPS_FIELD", "protection-system"), + ( + "GST_PROTECTION_UNSPECIFIED_SYSTEM_ID", + "unspecified-system-id", + ), + ("(gint) GST_QOS_TYPE_OVERFLOW", "0"), + ("(gint) GST_QOS_TYPE_THROTTLE", "2"), + ("(gint) GST_QOS_TYPE_UNDERFLOW", "1"), + ("(gint) GST_QUERY_ACCEPT_CAPS", "40963"), + ("(gint) GST_QUERY_ALLOCATION", "35846"), + ("(gint) GST_QUERY_BITRATE", "51202"), + ("(gint) GST_QUERY_BUFFERING", "28163"), + ("(gint) GST_QUERY_CAPS", "43523"), + ("(gint) GST_QUERY_CONTEXT", "48643"), + ("(gint) GST_QUERY_CONVERT", "20483"), + ("(gint) GST_QUERY_CUSTOM", "30723"), + ("(gint) GST_QUERY_DRAIN", "46086"), + ("(gint) GST_QUERY_DURATION", "5123"), + ("(gint) GST_QUERY_FORMATS", "23043"), + ("(gint) GST_QUERY_JITTER", "10243"), + ("(gint) GST_QUERY_LATENCY", "7683"), + ("GST_QUERY_NUM_SHIFT", "8"), + ("(gint) GST_QUERY_POSITION", "2563"), + ("(gint) GST_QUERY_RATE", "12803"), + ("(gint) GST_QUERY_SCHEDULING", "38401"), + ("(gint) GST_QUERY_SEEKING", "15363"), + ("(gint) GST_QUERY_SEGMENT", "17923"), + ("GST_QUERY_TYPE_BOTH", "3"), + ("(guint) GST_QUERY_TYPE_DOWNSTREAM", "2"), + ("(guint) GST_QUERY_TYPE_SERIALIZED", "4"), + ("(guint) GST_QUERY_TYPE_UPSTREAM", "1"), + ("(gint) GST_QUERY_UNKNOWN", "0"), + ("(gint) GST_QUERY_URI", "33283"), + ("(gint) GST_RANK_MARGINAL", "64"), + ("(gint) GST_RANK_NONE", "0"), + ("(gint) GST_RANK_PRIMARY", "256"), + ("(gint) GST_RANK_SECONDARY", "128"), + ("(gint) GST_RESOURCE_ERROR_BUSY", "4"), + ("(gint) GST_RESOURCE_ERROR_CLOSE", "8"), + ("(gint) GST_RESOURCE_ERROR_FAILED", "1"), + ("(gint) GST_RESOURCE_ERROR_NOT_AUTHORIZED", "15"), + ("(gint) GST_RESOURCE_ERROR_NOT_FOUND", "3"), + ("(gint) GST_RESOURCE_ERROR_NO_SPACE_LEFT", "14"), + ("(gint) GST_RESOURCE_ERROR_NUM_ERRORS", "16"), + ("(gint) GST_RESOURCE_ERROR_OPEN_READ", "5"), + ("(gint) GST_RESOURCE_ERROR_OPEN_READ_WRITE", "7"), + ("(gint) GST_RESOURCE_ERROR_OPEN_WRITE", "6"), + ("(gint) GST_RESOURCE_ERROR_READ", "9"), + ("(gint) GST_RESOURCE_ERROR_SEEK", "11"), + ("(gint) GST_RESOURCE_ERROR_SETTINGS", "13"), + ("(gint) GST_RESOURCE_ERROR_SYNC", "12"), + ("(gint) GST_RESOURCE_ERROR_TOO_LAZY", "2"), + ("(gint) GST_RESOURCE_ERROR_WRITE", "10"), + ("(guint) GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED", "4"), + ("(guint) GST_SCHEDULING_FLAG_SEEKABLE", "1"), + ("(guint) GST_SCHEDULING_FLAG_SEQUENTIAL", "2"), + ("(gint) GST_SEARCH_MODE_AFTER", "2"), + ("(gint) GST_SEARCH_MODE_BEFORE", "1"), + ("(gint) GST_SEARCH_MODE_EXACT", "0"), + ("GST_SECOND", "1000000000"), + ("(guint) GST_SEEK_FLAG_ACCURATE", "2"), + ("(guint) GST_SEEK_FLAG_FLUSH", "1"), + ("(guint) GST_SEEK_FLAG_INSTANT_RATE_CHANGE", "1024"), + ("(guint) GST_SEEK_FLAG_KEY_UNIT", "4"), + ("(guint) GST_SEEK_FLAG_NONE", "0"), + ("(guint) GST_SEEK_FLAG_SEGMENT", "8"), + ("(guint) GST_SEEK_FLAG_SKIP", "16"), + ("(guint) GST_SEEK_FLAG_SNAP_AFTER", "64"), + ("(guint) GST_SEEK_FLAG_SNAP_BEFORE", "32"), + ("(guint) GST_SEEK_FLAG_SNAP_NEAREST", "96"), + ("(guint) GST_SEEK_FLAG_TRICKMODE", "16"), + ("(guint) GST_SEEK_FLAG_TRICKMODE_FORWARD_PREDICTED", "512"), + ("(guint) GST_SEEK_FLAG_TRICKMODE_KEY_UNITS", "128"), + ("(guint) GST_SEEK_FLAG_TRICKMODE_NO_AUDIO", "256"), + ("(gint) GST_SEEK_TYPE_END", "2"), + ("(gint) GST_SEEK_TYPE_NONE", "0"), + ("(gint) GST_SEEK_TYPE_SET", "1"), + ("(guint) GST_SEGMENT_FLAG_NONE", "0"), + ("(guint) GST_SEGMENT_FLAG_RESET", "1"), + ("(guint) GST_SEGMENT_FLAG_SEGMENT", "8"), + ("(guint) GST_SEGMENT_FLAG_SKIP", "16"), + ("(guint) GST_SEGMENT_FLAG_TRICKMODE", "16"), + ( + "(guint) GST_SEGMENT_FLAG_TRICKMODE_FORWARD_PREDICTED", + "512", + ), + ("(guint) GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS", "128"), + ("(guint) GST_SEGMENT_FLAG_TRICKMODE_NO_AUDIO", "256"), + ("GST_SEGMENT_INSTANT_FLAGS", "912"), + ("GST_SEQNUM_INVALID", "0"), + ("(guint) GST_STACK_TRACE_SHOW_FULL", "1"), + ("(guint) GST_STACK_TRACE_SHOW_NONE", "0"), + ("(gint) GST_STATE_CHANGE_ASYNC", "2"), + ("(gint) GST_STATE_CHANGE_FAILURE", "0"), + ("(gint) GST_STATE_CHANGE_NO_PREROLL", "3"), + ("(gint) GST_STATE_CHANGE_NULL_TO_NULL", "9"), + ("(gint) GST_STATE_CHANGE_NULL_TO_READY", "10"), + ("(gint) GST_STATE_CHANGE_PAUSED_TO_PAUSED", "27"), + ("(gint) GST_STATE_CHANGE_PAUSED_TO_PLAYING", "28"), + ("(gint) GST_STATE_CHANGE_PAUSED_TO_READY", "26"), + ("(gint) GST_STATE_CHANGE_PLAYING_TO_PAUSED", "35"), + ("(gint) GST_STATE_CHANGE_PLAYING_TO_PLAYING", "36"), + ("(gint) GST_STATE_CHANGE_READY_TO_NULL", "17"), + ("(gint) GST_STATE_CHANGE_READY_TO_PAUSED", "19"), + ("(gint) GST_STATE_CHANGE_READY_TO_READY", "18"), + ("(gint) GST_STATE_CHANGE_SUCCESS", "1"), + ("(gint) GST_STATE_NULL", "1"), + ("(gint) GST_STATE_PAUSED", "3"), + ("(gint) GST_STATE_PLAYING", "4"), + ("(gint) GST_STATE_READY", "2"), + ("(gint) GST_STATE_VOID_PENDING", "0"), + ("(gint) GST_STREAM_ERROR_CODEC_NOT_FOUND", "6"), + ("(gint) GST_STREAM_ERROR_DECODE", "7"), + ("(gint) GST_STREAM_ERROR_DECRYPT", "12"), + ("(gint) GST_STREAM_ERROR_DECRYPT_NOKEY", "13"), + ("(gint) GST_STREAM_ERROR_DEMUX", "9"), + ("(gint) GST_STREAM_ERROR_ENCODE", "8"), + ("(gint) GST_STREAM_ERROR_FAILED", "1"), + ("(gint) GST_STREAM_ERROR_FORMAT", "11"), + ("(gint) GST_STREAM_ERROR_MUX", "10"), + ("(gint) GST_STREAM_ERROR_NOT_IMPLEMENTED", "3"), + ("(gint) GST_STREAM_ERROR_NUM_ERRORS", "14"), + ("(gint) GST_STREAM_ERROR_TOO_LAZY", "2"), + ("(gint) GST_STREAM_ERROR_TYPE_NOT_FOUND", "4"), + ("(gint) GST_STREAM_ERROR_WRONG_TYPE", "5"), + ("(guint) GST_STREAM_FLAG_NONE", "0"), + ("(guint) GST_STREAM_FLAG_SELECT", "2"), + ("(guint) GST_STREAM_FLAG_SPARSE", "1"), + ("(guint) GST_STREAM_FLAG_UNSELECT", "4"), + ("(gint) GST_STREAM_STATUS_TYPE_CREATE", "0"), + ("(gint) GST_STREAM_STATUS_TYPE_DESTROY", "3"), + ("(gint) GST_STREAM_STATUS_TYPE_ENTER", "1"), + ("(gint) GST_STREAM_STATUS_TYPE_LEAVE", "2"), + ("(gint) GST_STREAM_STATUS_TYPE_PAUSE", "9"), + ("(gint) GST_STREAM_STATUS_TYPE_START", "8"), + ("(gint) GST_STREAM_STATUS_TYPE_STOP", "10"), + ("(guint) GST_STREAM_TYPE_AUDIO", "2"), + ("(guint) GST_STREAM_TYPE_CONTAINER", "8"), + ("(guint) GST_STREAM_TYPE_TEXT", "16"), + ("(guint) GST_STREAM_TYPE_UNKNOWN", "1"), + ("(guint) GST_STREAM_TYPE_VIDEO", "4"), + ("(gint) GST_STRUCTURE_CHANGE_TYPE_PAD_LINK", "0"), + ("(gint) GST_STRUCTURE_CHANGE_TYPE_PAD_UNLINK", "1"), + ("GST_TAG_ALBUM", "album"), + ("GST_TAG_ALBUM_ARTIST", "album-artist"), + ("GST_TAG_ALBUM_ARTIST_SORTNAME", "album-artist-sortname"), + ("GST_TAG_ALBUM_GAIN", "replaygain-album-gain"), + ("GST_TAG_ALBUM_PEAK", "replaygain-album-peak"), + ("GST_TAG_ALBUM_SORTNAME", "album-sortname"), + ("GST_TAG_ALBUM_VOLUME_COUNT", "album-disc-count"), + ("GST_TAG_ALBUM_VOLUME_NUMBER", "album-disc-number"), + ("GST_TAG_APPLICATION_DATA", "application-data"), + ("GST_TAG_APPLICATION_NAME", "application-name"), + ("GST_TAG_ARTIST", "artist"), + ("GST_TAG_ARTIST_SORTNAME", "artist-sortname"), + ("GST_TAG_ATTACHMENT", "attachment"), + ("GST_TAG_AUDIO_CODEC", "audio-codec"), + ("GST_TAG_BEATS_PER_MINUTE", "beats-per-minute"), + ("GST_TAG_BITRATE", "bitrate"), + ("GST_TAG_CODEC", "codec"), + ("GST_TAG_COMMENT", "comment"), + ("GST_TAG_COMPOSER", "composer"), + ("GST_TAG_COMPOSER_SORTNAME", "composer-sortname"), + ("GST_TAG_CONDUCTOR", "conductor"), + ("GST_TAG_CONTACT", "contact"), + ("GST_TAG_CONTAINER_FORMAT", "container-format"), + ("GST_TAG_COPYRIGHT", "copyright"), + ("GST_TAG_COPYRIGHT_URI", "copyright-uri"), + ("GST_TAG_DATE", "date"), + ("GST_TAG_DATE_TIME", "datetime"), + ("GST_TAG_DESCRIPTION", "description"), + ("GST_TAG_DEVICE_MANUFACTURER", "device-manufacturer"), + ("GST_TAG_DEVICE_MODEL", "device-model"), + ("GST_TAG_DURATION", "duration"), + ("GST_TAG_ENCODED_BY", "encoded-by"), + ("GST_TAG_ENCODER", "encoder"), + ("GST_TAG_ENCODER_VERSION", "encoder-version"), + ("GST_TAG_EXTENDED_COMMENT", "extended-comment"), + ("(gint) GST_TAG_FLAG_COUNT", "4"), + ("(gint) GST_TAG_FLAG_DECODED", "3"), + ("(gint) GST_TAG_FLAG_ENCODED", "2"), + ("(gint) GST_TAG_FLAG_META", "1"), + ("(gint) GST_TAG_FLAG_UNDEFINED", "0"), + ("GST_TAG_GENRE", "genre"), + ( + "GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION", + "geo-location-capture-direction", + ), + ("GST_TAG_GEO_LOCATION_CITY", "geo-location-city"), + ("GST_TAG_GEO_LOCATION_COUNTRY", "geo-location-country"), + ("GST_TAG_GEO_LOCATION_ELEVATION", "geo-location-elevation"), + ( + "GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR", + "geo-location-horizontal-error", + ), + ("GST_TAG_GEO_LOCATION_LATITUDE", "geo-location-latitude"), + ("GST_TAG_GEO_LOCATION_LONGITUDE", "geo-location-longitude"), + ( + "GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION", + "geo-location-movement-direction", + ), + ( + "GST_TAG_GEO_LOCATION_MOVEMENT_SPEED", + "geo-location-movement-speed", + ), + ("GST_TAG_GEO_LOCATION_NAME", "geo-location-name"), + ( + "GST_TAG_GEO_LOCATION_SUBLOCATION", + "geo-location-sublocation", + ), + ("GST_TAG_GROUPING", "grouping"), + ("GST_TAG_HOMEPAGE", "homepage"), + ("GST_TAG_IMAGE", "image"), + ("GST_TAG_IMAGE_ORIENTATION", "image-orientation"), + ("GST_TAG_INTERPRETED_BY", "interpreted-by"), + ("GST_TAG_ISRC", "isrc"), + ("GST_TAG_KEYWORDS", "keywords"), + ("GST_TAG_LANGUAGE_CODE", "language-code"), + ("GST_TAG_LANGUAGE_NAME", "language-name"), + ("GST_TAG_LICENSE", "license"), + ("GST_TAG_LICENSE_URI", "license-uri"), + ("GST_TAG_LOCATION", "location"), + ("GST_TAG_LYRICS", "lyrics"), + ("GST_TAG_MAXIMUM_BITRATE", "maximum-bitrate"), + ("(gint) GST_TAG_MERGE_APPEND", "3"), + ("(gint) GST_TAG_MERGE_COUNT", "7"), + ("(gint) GST_TAG_MERGE_KEEP", "5"), + ("(gint) GST_TAG_MERGE_KEEP_ALL", "6"), + ("(gint) GST_TAG_MERGE_PREPEND", "4"), + ("(gint) GST_TAG_MERGE_REPLACE", "2"), + ("(gint) GST_TAG_MERGE_REPLACE_ALL", "1"), + ("(gint) GST_TAG_MERGE_UNDEFINED", "0"), + ("GST_TAG_MIDI_BASE_NOTE", "midi-base-note"), + ("GST_TAG_MINIMUM_BITRATE", "minimum-bitrate"), + ("GST_TAG_NOMINAL_BITRATE", "nominal-bitrate"), + ("GST_TAG_ORGANIZATION", "organization"), + ("GST_TAG_PERFORMER", "performer"), + ("GST_TAG_PREVIEW_IMAGE", "preview-image"), + ("GST_TAG_PRIVATE_DATA", "private-data"), + ("GST_TAG_PUBLISHER", "publisher"), + ("GST_TAG_REFERENCE_LEVEL", "replaygain-reference-level"), + ("(gint) GST_TAG_SCOPE_GLOBAL", "1"), + ("(gint) GST_TAG_SCOPE_STREAM", "0"), + ("GST_TAG_SERIAL", "serial"), + ("GST_TAG_SHOW_EPISODE_NUMBER", "show-episode-number"), + ("GST_TAG_SHOW_NAME", "show-name"), + ("GST_TAG_SHOW_SEASON_NUMBER", "show-season-number"), + ("GST_TAG_SHOW_SORTNAME", "show-sortname"), + ("GST_TAG_SUBTITLE_CODEC", "subtitle-codec"), + ("GST_TAG_TITLE", "title"), + ("GST_TAG_TITLE_SORTNAME", "title-sortname"), + ("GST_TAG_TRACK_COUNT", "track-count"), + ("GST_TAG_TRACK_GAIN", "replaygain-track-gain"), + ("GST_TAG_TRACK_NUMBER", "track-number"), + ("GST_TAG_TRACK_PEAK", "replaygain-track-peak"), + ("GST_TAG_USER_RATING", "user-rating"), + ("GST_TAG_VERSION", "version"), + ("GST_TAG_VIDEO_CODEC", "video-codec"), + ("(gint) GST_TASK_PAUSED", "2"), + ("(gint) GST_TASK_STARTED", "0"), + ("(gint) GST_TASK_STOPPED", "1"), + ("(gint) GST_TOC_ENTRY_TYPE_ANGLE", "-3"), + ("(gint) GST_TOC_ENTRY_TYPE_CHAPTER", "3"), + ("(gint) GST_TOC_ENTRY_TYPE_EDITION", "-1"), + ("(gint) GST_TOC_ENTRY_TYPE_INVALID", "0"), + ("(gint) GST_TOC_ENTRY_TYPE_TITLE", "1"), + ("(gint) GST_TOC_ENTRY_TYPE_TRACK", "2"), + ("(gint) GST_TOC_ENTRY_TYPE_VERSION", "-2"), + ("(gint) GST_TOC_LOOP_FORWARD", "1"), + ("(gint) GST_TOC_LOOP_NONE", "0"), + ("(gint) GST_TOC_LOOP_PING_PONG", "3"), + ("(gint) GST_TOC_LOOP_REVERSE", "2"), + ("GST_TOC_REPEAT_COUNT_INFINITE", "-1"), + ("(gint) GST_TOC_SCOPE_CURRENT", "2"), + ("(gint) GST_TOC_SCOPE_GLOBAL", "1"), + ("(guint) GST_TRACER_VALUE_FLAGS_AGGREGATED", "2"), + ("(guint) GST_TRACER_VALUE_FLAGS_NONE", "0"), + ("(guint) GST_TRACER_VALUE_FLAGS_OPTIONAL", "1"), + ("(gint) GST_TRACER_VALUE_SCOPE_ELEMENT", "2"), + ("(gint) GST_TRACER_VALUE_SCOPE_PAD", "3"), + ("(gint) GST_TRACER_VALUE_SCOPE_PROCESS", "0"), + ("(gint) GST_TRACER_VALUE_SCOPE_THREAD", "1"), + ("(gint) GST_TYPE_FIND_LIKELY", "80"), + ("(gint) GST_TYPE_FIND_MAXIMUM", "100"), + ("(gint) GST_TYPE_FIND_MINIMUM", "1"), + ("(gint) GST_TYPE_FIND_NEARLY_CERTAIN", "99"), + ("(gint) GST_TYPE_FIND_NONE", "0"), + ("(gint) GST_TYPE_FIND_POSSIBLE", "50"), + ("(gint) GST_URI_ERROR_BAD_REFERENCE", "3"), + ("(gint) GST_URI_ERROR_BAD_STATE", "2"), + ("(gint) GST_URI_ERROR_BAD_URI", "1"), + ("(gint) GST_URI_ERROR_UNSUPPORTED_PROTOCOL", "0"), + ("GST_URI_NO_PORT", "0"), + ("(gint) GST_URI_SINK", "1"), + ("(gint) GST_URI_SRC", "2"), + ("(gint) GST_URI_UNKNOWN", "0"), + ("GST_USECOND", "1000"), + ("GST_VALUE_EQUAL", "0"), + ("GST_VALUE_GREATER_THAN", "1"), + ("GST_VALUE_LESS_THAN", "-1"), + ("GST_VALUE_UNORDERED", "2"), +]; diff --git a/sys/gstreamer-sys/tests/constant.c b/sys/gstreamer-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-sys/tests/layout.c b/sys/gstreamer-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-sys/tests/manual.h b/sys/gstreamer-sys/tests/manual.h new file mode 100644 index 000000000..ed4ee6d1c --- /dev/null +++ b/sys/gstreamer-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-tag-sys/CHANGELOG.md b/sys/gstreamer-tag-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-tag-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-tag-sys/Cargo.toml b/sys/gstreamer-tag-sys/Cargo.toml new file mode 100644 index 000000000..bd9339f53 --- /dev/null +++ b/sys/gstreamer-tag-sys/Cargo.toml @@ -0,0 +1,62 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-base-sys] +path = "../gstreamer-base-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_2 = [] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] + +[lib] +name = "gstreamer_tag_sys" + +[package] +authors = ["Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgsttag-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_tag_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gsttag-1.0" +name = "gstreamer-tag-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_tag_1_0] +name = "gstreamer-tag-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_tag_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-tag-sys/LICENSE b/sys/gstreamer-tag-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-tag-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-tag-sys/README.md b/sys/gstreamer-tag-sys/README.md new file mode 100644 index 000000000..ffaef7553 --- /dev/null +++ b/sys/gstreamer-tag-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-tag-sys.svg)](https://crates.io/crates/gstreamer-tag-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Tag library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-tag-sys/build.rs b/sys/gstreamer-tag-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-tag-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-tag-sys/src/lib.rs b/sys/gstreamer-tag-sys/src/lib.rs new file mode 100644 index 000000000..33181294f --- /dev/null +++ b/sys/gstreamer-tag-sys/src/lib.rs @@ -0,0 +1,430 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstTagDemuxResult = c_int; +pub const GST_TAG_DEMUX_RESULT_BROKEN_TAG: GstTagDemuxResult = 0; +pub const GST_TAG_DEMUX_RESULT_AGAIN: GstTagDemuxResult = 1; +pub const GST_TAG_DEMUX_RESULT_OK: GstTagDemuxResult = 2; + +pub type GstTagImageType = c_int; +pub const GST_TAG_IMAGE_TYPE_NONE: GstTagImageType = -1; +pub const GST_TAG_IMAGE_TYPE_UNDEFINED: GstTagImageType = 0; +pub const GST_TAG_IMAGE_TYPE_FRONT_COVER: GstTagImageType = 1; +pub const GST_TAG_IMAGE_TYPE_BACK_COVER: GstTagImageType = 2; +pub const GST_TAG_IMAGE_TYPE_LEAFLET_PAGE: GstTagImageType = 3; +pub const GST_TAG_IMAGE_TYPE_MEDIUM: GstTagImageType = 4; +pub const GST_TAG_IMAGE_TYPE_LEAD_ARTIST: GstTagImageType = 5; +pub const GST_TAG_IMAGE_TYPE_ARTIST: GstTagImageType = 6; +pub const GST_TAG_IMAGE_TYPE_CONDUCTOR: GstTagImageType = 7; +pub const GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA: GstTagImageType = 8; +pub const GST_TAG_IMAGE_TYPE_COMPOSER: GstTagImageType = 9; +pub const GST_TAG_IMAGE_TYPE_LYRICIST: GstTagImageType = 10; +pub const GST_TAG_IMAGE_TYPE_RECORDING_LOCATION: GstTagImageType = 11; +pub const GST_TAG_IMAGE_TYPE_DURING_RECORDING: GstTagImageType = 12; +pub const GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE: GstTagImageType = 13; +pub const GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE: GstTagImageType = 14; +pub const GST_TAG_IMAGE_TYPE_FISH: GstTagImageType = 15; +pub const GST_TAG_IMAGE_TYPE_ILLUSTRATION: GstTagImageType = 16; +pub const GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO: GstTagImageType = 17; +pub const GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO: GstTagImageType = 18; + +// Constants +pub const GST_TAG_ACOUSTID_FINGERPRINT: *const c_char = + b"chromaprint-fingerprint\0" as *const u8 as *const c_char; +pub const GST_TAG_ACOUSTID_ID: *const c_char = b"acoustid-id\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_CONTRAST: *const c_char = + b"capturing-contrast\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO: *const c_char = + b"capturing-digital-zoom-ratio\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_EXPOSURE_COMPENSATION: *const c_char = + b"capturing-exposure-compensation\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_EXPOSURE_MODE: *const c_char = + b"capturing-exposure-mode\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_EXPOSURE_PROGRAM: *const c_char = + b"capturing-exposure-program\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_FLASH_FIRED: *const c_char = + b"capturing-flash-fired\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_FLASH_MODE: *const c_char = + b"capturing-flash-mode\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_FOCAL_LENGTH: *const c_char = + b"capturing-focal-length\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM: *const c_char = + b"capturing-focal-length-35mm\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_FOCAL_RATIO: *const c_char = + b"capturing-focal-ratio\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_GAIN_ADJUSTMENT: *const c_char = + b"capturing-gain-adjustment\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_ISO_SPEED: *const c_char = + b"capturing-iso-speed\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_METERING_MODE: *const c_char = + b"capturing-metering-mode\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_SATURATION: *const c_char = + b"capturing-saturation\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE: *const c_char = + b"capturing-scene-capture-type\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_SHARPNESS: *const c_char = + b"capturing-sharpness\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_SHUTTER_SPEED: *const c_char = + b"capturing-shutter-speed\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_SOURCE: *const c_char = + b"capturing-source\0" as *const u8 as *const c_char; +pub const GST_TAG_CAPTURING_WHITE_BALANCE: *const c_char = + b"capturing-white-balance\0" as *const u8 as *const c_char; +pub const GST_TAG_CDDA_CDDB_DISCID: *const c_char = b"discid\0" as *const u8 as *const c_char; +pub const GST_TAG_CDDA_CDDB_DISCID_FULL: *const c_char = + b"discid-full\0" as *const u8 as *const c_char; +pub const GST_TAG_CDDA_MUSICBRAINZ_DISCID: *const c_char = + b"musicbrainz-discid\0" as *const u8 as *const c_char; +pub const GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL: *const c_char = + b"musicbrainz-discid-full\0" as *const u8 as *const c_char; +pub const GST_TAG_CMML_CLIP: *const c_char = b"cmml-clip\0" as *const u8 as *const c_char; +pub const GST_TAG_CMML_HEAD: *const c_char = b"cmml-head\0" as *const u8 as *const c_char; +pub const GST_TAG_CMML_STREAM: *const c_char = b"cmml-stream\0" as *const u8 as *const c_char; +pub const GST_TAG_ID3V2_HEADER_SIZE: c_int = 10; +pub const GST_TAG_IMAGE_HORIZONTAL_PPI: *const c_char = + b"image-horizontal-ppi\0" as *const u8 as *const c_char; +pub const GST_TAG_IMAGE_VERTICAL_PPI: *const c_char = + b"image-vertical-ppi\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICAL_KEY: *const c_char = b"musical-key\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_ALBUMARTISTID: *const c_char = + b"musicbrainz-albumartistid\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_ALBUMID: *const c_char = + b"musicbrainz-albumid\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_ARTISTID: *const c_char = + b"musicbrainz-artistid\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_RELEASEGROUPID: *const c_char = + b"musicbrainz-releasegroupid\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_RELEASETRACKID: *const c_char = + b"musicbrainz-releasetrackid\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_TRACKID: *const c_char = + b"musicbrainz-trackid\0" as *const u8 as *const c_char; +pub const GST_TAG_MUSICBRAINZ_TRMID: *const c_char = + b"musicbrainz-trmid\0" as *const u8 as *const c_char; + +// Flags +pub type GstTagLicenseFlags = c_uint; +pub const GST_TAG_LICENSE_PERMITS_REPRODUCTION: GstTagLicenseFlags = 1; +pub const GST_TAG_LICENSE_PERMITS_DISTRIBUTION: GstTagLicenseFlags = 2; +pub const GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS: GstTagLicenseFlags = 4; +pub const GST_TAG_LICENSE_PERMITS_SHARING: GstTagLicenseFlags = 8; +pub const GST_TAG_LICENSE_REQUIRES_NOTICE: GstTagLicenseFlags = 256; +pub const GST_TAG_LICENSE_REQUIRES_ATTRIBUTION: GstTagLicenseFlags = 512; +pub const GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE: GstTagLicenseFlags = 1024; +pub const GST_TAG_LICENSE_REQUIRES_SOURCE_CODE: GstTagLicenseFlags = 2048; +pub const GST_TAG_LICENSE_REQUIRES_COPYLEFT: GstTagLicenseFlags = 4096; +pub const GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT: GstTagLicenseFlags = 8192; +pub const GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE: GstTagLicenseFlags = 65536; +pub const GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE: GstTagLicenseFlags = 131072; +pub const GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE: GstTagLicenseFlags = 16777216; +pub const GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE: GstTagLicenseFlags = 33554432; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTagDemuxClass { + pub parent_class: gst::GstElementClass, + pub min_start_size: c_uint, + pub min_end_size: c_uint, + pub identify_tag: Option< + unsafe extern "C" fn( + *mut GstTagDemux, + *mut gst::GstBuffer, + gboolean, + *mut c_uint, + ) -> gboolean, + >, + pub parse_tag: Option< + unsafe extern "C" fn( + *mut GstTagDemux, + *mut gst::GstBuffer, + gboolean, + *mut c_uint, + *mut *mut gst::GstTagList, + ) -> GstTagDemuxResult, + >, + pub merge_tags: Option< + unsafe extern "C" fn( + *mut GstTagDemux, + *const gst::GstTagList, + *const gst::GstTagList, + ) -> *mut gst::GstTagList, + >, + pub reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTagDemuxClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTagDemuxClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("min_start_size", &self.min_start_size) + .field("min_end_size", &self.min_end_size) + .field("identify_tag", &self.identify_tag) + .field("parse_tag", &self.parse_tag) + .field("merge_tags", &self.merge_tags) + .finish() + } +} + +#[repr(C)] +pub struct _GstTagDemuxPrivate(c_void); + +pub type GstTagDemuxPrivate = *mut _GstTagDemuxPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTagMuxClass { + pub parent_class: gst::GstElementClass, + pub render_start_tag: + Option *mut gst::GstBuffer>, + pub render_end_tag: + Option *mut gst::GstBuffer>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTagMuxClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTagMuxClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("render_start_tag", &self.render_start_tag) + .field("render_end_tag", &self.render_end_tag) + .finish() + } +} + +#[repr(C)] +pub struct _GstTagMuxPrivate(c_void); + +pub type GstTagMuxPrivate = *mut _GstTagMuxPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTagXmpWriterInterface { + pub parent: gobject::GTypeInterface, +} + +impl ::std::fmt::Debug for GstTagXmpWriterInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstTagXmpWriterInterface @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .finish() + } +} + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTagDemux { + pub element: gst::GstElement, + pub priv_: *mut GstTagDemuxPrivate, + pub reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTagDemux { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTagDemux @ {:?}", self as *const _)) + .field("element", &self.element) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstTagMux { + pub element: gst::GstElement, + pub priv_: *mut GstTagMuxPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstTagMux { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstTagMux @ {:?}", self as *const _)) + .field("element", &self.element) + .finish() + } +} + +// Interfaces +#[repr(C)] +pub struct GstTagXmpWriter(c_void); + +impl ::std::fmt::Debug for GstTagXmpWriter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstTagXmpWriter @ {:?}", self as *const _) + } +} + +#[link(name = "gsttag-1.0")] +extern "C" { + + //========================================================================= + // GstTagDemuxResult + //========================================================================= + pub fn gst_tag_demux_result_get_type() -> GType; + + //========================================================================= + // GstTagImageType + //========================================================================= + pub fn gst_tag_image_type_get_type() -> GType; + + //========================================================================= + // GstTagLicenseFlags + //========================================================================= + pub fn gst_tag_license_flags_get_type() -> GType; + + //========================================================================= + // GstTagDemux + //========================================================================= + pub fn gst_tag_demux_get_type() -> GType; + + //========================================================================= + // GstTagMux + //========================================================================= + pub fn gst_tag_mux_get_type() -> GType; + + //========================================================================= + // GstTagXmpWriter + //========================================================================= + pub fn gst_tag_xmp_writer_get_type() -> GType; + pub fn gst_tag_xmp_writer_add_all_schemas(config: *mut GstTagXmpWriter); + pub fn gst_tag_xmp_writer_add_schema(config: *mut GstTagXmpWriter, schema: *const c_char); + pub fn gst_tag_xmp_writer_has_schema( + config: *mut GstTagXmpWriter, + schema: *const c_char, + ) -> gboolean; + pub fn gst_tag_xmp_writer_remove_all_schemas(config: *mut GstTagXmpWriter); + pub fn gst_tag_xmp_writer_remove_schema(config: *mut GstTagXmpWriter, schema: *const c_char); + pub fn gst_tag_xmp_writer_tag_list_to_xmp_buffer( + config: *mut GstTagXmpWriter, + taglist: *const gst::GstTagList, + read_only: gboolean, + ) -> *mut gst::GstBuffer; + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_tag_check_language_code(lang_code: *const c_char) -> gboolean; + pub fn gst_tag_freeform_string_to_utf8( + data: *const c_char, + size: c_int, + env_vars: *mut *const c_char, + ) -> *mut c_char; + pub fn gst_tag_from_id3_tag(id3_tag: *const c_char) -> *const c_char; + pub fn gst_tag_from_id3_user_tag( + type_: *const c_char, + id3_user_tag: *const c_char, + ) -> *const c_char; + pub fn gst_tag_from_vorbis_tag(vorbis_tag: *const c_char) -> *const c_char; + pub fn gst_tag_get_id3v2_tag_size(buffer: *mut gst::GstBuffer) -> c_uint; + pub fn gst_tag_get_language_code_iso_639_1(lang_code: *const c_char) -> *const c_char; + pub fn gst_tag_get_language_code_iso_639_2B(lang_code: *const c_char) -> *const c_char; + pub fn gst_tag_get_language_code_iso_639_2T(lang_code: *const c_char) -> *const c_char; + pub fn gst_tag_get_language_codes() -> *mut *mut c_char; + pub fn gst_tag_get_language_name(language_code: *const c_char) -> *const c_char; + pub fn gst_tag_get_license_description(license_ref: *const c_char) -> *const c_char; + pub fn gst_tag_get_license_flags(license_ref: *const c_char) -> GstTagLicenseFlags; + pub fn gst_tag_get_license_jurisdiction(license_ref: *const c_char) -> *const c_char; + pub fn gst_tag_get_license_nick(license_ref: *const c_char) -> *const c_char; + pub fn gst_tag_get_license_title(license_ref: *const c_char) -> *const c_char; + pub fn gst_tag_get_license_version(license_ref: *const c_char) -> *const c_char; + pub fn gst_tag_get_licenses() -> *mut *mut c_char; + pub fn gst_tag_id3_genre_count() -> c_uint; + pub fn gst_tag_id3_genre_get(id: c_uint) -> *const c_char; + pub fn gst_tag_image_data_to_image_sample( + image_data: *const u8, + image_data_len: c_uint, + image_type: GstTagImageType, + ) -> *mut gst::GstSample; + pub fn gst_tag_list_add_id3_image( + tag_list: *mut gst::GstTagList, + image_data: *const u8, + image_data_len: c_uint, + id3_picture_type: c_uint, + ) -> gboolean; + pub fn gst_tag_list_from_exif_buffer( + buffer: *mut gst::GstBuffer, + byte_order: c_int, + base_offset: u32, + ) -> *mut gst::GstTagList; + pub fn gst_tag_list_from_exif_buffer_with_tiff_header( + buffer: *mut gst::GstBuffer, + ) -> *mut gst::GstTagList; + pub fn gst_tag_list_from_id3v2_tag(buffer: *mut gst::GstBuffer) -> *mut gst::GstTagList; + pub fn gst_tag_list_from_vorbiscomment( + data: *const u8, + size: size_t, + id_data: *const u8, + id_data_length: c_uint, + vendor_string: *mut *mut c_char, + ) -> *mut gst::GstTagList; + pub fn gst_tag_list_from_vorbiscomment_buffer( + buffer: *mut gst::GstBuffer, + id_data: *const u8, + id_data_length: c_uint, + vendor_string: *mut *mut c_char, + ) -> *mut gst::GstTagList; + pub fn gst_tag_list_from_xmp_buffer(buffer: *mut gst::GstBuffer) -> *mut gst::GstTagList; + pub fn gst_tag_list_new_from_id3v1(data: *const [u8; 128]) -> *mut gst::GstTagList; + pub fn gst_tag_list_to_exif_buffer( + taglist: *const gst::GstTagList, + byte_order: c_int, + base_offset: u32, + ) -> *mut gst::GstBuffer; + pub fn gst_tag_list_to_exif_buffer_with_tiff_header( + taglist: *const gst::GstTagList, + ) -> *mut gst::GstBuffer; + pub fn gst_tag_list_to_vorbiscomment_buffer( + list: *const gst::GstTagList, + id_data: *const u8, + id_data_length: c_uint, + vendor_string: *const c_char, + ) -> *mut gst::GstBuffer; + pub fn gst_tag_list_to_xmp_buffer( + list: *const gst::GstTagList, + read_only: gboolean, + schemas: *mut *const c_char, + ) -> *mut gst::GstBuffer; + pub fn gst_tag_parse_extended_comment( + ext_comment: *const c_char, + key: *mut *mut c_char, + lang: *mut *mut c_char, + value: *mut *mut c_char, + fail_if_no_key: gboolean, + ) -> gboolean; + pub fn gst_tag_register_musicbrainz_tags(); + pub fn gst_tag_to_id3_tag(gst_tag: *const c_char) -> *const c_char; + pub fn gst_tag_to_vorbis_comments( + list: *const gst::GstTagList, + tag: *const c_char, + ) -> *mut glib::GList; + pub fn gst_tag_to_vorbis_tag(gst_tag: *const c_char) -> *const c_char; + pub fn gst_tag_xmp_list_schemas() -> *mut *const c_char; + pub fn gst_vorbis_tag_add(list: *mut gst::GstTagList, tag: *const c_char, value: *const c_char); + +} diff --git a/sys/gstreamer-tag-sys/tests/abi.rs b/sys/gstreamer-tag-sys/tests/abi.rs new file mode 100644 index 000000000..4e23a0f0e --- /dev/null +++ b/sys/gstreamer-tag-sys/tests/abi.rs @@ -0,0 +1,429 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_tag_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_tag_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-tag-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstTagDemux", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagDemuxClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagDemuxResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagImageType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagLicenseFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagMux", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagMuxClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstTagXmpWriterInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("GST_TAG_ACOUSTID_FINGERPRINT", "chromaprint-fingerprint"), + ("GST_TAG_ACOUSTID_ID", "acoustid-id"), + ("GST_TAG_CAPTURING_CONTRAST", "capturing-contrast"), + ( + "GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO", + "capturing-digital-zoom-ratio", + ), + ( + "GST_TAG_CAPTURING_EXPOSURE_COMPENSATION", + "capturing-exposure-compensation", + ), + ("GST_TAG_CAPTURING_EXPOSURE_MODE", "capturing-exposure-mode"), + ( + "GST_TAG_CAPTURING_EXPOSURE_PROGRAM", + "capturing-exposure-program", + ), + ("GST_TAG_CAPTURING_FLASH_FIRED", "capturing-flash-fired"), + ("GST_TAG_CAPTURING_FLASH_MODE", "capturing-flash-mode"), + ("GST_TAG_CAPTURING_FOCAL_LENGTH", "capturing-focal-length"), + ( + "GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM", + "capturing-focal-length-35mm", + ), + ("GST_TAG_CAPTURING_FOCAL_RATIO", "capturing-focal-ratio"), + ( + "GST_TAG_CAPTURING_GAIN_ADJUSTMENT", + "capturing-gain-adjustment", + ), + ("GST_TAG_CAPTURING_ISO_SPEED", "capturing-iso-speed"), + ("GST_TAG_CAPTURING_METERING_MODE", "capturing-metering-mode"), + ("GST_TAG_CAPTURING_SATURATION", "capturing-saturation"), + ( + "GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE", + "capturing-scene-capture-type", + ), + ("GST_TAG_CAPTURING_SHARPNESS", "capturing-sharpness"), + ("GST_TAG_CAPTURING_SHUTTER_SPEED", "capturing-shutter-speed"), + ("GST_TAG_CAPTURING_SOURCE", "capturing-source"), + ("GST_TAG_CAPTURING_WHITE_BALANCE", "capturing-white-balance"), + ("GST_TAG_CDDA_CDDB_DISCID", "discid"), + ("GST_TAG_CDDA_CDDB_DISCID_FULL", "discid-full"), + ("GST_TAG_CDDA_MUSICBRAINZ_DISCID", "musicbrainz-discid"), + ( + "GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL", + "musicbrainz-discid-full", + ), + ("GST_TAG_CMML_CLIP", "cmml-clip"), + ("GST_TAG_CMML_HEAD", "cmml-head"), + ("GST_TAG_CMML_STREAM", "cmml-stream"), + ("(gint) GST_TAG_DEMUX_RESULT_AGAIN", "1"), + ("(gint) GST_TAG_DEMUX_RESULT_BROKEN_TAG", "0"), + ("(gint) GST_TAG_DEMUX_RESULT_OK", "2"), + ("GST_TAG_ID3V2_HEADER_SIZE", "10"), + ("GST_TAG_IMAGE_HORIZONTAL_PPI", "image-horizontal-ppi"), + ("(gint) GST_TAG_IMAGE_TYPE_ARTIST", "6"), + ("(gint) GST_TAG_IMAGE_TYPE_BACK_COVER", "2"), + ("(gint) GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO", "17"), + ("(gint) GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA", "8"), + ("(gint) GST_TAG_IMAGE_TYPE_COMPOSER", "9"), + ("(gint) GST_TAG_IMAGE_TYPE_CONDUCTOR", "7"), + ("(gint) GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE", "13"), + ("(gint) GST_TAG_IMAGE_TYPE_DURING_RECORDING", "12"), + ("(gint) GST_TAG_IMAGE_TYPE_FISH", "15"), + ("(gint) GST_TAG_IMAGE_TYPE_FRONT_COVER", "1"), + ("(gint) GST_TAG_IMAGE_TYPE_ILLUSTRATION", "16"), + ("(gint) GST_TAG_IMAGE_TYPE_LEAD_ARTIST", "5"), + ("(gint) GST_TAG_IMAGE_TYPE_LEAFLET_PAGE", "3"), + ("(gint) GST_TAG_IMAGE_TYPE_LYRICIST", "10"), + ("(gint) GST_TAG_IMAGE_TYPE_MEDIUM", "4"), + ("(gint) GST_TAG_IMAGE_TYPE_NONE", "-1"), + ("(gint) GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO", "18"), + ("(gint) GST_TAG_IMAGE_TYPE_RECORDING_LOCATION", "11"), + ("(gint) GST_TAG_IMAGE_TYPE_UNDEFINED", "0"), + ("(gint) GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE", "14"), + ("GST_TAG_IMAGE_VERTICAL_PPI", "image-vertical-ppi"), + ( + "(guint) GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE", + "16777216", + ), + ( + "(guint) GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE", + "33554432", + ), + ("(guint) GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS", "4"), + ("(guint) GST_TAG_LICENSE_PERMITS_DISTRIBUTION", "2"), + ("(guint) GST_TAG_LICENSE_PERMITS_REPRODUCTION", "1"), + ("(guint) GST_TAG_LICENSE_PERMITS_SHARING", "8"), + ("(guint) GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE", "65536"), + ( + "(guint) GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE", + "131072", + ), + ("(guint) GST_TAG_LICENSE_REQUIRES_ATTRIBUTION", "512"), + ("(guint) GST_TAG_LICENSE_REQUIRES_COPYLEFT", "4096"), + ("(guint) GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT", "8192"), + ("(guint) GST_TAG_LICENSE_REQUIRES_NOTICE", "256"), + ("(guint) GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE", "1024"), + ("(guint) GST_TAG_LICENSE_REQUIRES_SOURCE_CODE", "2048"), + ("GST_TAG_MUSICAL_KEY", "musical-key"), + ( + "GST_TAG_MUSICBRAINZ_ALBUMARTISTID", + "musicbrainz-albumartistid", + ), + ("GST_TAG_MUSICBRAINZ_ALBUMID", "musicbrainz-albumid"), + ("GST_TAG_MUSICBRAINZ_ARTISTID", "musicbrainz-artistid"), + ( + "GST_TAG_MUSICBRAINZ_RELEASEGROUPID", + "musicbrainz-releasegroupid", + ), + ( + "GST_TAG_MUSICBRAINZ_RELEASETRACKID", + "musicbrainz-releasetrackid", + ), + ("GST_TAG_MUSICBRAINZ_TRACKID", "musicbrainz-trackid"), + ("GST_TAG_MUSICBRAINZ_TRMID", "musicbrainz-trmid"), +]; diff --git a/sys/gstreamer-tag-sys/tests/constant.c b/sys/gstreamer-tag-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-tag-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-tag-sys/tests/layout.c b/sys/gstreamer-tag-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-tag-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-tag-sys/tests/manual.h b/sys/gstreamer-tag-sys/tests/manual.h new file mode 100644 index 000000000..0b0cb9401 --- /dev/null +++ b/sys/gstreamer-tag-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-video-sys/CHANGELOG.md b/sys/gstreamer-video-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-video-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-video-sys/Cargo.toml b/sys/gstreamer-video-sys/Cargo.toml new file mode 100644 index 000000000..4ac589f84 --- /dev/null +++ b/sys/gstreamer-video-sys/Cargo.toml @@ -0,0 +1,64 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-base-sys] +path = "../gstreamer-base-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +v1_0_3 = [] +v1_2 = [] +v1_2_2 = ["v1_2"] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] +v1_14 = ["v1_12"] +v1_16 = ["v1_14"] +v1_18 = ["v1_16"] +dox = [] + +[lib] +name = "gstreamer_video_sys" + +[package] +authors = ["Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstvideo-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_video_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstvideo-1.0" +name = "gstreamer-video-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_video_1_0] +name = "gstreamer-video-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_video_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-video-sys/LICENSE b/sys/gstreamer-video-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/sys/gstreamer-video-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/sys/gstreamer-video-sys/README.md b/sys/gstreamer-video-sys/README.md new file mode 100644 index 000000000..56606cea5 --- /dev/null +++ b/sys/gstreamer-video-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-video-sys.svg)](https://crates.io/crates/gstreamer-video-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (Video library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-video-sys/build.rs b/sys/gstreamer-video-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-video-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-video-sys/src/lib.rs b/sys/gstreamer-video-sys/src/lib.rs new file mode 100644 index 000000000..5784c2155 --- /dev/null +++ b/sys/gstreamer-video-sys/src/lib.rs @@ -0,0 +1,3972 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_base_sys as gst_base; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstColorBalanceType = c_int; +pub const GST_COLOR_BALANCE_HARDWARE: GstColorBalanceType = 0; +pub const GST_COLOR_BALANCE_SOFTWARE: GstColorBalanceType = 1; + +pub type GstNavigationCommand = c_int; +pub const GST_NAVIGATION_COMMAND_INVALID: GstNavigationCommand = 0; +pub const GST_NAVIGATION_COMMAND_MENU1: GstNavigationCommand = 1; +pub const GST_NAVIGATION_COMMAND_MENU2: GstNavigationCommand = 2; +pub const GST_NAVIGATION_COMMAND_MENU3: GstNavigationCommand = 3; +pub const GST_NAVIGATION_COMMAND_MENU4: GstNavigationCommand = 4; +pub const GST_NAVIGATION_COMMAND_MENU5: GstNavigationCommand = 5; +pub const GST_NAVIGATION_COMMAND_MENU6: GstNavigationCommand = 6; +pub const GST_NAVIGATION_COMMAND_MENU7: GstNavigationCommand = 7; +pub const GST_NAVIGATION_COMMAND_LEFT: GstNavigationCommand = 20; +pub const GST_NAVIGATION_COMMAND_RIGHT: GstNavigationCommand = 21; +pub const GST_NAVIGATION_COMMAND_UP: GstNavigationCommand = 22; +pub const GST_NAVIGATION_COMMAND_DOWN: GstNavigationCommand = 23; +pub const GST_NAVIGATION_COMMAND_ACTIVATE: GstNavigationCommand = 24; +pub const GST_NAVIGATION_COMMAND_PREV_ANGLE: GstNavigationCommand = 30; +pub const GST_NAVIGATION_COMMAND_NEXT_ANGLE: GstNavigationCommand = 31; + +pub type GstNavigationEventType = c_int; +pub const GST_NAVIGATION_EVENT_INVALID: GstNavigationEventType = 0; +pub const GST_NAVIGATION_EVENT_KEY_PRESS: GstNavigationEventType = 1; +pub const GST_NAVIGATION_EVENT_KEY_RELEASE: GstNavigationEventType = 2; +pub const GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS: GstNavigationEventType = 3; +pub const GST_NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE: GstNavigationEventType = 4; +pub const GST_NAVIGATION_EVENT_MOUSE_MOVE: GstNavigationEventType = 5; +pub const GST_NAVIGATION_EVENT_COMMAND: GstNavigationEventType = 6; +pub const GST_NAVIGATION_EVENT_MOUSE_SCROLL: GstNavigationEventType = 7; + +pub type GstNavigationMessageType = c_int; +pub const GST_NAVIGATION_MESSAGE_INVALID: GstNavigationMessageType = 0; +pub const GST_NAVIGATION_MESSAGE_MOUSE_OVER: GstNavigationMessageType = 1; +pub const GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED: GstNavigationMessageType = 2; +pub const GST_NAVIGATION_MESSAGE_ANGLES_CHANGED: GstNavigationMessageType = 3; +pub const GST_NAVIGATION_MESSAGE_EVENT: GstNavigationMessageType = 4; + +pub type GstNavigationQueryType = c_int; +pub const GST_NAVIGATION_QUERY_INVALID: GstNavigationQueryType = 0; +pub const GST_NAVIGATION_QUERY_COMMANDS: GstNavigationQueryType = 1; +pub const GST_NAVIGATION_QUERY_ANGLES: GstNavigationQueryType = 2; + +pub type GstVideoAFDSpec = c_int; +pub const GST_VIDEO_AFD_SPEC_DVB_ETSI: GstVideoAFDSpec = 0; +pub const GST_VIDEO_AFD_SPEC_ATSC_A53: GstVideoAFDSpec = 1; +pub const GST_VIDEO_AFD_SPEC_SMPTE_ST2016_1: GstVideoAFDSpec = 2; + +pub type GstVideoAFDValue = c_int; +pub const GST_VIDEO_AFD_UNAVAILABLE: GstVideoAFDValue = 0; +pub const GST_VIDEO_AFD_16_9_TOP_ALIGNED: GstVideoAFDValue = 2; +pub const GST_VIDEO_AFD_14_9_TOP_ALIGNED: GstVideoAFDValue = 3; +pub const GST_VIDEO_AFD_GREATER_THAN_16_9: GstVideoAFDValue = 4; +pub const GST_VIDEO_AFD_4_3_FULL_16_9_FULL: GstVideoAFDValue = 8; +pub const GST_VIDEO_AFD_4_3_FULL_4_3_PILLAR: GstVideoAFDValue = 9; +pub const GST_VIDEO_AFD_16_9_LETTER_16_9_FULL: GstVideoAFDValue = 10; +pub const GST_VIDEO_AFD_14_9_LETTER_14_9_PILLAR: GstVideoAFDValue = 11; +pub const GST_VIDEO_AFD_4_3_FULL_14_9_CENTER: GstVideoAFDValue = 13; +pub const GST_VIDEO_AFD_16_9_LETTER_14_9_CENTER: GstVideoAFDValue = 14; +pub const GST_VIDEO_AFD_16_9_LETTER_4_3_CENTER: GstVideoAFDValue = 15; + +pub type GstVideoAlphaMode = c_int; +pub const GST_VIDEO_ALPHA_MODE_COPY: GstVideoAlphaMode = 0; +pub const GST_VIDEO_ALPHA_MODE_SET: GstVideoAlphaMode = 1; +pub const GST_VIDEO_ALPHA_MODE_MULT: GstVideoAlphaMode = 2; + +pub type GstVideoAncillaryDID = c_int; +pub const GST_VIDEO_ANCILLARY_DID_UNDEFINED: GstVideoAncillaryDID = 0; +pub const GST_VIDEO_ANCILLARY_DID_DELETION: GstVideoAncillaryDID = 128; +pub const GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_FIRST: GstVideoAncillaryDID = 160; +pub const GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_LAST: GstVideoAncillaryDID = 167; +pub const GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_FIRST: GstVideoAncillaryDID = 224; +pub const GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_LAST: GstVideoAncillaryDID = 231; +pub const GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_FIRST: GstVideoAncillaryDID = 236; +pub const GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_LAST: GstVideoAncillaryDID = 239; +pub const GST_VIDEO_ANCILLARY_DID_CAMERA_POSITION: GstVideoAncillaryDID = 240; +pub const GST_VIDEO_ANCILLARY_DID_HANC_ERROR_DETECTION: GstVideoAncillaryDID = 244; +pub const GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_FIRST: GstVideoAncillaryDID = 248; +pub const GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_LAST: GstVideoAncillaryDID = 255; + +pub type GstVideoAncillaryDID16 = c_int; +pub const GST_VIDEO_ANCILLARY_DID16_S334_EIA_708: GstVideoAncillaryDID16 = 24833; +pub const GST_VIDEO_ANCILLARY_DID16_S334_EIA_608: GstVideoAncillaryDID16 = 24834; +pub const GST_VIDEO_ANCILLARY_DID16_S2016_3_AFD_BAR: GstVideoAncillaryDID16 = 16645; + +pub type GstVideoCaptionType = c_int; +pub const GST_VIDEO_CAPTION_TYPE_UNKNOWN: GstVideoCaptionType = 0; +pub const GST_VIDEO_CAPTION_TYPE_CEA608_RAW: GstVideoCaptionType = 1; +pub const GST_VIDEO_CAPTION_TYPE_CEA608_S334_1A: GstVideoCaptionType = 2; +pub const GST_VIDEO_CAPTION_TYPE_CEA708_RAW: GstVideoCaptionType = 3; +pub const GST_VIDEO_CAPTION_TYPE_CEA708_CDP: GstVideoCaptionType = 4; + +pub type GstVideoChromaMethod = c_int; +pub const GST_VIDEO_CHROMA_METHOD_NEAREST: GstVideoChromaMethod = 0; +pub const GST_VIDEO_CHROMA_METHOD_LINEAR: GstVideoChromaMethod = 1; + +pub type GstVideoChromaMode = c_int; +pub const GST_VIDEO_CHROMA_MODE_FULL: GstVideoChromaMode = 0; +pub const GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY: GstVideoChromaMode = 1; +pub const GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY: GstVideoChromaMode = 2; +pub const GST_VIDEO_CHROMA_MODE_NONE: GstVideoChromaMode = 3; + +pub type GstVideoColorMatrix = c_int; +pub const GST_VIDEO_COLOR_MATRIX_UNKNOWN: GstVideoColorMatrix = 0; +pub const GST_VIDEO_COLOR_MATRIX_RGB: GstVideoColorMatrix = 1; +pub const GST_VIDEO_COLOR_MATRIX_FCC: GstVideoColorMatrix = 2; +pub const GST_VIDEO_COLOR_MATRIX_BT709: GstVideoColorMatrix = 3; +pub const GST_VIDEO_COLOR_MATRIX_BT601: GstVideoColorMatrix = 4; +pub const GST_VIDEO_COLOR_MATRIX_SMPTE240M: GstVideoColorMatrix = 5; +pub const GST_VIDEO_COLOR_MATRIX_BT2020: GstVideoColorMatrix = 6; + +pub type GstVideoColorPrimaries = c_int; +pub const GST_VIDEO_COLOR_PRIMARIES_UNKNOWN: GstVideoColorPrimaries = 0; +pub const GST_VIDEO_COLOR_PRIMARIES_BT709: GstVideoColorPrimaries = 1; +pub const GST_VIDEO_COLOR_PRIMARIES_BT470M: GstVideoColorPrimaries = 2; +pub const GST_VIDEO_COLOR_PRIMARIES_BT470BG: GstVideoColorPrimaries = 3; +pub const GST_VIDEO_COLOR_PRIMARIES_SMPTE170M: GstVideoColorPrimaries = 4; +pub const GST_VIDEO_COLOR_PRIMARIES_SMPTE240M: GstVideoColorPrimaries = 5; +pub const GST_VIDEO_COLOR_PRIMARIES_FILM: GstVideoColorPrimaries = 6; +pub const GST_VIDEO_COLOR_PRIMARIES_BT2020: GstVideoColorPrimaries = 7; +pub const GST_VIDEO_COLOR_PRIMARIES_ADOBERGB: GstVideoColorPrimaries = 8; +pub const GST_VIDEO_COLOR_PRIMARIES_SMPTEST428: GstVideoColorPrimaries = 9; +pub const GST_VIDEO_COLOR_PRIMARIES_SMPTERP431: GstVideoColorPrimaries = 10; +pub const GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432: GstVideoColorPrimaries = 11; +pub const GST_VIDEO_COLOR_PRIMARIES_EBU3213: GstVideoColorPrimaries = 12; + +pub type GstVideoColorRange = c_int; +pub const GST_VIDEO_COLOR_RANGE_UNKNOWN: GstVideoColorRange = 0; +pub const GST_VIDEO_COLOR_RANGE_0_255: GstVideoColorRange = 1; +pub const GST_VIDEO_COLOR_RANGE_16_235: GstVideoColorRange = 2; + +pub type GstVideoDitherMethod = c_int; +pub const GST_VIDEO_DITHER_NONE: GstVideoDitherMethod = 0; +pub const GST_VIDEO_DITHER_VERTERR: GstVideoDitherMethod = 1; +pub const GST_VIDEO_DITHER_FLOYD_STEINBERG: GstVideoDitherMethod = 2; +pub const GST_VIDEO_DITHER_SIERRA_LITE: GstVideoDitherMethod = 3; +pub const GST_VIDEO_DITHER_BAYER: GstVideoDitherMethod = 4; + +pub type GstVideoFieldOrder = c_int; +pub const GST_VIDEO_FIELD_ORDER_UNKNOWN: GstVideoFieldOrder = 0; +pub const GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST: GstVideoFieldOrder = 1; +pub const GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST: GstVideoFieldOrder = 2; + +pub type GstVideoFormat = c_int; +pub const GST_VIDEO_FORMAT_UNKNOWN: GstVideoFormat = 0; +pub const GST_VIDEO_FORMAT_ENCODED: GstVideoFormat = 1; +pub const GST_VIDEO_FORMAT_I420: GstVideoFormat = 2; +pub const GST_VIDEO_FORMAT_YV12: GstVideoFormat = 3; +pub const GST_VIDEO_FORMAT_YUY2: GstVideoFormat = 4; +pub const GST_VIDEO_FORMAT_UYVY: GstVideoFormat = 5; +pub const GST_VIDEO_FORMAT_AYUV: GstVideoFormat = 6; +pub const GST_VIDEO_FORMAT_RGBx: GstVideoFormat = 7; +pub const GST_VIDEO_FORMAT_BGRx: GstVideoFormat = 8; +pub const GST_VIDEO_FORMAT_xRGB: GstVideoFormat = 9; +pub const GST_VIDEO_FORMAT_xBGR: GstVideoFormat = 10; +pub const GST_VIDEO_FORMAT_RGBA: GstVideoFormat = 11; +pub const GST_VIDEO_FORMAT_BGRA: GstVideoFormat = 12; +pub const GST_VIDEO_FORMAT_ARGB: GstVideoFormat = 13; +pub const GST_VIDEO_FORMAT_ABGR: GstVideoFormat = 14; +pub const GST_VIDEO_FORMAT_RGB: GstVideoFormat = 15; +pub const GST_VIDEO_FORMAT_BGR: GstVideoFormat = 16; +pub const GST_VIDEO_FORMAT_Y41B: GstVideoFormat = 17; +pub const GST_VIDEO_FORMAT_Y42B: GstVideoFormat = 18; +pub const GST_VIDEO_FORMAT_YVYU: GstVideoFormat = 19; +pub const GST_VIDEO_FORMAT_Y444: GstVideoFormat = 20; +pub const GST_VIDEO_FORMAT_v210: GstVideoFormat = 21; +pub const GST_VIDEO_FORMAT_v216: GstVideoFormat = 22; +pub const GST_VIDEO_FORMAT_NV12: GstVideoFormat = 23; +pub const GST_VIDEO_FORMAT_NV21: GstVideoFormat = 24; +pub const GST_VIDEO_FORMAT_GRAY8: GstVideoFormat = 25; +pub const GST_VIDEO_FORMAT_GRAY16_BE: GstVideoFormat = 26; +pub const GST_VIDEO_FORMAT_GRAY16_LE: GstVideoFormat = 27; +pub const GST_VIDEO_FORMAT_v308: GstVideoFormat = 28; +pub const GST_VIDEO_FORMAT_RGB16: GstVideoFormat = 29; +pub const GST_VIDEO_FORMAT_BGR16: GstVideoFormat = 30; +pub const GST_VIDEO_FORMAT_RGB15: GstVideoFormat = 31; +pub const GST_VIDEO_FORMAT_BGR15: GstVideoFormat = 32; +pub const GST_VIDEO_FORMAT_UYVP: GstVideoFormat = 33; +pub const GST_VIDEO_FORMAT_A420: GstVideoFormat = 34; +pub const GST_VIDEO_FORMAT_RGB8P: GstVideoFormat = 35; +pub const GST_VIDEO_FORMAT_YUV9: GstVideoFormat = 36; +pub const GST_VIDEO_FORMAT_YVU9: GstVideoFormat = 37; +pub const GST_VIDEO_FORMAT_IYU1: GstVideoFormat = 38; +pub const GST_VIDEO_FORMAT_ARGB64: GstVideoFormat = 39; +pub const GST_VIDEO_FORMAT_AYUV64: GstVideoFormat = 40; +pub const GST_VIDEO_FORMAT_r210: GstVideoFormat = 41; +pub const GST_VIDEO_FORMAT_I420_10BE: GstVideoFormat = 42; +pub const GST_VIDEO_FORMAT_I420_10LE: GstVideoFormat = 43; +pub const GST_VIDEO_FORMAT_I422_10BE: GstVideoFormat = 44; +pub const GST_VIDEO_FORMAT_I422_10LE: GstVideoFormat = 45; +pub const GST_VIDEO_FORMAT_Y444_10BE: GstVideoFormat = 46; +pub const GST_VIDEO_FORMAT_Y444_10LE: GstVideoFormat = 47; +pub const GST_VIDEO_FORMAT_GBR: GstVideoFormat = 48; +pub const GST_VIDEO_FORMAT_GBR_10BE: GstVideoFormat = 49; +pub const GST_VIDEO_FORMAT_GBR_10LE: GstVideoFormat = 50; +pub const GST_VIDEO_FORMAT_NV16: GstVideoFormat = 51; +pub const GST_VIDEO_FORMAT_NV24: GstVideoFormat = 52; +pub const GST_VIDEO_FORMAT_NV12_64Z32: GstVideoFormat = 53; +pub const GST_VIDEO_FORMAT_A420_10BE: GstVideoFormat = 54; +pub const GST_VIDEO_FORMAT_A420_10LE: GstVideoFormat = 55; +pub const GST_VIDEO_FORMAT_A422_10BE: GstVideoFormat = 56; +pub const GST_VIDEO_FORMAT_A422_10LE: GstVideoFormat = 57; +pub const GST_VIDEO_FORMAT_A444_10BE: GstVideoFormat = 58; +pub const GST_VIDEO_FORMAT_A444_10LE: GstVideoFormat = 59; +pub const GST_VIDEO_FORMAT_NV61: GstVideoFormat = 60; +pub const GST_VIDEO_FORMAT_P010_10BE: GstVideoFormat = 61; +pub const GST_VIDEO_FORMAT_P010_10LE: GstVideoFormat = 62; +pub const GST_VIDEO_FORMAT_IYU2: GstVideoFormat = 63; +pub const GST_VIDEO_FORMAT_VYUY: GstVideoFormat = 64; +pub const GST_VIDEO_FORMAT_GBRA: GstVideoFormat = 65; +pub const GST_VIDEO_FORMAT_GBRA_10BE: GstVideoFormat = 66; +pub const GST_VIDEO_FORMAT_GBRA_10LE: GstVideoFormat = 67; +pub const GST_VIDEO_FORMAT_GBR_12BE: GstVideoFormat = 68; +pub const GST_VIDEO_FORMAT_GBR_12LE: GstVideoFormat = 69; +pub const GST_VIDEO_FORMAT_GBRA_12BE: GstVideoFormat = 70; +pub const GST_VIDEO_FORMAT_GBRA_12LE: GstVideoFormat = 71; +pub const GST_VIDEO_FORMAT_I420_12BE: GstVideoFormat = 72; +pub const GST_VIDEO_FORMAT_I420_12LE: GstVideoFormat = 73; +pub const GST_VIDEO_FORMAT_I422_12BE: GstVideoFormat = 74; +pub const GST_VIDEO_FORMAT_I422_12LE: GstVideoFormat = 75; +pub const GST_VIDEO_FORMAT_Y444_12BE: GstVideoFormat = 76; +pub const GST_VIDEO_FORMAT_Y444_12LE: GstVideoFormat = 77; +pub const GST_VIDEO_FORMAT_GRAY10_LE32: GstVideoFormat = 78; +pub const GST_VIDEO_FORMAT_NV12_10LE32: GstVideoFormat = 79; +pub const GST_VIDEO_FORMAT_NV16_10LE32: GstVideoFormat = 80; +pub const GST_VIDEO_FORMAT_NV12_10LE40: GstVideoFormat = 81; +pub const GST_VIDEO_FORMAT_Y210: GstVideoFormat = 82; +pub const GST_VIDEO_FORMAT_Y410: GstVideoFormat = 83; +pub const GST_VIDEO_FORMAT_VUYA: GstVideoFormat = 84; +pub const GST_VIDEO_FORMAT_BGR10A2_LE: GstVideoFormat = 85; +pub const GST_VIDEO_FORMAT_RGB10A2_LE: GstVideoFormat = 86; +pub const GST_VIDEO_FORMAT_Y444_16BE: GstVideoFormat = 87; +pub const GST_VIDEO_FORMAT_Y444_16LE: GstVideoFormat = 88; +pub const GST_VIDEO_FORMAT_P016_BE: GstVideoFormat = 89; +pub const GST_VIDEO_FORMAT_P016_LE: GstVideoFormat = 90; +pub const GST_VIDEO_FORMAT_P012_BE: GstVideoFormat = 91; +pub const GST_VIDEO_FORMAT_P012_LE: GstVideoFormat = 92; +pub const GST_VIDEO_FORMAT_Y212_BE: GstVideoFormat = 93; +pub const GST_VIDEO_FORMAT_Y212_LE: GstVideoFormat = 94; +pub const GST_VIDEO_FORMAT_Y412_BE: GstVideoFormat = 95; +pub const GST_VIDEO_FORMAT_Y412_LE: GstVideoFormat = 96; +pub const GST_VIDEO_FORMAT_NV12_4L4: GstVideoFormat = 97; +pub const GST_VIDEO_FORMAT_NV12_32L32: GstVideoFormat = 98; + +pub type GstVideoGLTextureOrientation = c_int; +pub const GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL: GstVideoGLTextureOrientation = 0; +pub const GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_FLIP: GstVideoGLTextureOrientation = 1; +pub const GST_VIDEO_GL_TEXTURE_ORIENTATION_X_FLIP_Y_NORMAL: GstVideoGLTextureOrientation = 2; +pub const GST_VIDEO_GL_TEXTURE_ORIENTATION_X_FLIP_Y_FLIP: GstVideoGLTextureOrientation = 3; + +pub type GstVideoGLTextureType = c_int; +pub const GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE: GstVideoGLTextureType = 0; +pub const GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA: GstVideoGLTextureType = 1; +pub const GST_VIDEO_GL_TEXTURE_TYPE_RGB16: GstVideoGLTextureType = 2; +pub const GST_VIDEO_GL_TEXTURE_TYPE_RGB: GstVideoGLTextureType = 3; +pub const GST_VIDEO_GL_TEXTURE_TYPE_RGBA: GstVideoGLTextureType = 4; +pub const GST_VIDEO_GL_TEXTURE_TYPE_R: GstVideoGLTextureType = 5; +pub const GST_VIDEO_GL_TEXTURE_TYPE_RG: GstVideoGLTextureType = 6; + +pub type GstVideoGammaMode = c_int; +pub const GST_VIDEO_GAMMA_MODE_NONE: GstVideoGammaMode = 0; +pub const GST_VIDEO_GAMMA_MODE_REMAP: GstVideoGammaMode = 1; + +pub type GstVideoInterlaceMode = c_int; +pub const GST_VIDEO_INTERLACE_MODE_PROGRESSIVE: GstVideoInterlaceMode = 0; +pub const GST_VIDEO_INTERLACE_MODE_INTERLEAVED: GstVideoInterlaceMode = 1; +pub const GST_VIDEO_INTERLACE_MODE_MIXED: GstVideoInterlaceMode = 2; +pub const GST_VIDEO_INTERLACE_MODE_FIELDS: GstVideoInterlaceMode = 3; +pub const GST_VIDEO_INTERLACE_MODE_ALTERNATE: GstVideoInterlaceMode = 4; + +pub type GstVideoMatrixMode = c_int; +pub const GST_VIDEO_MATRIX_MODE_FULL: GstVideoMatrixMode = 0; +pub const GST_VIDEO_MATRIX_MODE_INPUT_ONLY: GstVideoMatrixMode = 1; +pub const GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY: GstVideoMatrixMode = 2; +pub const GST_VIDEO_MATRIX_MODE_NONE: GstVideoMatrixMode = 3; + +pub type GstVideoMultiviewFramePacking = c_int; +pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE: GstVideoMultiviewFramePacking = -1; +pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO: GstVideoMultiviewFramePacking = 0; +pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT: GstVideoMultiviewFramePacking = 1; +pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT: GstVideoMultiviewFramePacking = 2; +pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE: GstVideoMultiviewFramePacking = 3; +pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX: GstVideoMultiviewFramePacking = + 4; +pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED: GstVideoMultiviewFramePacking = 5; +pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED: GstVideoMultiviewFramePacking = 6; +pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM: GstVideoMultiviewFramePacking = 7; +pub const GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD: GstVideoMultiviewFramePacking = 8; + +pub type GstVideoMultiviewMode = c_int; +pub const GST_VIDEO_MULTIVIEW_MODE_NONE: GstVideoMultiviewMode = -1; +pub const GST_VIDEO_MULTIVIEW_MODE_MONO: GstVideoMultiviewMode = 0; +pub const GST_VIDEO_MULTIVIEW_MODE_LEFT: GstVideoMultiviewMode = 1; +pub const GST_VIDEO_MULTIVIEW_MODE_RIGHT: GstVideoMultiviewMode = 2; +pub const GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE: GstVideoMultiviewMode = 3; +pub const GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX: GstVideoMultiviewMode = 4; +pub const GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED: GstVideoMultiviewMode = 5; +pub const GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED: GstVideoMultiviewMode = 6; +pub const GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM: GstVideoMultiviewMode = 7; +pub const GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD: GstVideoMultiviewMode = 8; +pub const GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME: GstVideoMultiviewMode = 32; +pub const GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME: GstVideoMultiviewMode = 33; +pub const GST_VIDEO_MULTIVIEW_MODE_SEPARATED: GstVideoMultiviewMode = 34; + +pub type GstVideoOrientationMethod = c_int; +pub const GST_VIDEO_ORIENTATION_IDENTITY: GstVideoOrientationMethod = 0; +pub const GST_VIDEO_ORIENTATION_90R: GstVideoOrientationMethod = 1; +pub const GST_VIDEO_ORIENTATION_180: GstVideoOrientationMethod = 2; +pub const GST_VIDEO_ORIENTATION_90L: GstVideoOrientationMethod = 3; +pub const GST_VIDEO_ORIENTATION_HORIZ: GstVideoOrientationMethod = 4; +pub const GST_VIDEO_ORIENTATION_VERT: GstVideoOrientationMethod = 5; +pub const GST_VIDEO_ORIENTATION_UL_LR: GstVideoOrientationMethod = 6; +pub const GST_VIDEO_ORIENTATION_UR_LL: GstVideoOrientationMethod = 7; +pub const GST_VIDEO_ORIENTATION_AUTO: GstVideoOrientationMethod = 8; +pub const GST_VIDEO_ORIENTATION_CUSTOM: GstVideoOrientationMethod = 9; + +pub type GstVideoPrimariesMode = c_int; +pub const GST_VIDEO_PRIMARIES_MODE_NONE: GstVideoPrimariesMode = 0; +pub const GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY: GstVideoPrimariesMode = 1; +pub const GST_VIDEO_PRIMARIES_MODE_FAST: GstVideoPrimariesMode = 2; + +pub type GstVideoResamplerMethod = c_int; +pub const GST_VIDEO_RESAMPLER_METHOD_NEAREST: GstVideoResamplerMethod = 0; +pub const GST_VIDEO_RESAMPLER_METHOD_LINEAR: GstVideoResamplerMethod = 1; +pub const GST_VIDEO_RESAMPLER_METHOD_CUBIC: GstVideoResamplerMethod = 2; +pub const GST_VIDEO_RESAMPLER_METHOD_SINC: GstVideoResamplerMethod = 3; +pub const GST_VIDEO_RESAMPLER_METHOD_LANCZOS: GstVideoResamplerMethod = 4; + +pub type GstVideoTileMode = c_int; +pub const GST_VIDEO_TILE_MODE_UNKNOWN: GstVideoTileMode = 0; +pub const GST_VIDEO_TILE_MODE_ZFLIPZ_2X2: GstVideoTileMode = 65536; +pub const GST_VIDEO_TILE_MODE_LINEAR: GstVideoTileMode = 131072; + +pub type GstVideoTileType = c_int; +pub const GST_VIDEO_TILE_TYPE_INDEXED: GstVideoTileType = 0; + +pub type GstVideoTransferFunction = c_int; +pub const GST_VIDEO_TRANSFER_UNKNOWN: GstVideoTransferFunction = 0; +pub const GST_VIDEO_TRANSFER_GAMMA10: GstVideoTransferFunction = 1; +pub const GST_VIDEO_TRANSFER_GAMMA18: GstVideoTransferFunction = 2; +pub const GST_VIDEO_TRANSFER_GAMMA20: GstVideoTransferFunction = 3; +pub const GST_VIDEO_TRANSFER_GAMMA22: GstVideoTransferFunction = 4; +pub const GST_VIDEO_TRANSFER_BT709: GstVideoTransferFunction = 5; +pub const GST_VIDEO_TRANSFER_SMPTE240M: GstVideoTransferFunction = 6; +pub const GST_VIDEO_TRANSFER_SRGB: GstVideoTransferFunction = 7; +pub const GST_VIDEO_TRANSFER_GAMMA28: GstVideoTransferFunction = 8; +pub const GST_VIDEO_TRANSFER_LOG100: GstVideoTransferFunction = 9; +pub const GST_VIDEO_TRANSFER_LOG316: GstVideoTransferFunction = 10; +pub const GST_VIDEO_TRANSFER_BT2020_12: GstVideoTransferFunction = 11; +pub const GST_VIDEO_TRANSFER_ADOBERGB: GstVideoTransferFunction = 12; +pub const GST_VIDEO_TRANSFER_BT2020_10: GstVideoTransferFunction = 13; +pub const GST_VIDEO_TRANSFER_SMPTE2084: GstVideoTransferFunction = 14; +pub const GST_VIDEO_TRANSFER_ARIB_STD_B67: GstVideoTransferFunction = 15; +pub const GST_VIDEO_TRANSFER_BT601: GstVideoTransferFunction = 16; + +pub type GstVideoVBIParserResult = c_int; +pub const GST_VIDEO_VBI_PARSER_RESULT_DONE: GstVideoVBIParserResult = 0; +pub const GST_VIDEO_VBI_PARSER_RESULT_OK: GstVideoVBIParserResult = 1; +pub const GST_VIDEO_VBI_PARSER_RESULT_ERROR: GstVideoVBIParserResult = 2; + +// Constants +pub const GST_BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META: *const c_char = + b"GstBufferPoolOptionVideoAffineTransformation\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT: *const c_char = + b"GstBufferPoolOptionVideoAlignment\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META: *const c_char = + b"GstBufferPoolOptionVideoGLTextureUploadMeta\0" as *const u8 as *const c_char; +pub const GST_BUFFER_POOL_OPTION_VIDEO_META: *const c_char = + b"GstBufferPoolOptionVideoMeta\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_FORMAT_INTERLACED: *const c_char = + b"format:Interlaced\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META: *const c_char = + b"meta:GstVideoAffineTransformation\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META: *const c_char = + b"meta:GstVideoGLTextureUploadMeta\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_META_GST_VIDEO_META: *const c_char = + b"meta:GstVideoMeta\0" as *const u8 as *const c_char; +pub const GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION: *const c_char = + b"meta:GstVideoOverlayComposition\0" as *const u8 as *const c_char; +pub const GST_META_TAG_VIDEO_COLORSPACE_STR: *const c_char = + b"colorspace\0" as *const u8 as *const c_char; +pub const GST_META_TAG_VIDEO_ORIENTATION_STR: *const c_char = + b"orientation\0" as *const u8 as *const c_char; +pub const GST_META_TAG_VIDEO_SIZE_STR: *const c_char = b"size\0" as *const u8 as *const c_char; +pub const GST_META_TAG_VIDEO_STR: *const c_char = b"video\0" as *const u8 as *const c_char; +pub const GST_VIDEO_COLORIMETRY_BT2020: *const c_char = b"bt2020\0" as *const u8 as *const c_char; +pub const GST_VIDEO_COLORIMETRY_BT2020_10: *const c_char = + b"bt2020-10\0" as *const u8 as *const c_char; +pub const GST_VIDEO_COLORIMETRY_BT2100_HLG: *const c_char = + b"bt2100-hlg\0" as *const u8 as *const c_char; +pub const GST_VIDEO_COLORIMETRY_BT2100_PQ: *const c_char = + b"bt2100-pq\0" as *const u8 as *const c_char; +pub const GST_VIDEO_COLORIMETRY_BT601: *const c_char = b"bt601\0" as *const u8 as *const c_char; +pub const GST_VIDEO_COLORIMETRY_BT709: *const c_char = b"bt709\0" as *const u8 as *const c_char; +pub const GST_VIDEO_COLORIMETRY_SMPTE240M: *const c_char = + b"smpte240m\0" as *const u8 as *const c_char; +pub const GST_VIDEO_COLORIMETRY_SRGB: *const c_char = b"sRGB\0" as *const u8 as *const c_char; +pub const GST_VIDEO_COMP_A: c_int = 3; +pub const GST_VIDEO_COMP_B: c_int = 2; +pub const GST_VIDEO_COMP_G: c_int = 1; +pub const GST_VIDEO_COMP_INDEX: c_int = 0; +pub const GST_VIDEO_COMP_PALETTE: c_int = 1; +pub const GST_VIDEO_COMP_R: c_int = 0; +pub const GST_VIDEO_COMP_U: c_int = 1; +pub const GST_VIDEO_COMP_V: c_int = 2; +pub const GST_VIDEO_COMP_Y: c_int = 0; +pub const GST_VIDEO_CONVERTER_OPT_ALPHA_MODE: *const c_char = + b"GstVideoConverter.alpha-mode\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE: *const c_char = + b"GstVideoConverter.alpha-value\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_BORDER_ARGB: *const c_char = + b"GstVideoConverter.border-argb\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_CHROMA_MODE: *const c_char = + b"GstVideoConverter.chroma-mode\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD: *const c_char = + b"GstVideoConverter.chroma-resampler-method\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DEST_HEIGHT: *const c_char = + b"GstVideoConverter.dest-height\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DEST_WIDTH: *const c_char = + b"GstVideoConverter.dest-width\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DEST_X: *const c_char = + b"GstVideoConverter.dest-x\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DEST_Y: *const c_char = + b"GstVideoConverter.dest-y\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DITHER_METHOD: *const c_char = + b"GstVideoConverter.dither-method\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION: *const c_char = + b"GstVideoConverter.dither-quantization\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_FILL_BORDER: *const c_char = + b"GstVideoConverter.fill-border\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_GAMMA_MODE: *const c_char = + b"GstVideoConverter.gamma-mode\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_MATRIX_MODE: *const c_char = + b"GstVideoConverter.matrix-mode\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE: *const c_char = + b"GstVideoConverter.primaries-mode\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_RESAMPLER_METHOD: *const c_char = + b"GstVideoConverter.resampler-method\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_RESAMPLER_TAPS: *const c_char = + b"GstVideoConverter.resampler-taps\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_SRC_HEIGHT: *const c_char = + b"GstVideoConverter.src-height\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_SRC_WIDTH: *const c_char = + b"GstVideoConverter.src-width\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_SRC_X: *const c_char = + b"GstVideoConverter.src-x\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_SRC_Y: *const c_char = + b"GstVideoConverter.src-y\0" as *const u8 as *const c_char; +pub const GST_VIDEO_CONVERTER_OPT_THREADS: *const c_char = + b"GstVideoConverter.threads\0" as *const u8 as *const c_char; +pub const GST_VIDEO_DECODER_MAX_ERRORS: c_int = 10; +pub const GST_VIDEO_DECODER_SINK_NAME: *const c_char = b"sink\0" as *const u8 as *const c_char; +pub const GST_VIDEO_DECODER_SRC_NAME: *const c_char = b"src\0" as *const u8 as *const c_char; +pub const GST_VIDEO_ENCODER_SINK_NAME: *const c_char = b"sink\0" as *const u8 as *const c_char; +pub const GST_VIDEO_ENCODER_SRC_NAME: *const c_char = b"src\0" as *const u8 as *const c_char; +pub const GST_VIDEO_FPS_RANGE: *const c_char = + b"(fraction) [ 0, max ]\0" as *const u8 as *const c_char; +pub const GST_VIDEO_MAX_COMPONENTS: c_int = 4; +pub const GST_VIDEO_MAX_PLANES: c_int = 4; +pub const GST_VIDEO_RESAMPLER_OPT_CUBIC_B: *const c_char = + b"GstVideoResampler.cubic-b\0" as *const u8 as *const c_char; +pub const GST_VIDEO_RESAMPLER_OPT_CUBIC_C: *const c_char = + b"GstVideoResampler.cubic-c\0" as *const u8 as *const c_char; +pub const GST_VIDEO_RESAMPLER_OPT_ENVELOPE: *const c_char = + b"GstVideoResampler.envelope\0" as *const u8 as *const c_char; +pub const GST_VIDEO_RESAMPLER_OPT_MAX_TAPS: *const c_char = + b"GstVideoResampler.max-taps\0" as *const u8 as *const c_char; +pub const GST_VIDEO_RESAMPLER_OPT_SHARPEN: *const c_char = + b"GstVideoResampler.sharpen\0" as *const u8 as *const c_char; +pub const GST_VIDEO_RESAMPLER_OPT_SHARPNESS: *const c_char = + b"GstVideoResampler.sharpness\0" as *const u8 as *const c_char; +pub const GST_VIDEO_SCALER_OPT_DITHER_METHOD: *const c_char = + b"GstVideoScaler.dither-method\0" as *const u8 as *const c_char; +pub const GST_VIDEO_SIZE_RANGE: *const c_char = b"(int) [ 1, max ]\0" as *const u8 as *const c_char; +pub const GST_VIDEO_TILE_TYPE_MASK: c_int = 65535; +pub const GST_VIDEO_TILE_TYPE_SHIFT: c_int = 16; +pub const GST_VIDEO_TILE_X_TILES_MASK: c_int = 65535; +pub const GST_VIDEO_TILE_Y_TILES_SHIFT: c_int = 16; + +// Flags +pub type GstVideoBufferFlags = c_uint; +pub const GST_VIDEO_BUFFER_FLAG_INTERLACED: GstVideoBufferFlags = 1048576; +pub const GST_VIDEO_BUFFER_FLAG_TFF: GstVideoBufferFlags = 2097152; +pub const GST_VIDEO_BUFFER_FLAG_RFF: GstVideoBufferFlags = 4194304; +pub const GST_VIDEO_BUFFER_FLAG_ONEFIELD: GstVideoBufferFlags = 8388608; +pub const GST_VIDEO_BUFFER_FLAG_MULTIPLE_VIEW: GstVideoBufferFlags = 16777216; +pub const GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE: GstVideoBufferFlags = 33554432; +pub const GST_VIDEO_BUFFER_FLAG_TOP_FIELD: GstVideoBufferFlags = 10485760; +pub const GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD: GstVideoBufferFlags = 8388608; +pub const GST_VIDEO_BUFFER_FLAG_MARKER: GstVideoBufferFlags = 512; +pub const GST_VIDEO_BUFFER_FLAG_LAST: GstVideoBufferFlags = 268435456; + +pub type GstVideoChromaFlags = c_uint; +pub const GST_VIDEO_CHROMA_FLAG_NONE: GstVideoChromaFlags = 0; +pub const GST_VIDEO_CHROMA_FLAG_INTERLACED: GstVideoChromaFlags = 1; + +pub type GstVideoChromaSite = c_uint; +pub const GST_VIDEO_CHROMA_SITE_UNKNOWN: GstVideoChromaSite = 0; +pub const GST_VIDEO_CHROMA_SITE_NONE: GstVideoChromaSite = 1; +pub const GST_VIDEO_CHROMA_SITE_H_COSITED: GstVideoChromaSite = 2; +pub const GST_VIDEO_CHROMA_SITE_V_COSITED: GstVideoChromaSite = 4; +pub const GST_VIDEO_CHROMA_SITE_ALT_LINE: GstVideoChromaSite = 8; +pub const GST_VIDEO_CHROMA_SITE_COSITED: GstVideoChromaSite = 6; +pub const GST_VIDEO_CHROMA_SITE_JPEG: GstVideoChromaSite = 1; +pub const GST_VIDEO_CHROMA_SITE_MPEG2: GstVideoChromaSite = 2; +pub const GST_VIDEO_CHROMA_SITE_DV: GstVideoChromaSite = 14; + +pub type GstVideoCodecFrameFlags = c_uint; +pub const GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY: GstVideoCodecFrameFlags = 1; +pub const GST_VIDEO_CODEC_FRAME_FLAG_SYNC_POINT: GstVideoCodecFrameFlags = 2; +pub const GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME: GstVideoCodecFrameFlags = 4; +pub const GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME_HEADERS: GstVideoCodecFrameFlags = 8; + +pub type GstVideoDitherFlags = c_uint; +pub const GST_VIDEO_DITHER_FLAG_NONE: GstVideoDitherFlags = 0; +pub const GST_VIDEO_DITHER_FLAG_INTERLACED: GstVideoDitherFlags = 1; +pub const GST_VIDEO_DITHER_FLAG_QUANTIZE: GstVideoDitherFlags = 2; + +pub type GstVideoFlags = c_uint; +pub const GST_VIDEO_FLAG_NONE: GstVideoFlags = 0; +pub const GST_VIDEO_FLAG_VARIABLE_FPS: GstVideoFlags = 1; +pub const GST_VIDEO_FLAG_PREMULTIPLIED_ALPHA: GstVideoFlags = 2; + +pub type GstVideoFormatFlags = c_uint; +pub const GST_VIDEO_FORMAT_FLAG_YUV: GstVideoFormatFlags = 1; +pub const GST_VIDEO_FORMAT_FLAG_RGB: GstVideoFormatFlags = 2; +pub const GST_VIDEO_FORMAT_FLAG_GRAY: GstVideoFormatFlags = 4; +pub const GST_VIDEO_FORMAT_FLAG_ALPHA: GstVideoFormatFlags = 8; +pub const GST_VIDEO_FORMAT_FLAG_LE: GstVideoFormatFlags = 16; +pub const GST_VIDEO_FORMAT_FLAG_PALETTE: GstVideoFormatFlags = 32; +pub const GST_VIDEO_FORMAT_FLAG_COMPLEX: GstVideoFormatFlags = 64; +pub const GST_VIDEO_FORMAT_FLAG_UNPACK: GstVideoFormatFlags = 128; +pub const GST_VIDEO_FORMAT_FLAG_TILED: GstVideoFormatFlags = 256; + +pub type GstVideoFrameFlags = c_uint; +pub const GST_VIDEO_FRAME_FLAG_NONE: GstVideoFrameFlags = 0; +pub const GST_VIDEO_FRAME_FLAG_INTERLACED: GstVideoFrameFlags = 1; +pub const GST_VIDEO_FRAME_FLAG_TFF: GstVideoFrameFlags = 2; +pub const GST_VIDEO_FRAME_FLAG_RFF: GstVideoFrameFlags = 4; +pub const GST_VIDEO_FRAME_FLAG_ONEFIELD: GstVideoFrameFlags = 8; +pub const GST_VIDEO_FRAME_FLAG_MULTIPLE_VIEW: GstVideoFrameFlags = 16; +pub const GST_VIDEO_FRAME_FLAG_FIRST_IN_BUNDLE: GstVideoFrameFlags = 32; +pub const GST_VIDEO_FRAME_FLAG_TOP_FIELD: GstVideoFrameFlags = 10; +pub const GST_VIDEO_FRAME_FLAG_BOTTOM_FIELD: GstVideoFrameFlags = 8; + +pub type GstVideoFrameMapFlags = c_uint; +pub const GST_VIDEO_FRAME_MAP_FLAG_NO_REF: GstVideoFrameMapFlags = 65536; +pub const GST_VIDEO_FRAME_MAP_FLAG_LAST: GstVideoFrameMapFlags = 16777216; + +pub type GstVideoMultiviewFlags = c_uint; +pub const GST_VIDEO_MULTIVIEW_FLAGS_NONE: GstVideoMultiviewFlags = 0; +pub const GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST: GstVideoMultiviewFlags = 1; +pub const GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED: GstVideoMultiviewFlags = 2; +pub const GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED: GstVideoMultiviewFlags = 4; +pub const GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED: GstVideoMultiviewFlags = 8; +pub const GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED: GstVideoMultiviewFlags = 16; +pub const GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT: GstVideoMultiviewFlags = 16384; +pub const GST_VIDEO_MULTIVIEW_FLAGS_MIXED_MONO: GstVideoMultiviewFlags = 32768; + +pub type GstVideoOverlayFormatFlags = c_uint; +pub const GST_VIDEO_OVERLAY_FORMAT_FLAG_NONE: GstVideoOverlayFormatFlags = 0; +pub const GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA: GstVideoOverlayFormatFlags = 1; +pub const GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA: GstVideoOverlayFormatFlags = 2; + +pub type GstVideoPackFlags = c_uint; +pub const GST_VIDEO_PACK_FLAG_NONE: GstVideoPackFlags = 0; +pub const GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE: GstVideoPackFlags = 1; +pub const GST_VIDEO_PACK_FLAG_INTERLACED: GstVideoPackFlags = 2; + +pub type GstVideoResamplerFlags = c_uint; +pub const GST_VIDEO_RESAMPLER_FLAG_NONE: GstVideoResamplerFlags = 0; +pub const GST_VIDEO_RESAMPLER_FLAG_HALF_TAPS: GstVideoResamplerFlags = 1; + +pub type GstVideoScalerFlags = c_uint; +pub const GST_VIDEO_SCALER_FLAG_NONE: GstVideoScalerFlags = 0; +pub const GST_VIDEO_SCALER_FLAG_INTERLACED: GstVideoScalerFlags = 1; + +pub type GstVideoTimeCodeFlags = c_uint; +pub const GST_VIDEO_TIME_CODE_FLAGS_NONE: GstVideoTimeCodeFlags = 0; +pub const GST_VIDEO_TIME_CODE_FLAGS_DROP_FRAME: GstVideoTimeCodeFlags = 1; +pub const GST_VIDEO_TIME_CODE_FLAGS_INTERLACED: GstVideoTimeCodeFlags = 2; + +// Unions +#[repr(C)] +#[derive(Copy, Clone)] +pub union GstVideoCodecFrame_abidata { + pub ABI: GstVideoCodecFrame_abidata_ABI, + pub padding: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstVideoCodecFrame_abidata { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoCodecFrame_abidata @ {:?}", + self as *const _ + )) + .field("ABI", unsafe { &self.ABI }) + .field("padding", unsafe { &self.padding }) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub union GstVideoInfo_ABI { + pub abi: GstVideoInfo_ABI_abi, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoInfo_ABI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoInfo_ABI @ {:?}", self as *const _)) + .field("abi", unsafe { &self.abi }) + .finish() + } +} + +// Callbacks +pub type GstVideoAffineTransformationGetMatrix = + Option gboolean>; +pub type GstVideoConvertSampleCallback = + Option; +pub type GstVideoFormatPack = Option< + unsafe extern "C" fn( + *const GstVideoFormatInfo, + GstVideoPackFlags, + gpointer, + c_int, + *mut gpointer, + *const c_int, + GstVideoChromaSite, + c_int, + c_int, + ), +>; +pub type GstVideoFormatUnpack = Option< + unsafe extern "C" fn( + *const GstVideoFormatInfo, + GstVideoPackFlags, + gpointer, + *const gpointer, + *const c_int, + c_int, + c_int, + c_int, + ), +>; +pub type GstVideoGLTextureUpload = + Option gboolean>; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstColorBalanceChannelClass { + pub parent: gobject::GObjectClass, + pub value_changed: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstColorBalanceChannelClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstColorBalanceChannelClass @ {:?}", + self as *const _ + )) + .field("parent", &self.parent) + .field("value_changed", &self.value_changed) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstColorBalanceInterface { + pub iface: gobject::GTypeInterface, + pub list_channels: Option *const glib::GList>, + pub set_value: + Option, + pub get_value: + Option c_int>, + pub get_balance_type: Option GstColorBalanceType>, + pub value_changed: + Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstColorBalanceInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstColorBalanceInterface @ {:?}", + self as *const _ + )) + .field("iface", &self.iface) + .field("list_channels", &self.list_channels) + .field("set_value", &self.set_value) + .field("get_value", &self.get_value) + .field("get_balance_type", &self.get_balance_type) + .field("value_changed", &self.value_changed) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstNavigationInterface { + pub iface: gobject::GTypeInterface, + pub send_event: Option, +} + +impl ::std::fmt::Debug for GstNavigationInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstNavigationInterface @ {:?}", self as *const _)) + .field("iface", &self.iface) + .field("send_event", &self.send_event) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoAFDMeta { + pub meta: gst::GstMeta, + pub field: u8, + pub spec: GstVideoAFDSpec, + pub afd: GstVideoAFDValue, +} + +impl ::std::fmt::Debug for GstVideoAFDMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoAFDMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("field", &self.field) + .field("spec", &self.spec) + .field("afd", &self.afd) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoAffineTransformationMeta { + pub meta: gst::GstMeta, + pub matrix: [c_float; 16], +} + +impl ::std::fmt::Debug for GstVideoAffineTransformationMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoAffineTransformationMeta @ {:?}", + self as *const _ + )) + .field("meta", &self.meta) + .field("matrix", &self.matrix) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoAggregatorClass { + pub parent_class: gst_base::GstAggregatorClass, + pub update_caps: Option< + unsafe extern "C" fn(*mut GstVideoAggregator, *mut gst::GstCaps) -> *mut gst::GstCaps, + >, + pub aggregate_frames: Option< + unsafe extern "C" fn( + *mut GstVideoAggregator, + *mut *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub create_output_buffer: Option< + unsafe extern "C" fn( + *mut GstVideoAggregator, + *mut *mut gst::GstBuffer, + ) -> gst::GstFlowReturn, + >, + pub find_best_format: Option< + unsafe extern "C" fn( + *mut GstVideoAggregator, + *mut gst::GstCaps, + *mut GstVideoInfo, + *mut gboolean, + ), + >, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstVideoAggregatorClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoAggregatorClass @ {:?}", self as *const _)) + .field("update_caps", &self.update_caps) + .field("aggregate_frames", &self.aggregate_frames) + .field("create_output_buffer", &self.create_output_buffer) + .field("find_best_format", &self.find_best_format) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoAggregatorConvertPadClass { + pub parent_class: GstVideoAggregatorPadClass, + pub create_conversion_info: Option< + unsafe extern "C" fn( + *mut GstVideoAggregatorConvertPad, + *mut GstVideoAggregator, + *mut GstVideoInfo, + ), + >, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoAggregatorConvertPadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoAggregatorConvertPadClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("create_conversion_info", &self.create_conversion_info) + .finish() + } +} + +#[repr(C)] +pub struct _GstVideoAggregatorConvertPadPrivate(c_void); + +pub type GstVideoAggregatorConvertPadPrivate = *mut _GstVideoAggregatorConvertPadPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoAggregatorPadClass { + pub parent_class: gst_base::GstAggregatorPadClass, + pub update_conversion_info: Option, + pub prepare_frame: Option< + unsafe extern "C" fn( + *mut GstVideoAggregatorPad, + *mut GstVideoAggregator, + *mut gst::GstBuffer, + *mut GstVideoFrame, + ) -> gboolean, + >, + pub clean_frame: Option< + unsafe extern "C" fn( + *mut GstVideoAggregatorPad, + *mut GstVideoAggregator, + *mut GstVideoFrame, + ), + >, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstVideoAggregatorPadClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoAggregatorPadClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("update_conversion_info", &self.update_conversion_info) + .field("prepare_frame", &self.prepare_frame) + .field("clean_frame", &self.clean_frame) + .field("_gst_reserved", &self._gst_reserved) + .finish() + } +} + +#[repr(C)] +pub struct _GstVideoAggregatorPadPrivate(c_void); + +pub type GstVideoAggregatorPadPrivate = *mut _GstVideoAggregatorPadPrivate; + +#[repr(C)] +pub struct _GstVideoAggregatorPrivate(c_void); + +pub type GstVideoAggregatorPrivate = *mut _GstVideoAggregatorPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoAlignment { + pub padding_top: c_uint, + pub padding_bottom: c_uint, + pub padding_left: c_uint, + pub padding_right: c_uint, + pub stride_align: [c_uint; 4], +} + +impl ::std::fmt::Debug for GstVideoAlignment { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoAlignment @ {:?}", self as *const _)) + .field("padding_top", &self.padding_top) + .field("padding_bottom", &self.padding_bottom) + .field("padding_left", &self.padding_left) + .field("padding_right", &self.padding_right) + .field("stride_align", &self.stride_align) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoAncillary { + pub DID: u8, + pub SDID_block_number: u8, + pub data_count: u8, + pub data: [u8; 256], + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoAncillary { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoAncillary @ {:?}", self as *const _)) + .field("DID", &self.DID) + .field("SDID_block_number", &self.SDID_block_number) + .field("data_count", &self.data_count) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoBarMeta { + pub meta: gst::GstMeta, + pub field: u8, + pub is_letterbox: gboolean, + pub bar_data1: c_uint, + pub bar_data2: c_uint, +} + +impl ::std::fmt::Debug for GstVideoBarMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoBarMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("field", &self.field) + .field("is_letterbox", &self.is_letterbox) + .field("bar_data1", &self.bar_data1) + .field("bar_data2", &self.bar_data2) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoBufferPoolClass { + pub parent_class: gst::GstBufferPoolClass, +} + +impl ::std::fmt::Debug for GstVideoBufferPoolClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoBufferPoolClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _GstVideoBufferPoolPrivate(c_void); + +pub type GstVideoBufferPoolPrivate = *mut _GstVideoBufferPoolPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoCaptionMeta { + pub meta: gst::GstMeta, + pub caption_type: GstVideoCaptionType, + pub data: *mut u8, + pub size: size_t, +} + +impl ::std::fmt::Debug for GstVideoCaptionMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoCaptionMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("caption_type", &self.caption_type) + .field("data", &self.data) + .field("size", &self.size) + .finish() + } +} + +#[repr(C)] +pub struct _GstVideoChromaResample(c_void); + +pub type GstVideoChromaResample = *mut _GstVideoChromaResample; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoCodecFrame { + pub ref_count: c_int, + pub flags: u32, + pub system_frame_number: u32, + pub decode_frame_number: u32, + pub presentation_frame_number: u32, + pub dts: gst::GstClockTime, + pub pts: gst::GstClockTime, + pub duration: gst::GstClockTime, + pub distance_from_sync: c_int, + pub input_buffer: *mut gst::GstBuffer, + pub output_buffer: *mut gst::GstBuffer, + pub deadline: gst::GstClockTime, + pub events: *mut glib::GList, + pub user_data: gpointer, + pub user_data_destroy_notify: glib::GDestroyNotify, + pub abidata: GstVideoCodecFrame_abidata, +} + +impl ::std::fmt::Debug for GstVideoCodecFrame { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoCodecFrame @ {:?}", self as *const _)) + .field("system_frame_number", &self.system_frame_number) + .field("dts", &self.dts) + .field("pts", &self.pts) + .field("duration", &self.duration) + .field("distance_from_sync", &self.distance_from_sync) + .field("input_buffer", &self.input_buffer) + .field("output_buffer", &self.output_buffer) + .field("deadline", &self.deadline) + .field("abidata", &self.abidata) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoCodecFrame_abidata_ABI { + pub ts: gst::GstClockTime, + pub ts2: gst::GstClockTime, + pub num_subframes: c_uint, +} + +impl ::std::fmt::Debug for GstVideoCodecFrame_abidata_ABI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoCodecFrame_abidata_ABI @ {:?}", + self as *const _ + )) + .field("ts", &self.ts) + .field("ts2", &self.ts2) + .field("num_subframes", &self.num_subframes) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoCodecState { + pub ref_count: c_int, + pub info: GstVideoInfo, + pub caps: *mut gst::GstCaps, + pub codec_data: *mut gst::GstBuffer, + pub allocation_caps: *mut gst::GstCaps, + pub padding: [gpointer; 19], +} + +impl ::std::fmt::Debug for GstVideoCodecState { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoCodecState @ {:?}", self as *const _)) + .field("info", &self.info) + .field("caps", &self.caps) + .field("codec_data", &self.codec_data) + .field("allocation_caps", &self.allocation_caps) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoColorPrimariesInfo { + pub primaries: GstVideoColorPrimaries, + pub Wx: c_double, + pub Wy: c_double, + pub Rx: c_double, + pub Ry: c_double, + pub Gx: c_double, + pub Gy: c_double, + pub Bx: c_double, + pub By: c_double, +} + +impl ::std::fmt::Debug for GstVideoColorPrimariesInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoColorPrimariesInfo @ {:?}", + self as *const _ + )) + .field("primaries", &self.primaries) + .field("Wx", &self.Wx) + .field("Wy", &self.Wy) + .field("Rx", &self.Rx) + .field("Ry", &self.Ry) + .field("Gx", &self.Gx) + .field("Gy", &self.Gy) + .field("Bx", &self.Bx) + .field("By", &self.By) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoColorimetry { + pub range: GstVideoColorRange, + pub matrix: GstVideoColorMatrix, + pub transfer: GstVideoTransferFunction, + pub primaries: GstVideoColorPrimaries, +} + +impl ::std::fmt::Debug for GstVideoColorimetry { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoColorimetry @ {:?}", self as *const _)) + .field("range", &self.range) + .field("matrix", &self.matrix) + .field("transfer", &self.transfer) + .field("primaries", &self.primaries) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoContentLightLevel { + pub max_content_light_level: u16, + pub max_frame_average_light_level: u16, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoContentLightLevel { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoContentLightLevel @ {:?}", + self as *const _ + )) + .field("max_content_light_level", &self.max_content_light_level) + .field( + "max_frame_average_light_level", + &self.max_frame_average_light_level, + ) + .finish() + } +} + +#[repr(C)] +pub struct _GstVideoConverter(c_void); + +pub type GstVideoConverter = *mut _GstVideoConverter; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoCropMeta { + pub meta: gst::GstMeta, + pub x: c_uint, + pub y: c_uint, + pub width: c_uint, + pub height: c_uint, +} + +impl ::std::fmt::Debug for GstVideoCropMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoCropMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("x", &self.x) + .field("y", &self.y) + .field("width", &self.width) + .field("height", &self.height) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoDecoderClass { + pub element_class: gst::GstElementClass, + pub open: Option gboolean>, + pub close: Option gboolean>, + pub start: Option gboolean>, + pub stop: Option gboolean>, + pub parse: Option< + unsafe extern "C" fn( + *mut GstVideoDecoder, + *mut GstVideoCodecFrame, + *mut gst_base::GstAdapter, + gboolean, + ) -> gst::GstFlowReturn, + >, + pub set_format: + Option gboolean>, + pub reset: Option gboolean>, + pub finish: Option gst::GstFlowReturn>, + pub handle_frame: Option< + unsafe extern "C" fn(*mut GstVideoDecoder, *mut GstVideoCodecFrame) -> gst::GstFlowReturn, + >, + pub sink_event: + Option gboolean>, + pub src_event: + Option gboolean>, + pub negotiate: Option gboolean>, + pub decide_allocation: + Option gboolean>, + pub propose_allocation: + Option gboolean>, + pub flush: Option gboolean>, + pub sink_query: + Option gboolean>, + pub src_query: + Option gboolean>, + pub getcaps: + Option *mut gst::GstCaps>, + pub drain: Option gst::GstFlowReturn>, + pub transform_meta: Option< + unsafe extern "C" fn( + *mut GstVideoDecoder, + *mut GstVideoCodecFrame, + *mut gst::GstMeta, + ) -> gboolean, + >, + pub padding: [gpointer; 14], +} + +impl ::std::fmt::Debug for GstVideoDecoderClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoDecoderClass @ {:?}", self as *const _)) + .field("open", &self.open) + .field("close", &self.close) + .field("start", &self.start) + .field("stop", &self.stop) + .field("parse", &self.parse) + .field("set_format", &self.set_format) + .field("reset", &self.reset) + .field("finish", &self.finish) + .field("handle_frame", &self.handle_frame) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("negotiate", &self.negotiate) + .field("decide_allocation", &self.decide_allocation) + .field("propose_allocation", &self.propose_allocation) + .field("flush", &self.flush) + .field("sink_query", &self.sink_query) + .field("src_query", &self.src_query) + .field("getcaps", &self.getcaps) + .field("drain", &self.drain) + .field("transform_meta", &self.transform_meta) + .finish() + } +} + +#[repr(C)] +pub struct _GstVideoDecoderPrivate(c_void); + +pub type GstVideoDecoderPrivate = *mut _GstVideoDecoderPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoDirectionInterface { + pub iface: gobject::GTypeInterface, +} + +impl ::std::fmt::Debug for GstVideoDirectionInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoDirectionInterface @ {:?}", + self as *const _ + )) + .field("iface", &self.iface) + .finish() + } +} + +#[repr(C)] +pub struct _GstVideoDither(c_void); + +pub type GstVideoDither = *mut _GstVideoDither; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoEncoderClass { + pub element_class: gst::GstElementClass, + pub open: Option gboolean>, + pub close: Option gboolean>, + pub start: Option gboolean>, + pub stop: Option gboolean>, + pub set_format: + Option gboolean>, + pub handle_frame: Option< + unsafe extern "C" fn(*mut GstVideoEncoder, *mut GstVideoCodecFrame) -> gst::GstFlowReturn, + >, + pub reset: Option gboolean>, + pub finish: Option gst::GstFlowReturn>, + pub pre_push: Option< + unsafe extern "C" fn(*mut GstVideoEncoder, *mut GstVideoCodecFrame) -> gst::GstFlowReturn, + >, + pub getcaps: + Option *mut gst::GstCaps>, + pub sink_event: + Option gboolean>, + pub src_event: + Option gboolean>, + pub negotiate: Option gboolean>, + pub decide_allocation: + Option gboolean>, + pub propose_allocation: + Option gboolean>, + pub flush: Option gboolean>, + pub sink_query: + Option gboolean>, + pub src_query: + Option gboolean>, + pub transform_meta: Option< + unsafe extern "C" fn( + *mut GstVideoEncoder, + *mut GstVideoCodecFrame, + *mut gst::GstMeta, + ) -> gboolean, + >, + pub _gst_reserved: [gpointer; 16], +} + +impl ::std::fmt::Debug for GstVideoEncoderClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoEncoderClass @ {:?}", self as *const _)) + .field("open", &self.open) + .field("close", &self.close) + .field("start", &self.start) + .field("stop", &self.stop) + .field("set_format", &self.set_format) + .field("handle_frame", &self.handle_frame) + .field("reset", &self.reset) + .field("finish", &self.finish) + .field("pre_push", &self.pre_push) + .field("getcaps", &self.getcaps) + .field("sink_event", &self.sink_event) + .field("src_event", &self.src_event) + .field("negotiate", &self.negotiate) + .field("decide_allocation", &self.decide_allocation) + .field("propose_allocation", &self.propose_allocation) + .field("flush", &self.flush) + .field("sink_query", &self.sink_query) + .field("src_query", &self.src_query) + .field("transform_meta", &self.transform_meta) + .finish() + } +} + +#[repr(C)] +pub struct _GstVideoEncoderPrivate(c_void); + +pub type GstVideoEncoderPrivate = *mut _GstVideoEncoderPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoFilterClass { + pub parent_class: gst_base::GstBaseTransformClass, + pub set_info: Option< + unsafe extern "C" fn( + *mut GstVideoFilter, + *mut gst::GstCaps, + *mut GstVideoInfo, + *mut gst::GstCaps, + *mut GstVideoInfo, + ) -> gboolean, + >, + pub transform_frame: Option< + unsafe extern "C" fn( + *mut GstVideoFilter, + *mut GstVideoFrame, + *mut GstVideoFrame, + ) -> gst::GstFlowReturn, + >, + pub transform_frame_ip: + Option gst::GstFlowReturn>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoFilterClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoFilterClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("set_info", &self.set_info) + .field("transform_frame", &self.transform_frame) + .field("transform_frame_ip", &self.transform_frame_ip) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoFormatInfo { + pub format: GstVideoFormat, + pub name: *const c_char, + pub description: *const c_char, + pub flags: GstVideoFormatFlags, + pub bits: c_uint, + pub n_components: c_uint, + pub shift: [c_uint; 4], + pub depth: [c_uint; 4], + pub pixel_stride: [c_int; 4], + pub n_planes: c_uint, + pub plane: [c_uint; 4], + pub poffset: [c_uint; 4], + pub w_sub: [c_uint; 4], + pub h_sub: [c_uint; 4], + pub unpack_format: GstVideoFormat, + pub unpack_func: GstVideoFormatUnpack, + pub pack_lines: c_int, + pub pack_func: GstVideoFormatPack, + pub tile_mode: GstVideoTileMode, + pub tile_ws: c_uint, + pub tile_hs: c_uint, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoFormatInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoFormatInfo @ {:?}", self as *const _)) + .field("format", &self.format) + .field("name", &self.name) + .field("description", &self.description) + .field("flags", &self.flags) + .field("bits", &self.bits) + .field("n_components", &self.n_components) + .field("shift", &self.shift) + .field("depth", &self.depth) + .field("pixel_stride", &self.pixel_stride) + .field("n_planes", &self.n_planes) + .field("plane", &self.plane) + .field("poffset", &self.poffset) + .field("w_sub", &self.w_sub) + .field("h_sub", &self.h_sub) + .field("unpack_format", &self.unpack_format) + .field("unpack_func", &self.unpack_func) + .field("pack_lines", &self.pack_lines) + .field("pack_func", &self.pack_func) + .field("tile_mode", &self.tile_mode) + .field("tile_ws", &self.tile_ws) + .field("tile_hs", &self.tile_hs) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoFrame { + pub info: GstVideoInfo, + pub flags: GstVideoFrameFlags, + pub buffer: *mut gst::GstBuffer, + pub meta: gpointer, + pub id: c_int, + pub data: [gpointer; 4], + pub map: [gst::GstMapInfo; 4], + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoFrame { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoFrame @ {:?}", self as *const _)) + .field("info", &self.info) + .field("flags", &self.flags) + .field("buffer", &self.buffer) + .field("meta", &self.meta) + .field("id", &self.id) + .field("data", &self.data) + .field("map", &self.map) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoGLTextureUploadMeta { + pub meta: gst::GstMeta, + pub texture_orientation: GstVideoGLTextureOrientation, + pub n_textures: c_uint, + pub texture_type: [GstVideoGLTextureType; 4], + pub buffer: *mut gst::GstBuffer, + pub upload: GstVideoGLTextureUpload, + pub user_data: gpointer, + pub user_data_copy: gobject::GBoxedCopyFunc, + pub user_data_free: gobject::GBoxedFreeFunc, +} + +impl ::std::fmt::Debug for GstVideoGLTextureUploadMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoGLTextureUploadMeta @ {:?}", + self as *const _ + )) + .field("meta", &self.meta) + .field("texture_orientation", &self.texture_orientation) + .field("n_textures", &self.n_textures) + .field("texture_type", &self.texture_type) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoInfo { + pub finfo: *const GstVideoFormatInfo, + pub interlace_mode: GstVideoInterlaceMode, + pub flags: GstVideoFlags, + pub width: c_int, + pub height: c_int, + pub size: size_t, + pub views: c_int, + pub chroma_site: GstVideoChromaSite, + pub colorimetry: GstVideoColorimetry, + pub par_n: c_int, + pub par_d: c_int, + pub fps_n: c_int, + pub fps_d: c_int, + pub offset: [size_t; 4], + pub stride: [c_int; 4], + pub ABI: GstVideoInfo_ABI, +} + +impl ::std::fmt::Debug for GstVideoInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoInfo @ {:?}", self as *const _)) + .field("finfo", &self.finfo) + .field("interlace_mode", &self.interlace_mode) + .field("flags", &self.flags) + .field("width", &self.width) + .field("height", &self.height) + .field("size", &self.size) + .field("views", &self.views) + .field("chroma_site", &self.chroma_site) + .field("colorimetry", &self.colorimetry) + .field("par_n", &self.par_n) + .field("par_d", &self.par_d) + .field("fps_n", &self.fps_n) + .field("fps_d", &self.fps_d) + .field("offset", &self.offset) + .field("stride", &self.stride) + .field("ABI", &self.ABI) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoInfo_ABI_abi { + pub multiview_mode: GstVideoMultiviewMode, + pub multiview_flags: GstVideoMultiviewFlags, + pub field_order: GstVideoFieldOrder, +} + +impl ::std::fmt::Debug for GstVideoInfo_ABI_abi { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoInfo_ABI_abi @ {:?}", self as *const _)) + .field("multiview_mode", &self.multiview_mode) + .field("multiview_flags", &self.multiview_flags) + .field("field_order", &self.field_order) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoMasteringDisplayInfo { + pub display_primaries: [GstVideoMasteringDisplayInfoCoordinates; 3], + pub white_point: GstVideoMasteringDisplayInfoCoordinates, + pub max_display_mastering_luminance: u32, + pub min_display_mastering_luminance: u32, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoMasteringDisplayInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoMasteringDisplayInfo @ {:?}", + self as *const _ + )) + .field("display_primaries", &self.display_primaries) + .field("white_point", &self.white_point) + .field( + "max_display_mastering_luminance", + &self.max_display_mastering_luminance, + ) + .field( + "min_display_mastering_luminance", + &self.min_display_mastering_luminance, + ) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoMasteringDisplayInfoCoordinates { + pub x: u16, + pub y: u16, +} + +impl ::std::fmt::Debug for GstVideoMasteringDisplayInfoCoordinates { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoMasteringDisplayInfoCoordinates @ {:?}", + self as *const _ + )) + .field("x", &self.x) + .field("y", &self.y) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoMeta { + pub meta: gst::GstMeta, + pub buffer: *mut gst::GstBuffer, + pub flags: GstVideoFrameFlags, + pub format: GstVideoFormat, + pub id: c_int, + pub width: c_uint, + pub height: c_uint, + pub n_planes: c_uint, + pub offset: [size_t; 4], + pub stride: [c_int; 4], + pub map: Option< + unsafe extern "C" fn( + *mut GstVideoMeta, + c_uint, + *mut gst::GstMapInfo, + *mut gpointer, + *mut c_int, + gst::GstMapFlags, + ) -> gboolean, + >, + pub unmap: + Option gboolean>, + pub alignment: GstVideoAlignment, +} + +impl ::std::fmt::Debug for GstVideoMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("buffer", &self.buffer) + .field("flags", &self.flags) + .field("format", &self.format) + .field("id", &self.id) + .field("width", &self.width) + .field("height", &self.height) + .field("n_planes", &self.n_planes) + .field("offset", &self.offset) + .field("stride", &self.stride) + .field("map", &self.map) + .field("unmap", &self.unmap) + .field("alignment", &self.alignment) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoMetaTransform { + pub in_info: *mut GstVideoInfo, + pub out_info: *mut GstVideoInfo, +} + +impl ::std::fmt::Debug for GstVideoMetaTransform { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoMetaTransform @ {:?}", self as *const _)) + .field("in_info", &self.in_info) + .field("out_info", &self.out_info) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoOrientationInterface { + pub iface: gobject::GTypeInterface, + pub get_hflip: Option gboolean>, + pub get_vflip: Option gboolean>, + pub get_hcenter: Option gboolean>, + pub get_vcenter: Option gboolean>, + pub set_hflip: Option gboolean>, + pub set_vflip: Option gboolean>, + pub set_hcenter: Option gboolean>, + pub set_vcenter: Option gboolean>, +} + +impl ::std::fmt::Debug for GstVideoOrientationInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoOrientationInterface @ {:?}", + self as *const _ + )) + .field("iface", &self.iface) + .field("get_hflip", &self.get_hflip) + .field("get_vflip", &self.get_vflip) + .field("get_hcenter", &self.get_hcenter) + .field("get_vcenter", &self.get_vcenter) + .field("set_hflip", &self.set_hflip) + .field("set_vflip", &self.set_vflip) + .field("set_hcenter", &self.set_hcenter) + .field("set_vcenter", &self.set_vcenter) + .finish() + } +} + +#[repr(C)] +pub struct GstVideoOverlayComposition(c_void); + +impl ::std::fmt::Debug for GstVideoOverlayComposition { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoOverlayComposition @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoOverlayCompositionMeta { + pub meta: gst::GstMeta, + pub overlay: *mut GstVideoOverlayComposition, +} + +impl ::std::fmt::Debug for GstVideoOverlayCompositionMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoOverlayCompositionMeta @ {:?}", + self as *const _ + )) + .field("meta", &self.meta) + .field("overlay", &self.overlay) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoOverlayInterface { + pub iface: gobject::GTypeInterface, + pub expose: Option, + pub handle_events: Option, + pub set_render_rectangle: + Option, + pub set_window_handle: Option, +} + +impl ::std::fmt::Debug for GstVideoOverlayInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoOverlayInterface @ {:?}", + self as *const _ + )) + .field("iface", &self.iface) + .field("expose", &self.expose) + .field("handle_events", &self.handle_events) + .field("set_render_rectangle", &self.set_render_rectangle) + .field("set_window_handle", &self.set_window_handle) + .finish() + } +} + +#[repr(C)] +pub struct GstVideoOverlayRectangle(c_void); + +impl ::std::fmt::Debug for GstVideoOverlayRectangle { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoOverlayRectangle @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoRectangle { + pub x: c_int, + pub y: c_int, + pub w: c_int, + pub h: c_int, +} + +impl ::std::fmt::Debug for GstVideoRectangle { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoRectangle @ {:?}", self as *const _)) + .field("x", &self.x) + .field("y", &self.y) + .field("w", &self.w) + .field("h", &self.h) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoRegionOfInterestMeta { + pub meta: gst::GstMeta, + pub roi_type: glib::GQuark, + pub id: c_int, + pub parent_id: c_int, + pub x: c_uint, + pub y: c_uint, + pub w: c_uint, + pub h: c_uint, + pub params: *mut glib::GList, +} + +impl ::std::fmt::Debug for GstVideoRegionOfInterestMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoRegionOfInterestMeta @ {:?}", + self as *const _ + )) + .field("meta", &self.meta) + .field("roi_type", &self.roi_type) + .field("id", &self.id) + .field("parent_id", &self.parent_id) + .field("x", &self.x) + .field("y", &self.y) + .field("w", &self.w) + .field("h", &self.h) + .field("params", &self.params) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoResampler { + pub in_size: c_int, + pub out_size: c_int, + pub max_taps: c_uint, + pub n_phases: c_uint, + pub offset: *mut u32, + pub phase: *mut u32, + pub n_taps: *mut u32, + pub taps: *mut c_double, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoResampler { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoResampler @ {:?}", self as *const _)) + .field("in_size", &self.in_size) + .field("out_size", &self.out_size) + .field("max_taps", &self.max_taps) + .field("n_phases", &self.n_phases) + .field("offset", &self.offset) + .field("phase", &self.phase) + .field("n_taps", &self.n_taps) + .field("taps", &self.taps) + .finish() + } +} + +#[repr(C)] +pub struct _GstVideoScaler(c_void); + +pub type GstVideoScaler = *mut _GstVideoScaler; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoSinkClass { + pub parent_class: gst_base::GstBaseSinkClass, + pub show_frame: + Option gst::GstFlowReturn>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoSinkClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoSinkClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("show_frame", &self.show_frame) + .finish() + } +} + +#[repr(C)] +pub struct _GstVideoSinkPrivate(c_void); + +pub type GstVideoSinkPrivate = *mut _GstVideoSinkPrivate; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoTimeCode { + pub config: GstVideoTimeCodeConfig, + pub hours: c_uint, + pub minutes: c_uint, + pub seconds: c_uint, + pub frames: c_uint, + pub field_count: c_uint, +} + +impl ::std::fmt::Debug for GstVideoTimeCode { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoTimeCode @ {:?}", self as *const _)) + .field("config", &self.config) + .field("hours", &self.hours) + .field("minutes", &self.minutes) + .field("seconds", &self.seconds) + .field("frames", &self.frames) + .field("field_count", &self.field_count) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoTimeCodeConfig { + pub fps_n: c_uint, + pub fps_d: c_uint, + pub flags: GstVideoTimeCodeFlags, + pub latest_daily_jam: *mut glib::GDateTime, +} + +impl ::std::fmt::Debug for GstVideoTimeCodeConfig { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoTimeCodeConfig @ {:?}", self as *const _)) + .field("fps_n", &self.fps_n) + .field("fps_d", &self.fps_d) + .field("flags", &self.flags) + .field("latest_daily_jam", &self.latest_daily_jam) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoTimeCodeInterval { + pub hours: c_uint, + pub minutes: c_uint, + pub seconds: c_uint, + pub frames: c_uint, +} + +impl ::std::fmt::Debug for GstVideoTimeCodeInterval { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoTimeCodeInterval @ {:?}", + self as *const _ + )) + .field("hours", &self.hours) + .field("minutes", &self.minutes) + .field("seconds", &self.seconds) + .field("frames", &self.frames) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoTimeCodeMeta { + pub meta: gst::GstMeta, + pub tc: GstVideoTimeCode, +} + +impl ::std::fmt::Debug for GstVideoTimeCodeMeta { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoTimeCodeMeta @ {:?}", self as *const _)) + .field("meta", &self.meta) + .field("tc", &self.tc) + .finish() + } +} + +#[repr(C)] +pub struct GstVideoVBIEncoder(c_void); + +impl ::std::fmt::Debug for GstVideoVBIEncoder { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoVBIEncoder @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstVideoVBIParser(c_void); + +impl ::std::fmt::Debug for GstVideoVBIParser { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoVBIParser @ {:?}", self as *const _)) + .finish() + } +} + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstColorBalanceChannel { + pub parent: gobject::GObject, + pub label: *mut c_char, + pub min_value: c_int, + pub max_value: c_int, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstColorBalanceChannel { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstColorBalanceChannel @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("label", &self.label) + .field("min_value", &self.min_value) + .field("max_value", &self.max_value) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoAggregator { + pub aggregator: gst_base::GstAggregator, + pub info: GstVideoInfo, + pub priv_: *mut GstVideoAggregatorPrivate, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstVideoAggregator { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoAggregator @ {:?}", self as *const _)) + .field("aggregator", &self.aggregator) + .field("info", &self.info) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoAggregatorConvertPad { + pub parent: GstVideoAggregatorPad, + pub priv_: *mut GstVideoAggregatorConvertPadPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoAggregatorConvertPad { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoAggregatorConvertPad @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoAggregatorPad { + pub parent: gst_base::GstAggregatorPad, + pub info: GstVideoInfo, + pub priv_: *mut GstVideoAggregatorPadPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoAggregatorPad { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoAggregatorPad @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("info", &self.info) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoBufferPool { + pub bufferpool: gst::GstBufferPool, + pub priv_: *mut GstVideoBufferPoolPrivate, +} + +impl ::std::fmt::Debug for GstVideoBufferPool { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoBufferPool @ {:?}", self as *const _)) + .field("bufferpool", &self.bufferpool) + .field("priv_", &self.priv_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoDecoder { + pub element: gst::GstElement, + pub sinkpad: *mut gst::GstPad, + pub srcpad: *mut gst::GstPad, + pub stream_lock: glib::GRecMutex, + pub input_segment: gst::GstSegment, + pub output_segment: gst::GstSegment, + pub priv_: *mut GstVideoDecoderPrivate, + pub padding: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstVideoDecoder { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoDecoder @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoEncoder { + pub element: gst::GstElement, + pub sinkpad: *mut gst::GstPad, + pub srcpad: *mut gst::GstPad, + pub stream_lock: glib::GRecMutex, + pub input_segment: gst::GstSegment, + pub output_segment: gst::GstSegment, + pub priv_: *mut GstVideoEncoderPrivate, + pub padding: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstVideoEncoder { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoEncoder @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoFilter { + pub element: gst_base::GstBaseTransform, + pub negotiated: gboolean, + pub in_info: GstVideoInfo, + pub out_info: GstVideoInfo, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoFilter { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoFilter @ {:?}", self as *const _)) + .field("element", &self.element) + .field("negotiated", &self.negotiated) + .field("in_info", &self.in_info) + .field("out_info", &self.out_info) + .finish() + } +} + +#[repr(C)] +pub struct GstVideoMultiviewFlagsSet(c_void); + +impl ::std::fmt::Debug for GstVideoMultiviewFlagsSet { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstVideoMultiviewFlagsSet @ {:?}", + self as *const _ + )) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstVideoSink { + pub element: gst_base::GstBaseSink, + pub width: c_int, + pub height: c_int, + pub priv_: *mut GstVideoSinkPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstVideoSink { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstVideoSink @ {:?}", self as *const _)) + .field("element", &self.element) + .field("width", &self.width) + .field("height", &self.height) + .finish() + } +} + +// Interfaces +#[repr(C)] +pub struct GstColorBalance(c_void); + +impl ::std::fmt::Debug for GstColorBalance { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstColorBalance @ {:?}", self as *const _) + } +} + +#[repr(C)] +pub struct GstNavigation(c_void); + +impl ::std::fmt::Debug for GstNavigation { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstNavigation @ {:?}", self as *const _) + } +} + +#[repr(C)] +pub struct GstVideoDirection(c_void); + +impl ::std::fmt::Debug for GstVideoDirection { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstVideoDirection @ {:?}", self as *const _) + } +} + +#[repr(C)] +pub struct GstVideoOrientation(c_void); + +impl ::std::fmt::Debug for GstVideoOrientation { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstVideoOrientation @ {:?}", self as *const _) + } +} + +#[repr(C)] +pub struct GstVideoOverlay(c_void); + +impl ::std::fmt::Debug for GstVideoOverlay { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstVideoOverlay @ {:?}", self as *const _) + } +} + +#[link(name = "gstvideo-1.0")] +extern "C" { + + //========================================================================= + // GstColorBalanceType + //========================================================================= + pub fn gst_color_balance_type_get_type() -> GType; + + //========================================================================= + // GstNavigationCommand + //========================================================================= + pub fn gst_navigation_command_get_type() -> GType; + + //========================================================================= + // GstNavigationEventType + //========================================================================= + pub fn gst_navigation_event_type_get_type() -> GType; + + //========================================================================= + // GstNavigationMessageType + //========================================================================= + pub fn gst_navigation_message_type_get_type() -> GType; + + //========================================================================= + // GstNavigationQueryType + //========================================================================= + pub fn gst_navigation_query_type_get_type() -> GType; + + //========================================================================= + // GstVideoAFDSpec + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_afd_spec_get_type() -> GType; + + //========================================================================= + // GstVideoAFDValue + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_afd_value_get_type() -> GType; + + //========================================================================= + // GstVideoAlphaMode + //========================================================================= + pub fn gst_video_alpha_mode_get_type() -> GType; + + //========================================================================= + // GstVideoAncillaryDID + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_ancillary_did_get_type() -> GType; + + //========================================================================= + // GstVideoAncillaryDID16 + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_ancillary_di_d16_get_type() -> GType; + + //========================================================================= + // GstVideoCaptionType + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_caption_type_get_type() -> GType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_caption_type_from_caps(caps: *const gst::GstCaps) -> GstVideoCaptionType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_caption_type_to_caps(type_: GstVideoCaptionType) -> *mut gst::GstCaps; + + //========================================================================= + // GstVideoChromaMethod + //========================================================================= + pub fn gst_video_chroma_method_get_type() -> GType; + + //========================================================================= + // GstVideoChromaMode + //========================================================================= + pub fn gst_video_chroma_mode_get_type() -> GType; + + //========================================================================= + // GstVideoColorMatrix + //========================================================================= + pub fn gst_video_color_matrix_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_color_matrix_from_iso(value: c_uint) -> GstVideoColorMatrix; + pub fn gst_video_color_matrix_get_Kr_Kb( + matrix: GstVideoColorMatrix, + Kr: *mut c_double, + Kb: *mut c_double, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_color_matrix_to_iso(matrix: GstVideoColorMatrix) -> c_uint; + + //========================================================================= + // GstVideoColorPrimaries + //========================================================================= + pub fn gst_video_color_primaries_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_color_primaries_from_iso(value: c_uint) -> GstVideoColorPrimaries; + pub fn gst_video_color_primaries_get_info( + primaries: GstVideoColorPrimaries, + ) -> *const GstVideoColorPrimariesInfo; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_color_primaries_to_iso(primaries: GstVideoColorPrimaries) -> c_uint; + + //========================================================================= + // GstVideoColorRange + //========================================================================= + pub fn gst_video_color_range_get_type() -> GType; + pub fn gst_video_color_range_offsets( + range: GstVideoColorRange, + info: *const GstVideoFormatInfo, + offset: *mut [c_int; 4], + scale: *mut [c_int; 4], + ); + + //========================================================================= + // GstVideoDitherMethod + //========================================================================= + pub fn gst_video_dither_method_get_type() -> GType; + + //========================================================================= + // GstVideoFieldOrder + //========================================================================= + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_field_order_get_type() -> GType; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_field_order_from_string(order: *const c_char) -> GstVideoFieldOrder; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_field_order_to_string(order: GstVideoFieldOrder) -> *const c_char; + + //========================================================================= + // GstVideoFormat + //========================================================================= + pub fn gst_video_format_get_type() -> GType; + pub fn gst_video_format_from_fourcc(fourcc: u32) -> GstVideoFormat; + pub fn gst_video_format_from_masks( + depth: c_int, + bpp: c_int, + endianness: c_int, + red_mask: c_uint, + green_mask: c_uint, + blue_mask: c_uint, + alpha_mask: c_uint, + ) -> GstVideoFormat; + pub fn gst_video_format_from_string(format: *const c_char) -> GstVideoFormat; + pub fn gst_video_format_get_info(format: GstVideoFormat) -> *const GstVideoFormatInfo; + pub fn gst_video_format_get_palette(format: GstVideoFormat, size: *mut size_t) + -> gconstpointer; + pub fn gst_video_format_to_fourcc(format: GstVideoFormat) -> u32; + pub fn gst_video_format_to_string(format: GstVideoFormat) -> *const c_char; + + //========================================================================= + // GstVideoGammaMode + //========================================================================= + pub fn gst_video_gamma_mode_get_type() -> GType; + + //========================================================================= + // GstVideoInterlaceMode + //========================================================================= + pub fn gst_video_interlace_mode_get_type() -> GType; + pub fn gst_video_interlace_mode_from_string(mode: *const c_char) -> GstVideoInterlaceMode; + pub fn gst_video_interlace_mode_to_string(mode: GstVideoInterlaceMode) -> *const c_char; + + //========================================================================= + // GstVideoMatrixMode + //========================================================================= + pub fn gst_video_matrix_mode_get_type() -> GType; + + //========================================================================= + // GstVideoMultiviewFramePacking + //========================================================================= + pub fn gst_video_multiview_frame_packing_get_type() -> GType; + + //========================================================================= + // GstVideoMultiviewMode + //========================================================================= + pub fn gst_video_multiview_mode_get_type() -> GType; + pub fn gst_video_multiview_mode_from_caps_string( + caps_mview_mode: *const c_char, + ) -> GstVideoMultiviewMode; + pub fn gst_video_multiview_mode_to_caps_string( + mview_mode: GstVideoMultiviewMode, + ) -> *const c_char; + + //========================================================================= + // GstVideoOrientationMethod + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_orientation_method_get_type() -> GType; + + //========================================================================= + // GstVideoPrimariesMode + //========================================================================= + pub fn gst_video_primaries_mode_get_type() -> GType; + + //========================================================================= + // GstVideoResamplerMethod + //========================================================================= + pub fn gst_video_resampler_method_get_type() -> GType; + + //========================================================================= + // GstVideoTileMode + //========================================================================= + pub fn gst_video_tile_mode_get_type() -> GType; + + //========================================================================= + // GstVideoTileType + //========================================================================= + pub fn gst_video_tile_type_get_type() -> GType; + + //========================================================================= + // GstVideoTransferFunction + //========================================================================= + pub fn gst_video_transfer_function_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_transfer_function_from_iso(value: c_uint) -> GstVideoTransferFunction; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_transfer_function_is_equivalent( + from_func: GstVideoTransferFunction, + from_bpp: c_uint, + to_func: GstVideoTransferFunction, + to_bpp: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_transfer_function_to_iso(func: GstVideoTransferFunction) -> c_uint; + + //========================================================================= + // GstVideoVBIParserResult + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_parser_result_get_type() -> GType; + + //========================================================================= + // GstVideoBufferFlags + //========================================================================= + pub fn gst_video_buffer_flags_get_type() -> GType; + + //========================================================================= + // GstVideoChromaFlags + //========================================================================= + pub fn gst_video_chroma_flags_get_type() -> GType; + + //========================================================================= + // GstVideoChromaSite + //========================================================================= + pub fn gst_video_chroma_site_get_type() -> GType; + + //========================================================================= + // GstVideoDitherFlags + //========================================================================= + pub fn gst_video_dither_flags_get_type() -> GType; + + //========================================================================= + // GstVideoFlags + //========================================================================= + pub fn gst_video_flags_get_type() -> GType; + + //========================================================================= + // GstVideoFormatFlags + //========================================================================= + pub fn gst_video_format_flags_get_type() -> GType; + + //========================================================================= + // GstVideoFrameFlags + //========================================================================= + pub fn gst_video_frame_flags_get_type() -> GType; + + //========================================================================= + // GstVideoFrameMapFlags + //========================================================================= + pub fn gst_video_frame_map_flags_get_type() -> GType; + + //========================================================================= + // GstVideoMultiviewFlags + //========================================================================= + pub fn gst_video_multiview_flags_get_type() -> GType; + + //========================================================================= + // GstVideoOverlayFormatFlags + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_overlay_format_flags_get_type() -> GType; + + //========================================================================= + // GstVideoPackFlags + //========================================================================= + pub fn gst_video_pack_flags_get_type() -> GType; + + //========================================================================= + // GstVideoResamplerFlags + //========================================================================= + pub fn gst_video_resampler_flags_get_type() -> GType; + + //========================================================================= + // GstVideoScalerFlags + //========================================================================= + pub fn gst_video_scaler_flags_get_type() -> GType; + + //========================================================================= + // GstVideoTimeCodeFlags + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_time_code_flags_get_type() -> GType; + + //========================================================================= + // GstVideoAFDMeta + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_afd_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstVideoAffineTransformationMeta + //========================================================================= + pub fn gst_video_affine_transformation_meta_apply_matrix( + meta: *mut GstVideoAffineTransformationMeta, + matrix: *const [c_float; 16], + ); + pub fn gst_video_affine_transformation_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstVideoAlignment + //========================================================================= + pub fn gst_video_alignment_reset(align: *mut GstVideoAlignment); + + //========================================================================= + // GstVideoBarMeta + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_bar_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstVideoCaptionMeta + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_caption_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstVideoChromaResample + //========================================================================= + pub fn gst_video_chroma_resample_free(resample: *mut GstVideoChromaResample); + pub fn gst_video_chroma_resample_get_info( + resample: *mut GstVideoChromaResample, + n_lines: *mut c_uint, + offset: *mut c_int, + ); + pub fn gst_video_chroma_resample_new( + method: GstVideoChromaMethod, + site: GstVideoChromaSite, + flags: GstVideoChromaFlags, + format: GstVideoFormat, + h_factor: c_int, + v_factor: c_int, + ) -> *mut GstVideoChromaResample; + + //========================================================================= + // GstVideoCodecFrame + //========================================================================= + pub fn gst_video_codec_frame_get_type() -> GType; + pub fn gst_video_codec_frame_get_user_data(frame: *mut GstVideoCodecFrame) -> gpointer; + pub fn gst_video_codec_frame_ref(frame: *mut GstVideoCodecFrame) -> *mut GstVideoCodecFrame; + pub fn gst_video_codec_frame_set_user_data( + frame: *mut GstVideoCodecFrame, + user_data: gpointer, + notify: glib::GDestroyNotify, + ); + pub fn gst_video_codec_frame_unref(frame: *mut GstVideoCodecFrame); + + //========================================================================= + // GstVideoCodecState + //========================================================================= + pub fn gst_video_codec_state_get_type() -> GType; + pub fn gst_video_codec_state_ref(state: *mut GstVideoCodecState) -> *mut GstVideoCodecState; + pub fn gst_video_codec_state_unref(state: *mut GstVideoCodecState); + + //========================================================================= + // GstVideoColorimetry + //========================================================================= + pub fn gst_video_colorimetry_from_string( + cinfo: *mut GstVideoColorimetry, + color: *const c_char, + ) -> gboolean; + pub fn gst_video_colorimetry_is_equal( + cinfo: *const GstVideoColorimetry, + other: *const GstVideoColorimetry, + ) -> gboolean; + pub fn gst_video_colorimetry_matches( + cinfo: *const GstVideoColorimetry, + color: *const c_char, + ) -> gboolean; + pub fn gst_video_colorimetry_to_string(cinfo: *const GstVideoColorimetry) -> *mut c_char; + + //========================================================================= + // GstVideoContentLightLevel + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_content_light_level_add_to_caps( + linfo: *const GstVideoContentLightLevel, + caps: *mut gst::GstCaps, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_content_light_level_from_caps( + linfo: *mut GstVideoContentLightLevel, + caps: *const gst::GstCaps, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_content_light_level_from_string( + linfo: *mut GstVideoContentLightLevel, + level: *const c_char, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_content_light_level_init(linfo: *mut GstVideoContentLightLevel); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_content_light_level_to_string( + linfo: *const GstVideoContentLightLevel, + ) -> *mut c_char; + + //========================================================================= + // GstVideoConverter + //========================================================================= + pub fn gst_video_converter_frame( + convert: *mut GstVideoConverter, + src: *const GstVideoFrame, + dest: *mut GstVideoFrame, + ); + pub fn gst_video_converter_free(convert: *mut GstVideoConverter); + pub fn gst_video_converter_get_config( + convert: *mut GstVideoConverter, + ) -> *const gst::GstStructure; + pub fn gst_video_converter_set_config( + convert: *mut GstVideoConverter, + config: *mut gst::GstStructure, + ) -> gboolean; + pub fn gst_video_converter_new( + in_info: *mut GstVideoInfo, + out_info: *mut GstVideoInfo, + config: *mut gst::GstStructure, + ) -> *mut GstVideoConverter; + + //========================================================================= + // GstVideoCropMeta + //========================================================================= + pub fn gst_video_crop_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstVideoDither + //========================================================================= + pub fn gst_video_dither_free(dither: *mut GstVideoDither); + pub fn gst_video_dither_line( + dither: *mut GstVideoDither, + line: gpointer, + x: c_uint, + y: c_uint, + width: c_uint, + ); + pub fn gst_video_dither_new( + method: GstVideoDitherMethod, + flags: GstVideoDitherFlags, + format: GstVideoFormat, + quantizer: *mut c_uint, + width: c_uint, + ) -> *mut GstVideoDither; + + //========================================================================= + // GstVideoFormatInfo + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_format_info_component( + info: *const GstVideoFormatInfo, + plane: c_uint, + components: *mut c_int, + ); + + //========================================================================= + // GstVideoFrame + //========================================================================= + pub fn gst_video_frame_copy(dest: *mut GstVideoFrame, src: *const GstVideoFrame) -> gboolean; + pub fn gst_video_frame_copy_plane( + dest: *mut GstVideoFrame, + src: *const GstVideoFrame, + plane: c_uint, + ) -> gboolean; + pub fn gst_video_frame_map( + frame: *mut GstVideoFrame, + info: *mut GstVideoInfo, + buffer: *mut gst::GstBuffer, + flags: gst::GstMapFlags, + ) -> gboolean; + pub fn gst_video_frame_map_id( + frame: *mut GstVideoFrame, + info: *mut GstVideoInfo, + buffer: *mut gst::GstBuffer, + id: c_int, + flags: gst::GstMapFlags, + ) -> gboolean; + pub fn gst_video_frame_unmap(frame: *mut GstVideoFrame); + + //========================================================================= + // GstVideoGLTextureUploadMeta + //========================================================================= + pub fn gst_video_gl_texture_upload_meta_upload( + meta: *mut GstVideoGLTextureUploadMeta, + texture_id: *mut c_uint, + ) -> gboolean; + pub fn gst_video_gl_texture_upload_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstVideoInfo + //========================================================================= + pub fn gst_video_info_get_type() -> GType; + pub fn gst_video_info_new() -> *mut GstVideoInfo; + pub fn gst_video_info_align(info: *mut GstVideoInfo, align: *mut GstVideoAlignment) + -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_info_align_full( + info: *mut GstVideoInfo, + align: *mut GstVideoAlignment, + plane_size: *mut size_t, + ) -> gboolean; + pub fn gst_video_info_convert( + info: *mut GstVideoInfo, + src_format: gst::GstFormat, + src_value: i64, + dest_format: gst::GstFormat, + dest_value: *mut i64, + ) -> gboolean; + pub fn gst_video_info_copy(info: *const GstVideoInfo) -> *mut GstVideoInfo; + pub fn gst_video_info_free(info: *mut GstVideoInfo); + pub fn gst_video_info_from_caps(info: *mut GstVideoInfo, caps: *const gst::GstCaps) + -> gboolean; + pub fn gst_video_info_init(info: *mut GstVideoInfo); + pub fn gst_video_info_is_equal( + info: *const GstVideoInfo, + other: *const GstVideoInfo, + ) -> gboolean; + pub fn gst_video_info_set_format( + info: *mut GstVideoInfo, + format: GstVideoFormat, + width: c_uint, + height: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_info_set_interlaced_format( + info: *mut GstVideoInfo, + format: GstVideoFormat, + mode: GstVideoInterlaceMode, + width: c_uint, + height: c_uint, + ) -> gboolean; + pub fn gst_video_info_to_caps(info: *mut GstVideoInfo) -> *mut gst::GstCaps; + + //========================================================================= + // GstVideoMasteringDisplayInfo + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_mastering_display_info_add_to_caps( + minfo: *const GstVideoMasteringDisplayInfo, + caps: *mut gst::GstCaps, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_mastering_display_info_from_caps( + minfo: *mut GstVideoMasteringDisplayInfo, + caps: *const gst::GstCaps, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_mastering_display_info_init(minfo: *mut GstVideoMasteringDisplayInfo); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_mastering_display_info_is_equal( + minfo: *const GstVideoMasteringDisplayInfo, + other: *const GstVideoMasteringDisplayInfo, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_mastering_display_info_to_string( + minfo: *const GstVideoMasteringDisplayInfo, + ) -> *mut c_char; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_mastering_display_info_from_string( + minfo: *mut GstVideoMasteringDisplayInfo, + mastering: *const c_char, + ) -> gboolean; + + //========================================================================= + // GstVideoMeta + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_meta_get_plane_height( + meta: *mut GstVideoMeta, + plane_height: *mut c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_meta_get_plane_size( + meta: *mut GstVideoMeta, + plane_size: *mut size_t, + ) -> gboolean; + pub fn gst_video_meta_map( + meta: *mut GstVideoMeta, + plane: c_uint, + info: *mut gst::GstMapInfo, + data: *mut gpointer, + stride: *mut c_int, + flags: gst::GstMapFlags, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_meta_set_alignment( + meta: *mut GstVideoMeta, + alignment: GstVideoAlignment, + ) -> gboolean; + pub fn gst_video_meta_unmap( + meta: *mut GstVideoMeta, + plane: c_uint, + info: *mut gst::GstMapInfo, + ) -> gboolean; + pub fn gst_video_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstVideoMetaTransform + //========================================================================= + pub fn gst_video_meta_transform_scale_get_quark() -> glib::GQuark; + + //========================================================================= + // GstVideoOverlayComposition + //========================================================================= + pub fn gst_video_overlay_composition_get_type() -> GType; + pub fn gst_video_overlay_composition_new( + rectangle: *mut GstVideoOverlayRectangle, + ) -> *mut GstVideoOverlayComposition; + pub fn gst_video_overlay_composition_add_rectangle( + comp: *mut GstVideoOverlayComposition, + rectangle: *mut GstVideoOverlayRectangle, + ); + pub fn gst_video_overlay_composition_blend( + comp: *mut GstVideoOverlayComposition, + video_buf: *mut GstVideoFrame, + ) -> gboolean; + pub fn gst_video_overlay_composition_copy( + comp: *mut GstVideoOverlayComposition, + ) -> *mut GstVideoOverlayComposition; + pub fn gst_video_overlay_composition_get_rectangle( + comp: *mut GstVideoOverlayComposition, + n: c_uint, + ) -> *mut GstVideoOverlayRectangle; + pub fn gst_video_overlay_composition_get_seqnum( + comp: *mut GstVideoOverlayComposition, + ) -> c_uint; + pub fn gst_video_overlay_composition_make_writable( + comp: *mut GstVideoOverlayComposition, + ) -> *mut GstVideoOverlayComposition; + pub fn gst_video_overlay_composition_n_rectangles( + comp: *mut GstVideoOverlayComposition, + ) -> c_uint; + + //========================================================================= + // GstVideoOverlayCompositionMeta + //========================================================================= + pub fn gst_video_overlay_composition_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstVideoOverlayRectangle + //========================================================================= + pub fn gst_video_overlay_rectangle_get_type() -> GType; + pub fn gst_video_overlay_rectangle_new_raw( + pixels: *mut gst::GstBuffer, + render_x: c_int, + render_y: c_int, + render_width: c_uint, + render_height: c_uint, + flags: GstVideoOverlayFormatFlags, + ) -> *mut GstVideoOverlayRectangle; + pub fn gst_video_overlay_rectangle_copy( + rectangle: *mut GstVideoOverlayRectangle, + ) -> *mut GstVideoOverlayRectangle; + pub fn gst_video_overlay_rectangle_get_flags( + rectangle: *mut GstVideoOverlayRectangle, + ) -> GstVideoOverlayFormatFlags; + pub fn gst_video_overlay_rectangle_get_global_alpha( + rectangle: *mut GstVideoOverlayRectangle, + ) -> c_float; + pub fn gst_video_overlay_rectangle_get_pixels_argb( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_pixels_ayuv( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_pixels_raw( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_pixels_unscaled_argb( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_pixels_unscaled_ayuv( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_pixels_unscaled_raw( + rectangle: *mut GstVideoOverlayRectangle, + flags: GstVideoOverlayFormatFlags, + ) -> *mut gst::GstBuffer; + pub fn gst_video_overlay_rectangle_get_render_rectangle( + rectangle: *mut GstVideoOverlayRectangle, + render_x: *mut c_int, + render_y: *mut c_int, + render_width: *mut c_uint, + render_height: *mut c_uint, + ) -> gboolean; + pub fn gst_video_overlay_rectangle_get_seqnum( + rectangle: *mut GstVideoOverlayRectangle, + ) -> c_uint; + pub fn gst_video_overlay_rectangle_set_global_alpha( + rectangle: *mut GstVideoOverlayRectangle, + global_alpha: c_float, + ); + pub fn gst_video_overlay_rectangle_set_render_rectangle( + rectangle: *mut GstVideoOverlayRectangle, + render_x: c_int, + render_y: c_int, + render_width: c_uint, + render_height: c_uint, + ); + + //========================================================================= + // GstVideoRegionOfInterestMeta + //========================================================================= + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_video_region_of_interest_meta_add_param( + meta: *mut GstVideoRegionOfInterestMeta, + s: *mut gst::GstStructure, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_video_region_of_interest_meta_get_param( + meta: *mut GstVideoRegionOfInterestMeta, + name: *const c_char, + ) -> *mut gst::GstStructure; + pub fn gst_video_region_of_interest_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstVideoResampler + //========================================================================= + pub fn gst_video_resampler_clear(resampler: *mut GstVideoResampler); + pub fn gst_video_resampler_init( + resampler: *mut GstVideoResampler, + method: GstVideoResamplerMethod, + flags: GstVideoResamplerFlags, + n_phases: c_uint, + n_taps: c_uint, + shift: c_double, + in_size: c_uint, + out_size: c_uint, + options: *mut gst::GstStructure, + ) -> gboolean; + + //========================================================================= + // GstVideoScaler + //========================================================================= + pub fn gst_video_scaler_2d( + hscale: *mut GstVideoScaler, + vscale: *mut GstVideoScaler, + format: GstVideoFormat, + src: gpointer, + src_stride: c_int, + dest: gpointer, + dest_stride: c_int, + x: c_uint, + y: c_uint, + width: c_uint, + height: c_uint, + ); + pub fn gst_video_scaler_combine_packed_YUV( + y_scale: *mut GstVideoScaler, + uv_scale: *mut GstVideoScaler, + in_format: GstVideoFormat, + out_format: GstVideoFormat, + ) -> *mut GstVideoScaler; + pub fn gst_video_scaler_free(scale: *mut GstVideoScaler); + pub fn gst_video_scaler_get_coeff( + scale: *mut GstVideoScaler, + out_offset: c_uint, + in_offset: *mut c_uint, + n_taps: *mut c_uint, + ) -> *const c_double; + pub fn gst_video_scaler_get_max_taps(scale: *mut GstVideoScaler) -> c_uint; + pub fn gst_video_scaler_horizontal( + scale: *mut GstVideoScaler, + format: GstVideoFormat, + src: gpointer, + dest: gpointer, + dest_offset: c_uint, + width: c_uint, + ); + pub fn gst_video_scaler_vertical( + scale: *mut GstVideoScaler, + format: GstVideoFormat, + src_lines: *mut gpointer, + dest: gpointer, + dest_offset: c_uint, + width: c_uint, + ); + pub fn gst_video_scaler_new( + method: GstVideoResamplerMethod, + flags: GstVideoScalerFlags, + n_taps: c_uint, + in_size: c_uint, + out_size: c_uint, + options: *mut gst::GstStructure, + ) -> *mut GstVideoScaler; + + //========================================================================= + // GstVideoTimeCode + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_get_type() -> GType; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_new( + fps_n: c_uint, + fps_d: c_uint, + latest_daily_jam: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + hours: c_uint, + minutes: c_uint, + seconds: c_uint, + frames: c_uint, + field_count: c_uint, + ) -> *mut GstVideoTimeCode; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_new_empty() -> *mut GstVideoTimeCode; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_time_code_new_from_date_time( + fps_n: c_uint, + fps_d: c_uint, + dt: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + field_count: c_uint, + ) -> *mut GstVideoTimeCode; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_time_code_new_from_date_time_full( + fps_n: c_uint, + fps_d: c_uint, + dt: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + field_count: c_uint, + ) -> *mut GstVideoTimeCode; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_time_code_new_from_string(tc_str: *const c_char) -> *mut GstVideoTimeCode; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_add_frames(tc: *mut GstVideoTimeCode, frames: i64); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_time_code_add_interval( + tc: *const GstVideoTimeCode, + tc_inter: *const GstVideoTimeCodeInterval, + ) -> *mut GstVideoTimeCode; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_clear(tc: *mut GstVideoTimeCode); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_compare( + tc1: *const GstVideoTimeCode, + tc2: *const GstVideoTimeCode, + ) -> c_int; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_copy(tc: *const GstVideoTimeCode) -> *mut GstVideoTimeCode; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_frames_since_daily_jam(tc: *const GstVideoTimeCode) -> u64; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_free(tc: *mut GstVideoTimeCode); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_increment_frame(tc: *mut GstVideoTimeCode); + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_init( + tc: *mut GstVideoTimeCode, + fps_n: c_uint, + fps_d: c_uint, + latest_daily_jam: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + hours: c_uint, + minutes: c_uint, + seconds: c_uint, + frames: c_uint, + field_count: c_uint, + ); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_time_code_init_from_date_time( + tc: *mut GstVideoTimeCode, + fps_n: c_uint, + fps_d: c_uint, + dt: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + field_count: c_uint, + ); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_time_code_init_from_date_time_full( + tc: *mut GstVideoTimeCode, + fps_n: c_uint, + fps_d: c_uint, + dt: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + field_count: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_is_valid(tc: *const GstVideoTimeCode) -> gboolean; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_nsec_since_daily_jam(tc: *const GstVideoTimeCode) -> u64; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_to_date_time(tc: *const GstVideoTimeCode) -> *mut glib::GDateTime; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_to_string(tc: *const GstVideoTimeCode) -> *mut c_char; + + //========================================================================= + // GstVideoTimeCodeInterval + //========================================================================= + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_time_code_interval_get_type() -> GType; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_time_code_interval_new( + hours: c_uint, + minutes: c_uint, + seconds: c_uint, + frames: c_uint, + ) -> *mut GstVideoTimeCodeInterval; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_time_code_interval_new_from_string( + tc_inter_str: *const c_char, + ) -> *mut GstVideoTimeCodeInterval; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_time_code_interval_clear(tc: *mut GstVideoTimeCodeInterval); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_time_code_interval_copy( + tc: *const GstVideoTimeCodeInterval, + ) -> *mut GstVideoTimeCodeInterval; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_time_code_interval_free(tc: *mut GstVideoTimeCodeInterval); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_time_code_interval_init( + tc: *mut GstVideoTimeCodeInterval, + hours: c_uint, + minutes: c_uint, + seconds: c_uint, + frames: c_uint, + ); + + //========================================================================= + // GstVideoTimeCodeMeta + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_meta_get_info() -> *const gst::GstMetaInfo; + + //========================================================================= + // GstVideoVBIEncoder + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_encoder_get_type() -> GType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_encoder_new( + format: GstVideoFormat, + pixel_width: u32, + ) -> *mut GstVideoVBIEncoder; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_encoder_add_ancillary( + encoder: *mut GstVideoVBIEncoder, + composite: gboolean, + DID: u8, + SDID_block_number: u8, + data: *const u8, + data_count: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_encoder_copy( + encoder: *const GstVideoVBIEncoder, + ) -> *mut GstVideoVBIEncoder; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_encoder_free(encoder: *mut GstVideoVBIEncoder); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_encoder_write_line(encoder: *mut GstVideoVBIEncoder, data: *mut u8); + + //========================================================================= + // GstVideoVBIParser + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_parser_get_type() -> GType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_parser_new( + format: GstVideoFormat, + pixel_width: u32, + ) -> *mut GstVideoVBIParser; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_parser_add_line(parser: *mut GstVideoVBIParser, data: *const u8); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_parser_copy(parser: *const GstVideoVBIParser) -> *mut GstVideoVBIParser; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_parser_free(parser: *mut GstVideoVBIParser); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_vbi_parser_get_ancillary( + parser: *mut GstVideoVBIParser, + anc: *mut GstVideoAncillary, + ) -> GstVideoVBIParserResult; + + //========================================================================= + // GstColorBalanceChannel + //========================================================================= + pub fn gst_color_balance_channel_get_type() -> GType; + + //========================================================================= + // GstVideoAggregator + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_aggregator_get_type() -> GType; + + //========================================================================= + // GstVideoAggregatorConvertPad + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_aggregator_convert_pad_get_type() -> GType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_aggregator_convert_pad_update_conversion_info( + pad: *mut GstVideoAggregatorConvertPad, + ); + + //========================================================================= + // GstVideoAggregatorPad + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_aggregator_pad_get_type() -> GType; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_aggregator_pad_get_current_buffer( + pad: *mut GstVideoAggregatorPad, + ) -> *mut gst::GstBuffer; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_aggregator_pad_get_prepared_frame( + pad: *mut GstVideoAggregatorPad, + ) -> *mut GstVideoFrame; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_aggregator_pad_has_current_buffer(pad: *mut GstVideoAggregatorPad) + -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_aggregator_pad_set_needs_alpha( + pad: *mut GstVideoAggregatorPad, + needs_alpha: gboolean, + ); + + //========================================================================= + // GstVideoBufferPool + //========================================================================= + pub fn gst_video_buffer_pool_get_type() -> GType; + pub fn gst_video_buffer_pool_new() -> *mut gst::GstBufferPool; + + //========================================================================= + // GstVideoDecoder + //========================================================================= + pub fn gst_video_decoder_get_type() -> GType; + pub fn gst_video_decoder_add_to_frame(decoder: *mut GstVideoDecoder, n_bytes: c_int); + pub fn gst_video_decoder_allocate_output_buffer( + decoder: *mut GstVideoDecoder, + ) -> *mut gst::GstBuffer; + pub fn gst_video_decoder_allocate_output_frame( + decoder: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstFlowReturn; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_video_decoder_allocate_output_frame_with_params( + decoder: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + params: *mut gst::GstBufferPoolAcquireParams, + ) -> gst::GstFlowReturn; + pub fn gst_video_decoder_drop_frame( + dec: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstFlowReturn; + pub fn gst_video_decoder_finish_frame( + decoder: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstFlowReturn; + pub fn gst_video_decoder_get_allocator( + decoder: *mut GstVideoDecoder, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); + pub fn gst_video_decoder_get_buffer_pool( + decoder: *mut GstVideoDecoder, + ) -> *mut gst::GstBufferPool; + pub fn gst_video_decoder_get_estimate_rate(dec: *mut GstVideoDecoder) -> c_int; + pub fn gst_video_decoder_get_frame( + decoder: *mut GstVideoDecoder, + frame_number: c_int, + ) -> *mut GstVideoCodecFrame; + pub fn gst_video_decoder_get_frames(decoder: *mut GstVideoDecoder) -> *mut glib::GList; + pub fn gst_video_decoder_get_latency( + decoder: *mut GstVideoDecoder, + min_latency: *mut gst::GstClockTime, + max_latency: *mut gst::GstClockTime, + ); + pub fn gst_video_decoder_get_max_decode_time( + decoder: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstClockTimeDiff; + pub fn gst_video_decoder_get_max_errors(dec: *mut GstVideoDecoder) -> c_int; + pub fn gst_video_decoder_get_needs_format(dec: *mut GstVideoDecoder) -> gboolean; + pub fn gst_video_decoder_get_oldest_frame( + decoder: *mut GstVideoDecoder, + ) -> *mut GstVideoCodecFrame; + pub fn gst_video_decoder_get_output_state( + decoder: *mut GstVideoDecoder, + ) -> *mut GstVideoCodecState; + pub fn gst_video_decoder_get_packetized(decoder: *mut GstVideoDecoder) -> gboolean; + pub fn gst_video_decoder_get_pending_frame_size(decoder: *mut GstVideoDecoder) -> size_t; + pub fn gst_video_decoder_get_qos_proportion(decoder: *mut GstVideoDecoder) -> c_double; + pub fn gst_video_decoder_have_frame(decoder: *mut GstVideoDecoder) -> gst::GstFlowReturn; + pub fn gst_video_decoder_merge_tags( + decoder: *mut GstVideoDecoder, + tags: *const gst::GstTagList, + mode: gst::GstTagMergeMode, + ); + pub fn gst_video_decoder_negotiate(decoder: *mut GstVideoDecoder) -> gboolean; + pub fn gst_video_decoder_proxy_getcaps( + decoder: *mut GstVideoDecoder, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + pub fn gst_video_decoder_release_frame( + dec: *mut GstVideoDecoder, + frame: *mut GstVideoCodecFrame, + ); + pub fn gst_video_decoder_set_estimate_rate(dec: *mut GstVideoDecoder, enabled: gboolean); + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_decoder_set_interlaced_output_state( + decoder: *mut GstVideoDecoder, + fmt: GstVideoFormat, + mode: GstVideoInterlaceMode, + width: c_uint, + height: c_uint, + reference: *mut GstVideoCodecState, + ) -> *mut GstVideoCodecState; + pub fn gst_video_decoder_set_latency( + decoder: *mut GstVideoDecoder, + min_latency: gst::GstClockTime, + max_latency: gst::GstClockTime, + ); + pub fn gst_video_decoder_set_max_errors(dec: *mut GstVideoDecoder, num: c_int); + pub fn gst_video_decoder_set_needs_format(dec: *mut GstVideoDecoder, enabled: gboolean); + pub fn gst_video_decoder_set_output_state( + decoder: *mut GstVideoDecoder, + fmt: GstVideoFormat, + width: c_uint, + height: c_uint, + reference: *mut GstVideoCodecState, + ) -> *mut GstVideoCodecState; + pub fn gst_video_decoder_set_packetized(decoder: *mut GstVideoDecoder, packetized: gboolean); + pub fn gst_video_decoder_set_use_default_pad_acceptcaps( + decoder: *mut GstVideoDecoder, + use_: gboolean, + ); + + //========================================================================= + // GstVideoEncoder + //========================================================================= + pub fn gst_video_encoder_get_type() -> GType; + pub fn gst_video_encoder_allocate_output_buffer( + encoder: *mut GstVideoEncoder, + size: size_t, + ) -> *mut gst::GstBuffer; + pub fn gst_video_encoder_allocate_output_frame( + encoder: *mut GstVideoEncoder, + frame: *mut GstVideoCodecFrame, + size: size_t, + ) -> gst::GstFlowReturn; + pub fn gst_video_encoder_finish_frame( + encoder: *mut GstVideoEncoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstFlowReturn; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_encoder_finish_subframe( + encoder: *mut GstVideoEncoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstFlowReturn; + pub fn gst_video_encoder_get_allocator( + encoder: *mut GstVideoEncoder, + allocator: *mut *mut gst::GstAllocator, + params: *mut gst::GstAllocationParams, + ); + pub fn gst_video_encoder_get_frame( + encoder: *mut GstVideoEncoder, + frame_number: c_int, + ) -> *mut GstVideoCodecFrame; + pub fn gst_video_encoder_get_frames(encoder: *mut GstVideoEncoder) -> *mut glib::GList; + pub fn gst_video_encoder_get_latency( + encoder: *mut GstVideoEncoder, + min_latency: *mut gst::GstClockTime, + max_latency: *mut gst::GstClockTime, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_video_encoder_get_max_encode_time( + encoder: *mut GstVideoEncoder, + frame: *mut GstVideoCodecFrame, + ) -> gst::GstClockTimeDiff; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_encoder_get_min_force_key_unit_interval( + encoder: *mut GstVideoEncoder, + ) -> gst::GstClockTime; + pub fn gst_video_encoder_get_oldest_frame( + encoder: *mut GstVideoEncoder, + ) -> *mut GstVideoCodecFrame; + pub fn gst_video_encoder_get_output_state( + encoder: *mut GstVideoEncoder, + ) -> *mut GstVideoCodecState; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_video_encoder_is_qos_enabled(encoder: *mut GstVideoEncoder) -> gboolean; + pub fn gst_video_encoder_merge_tags( + encoder: *mut GstVideoEncoder, + tags: *const gst::GstTagList, + mode: gst::GstTagMergeMode, + ); + pub fn gst_video_encoder_negotiate(encoder: *mut GstVideoEncoder) -> gboolean; + pub fn gst_video_encoder_proxy_getcaps( + enc: *mut GstVideoEncoder, + caps: *mut gst::GstCaps, + filter: *mut gst::GstCaps, + ) -> *mut gst::GstCaps; + pub fn gst_video_encoder_set_headers(encoder: *mut GstVideoEncoder, headers: *mut glib::GList); + pub fn gst_video_encoder_set_latency( + encoder: *mut GstVideoEncoder, + min_latency: gst::GstClockTime, + max_latency: gst::GstClockTime, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_encoder_set_min_force_key_unit_interval( + encoder: *mut GstVideoEncoder, + interval: gst::GstClockTime, + ); + pub fn gst_video_encoder_set_min_pts(encoder: *mut GstVideoEncoder, min_pts: gst::GstClockTime); + pub fn gst_video_encoder_set_output_state( + encoder: *mut GstVideoEncoder, + caps: *mut gst::GstCaps, + reference: *mut GstVideoCodecState, + ) -> *mut GstVideoCodecState; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_video_encoder_set_qos_enabled(encoder: *mut GstVideoEncoder, enabled: gboolean); + + //========================================================================= + // GstVideoFilter + //========================================================================= + pub fn gst_video_filter_get_type() -> GType; + + //========================================================================= + // GstVideoMultiviewFlagsSet + //========================================================================= + pub fn gst_video_multiview_flagset_get_type() -> GType; + + //========================================================================= + // GstVideoSink + //========================================================================= + pub fn gst_video_sink_get_type() -> GType; + pub fn gst_video_sink_center_rect( + src: GstVideoRectangle, + dst: GstVideoRectangle, + result: *mut GstVideoRectangle, + scaling: gboolean, + ); + + //========================================================================= + // GstColorBalance + //========================================================================= + pub fn gst_color_balance_get_type() -> GType; + pub fn gst_color_balance_get_balance_type(balance: *mut GstColorBalance) + -> GstColorBalanceType; + pub fn gst_color_balance_get_value( + balance: *mut GstColorBalance, + channel: *mut GstColorBalanceChannel, + ) -> c_int; + pub fn gst_color_balance_list_channels(balance: *mut GstColorBalance) -> *const glib::GList; + pub fn gst_color_balance_set_value( + balance: *mut GstColorBalance, + channel: *mut GstColorBalanceChannel, + value: c_int, + ); + pub fn gst_color_balance_value_changed( + balance: *mut GstColorBalance, + channel: *mut GstColorBalanceChannel, + value: c_int, + ); + + //========================================================================= + // GstNavigation + //========================================================================= + pub fn gst_navigation_get_type() -> GType; + pub fn gst_navigation_event_get_type(event: *mut gst::GstEvent) -> GstNavigationEventType; + pub fn gst_navigation_event_parse_command( + event: *mut gst::GstEvent, + command: *mut GstNavigationCommand, + ) -> gboolean; + pub fn gst_navigation_event_parse_key_event( + event: *mut gst::GstEvent, + key: *mut *const c_char, + ) -> gboolean; + pub fn gst_navigation_event_parse_mouse_button_event( + event: *mut gst::GstEvent, + button: *mut c_int, + x: *mut c_double, + y: *mut c_double, + ) -> gboolean; + pub fn gst_navigation_event_parse_mouse_move_event( + event: *mut gst::GstEvent, + x: *mut c_double, + y: *mut c_double, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_navigation_event_parse_mouse_scroll_event( + event: *mut gst::GstEvent, + x: *mut c_double, + y: *mut c_double, + delta_x: *mut c_double, + delta_y: *mut c_double, + ) -> gboolean; + pub fn gst_navigation_message_get_type( + message: *mut gst::GstMessage, + ) -> GstNavigationMessageType; + pub fn gst_navigation_message_new_angles_changed( + src: *mut gst::GstObject, + cur_angle: c_uint, + n_angles: c_uint, + ) -> *mut gst::GstMessage; + pub fn gst_navigation_message_new_commands_changed( + src: *mut gst::GstObject, + ) -> *mut gst::GstMessage; + pub fn gst_navigation_message_new_event( + src: *mut gst::GstObject, + event: *mut gst::GstEvent, + ) -> *mut gst::GstMessage; + pub fn gst_navigation_message_new_mouse_over( + src: *mut gst::GstObject, + active: gboolean, + ) -> *mut gst::GstMessage; + pub fn gst_navigation_message_parse_angles_changed( + message: *mut gst::GstMessage, + cur_angle: *mut c_uint, + n_angles: *mut c_uint, + ) -> gboolean; + pub fn gst_navigation_message_parse_event( + message: *mut gst::GstMessage, + event: *mut *mut gst::GstEvent, + ) -> gboolean; + pub fn gst_navigation_message_parse_mouse_over( + message: *mut gst::GstMessage, + active: *mut gboolean, + ) -> gboolean; + pub fn gst_navigation_query_get_type(query: *mut gst::GstQuery) -> GstNavigationQueryType; + pub fn gst_navigation_query_new_angles() -> *mut gst::GstQuery; + pub fn gst_navigation_query_new_commands() -> *mut gst::GstQuery; + pub fn gst_navigation_query_parse_angles( + query: *mut gst::GstQuery, + cur_angle: *mut c_uint, + n_angles: *mut c_uint, + ) -> gboolean; + pub fn gst_navigation_query_parse_commands_length( + query: *mut gst::GstQuery, + n_cmds: *mut c_uint, + ) -> gboolean; + pub fn gst_navigation_query_parse_commands_nth( + query: *mut gst::GstQuery, + nth: c_uint, + cmd: *mut GstNavigationCommand, + ) -> gboolean; + pub fn gst_navigation_query_set_angles( + query: *mut gst::GstQuery, + cur_angle: c_uint, + n_angles: c_uint, + ); + pub fn gst_navigation_query_set_commands(query: *mut gst::GstQuery, n_cmds: c_int, ...); + pub fn gst_navigation_query_set_commandsv( + query: *mut gst::GstQuery, + n_cmds: c_int, + cmds: *mut GstNavigationCommand, + ); + pub fn gst_navigation_send_command( + navigation: *mut GstNavigation, + command: GstNavigationCommand, + ); + pub fn gst_navigation_send_event( + navigation: *mut GstNavigation, + structure: *mut gst::GstStructure, + ); + pub fn gst_navigation_send_key_event( + navigation: *mut GstNavigation, + event: *const c_char, + key: *const c_char, + ); + pub fn gst_navigation_send_mouse_event( + navigation: *mut GstNavigation, + event: *const c_char, + button: c_int, + x: c_double, + y: c_double, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_navigation_send_mouse_scroll_event( + navigation: *mut GstNavigation, + x: c_double, + y: c_double, + delta_x: c_double, + delta_y: c_double, + ); + + //========================================================================= + // GstVideoDirection + //========================================================================= + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_direction_get_type() -> GType; + + //========================================================================= + // GstVideoOrientation + //========================================================================= + pub fn gst_video_orientation_get_type() -> GType; + pub fn gst_video_orientation_get_hcenter( + video_orientation: *mut GstVideoOrientation, + center: *mut c_int, + ) -> gboolean; + pub fn gst_video_orientation_get_hflip( + video_orientation: *mut GstVideoOrientation, + flip: *mut gboolean, + ) -> gboolean; + pub fn gst_video_orientation_get_vcenter( + video_orientation: *mut GstVideoOrientation, + center: *mut c_int, + ) -> gboolean; + pub fn gst_video_orientation_get_vflip( + video_orientation: *mut GstVideoOrientation, + flip: *mut gboolean, + ) -> gboolean; + pub fn gst_video_orientation_set_hcenter( + video_orientation: *mut GstVideoOrientation, + center: c_int, + ) -> gboolean; + pub fn gst_video_orientation_set_hflip( + video_orientation: *mut GstVideoOrientation, + flip: gboolean, + ) -> gboolean; + pub fn gst_video_orientation_set_vcenter( + video_orientation: *mut GstVideoOrientation, + center: c_int, + ) -> gboolean; + pub fn gst_video_orientation_set_vflip( + video_orientation: *mut GstVideoOrientation, + flip: gboolean, + ) -> gboolean; + + //========================================================================= + // GstVideoOverlay + //========================================================================= + pub fn gst_video_overlay_get_type() -> GType; + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_video_overlay_install_properties( + oclass: *mut gobject::GObjectClass, + last_prop_id: c_int, + ); + #[cfg(any(feature = "v1_14", feature = "dox"))] + pub fn gst_video_overlay_set_property( + object: *mut gobject::GObject, + last_prop_id: c_int, + property_id: c_uint, + value: *const gobject::GValue, + ) -> gboolean; + pub fn gst_video_overlay_expose(overlay: *mut GstVideoOverlay); + pub fn gst_video_overlay_got_window_handle(overlay: *mut GstVideoOverlay, handle: uintptr_t); + pub fn gst_video_overlay_handle_events(overlay: *mut GstVideoOverlay, handle_events: gboolean); + pub fn gst_video_overlay_prepare_window_handle(overlay: *mut GstVideoOverlay); + pub fn gst_video_overlay_set_render_rectangle( + overlay: *mut GstVideoOverlay, + x: c_int, + y: c_int, + width: c_int, + height: c_int, + ) -> gboolean; + pub fn gst_video_overlay_set_window_handle(overlay: *mut GstVideoOverlay, handle: uintptr_t); + + //========================================================================= + // Other functions + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_buffer_add_video_afd_meta( + buffer: *mut gst::GstBuffer, + field: u8, + spec: GstVideoAFDSpec, + afd: GstVideoAFDValue, + ) -> *mut GstVideoAFDMeta; + pub fn gst_buffer_add_video_affine_transformation_meta( + buffer: *mut gst::GstBuffer, + ) -> *mut GstVideoAffineTransformationMeta; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_buffer_add_video_bar_meta( + buffer: *mut gst::GstBuffer, + field: u8, + is_letterbox: gboolean, + bar_data1: c_uint, + bar_data2: c_uint, + ) -> *mut GstVideoBarMeta; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_buffer_add_video_caption_meta( + buffer: *mut gst::GstBuffer, + caption_type: GstVideoCaptionType, + data: *const u8, + size: size_t, + ) -> *mut GstVideoCaptionMeta; + pub fn gst_buffer_add_video_gl_texture_upload_meta( + buffer: *mut gst::GstBuffer, + texture_orientation: GstVideoGLTextureOrientation, + n_textures: c_uint, + texture_type: *mut GstVideoGLTextureType, + upload: GstVideoGLTextureUpload, + user_data: gpointer, + user_data_copy: gobject::GBoxedCopyFunc, + user_data_free: gobject::GBoxedFreeFunc, + ) -> *mut GstVideoGLTextureUploadMeta; + pub fn gst_buffer_add_video_meta( + buffer: *mut gst::GstBuffer, + flags: GstVideoFrameFlags, + format: GstVideoFormat, + width: c_uint, + height: c_uint, + ) -> *mut GstVideoMeta; + pub fn gst_buffer_add_video_meta_full( + buffer: *mut gst::GstBuffer, + flags: GstVideoFrameFlags, + format: GstVideoFormat, + width: c_uint, + height: c_uint, + n_planes: c_uint, + offset: *mut [size_t; 4], + stride: *mut [c_int; 4], + ) -> *mut GstVideoMeta; + pub fn gst_buffer_add_video_overlay_composition_meta( + buf: *mut gst::GstBuffer, + comp: *mut GstVideoOverlayComposition, + ) -> *mut GstVideoOverlayCompositionMeta; + pub fn gst_buffer_add_video_region_of_interest_meta( + buffer: *mut gst::GstBuffer, + roi_type: *const c_char, + x: c_uint, + y: c_uint, + w: c_uint, + h: c_uint, + ) -> *mut GstVideoRegionOfInterestMeta; + pub fn gst_buffer_add_video_region_of_interest_meta_id( + buffer: *mut gst::GstBuffer, + roi_type: glib::GQuark, + x: c_uint, + y: c_uint, + w: c_uint, + h: c_uint, + ) -> *mut GstVideoRegionOfInterestMeta; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_buffer_add_video_time_code_meta( + buffer: *mut gst::GstBuffer, + tc: *const GstVideoTimeCode, + ) -> *mut GstVideoTimeCodeMeta; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_buffer_add_video_time_code_meta_full( + buffer: *mut gst::GstBuffer, + fps_n: c_uint, + fps_d: c_uint, + latest_daily_jam: *mut glib::GDateTime, + flags: GstVideoTimeCodeFlags, + hours: c_uint, + minutes: c_uint, + seconds: c_uint, + frames: c_uint, + field_count: c_uint, + ) -> *mut GstVideoTimeCodeMeta; + pub fn gst_buffer_get_video_meta(buffer: *mut gst::GstBuffer) -> *mut GstVideoMeta; + pub fn gst_buffer_get_video_meta_id( + buffer: *mut gst::GstBuffer, + id: c_int, + ) -> *mut GstVideoMeta; + pub fn gst_buffer_get_video_region_of_interest_meta_id( + buffer: *mut gst::GstBuffer, + id: c_int, + ) -> *mut GstVideoRegionOfInterestMeta; + pub fn gst_buffer_pool_config_get_video_alignment( + config: *mut gst::GstStructure, + align: *mut GstVideoAlignment, + ) -> gboolean; + pub fn gst_buffer_pool_config_set_video_alignment( + config: *mut gst::GstStructure, + align: *mut GstVideoAlignment, + ); + pub fn gst_is_video_overlay_prepare_window_handle_message( + msg: *mut gst::GstMessage, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_afd_meta_api_get_type() -> GType; + pub fn gst_video_affine_transformation_meta_api_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_bar_meta_api_get_type() -> GType; + pub fn gst_video_blend( + dest: *mut GstVideoFrame, + src: *mut GstVideoFrame, + x: c_int, + y: c_int, + global_alpha: c_float, + ) -> gboolean; + pub fn gst_video_blend_scale_linear_RGBA( + src: *mut GstVideoInfo, + src_buffer: *mut gst::GstBuffer, + dest_height: c_int, + dest_width: c_int, + dest: *mut GstVideoInfo, + dest_buffer: *mut *mut gst::GstBuffer, + ); + pub fn gst_video_calculate_display_ratio( + dar_n: *mut c_uint, + dar_d: *mut c_uint, + video_width: c_uint, + video_height: c_uint, + video_par_n: c_uint, + video_par_d: c_uint, + display_par_n: c_uint, + display_par_d: c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_video_caption_meta_api_get_type() -> GType; + pub fn gst_video_chroma_from_string(s: *const c_char) -> GstVideoChromaSite; + pub fn gst_video_chroma_resample( + resample: *mut GstVideoChromaResample, + lines: *mut gpointer, + width: c_int, + ); + pub fn gst_video_chroma_to_string(site: GstVideoChromaSite) -> *const c_char; + pub fn gst_video_color_transfer_decode( + func: GstVideoTransferFunction, + val: c_double, + ) -> c_double; + pub fn gst_video_color_transfer_encode( + func: GstVideoTransferFunction, + val: c_double, + ) -> c_double; + pub fn gst_video_convert_sample( + sample: *mut gst::GstSample, + to_caps: *const gst::GstCaps, + timeout: gst::GstClockTime, + error: *mut *mut glib::GError, + ) -> *mut gst::GstSample; + pub fn gst_video_convert_sample_async( + sample: *mut gst::GstSample, + to_caps: *const gst::GstCaps, + timeout: gst::GstClockTime, + callback: GstVideoConvertSampleCallback, + user_data: gpointer, + destroy_notify: glib::GDestroyNotify, + ); + pub fn gst_video_crop_meta_api_get_type() -> GType; + pub fn gst_video_event_is_force_key_unit(event: *mut gst::GstEvent) -> gboolean; + pub fn gst_video_event_new_downstream_force_key_unit( + timestamp: gst::GstClockTime, + stream_time: gst::GstClockTime, + running_time: gst::GstClockTime, + all_headers: gboolean, + count: c_uint, + ) -> *mut gst::GstEvent; + pub fn gst_video_event_new_still_frame(in_still: gboolean) -> *mut gst::GstEvent; + pub fn gst_video_event_new_upstream_force_key_unit( + running_time: gst::GstClockTime, + all_headers: gboolean, + count: c_uint, + ) -> *mut gst::GstEvent; + pub fn gst_video_event_parse_downstream_force_key_unit( + event: *mut gst::GstEvent, + timestamp: *mut gst::GstClockTime, + stream_time: *mut gst::GstClockTime, + running_time: *mut gst::GstClockTime, + all_headers: *mut gboolean, + count: *mut c_uint, + ) -> gboolean; + pub fn gst_video_event_parse_still_frame( + event: *mut gst::GstEvent, + in_still: *mut gboolean, + ) -> gboolean; + pub fn gst_video_event_parse_upstream_force_key_unit( + event: *mut gst::GstEvent, + running_time: *mut gst::GstClockTime, + all_headers: *mut gboolean, + count: *mut c_uint, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_formats_raw(len: *mut c_uint) -> *const GstVideoFormat; + pub fn gst_video_gl_texture_upload_meta_api_get_type() -> GType; + pub fn gst_video_guess_framerate( + duration: gst::GstClockTime, + dest_n: *mut c_int, + dest_d: *mut c_int, + ) -> gboolean; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_make_raw_caps( + formats: *const GstVideoFormat, + len: c_uint, + ) -> *mut gst::GstCaps; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_video_make_raw_caps_with_features( + formats: *const GstVideoFormat, + len: c_uint, + features: *mut gst::GstCapsFeatures, + ) -> *mut gst::GstCaps; + pub fn gst_video_meta_api_get_type() -> GType; + pub fn gst_video_multiview_get_doubled_height_modes() -> *const gobject::GValue; + pub fn gst_video_multiview_get_doubled_size_modes() -> *const gobject::GValue; + pub fn gst_video_multiview_get_doubled_width_modes() -> *const gobject::GValue; + pub fn gst_video_multiview_get_mono_modes() -> *const gobject::GValue; + pub fn gst_video_multiview_get_unpacked_modes() -> *const gobject::GValue; + pub fn gst_video_multiview_guess_half_aspect( + mv_mode: GstVideoMultiviewMode, + width: c_uint, + height: c_uint, + par_n: c_uint, + par_d: c_uint, + ) -> gboolean; + pub fn gst_video_multiview_video_info_change_mode( + info: *mut GstVideoInfo, + out_mview_mode: GstVideoMultiviewMode, + out_mview_flags: GstVideoMultiviewFlags, + ); + pub fn gst_video_overlay_composition_meta_api_get_type() -> GType; + pub fn gst_video_region_of_interest_meta_api_get_type() -> GType; + pub fn gst_video_tile_get_index( + mode: GstVideoTileMode, + x: c_int, + y: c_int, + x_tiles: c_int, + y_tiles: c_int, + ) -> c_uint; + #[cfg(any(feature = "v1_10", feature = "dox"))] + pub fn gst_video_time_code_meta_api_get_type() -> GType; + +} diff --git a/sys/gstreamer-video-sys/tests/abi.rs b/sys/gstreamer-video-sys/tests/abi.rs new file mode 100644 index 000000000..88a9fa858 --- /dev/null +++ b/sys/gstreamer-video-sys/tests/abi.rs @@ -0,0 +1,1535 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_video_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_video_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-video-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstColorBalanceChannel", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstColorBalanceChannelClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstColorBalanceInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstColorBalanceType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNavigationCommand", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNavigationEventType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNavigationInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNavigationMessageType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstNavigationQueryType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAFDMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAFDSpec", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAFDValue", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAffineTransformationMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregator", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregatorClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregatorConvertPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregatorConvertPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregatorPad", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAggregatorPadClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAlignment", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAlphaMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAncillary", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAncillaryDID", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoAncillaryDID16", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoBarMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoBufferFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoBufferPool", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoBufferPoolClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCaptionMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCaptionType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoChromaFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoChromaMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoChromaMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoChromaSite", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCodecFrame", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCodecFrameFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCodecState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoColorMatrix", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoColorPrimaries", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoColorPrimariesInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoColorRange", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoColorimetry", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoContentLightLevel", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoCropMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoDecoder", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoDecoderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoDirectionInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoDitherFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoDitherMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoEncoder", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoEncoderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFieldOrder", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFilter", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFilterClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFormat", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFormatFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFormatInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFrame", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFrameFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoFrameMapFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoGLTextureOrientation", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoGLTextureType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoGLTextureUploadMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoGammaMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoInterlaceMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMasteringDisplayInfo", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMasteringDisplayInfoCoordinates", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMatrixMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMetaTransform", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMultiviewFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMultiviewFramePacking", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoMultiviewMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoOrientationInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoOrientationMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoOverlayCompositionMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoOverlayFormatFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoOverlayInterface", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoPackFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoPrimariesMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoRectangle", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoRegionOfInterestMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoResampler", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoResamplerFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoResamplerMethod", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoScalerFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoSink", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoSinkClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTileMode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTileType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTimeCode", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTimeCodeConfig", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTimeCodeFlags", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTimeCodeInterval", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTimeCodeMeta", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoTransferFunction", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstVideoVBIParserResult", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ( + "GST_BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META", + "GstBufferPoolOptionVideoAffineTransformation", + ), + ( + "GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT", + "GstBufferPoolOptionVideoAlignment", + ), + ( + "GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META", + "GstBufferPoolOptionVideoGLTextureUploadMeta", + ), + ( + "GST_BUFFER_POOL_OPTION_VIDEO_META", + "GstBufferPoolOptionVideoMeta", + ), + ("GST_CAPS_FEATURE_FORMAT_INTERLACED", "format:Interlaced"), + ( + "GST_CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META", + "meta:GstVideoAffineTransformation", + ), + ( + "GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META", + "meta:GstVideoGLTextureUploadMeta", + ), + ("GST_CAPS_FEATURE_META_GST_VIDEO_META", "meta:GstVideoMeta"), + ( + "GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION", + "meta:GstVideoOverlayComposition", + ), + ("(gint) GST_COLOR_BALANCE_HARDWARE", "0"), + ("(gint) GST_COLOR_BALANCE_SOFTWARE", "1"), + ("GST_META_TAG_VIDEO_COLORSPACE_STR", "colorspace"), + ("GST_META_TAG_VIDEO_ORIENTATION_STR", "orientation"), + ("GST_META_TAG_VIDEO_SIZE_STR", "size"), + ("GST_META_TAG_VIDEO_STR", "video"), + ("(gint) GST_NAVIGATION_COMMAND_ACTIVATE", "24"), + ("(gint) GST_NAVIGATION_COMMAND_DOWN", "23"), + ("(gint) GST_NAVIGATION_COMMAND_INVALID", "0"), + ("(gint) GST_NAVIGATION_COMMAND_LEFT", "20"), + ("(gint) GST_NAVIGATION_COMMAND_MENU1", "1"), + ("(gint) GST_NAVIGATION_COMMAND_MENU2", "2"), + ("(gint) GST_NAVIGATION_COMMAND_MENU3", "3"), + ("(gint) GST_NAVIGATION_COMMAND_MENU4", "4"), + ("(gint) GST_NAVIGATION_COMMAND_MENU5", "5"), + ("(gint) GST_NAVIGATION_COMMAND_MENU6", "6"), + ("(gint) GST_NAVIGATION_COMMAND_MENU7", "7"), + ("(gint) GST_NAVIGATION_COMMAND_NEXT_ANGLE", "31"), + ("(gint) GST_NAVIGATION_COMMAND_PREV_ANGLE", "30"), + ("(gint) GST_NAVIGATION_COMMAND_RIGHT", "21"), + ("(gint) GST_NAVIGATION_COMMAND_UP", "22"), + ("(gint) GST_NAVIGATION_EVENT_COMMAND", "6"), + ("(gint) GST_NAVIGATION_EVENT_INVALID", "0"), + ("(gint) GST_NAVIGATION_EVENT_KEY_PRESS", "1"), + ("(gint) GST_NAVIGATION_EVENT_KEY_RELEASE", "2"), + ("(gint) GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS", "3"), + ("(gint) GST_NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE", "4"), + ("(gint) GST_NAVIGATION_EVENT_MOUSE_MOVE", "5"), + ("(gint) GST_NAVIGATION_EVENT_MOUSE_SCROLL", "7"), + ("(gint) GST_NAVIGATION_MESSAGE_ANGLES_CHANGED", "3"), + ("(gint) GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED", "2"), + ("(gint) GST_NAVIGATION_MESSAGE_EVENT", "4"), + ("(gint) GST_NAVIGATION_MESSAGE_INVALID", "0"), + ("(gint) GST_NAVIGATION_MESSAGE_MOUSE_OVER", "1"), + ("(gint) GST_NAVIGATION_QUERY_ANGLES", "2"), + ("(gint) GST_NAVIGATION_QUERY_COMMANDS", "1"), + ("(gint) GST_NAVIGATION_QUERY_INVALID", "0"), + ("(gint) GST_VIDEO_AFD_14_9_LETTER_14_9_PILLAR", "11"), + ("(gint) GST_VIDEO_AFD_14_9_TOP_ALIGNED", "3"), + ("(gint) GST_VIDEO_AFD_16_9_LETTER_14_9_CENTER", "14"), + ("(gint) GST_VIDEO_AFD_16_9_LETTER_16_9_FULL", "10"), + ("(gint) GST_VIDEO_AFD_16_9_LETTER_4_3_CENTER", "15"), + ("(gint) GST_VIDEO_AFD_16_9_TOP_ALIGNED", "2"), + ("(gint) GST_VIDEO_AFD_4_3_FULL_14_9_CENTER", "13"), + ("(gint) GST_VIDEO_AFD_4_3_FULL_16_9_FULL", "8"), + ("(gint) GST_VIDEO_AFD_4_3_FULL_4_3_PILLAR", "9"), + ("(gint) GST_VIDEO_AFD_GREATER_THAN_16_9", "4"), + ("(gint) GST_VIDEO_AFD_SPEC_ATSC_A53", "1"), + ("(gint) GST_VIDEO_AFD_SPEC_DVB_ETSI", "0"), + ("(gint) GST_VIDEO_AFD_SPEC_SMPTE_ST2016_1", "2"), + ("(gint) GST_VIDEO_AFD_UNAVAILABLE", "0"), + ("(gint) GST_VIDEO_ALPHA_MODE_COPY", "0"), + ("(gint) GST_VIDEO_ALPHA_MODE_MULT", "2"), + ("(gint) GST_VIDEO_ALPHA_MODE_SET", "1"), + ("(gint) GST_VIDEO_ANCILLARY_DID16_S2016_3_AFD_BAR", "16645"), + ("(gint) GST_VIDEO_ANCILLARY_DID16_S334_EIA_608", "24834"), + ("(gint) GST_VIDEO_ANCILLARY_DID16_S334_EIA_708", "24833"), + ("(gint) GST_VIDEO_ANCILLARY_DID_CAMERA_POSITION", "240"), + ("(gint) GST_VIDEO_ANCILLARY_DID_DELETION", "128"), + ( + "(gint) GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_FIRST", + "160", + ), + ( + "(gint) GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_LAST", + "167", + ), + ("(gint) GST_VIDEO_ANCILLARY_DID_HANC_ERROR_DETECTION", "244"), + ( + "(gint) GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_FIRST", + "224", + ), + ( + "(gint) GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_LAST", + "231", + ), + ( + "(gint) GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_FIRST", + "236", + ), + ( + "(gint) GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_LAST", + "239", + ), + ( + "(gint) GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_FIRST", + "248", + ), + ( + "(gint) GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_LAST", + "255", + ), + ("(gint) GST_VIDEO_ANCILLARY_DID_UNDEFINED", "0"), + ("(guint) GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD", "8388608"), + ("(guint) GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE", "33554432"), + ("(guint) GST_VIDEO_BUFFER_FLAG_INTERLACED", "1048576"), + ("(guint) GST_VIDEO_BUFFER_FLAG_LAST", "268435456"), + ("(guint) GST_VIDEO_BUFFER_FLAG_MARKER", "512"), + ("(guint) GST_VIDEO_BUFFER_FLAG_MULTIPLE_VIEW", "16777216"), + ("(guint) GST_VIDEO_BUFFER_FLAG_ONEFIELD", "8388608"), + ("(guint) GST_VIDEO_BUFFER_FLAG_RFF", "4194304"), + ("(guint) GST_VIDEO_BUFFER_FLAG_TFF", "2097152"), + ("(guint) GST_VIDEO_BUFFER_FLAG_TOP_FIELD", "10485760"), + ("(gint) GST_VIDEO_CAPTION_TYPE_CEA608_RAW", "1"), + ("(gint) GST_VIDEO_CAPTION_TYPE_CEA608_S334_1A", "2"), + ("(gint) GST_VIDEO_CAPTION_TYPE_CEA708_CDP", "4"), + ("(gint) GST_VIDEO_CAPTION_TYPE_CEA708_RAW", "3"), + ("(gint) GST_VIDEO_CAPTION_TYPE_UNKNOWN", "0"), + ("(guint) GST_VIDEO_CHROMA_FLAG_INTERLACED", "1"), + ("(guint) GST_VIDEO_CHROMA_FLAG_NONE", "0"), + ("(gint) GST_VIDEO_CHROMA_METHOD_LINEAR", "1"), + ("(gint) GST_VIDEO_CHROMA_METHOD_NEAREST", "0"), + ("(gint) GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY", "2"), + ("(gint) GST_VIDEO_CHROMA_MODE_FULL", "0"), + ("(gint) GST_VIDEO_CHROMA_MODE_NONE", "3"), + ("(gint) GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY", "1"), + ("(guint) GST_VIDEO_CHROMA_SITE_ALT_LINE", "8"), + ("(guint) GST_VIDEO_CHROMA_SITE_COSITED", "6"), + ("(guint) GST_VIDEO_CHROMA_SITE_DV", "14"), + ("(guint) GST_VIDEO_CHROMA_SITE_H_COSITED", "2"), + ("(guint) GST_VIDEO_CHROMA_SITE_JPEG", "1"), + ("(guint) GST_VIDEO_CHROMA_SITE_MPEG2", "2"), + ("(guint) GST_VIDEO_CHROMA_SITE_NONE", "1"), + ("(guint) GST_VIDEO_CHROMA_SITE_UNKNOWN", "0"), + ("(guint) GST_VIDEO_CHROMA_SITE_V_COSITED", "4"), + ("(guint) GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY", "1"), + ("(guint) GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME", "4"), + ( + "(guint) GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME_HEADERS", + "8", + ), + ("(guint) GST_VIDEO_CODEC_FRAME_FLAG_SYNC_POINT", "2"), + ("GST_VIDEO_COLORIMETRY_BT2020", "bt2020"), + ("GST_VIDEO_COLORIMETRY_BT2020_10", "bt2020-10"), + ("GST_VIDEO_COLORIMETRY_BT2100_HLG", "bt2100-hlg"), + ("GST_VIDEO_COLORIMETRY_BT2100_PQ", "bt2100-pq"), + ("GST_VIDEO_COLORIMETRY_BT601", "bt601"), + ("GST_VIDEO_COLORIMETRY_BT709", "bt709"), + ("GST_VIDEO_COLORIMETRY_SMPTE240M", "smpte240m"), + ("GST_VIDEO_COLORIMETRY_SRGB", "sRGB"), + ("(gint) GST_VIDEO_COLOR_MATRIX_BT2020", "6"), + ("(gint) GST_VIDEO_COLOR_MATRIX_BT601", "4"), + ("(gint) GST_VIDEO_COLOR_MATRIX_BT709", "3"), + ("(gint) GST_VIDEO_COLOR_MATRIX_FCC", "2"), + ("(gint) GST_VIDEO_COLOR_MATRIX_RGB", "1"), + ("(gint) GST_VIDEO_COLOR_MATRIX_SMPTE240M", "5"), + ("(gint) GST_VIDEO_COLOR_MATRIX_UNKNOWN", "0"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_ADOBERGB", "8"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_BT2020", "7"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_BT470BG", "3"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_BT470M", "2"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_BT709", "1"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_EBU3213", "12"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_FILM", "6"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_SMPTE170M", "4"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_SMPTE240M", "5"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432", "11"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_SMPTERP431", "10"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_SMPTEST428", "9"), + ("(gint) GST_VIDEO_COLOR_PRIMARIES_UNKNOWN", "0"), + ("(gint) GST_VIDEO_COLOR_RANGE_0_255", "1"), + ("(gint) GST_VIDEO_COLOR_RANGE_16_235", "2"), + ("(gint) GST_VIDEO_COLOR_RANGE_UNKNOWN", "0"), + ("GST_VIDEO_COMP_A", "3"), + ("GST_VIDEO_COMP_B", "2"), + ("GST_VIDEO_COMP_G", "1"), + ("GST_VIDEO_COMP_INDEX", "0"), + ("GST_VIDEO_COMP_PALETTE", "1"), + ("GST_VIDEO_COMP_R", "0"), + ("GST_VIDEO_COMP_U", "1"), + ("GST_VIDEO_COMP_V", "2"), + ("GST_VIDEO_COMP_Y", "0"), + ( + "GST_VIDEO_CONVERTER_OPT_ALPHA_MODE", + "GstVideoConverter.alpha-mode", + ), + ( + "GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE", + "GstVideoConverter.alpha-value", + ), + ( + "GST_VIDEO_CONVERTER_OPT_BORDER_ARGB", + "GstVideoConverter.border-argb", + ), + ( + "GST_VIDEO_CONVERTER_OPT_CHROMA_MODE", + "GstVideoConverter.chroma-mode", + ), + ( + "GST_VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD", + "GstVideoConverter.chroma-resampler-method", + ), + ( + "GST_VIDEO_CONVERTER_OPT_DEST_HEIGHT", + "GstVideoConverter.dest-height", + ), + ( + "GST_VIDEO_CONVERTER_OPT_DEST_WIDTH", + "GstVideoConverter.dest-width", + ), + ("GST_VIDEO_CONVERTER_OPT_DEST_X", "GstVideoConverter.dest-x"), + ("GST_VIDEO_CONVERTER_OPT_DEST_Y", "GstVideoConverter.dest-y"), + ( + "GST_VIDEO_CONVERTER_OPT_DITHER_METHOD", + "GstVideoConverter.dither-method", + ), + ( + "GST_VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION", + "GstVideoConverter.dither-quantization", + ), + ( + "GST_VIDEO_CONVERTER_OPT_FILL_BORDER", + "GstVideoConverter.fill-border", + ), + ( + "GST_VIDEO_CONVERTER_OPT_GAMMA_MODE", + "GstVideoConverter.gamma-mode", + ), + ( + "GST_VIDEO_CONVERTER_OPT_MATRIX_MODE", + "GstVideoConverter.matrix-mode", + ), + ( + "GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE", + "GstVideoConverter.primaries-mode", + ), + ( + "GST_VIDEO_CONVERTER_OPT_RESAMPLER_METHOD", + "GstVideoConverter.resampler-method", + ), + ( + "GST_VIDEO_CONVERTER_OPT_RESAMPLER_TAPS", + "GstVideoConverter.resampler-taps", + ), + ( + "GST_VIDEO_CONVERTER_OPT_SRC_HEIGHT", + "GstVideoConverter.src-height", + ), + ( + "GST_VIDEO_CONVERTER_OPT_SRC_WIDTH", + "GstVideoConverter.src-width", + ), + ("GST_VIDEO_CONVERTER_OPT_SRC_X", "GstVideoConverter.src-x"), + ("GST_VIDEO_CONVERTER_OPT_SRC_Y", "GstVideoConverter.src-y"), + ( + "GST_VIDEO_CONVERTER_OPT_THREADS", + "GstVideoConverter.threads", + ), + ("GST_VIDEO_DECODER_MAX_ERRORS", "10"), + ("GST_VIDEO_DECODER_SINK_NAME", "sink"), + ("GST_VIDEO_DECODER_SRC_NAME", "src"), + ("(gint) GST_VIDEO_DITHER_BAYER", "4"), + ("(guint) GST_VIDEO_DITHER_FLAG_INTERLACED", "1"), + ("(guint) GST_VIDEO_DITHER_FLAG_NONE", "0"), + ("(guint) GST_VIDEO_DITHER_FLAG_QUANTIZE", "2"), + ("(gint) GST_VIDEO_DITHER_FLOYD_STEINBERG", "2"), + ("(gint) GST_VIDEO_DITHER_NONE", "0"), + ("(gint) GST_VIDEO_DITHER_SIERRA_LITE", "3"), + ("(gint) GST_VIDEO_DITHER_VERTERR", "1"), + ("GST_VIDEO_ENCODER_SINK_NAME", "sink"), + ("GST_VIDEO_ENCODER_SRC_NAME", "src"), + ("(gint) GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST", "2"), + ("(gint) GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST", "1"), + ("(gint) GST_VIDEO_FIELD_ORDER_UNKNOWN", "0"), + ("(guint) GST_VIDEO_FLAG_NONE", "0"), + ("(guint) GST_VIDEO_FLAG_PREMULTIPLIED_ALPHA", "2"), + ("(guint) GST_VIDEO_FLAG_VARIABLE_FPS", "1"), + ("(gint) GST_VIDEO_FORMAT_A420", "34"), + ("(gint) GST_VIDEO_FORMAT_A420_10BE", "54"), + ("(gint) GST_VIDEO_FORMAT_A420_10LE", "55"), + ("(gint) GST_VIDEO_FORMAT_A422_10BE", "56"), + ("(gint) GST_VIDEO_FORMAT_A422_10LE", "57"), + ("(gint) GST_VIDEO_FORMAT_A444_10BE", "58"), + ("(gint) GST_VIDEO_FORMAT_A444_10LE", "59"), + ("(gint) GST_VIDEO_FORMAT_ABGR", "14"), + ("(gint) GST_VIDEO_FORMAT_ARGB", "13"), + ("(gint) GST_VIDEO_FORMAT_ARGB64", "39"), + ("(gint) GST_VIDEO_FORMAT_AYUV", "6"), + ("(gint) GST_VIDEO_FORMAT_AYUV64", "40"), + ("(gint) GST_VIDEO_FORMAT_BGR", "16"), + ("(gint) GST_VIDEO_FORMAT_BGR10A2_LE", "85"), + ("(gint) GST_VIDEO_FORMAT_BGR15", "32"), + ("(gint) GST_VIDEO_FORMAT_BGR16", "30"), + ("(gint) GST_VIDEO_FORMAT_BGRA", "12"), + ("(gint) GST_VIDEO_FORMAT_BGRx", "8"), + ("(gint) GST_VIDEO_FORMAT_ENCODED", "1"), + ("(guint) GST_VIDEO_FORMAT_FLAG_ALPHA", "8"), + ("(guint) GST_VIDEO_FORMAT_FLAG_COMPLEX", "64"), + ("(guint) GST_VIDEO_FORMAT_FLAG_GRAY", "4"), + ("(guint) GST_VIDEO_FORMAT_FLAG_LE", "16"), + ("(guint) GST_VIDEO_FORMAT_FLAG_PALETTE", "32"), + ("(guint) GST_VIDEO_FORMAT_FLAG_RGB", "2"), + ("(guint) GST_VIDEO_FORMAT_FLAG_TILED", "256"), + ("(guint) GST_VIDEO_FORMAT_FLAG_UNPACK", "128"), + ("(guint) GST_VIDEO_FORMAT_FLAG_YUV", "1"), + ("(gint) GST_VIDEO_FORMAT_GBR", "48"), + ("(gint) GST_VIDEO_FORMAT_GBRA", "65"), + ("(gint) GST_VIDEO_FORMAT_GBRA_10BE", "66"), + ("(gint) GST_VIDEO_FORMAT_GBRA_10LE", "67"), + ("(gint) GST_VIDEO_FORMAT_GBRA_12BE", "70"), + ("(gint) GST_VIDEO_FORMAT_GBRA_12LE", "71"), + ("(gint) GST_VIDEO_FORMAT_GBR_10BE", "49"), + ("(gint) GST_VIDEO_FORMAT_GBR_10LE", "50"), + ("(gint) GST_VIDEO_FORMAT_GBR_12BE", "68"), + ("(gint) GST_VIDEO_FORMAT_GBR_12LE", "69"), + ("(gint) GST_VIDEO_FORMAT_GRAY10_LE32", "78"), + ("(gint) GST_VIDEO_FORMAT_GRAY16_BE", "26"), + ("(gint) GST_VIDEO_FORMAT_GRAY16_LE", "27"), + ("(gint) GST_VIDEO_FORMAT_GRAY8", "25"), + ("(gint) GST_VIDEO_FORMAT_I420", "2"), + ("(gint) GST_VIDEO_FORMAT_I420_10BE", "42"), + ("(gint) GST_VIDEO_FORMAT_I420_10LE", "43"), + ("(gint) GST_VIDEO_FORMAT_I420_12BE", "72"), + ("(gint) GST_VIDEO_FORMAT_I420_12LE", "73"), + ("(gint) GST_VIDEO_FORMAT_I422_10BE", "44"), + ("(gint) GST_VIDEO_FORMAT_I422_10LE", "45"), + ("(gint) GST_VIDEO_FORMAT_I422_12BE", "74"), + ("(gint) GST_VIDEO_FORMAT_I422_12LE", "75"), + ("(gint) GST_VIDEO_FORMAT_IYU1", "38"), + ("(gint) GST_VIDEO_FORMAT_IYU2", "63"), + ("(gint) GST_VIDEO_FORMAT_NV12", "23"), + ("(gint) GST_VIDEO_FORMAT_NV12_10LE32", "79"), + ("(gint) GST_VIDEO_FORMAT_NV12_10LE40", "81"), + ("(gint) GST_VIDEO_FORMAT_NV12_32L32", "98"), + ("(gint) GST_VIDEO_FORMAT_NV12_4L4", "97"), + ("(gint) GST_VIDEO_FORMAT_NV12_64Z32", "53"), + ("(gint) GST_VIDEO_FORMAT_NV16", "51"), + ("(gint) GST_VIDEO_FORMAT_NV16_10LE32", "80"), + ("(gint) GST_VIDEO_FORMAT_NV21", "24"), + ("(gint) GST_VIDEO_FORMAT_NV24", "52"), + ("(gint) GST_VIDEO_FORMAT_NV61", "60"), + ("(gint) GST_VIDEO_FORMAT_P010_10BE", "61"), + ("(gint) GST_VIDEO_FORMAT_P010_10LE", "62"), + ("(gint) GST_VIDEO_FORMAT_P012_BE", "91"), + ("(gint) GST_VIDEO_FORMAT_P012_LE", "92"), + ("(gint) GST_VIDEO_FORMAT_P016_BE", "89"), + ("(gint) GST_VIDEO_FORMAT_P016_LE", "90"), + ("(gint) GST_VIDEO_FORMAT_RGB", "15"), + ("(gint) GST_VIDEO_FORMAT_RGB10A2_LE", "86"), + ("(gint) GST_VIDEO_FORMAT_RGB15", "31"), + ("(gint) GST_VIDEO_FORMAT_RGB16", "29"), + ("(gint) GST_VIDEO_FORMAT_RGB8P", "35"), + ("(gint) GST_VIDEO_FORMAT_RGBA", "11"), + ("(gint) GST_VIDEO_FORMAT_RGBx", "7"), + ("(gint) GST_VIDEO_FORMAT_UNKNOWN", "0"), + ("(gint) GST_VIDEO_FORMAT_UYVP", "33"), + ("(gint) GST_VIDEO_FORMAT_UYVY", "5"), + ("(gint) GST_VIDEO_FORMAT_VUYA", "84"), + ("(gint) GST_VIDEO_FORMAT_VYUY", "64"), + ("(gint) GST_VIDEO_FORMAT_Y210", "82"), + ("(gint) GST_VIDEO_FORMAT_Y212_BE", "93"), + ("(gint) GST_VIDEO_FORMAT_Y212_LE", "94"), + ("(gint) GST_VIDEO_FORMAT_Y410", "83"), + ("(gint) GST_VIDEO_FORMAT_Y412_BE", "95"), + ("(gint) GST_VIDEO_FORMAT_Y412_LE", "96"), + ("(gint) GST_VIDEO_FORMAT_Y41B", "17"), + ("(gint) GST_VIDEO_FORMAT_Y42B", "18"), + ("(gint) GST_VIDEO_FORMAT_Y444", "20"), + ("(gint) GST_VIDEO_FORMAT_Y444_10BE", "46"), + ("(gint) GST_VIDEO_FORMAT_Y444_10LE", "47"), + ("(gint) GST_VIDEO_FORMAT_Y444_12BE", "76"), + ("(gint) GST_VIDEO_FORMAT_Y444_12LE", "77"), + ("(gint) GST_VIDEO_FORMAT_Y444_16BE", "87"), + ("(gint) GST_VIDEO_FORMAT_Y444_16LE", "88"), + ("(gint) GST_VIDEO_FORMAT_YUV9", "36"), + ("(gint) GST_VIDEO_FORMAT_YUY2", "4"), + ("(gint) GST_VIDEO_FORMAT_YV12", "3"), + ("(gint) GST_VIDEO_FORMAT_YVU9", "37"), + ("(gint) GST_VIDEO_FORMAT_YVYU", "19"), + ("(gint) GST_VIDEO_FORMAT_r210", "41"), + ("(gint) GST_VIDEO_FORMAT_v210", "21"), + ("(gint) GST_VIDEO_FORMAT_v216", "22"), + ("(gint) GST_VIDEO_FORMAT_v308", "28"), + ("(gint) GST_VIDEO_FORMAT_xBGR", "10"), + ("(gint) GST_VIDEO_FORMAT_xRGB", "9"), + ("GST_VIDEO_FPS_RANGE", "(fraction) [ 0, max ]"), + ("(guint) GST_VIDEO_FRAME_FLAG_BOTTOM_FIELD", "8"), + ("(guint) GST_VIDEO_FRAME_FLAG_FIRST_IN_BUNDLE", "32"), + ("(guint) GST_VIDEO_FRAME_FLAG_INTERLACED", "1"), + ("(guint) GST_VIDEO_FRAME_FLAG_MULTIPLE_VIEW", "16"), + ("(guint) GST_VIDEO_FRAME_FLAG_NONE", "0"), + ("(guint) GST_VIDEO_FRAME_FLAG_ONEFIELD", "8"), + ("(guint) GST_VIDEO_FRAME_FLAG_RFF", "4"), + ("(guint) GST_VIDEO_FRAME_FLAG_TFF", "2"), + ("(guint) GST_VIDEO_FRAME_FLAG_TOP_FIELD", "10"), + ("(guint) GST_VIDEO_FRAME_MAP_FLAG_LAST", "16777216"), + ("(guint) GST_VIDEO_FRAME_MAP_FLAG_NO_REF", "65536"), + ("(gint) GST_VIDEO_GAMMA_MODE_NONE", "0"), + ("(gint) GST_VIDEO_GAMMA_MODE_REMAP", "1"), + ("(gint) GST_VIDEO_GL_TEXTURE_ORIENTATION_X_FLIP_Y_FLIP", "3"), + ( + "(gint) GST_VIDEO_GL_TEXTURE_ORIENTATION_X_FLIP_Y_NORMAL", + "2", + ), + ( + "(gint) GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_FLIP", + "1", + ), + ( + "(gint) GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL", + "0", + ), + ("(gint) GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE", "0"), + ("(gint) GST_VIDEO_GL_TEXTURE_TYPE_LUMINANCE_ALPHA", "1"), + ("(gint) GST_VIDEO_GL_TEXTURE_TYPE_R", "5"), + ("(gint) GST_VIDEO_GL_TEXTURE_TYPE_RG", "6"), + ("(gint) GST_VIDEO_GL_TEXTURE_TYPE_RGB", "3"), + ("(gint) GST_VIDEO_GL_TEXTURE_TYPE_RGB16", "2"), + ("(gint) GST_VIDEO_GL_TEXTURE_TYPE_RGBA", "4"), + ("(gint) GST_VIDEO_INTERLACE_MODE_ALTERNATE", "4"), + ("(gint) GST_VIDEO_INTERLACE_MODE_FIELDS", "3"), + ("(gint) GST_VIDEO_INTERLACE_MODE_INTERLEAVED", "1"), + ("(gint) GST_VIDEO_INTERLACE_MODE_MIXED", "2"), + ("(gint) GST_VIDEO_INTERLACE_MODE_PROGRESSIVE", "0"), + ("(gint) GST_VIDEO_MATRIX_MODE_FULL", "0"), + ("(gint) GST_VIDEO_MATRIX_MODE_INPUT_ONLY", "1"), + ("(gint) GST_VIDEO_MATRIX_MODE_NONE", "3"), + ("(gint) GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY", "2"), + ("GST_VIDEO_MAX_COMPONENTS", "4"), + ("GST_VIDEO_MAX_PLANES", "4"), + ("(guint) GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT", "16384"), + ("(guint) GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED", "2"), + ("(guint) GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED", "4"), + ("(guint) GST_VIDEO_MULTIVIEW_FLAGS_MIXED_MONO", "32768"), + ("(guint) GST_VIDEO_MULTIVIEW_FLAGS_NONE", "0"), + ("(guint) GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED", "8"), + ("(guint) GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED", "16"), + ("(guint) GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST", "1"), + ("(gint) GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD", "8"), + ( + "(gint) GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED", + "5", + ), + ("(gint) GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT", "1"), + ("(gint) GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO", "0"), + ("(gint) GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE", "-1"), + ("(gint) GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT", "2"), + ( + "(gint) GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED", + "6", + ), + ("(gint) GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE", "3"), + ( + "(gint) GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX", + "4", + ), + ("(gint) GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM", "7"), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD", "8"), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED", "5"), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME", "32"), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_LEFT", "1"), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_MONO", "0"), + ( + "(gint) GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME", + "33", + ), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_NONE", "-1"), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_RIGHT", "2"), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED", "6"), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_SEPARATED", "34"), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE", "3"), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX", "4"), + ("(gint) GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM", "7"), + ("(gint) GST_VIDEO_ORIENTATION_180", "2"), + ("(gint) GST_VIDEO_ORIENTATION_90L", "3"), + ("(gint) GST_VIDEO_ORIENTATION_90R", "1"), + ("(gint) GST_VIDEO_ORIENTATION_AUTO", "8"), + ("(gint) GST_VIDEO_ORIENTATION_CUSTOM", "9"), + ("(gint) GST_VIDEO_ORIENTATION_HORIZ", "4"), + ("(gint) GST_VIDEO_ORIENTATION_IDENTITY", "0"), + ("(gint) GST_VIDEO_ORIENTATION_UL_LR", "6"), + ("(gint) GST_VIDEO_ORIENTATION_UR_LL", "7"), + ("(gint) GST_VIDEO_ORIENTATION_VERT", "5"), + ("(guint) GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA", "2"), + ("(guint) GST_VIDEO_OVERLAY_FORMAT_FLAG_NONE", "0"), + ( + "(guint) GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA", + "1", + ), + ("(guint) GST_VIDEO_PACK_FLAG_INTERLACED", "2"), + ("(guint) GST_VIDEO_PACK_FLAG_NONE", "0"), + ("(guint) GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE", "1"), + ("(gint) GST_VIDEO_PRIMARIES_MODE_FAST", "2"), + ("(gint) GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY", "1"), + ("(gint) GST_VIDEO_PRIMARIES_MODE_NONE", "0"), + ("(guint) GST_VIDEO_RESAMPLER_FLAG_HALF_TAPS", "1"), + ("(guint) GST_VIDEO_RESAMPLER_FLAG_NONE", "0"), + ("(gint) GST_VIDEO_RESAMPLER_METHOD_CUBIC", "2"), + ("(gint) GST_VIDEO_RESAMPLER_METHOD_LANCZOS", "4"), + ("(gint) GST_VIDEO_RESAMPLER_METHOD_LINEAR", "1"), + ("(gint) GST_VIDEO_RESAMPLER_METHOD_NEAREST", "0"), + ("(gint) GST_VIDEO_RESAMPLER_METHOD_SINC", "3"), + ( + "GST_VIDEO_RESAMPLER_OPT_CUBIC_B", + "GstVideoResampler.cubic-b", + ), + ( + "GST_VIDEO_RESAMPLER_OPT_CUBIC_C", + "GstVideoResampler.cubic-c", + ), + ( + "GST_VIDEO_RESAMPLER_OPT_ENVELOPE", + "GstVideoResampler.envelope", + ), + ( + "GST_VIDEO_RESAMPLER_OPT_MAX_TAPS", + "GstVideoResampler.max-taps", + ), + ( + "GST_VIDEO_RESAMPLER_OPT_SHARPEN", + "GstVideoResampler.sharpen", + ), + ( + "GST_VIDEO_RESAMPLER_OPT_SHARPNESS", + "GstVideoResampler.sharpness", + ), + ("(guint) GST_VIDEO_SCALER_FLAG_INTERLACED", "1"), + ("(guint) GST_VIDEO_SCALER_FLAG_NONE", "0"), + ( + "GST_VIDEO_SCALER_OPT_DITHER_METHOD", + "GstVideoScaler.dither-method", + ), + ("GST_VIDEO_SIZE_RANGE", "(int) [ 1, max ]"), + ("(gint) GST_VIDEO_TILE_MODE_LINEAR", "131072"), + ("(gint) GST_VIDEO_TILE_MODE_UNKNOWN", "0"), + ("(gint) GST_VIDEO_TILE_MODE_ZFLIPZ_2X2", "65536"), + ("(gint) GST_VIDEO_TILE_TYPE_INDEXED", "0"), + ("GST_VIDEO_TILE_TYPE_MASK", "65535"), + ("GST_VIDEO_TILE_TYPE_SHIFT", "16"), + ("GST_VIDEO_TILE_X_TILES_MASK", "65535"), + ("GST_VIDEO_TILE_Y_TILES_SHIFT", "16"), + ("(guint) GST_VIDEO_TIME_CODE_FLAGS_DROP_FRAME", "1"), + ("(guint) GST_VIDEO_TIME_CODE_FLAGS_INTERLACED", "2"), + ("(guint) GST_VIDEO_TIME_CODE_FLAGS_NONE", "0"), + ("(gint) GST_VIDEO_TRANSFER_ADOBERGB", "12"), + ("(gint) GST_VIDEO_TRANSFER_ARIB_STD_B67", "15"), + ("(gint) GST_VIDEO_TRANSFER_BT2020_10", "13"), + ("(gint) GST_VIDEO_TRANSFER_BT2020_12", "11"), + ("(gint) GST_VIDEO_TRANSFER_BT601", "16"), + ("(gint) GST_VIDEO_TRANSFER_BT709", "5"), + ("(gint) GST_VIDEO_TRANSFER_GAMMA10", "1"), + ("(gint) GST_VIDEO_TRANSFER_GAMMA18", "2"), + ("(gint) GST_VIDEO_TRANSFER_GAMMA20", "3"), + ("(gint) GST_VIDEO_TRANSFER_GAMMA22", "4"), + ("(gint) GST_VIDEO_TRANSFER_GAMMA28", "8"), + ("(gint) GST_VIDEO_TRANSFER_LOG100", "9"), + ("(gint) GST_VIDEO_TRANSFER_LOG316", "10"), + ("(gint) GST_VIDEO_TRANSFER_SMPTE2084", "14"), + ("(gint) GST_VIDEO_TRANSFER_SMPTE240M", "6"), + ("(gint) GST_VIDEO_TRANSFER_SRGB", "7"), + ("(gint) GST_VIDEO_TRANSFER_UNKNOWN", "0"), + ("(gint) GST_VIDEO_VBI_PARSER_RESULT_DONE", "0"), + ("(gint) GST_VIDEO_VBI_PARSER_RESULT_ERROR", "2"), + ("(gint) GST_VIDEO_VBI_PARSER_RESULT_OK", "1"), +]; diff --git a/sys/gstreamer-video-sys/tests/constant.c b/sys/gstreamer-video-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-video-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-video-sys/tests/layout.c b/sys/gstreamer-video-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-video-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-video-sys/tests/manual.h b/sys/gstreamer-video-sys/tests/manual.h new file mode 100644 index 000000000..c48a7e612 --- /dev/null +++ b/sys/gstreamer-video-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include diff --git a/sys/gstreamer-webrtc-sys/CHANGELOG.md b/sys/gstreamer-webrtc-sys/CHANGELOG.md new file mode 100644 index 000000000..ca04a635e --- /dev/null +++ b/sys/gstreamer-webrtc-sys/CHANGELOG.md @@ -0,0 +1,181 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.9.1] - 2020-09-08 +### Changed +- Updated bindings to 1.18.0. This stabilized GStreamer 1.18 support and any + API behind the "v1_18" feature is considered stable now. + +## [0.9.0] - 2020-07-05 +### Added +- Updated bindings to 1.17.2, adding experimental 1.18 support. This can be + opted-in via the "v1_18" feature flag but there might still be API changes + in the newly added API. + +### Changed +- Minimum supported GStreamer version is 1.8 now. +- The `system-deps` crate is now used for declaring the dependency on the C + libraries instead of directly using `pkg-config`. + +### Fixed +- Various missing version markers were added, which should allow compilation + against GStreamer 1.8 on Windows again. On Windows missing symbols are + apparently an error even if they're not used. +- `AUDIO/VIDEO_FORMATS_ALL` are ignored now as they're endian-dependent. + +## [0.8.1] - 2019-12-16 +### Added +- GStreamer RTP bindings + +### Changed +- Update minimum supported Rust version to 1.36 +- Update introspection data to GStreamer 1.16.2 release + +## [0.8.0] - 2019-06-24 +### Added +- GstGLDisplayX11 and GstGLDisplayWayland were added to gstreamer-gl-sys in + addition to GstGLDisplayEGL that existed before + +### Changed +- Updated to GStreamer 1.16.0 .gir files, plus backported fixes +- Updated to latest gir +- Run all code through rustfmt after code generation + +## [0.7.0] - 2019-02-22 +### Added +- GstGL (OpenGL/GLES) bindings + +### Changed +- Switch to Rust 1.31 as minimum supported version +- Generate GstVideoOverlayFormatFlags as flags type instead of enum +- Updates GstMpegts with various annotation fixes from GStreamer git master + +## [0.6.1] - 2018-11-10 +### Added +- GstCheck and GES (gstreamer editing services) bindings + +### Changed +- Updated .gir files to 1.14.4 release +- All references were updated from GitHub to freedesktop.org GitLab +- Various functions take \*const instead of \*mut as parameters now + +### Fixed +- Various functions and structs having pointer-of-array parameters/fields have + now fixed types. They were previously flat arrays instead of + pointer-of-arrays. +- Set gstreamer-webrtc-sys minimum version to 1.14. It did not exist before + that + +## [0.6.0] - 2018-09-08 +### Changed +- Updated everything to GStreamer 1.14.2 +- Various fixes to how the code generator is used +- Regenerate with latest GIR code generator + +### Fixed +- WebRTCICETransport and WebRTCDTLSTransport have the correct parent class + struct +- gstreamer-webrtc-sys correctly depends/links to gstreamer-sys +- Removed unneeded dependencies from the code generator configuration files + +## [0.5.0] - 2018-03-20 +### Changed +- Updated everything to GStreamer 1.14.0 + +### Added +- GstSdp, GstRtsp, GstRtspServer and GstWebRTC bindings + +### Fixed +- Use external_libraries feature of gir to require less manual editing +- Remove some unused crates from dependencies +- Disale print_system_libs in calls to pkg-config to work better with + non-system installs of GStreamer + +## [0.4.1] - 2018-02-18 +### Fixed +- Fix native library name of GstNet bindings + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## 0.1.0 - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.1...HEAD +[0.9.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.9.0...0.9.1 +[0.9.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.1...0.9.0 +[0.8.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.8.0...0.8.1 +[0.8.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.7.0...0.8.0 +[0.7.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.1...0.7.0 +[0.6.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.6.0...0.6.1 +[0.6.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.5.0...0.6.0 +[0.5.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.1...0.5.0 +[0.4.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.4.0...0.4.1 +[0.4.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/compare/0.1.0...0.1.1 diff --git a/sys/gstreamer-webrtc-sys/Cargo.toml b/sys/gstreamer-webrtc-sys/Cargo.toml new file mode 100644 index 000000000..27a9a23d8 --- /dev/null +++ b/sys/gstreamer-webrtc-sys/Cargo.toml @@ -0,0 +1,56 @@ +[build-dependencies] +system-deps = "1.3" + +[dependencies] +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-sdp-sys] +path = "../gstreamer-sdp-sys" +features = ["v1_14"] + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" +features = ["v1_14"] + +[dev-dependencies] +shell-words = "1.0.0" +tempfile = "3" + +[features] +dox = [] +v1_16 = ["v1_14_1"] +v1_18 = ["v1_16"] +v1_14_1 = [] + +[lib] +name = "gstreamer_webrtc_sys" + +[package] +authors = ["Sebastian Dröge "] +build = "build.rs" +description = "FFI bindings to libgstwebrtc-1.0" +documentation = "https://slomo.pages.freedesktop.org/rustdocs/gstreamer-sys/gstreamer_webrtc_sys/" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstwebrtc-1.0" +name = "gstreamer-webrtc-sys" +readme = "README.md" +repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" +version = "0.10.0" +[package.metadata.docs.rs] +features = ["dox"] +[package.metadata.system-deps.gstreamer_webrtc_1_0] +name = "gstreamer-webrtc-1.0" +version = "1.14" + +[package.metadata.system-deps.gstreamer_webrtc_1_0.feature-versions] +v1_14_1 = "1.14.1" +v1_16 = "1.16" +v1_18 = "1.18" diff --git a/sys/gstreamer-webrtc-sys/README.md b/sys/gstreamer-webrtc-sys/README.md new file mode 100644 index 000000000..d0ca20b26 --- /dev/null +++ b/sys/gstreamer-webrtc-sys/README.md @@ -0,0 +1,33 @@ +# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! + +# gstreamer-webrtc-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-webrtc-sys.svg)](https://crates.io/crates/gstreamer-webrtc-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) + +[GStreamer](https://gstreamer.freedesktop.org/) (WebRTC library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs + * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/sys/gstreamer-webrtc-sys/build.rs b/sys/gstreamer-webrtc-sys/build.rs new file mode 100644 index 000000000..f3c439fba --- /dev/null +++ b/sys/gstreamer-webrtc-sys/build.rs @@ -0,0 +1,20 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#[cfg(not(feature = "dox"))] +extern crate system_deps; + +#[cfg(not(feature = "dox"))] +use std::process; + +#[cfg(feature = "dox")] +fn main() {} // prevent linking libraries to avoid documentation failure + +#[cfg(not(feature = "dox"))] +fn main() { + if let Err(s) = system_deps::Config::new().probe() { + let _ = eprintln!("{}", s); + process::exit(1); + } +} diff --git a/sys/gstreamer-webrtc-sys/src/lib.rs b/sys/gstreamer-webrtc-sys/src/lib.rs new file mode 100644 index 000000000..85b9b66c2 --- /dev/null +++ b/sys/gstreamer-webrtc-sys/src/lib.rs @@ -0,0 +1,669 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] +#![allow( + clippy::approx_constant, + clippy::type_complexity, + clippy::unreadable_literal +)] + +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_sdp_sys as gst_sdp; +extern crate gstreamer_sys as gst; +extern crate libc; + +#[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, time_t, uintptr_t, FILE, +}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType}; + +// Enums +pub type GstWebRTCBundlePolicy = c_int; +pub const GST_WEBRTC_BUNDLE_POLICY_NONE: GstWebRTCBundlePolicy = 0; +pub const GST_WEBRTC_BUNDLE_POLICY_BALANCED: GstWebRTCBundlePolicy = 1; +pub const GST_WEBRTC_BUNDLE_POLICY_MAX_COMPAT: GstWebRTCBundlePolicy = 2; +pub const GST_WEBRTC_BUNDLE_POLICY_MAX_BUNDLE: GstWebRTCBundlePolicy = 3; + +pub type GstWebRTCDTLSSetup = c_int; +pub const GST_WEBRTC_DTLS_SETUP_NONE: GstWebRTCDTLSSetup = 0; +pub const GST_WEBRTC_DTLS_SETUP_ACTPASS: GstWebRTCDTLSSetup = 1; +pub const GST_WEBRTC_DTLS_SETUP_ACTIVE: GstWebRTCDTLSSetup = 2; +pub const GST_WEBRTC_DTLS_SETUP_PASSIVE: GstWebRTCDTLSSetup = 3; + +pub type GstWebRTCDTLSTransportState = c_int; +pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW: GstWebRTCDTLSTransportState = 0; +pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED: GstWebRTCDTLSTransportState = 1; +pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED: GstWebRTCDTLSTransportState = 2; +pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING: GstWebRTCDTLSTransportState = 3; +pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED: GstWebRTCDTLSTransportState = 4; + +pub type GstWebRTCDataChannelState = c_int; +pub const GST_WEBRTC_DATA_CHANNEL_STATE_NEW: GstWebRTCDataChannelState = 0; +pub const GST_WEBRTC_DATA_CHANNEL_STATE_CONNECTING: GstWebRTCDataChannelState = 1; +pub const GST_WEBRTC_DATA_CHANNEL_STATE_OPEN: GstWebRTCDataChannelState = 2; +pub const GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING: GstWebRTCDataChannelState = 3; +pub const GST_WEBRTC_DATA_CHANNEL_STATE_CLOSED: GstWebRTCDataChannelState = 4; + +pub type GstWebRTCFECType = c_int; +pub const GST_WEBRTC_FEC_TYPE_NONE: GstWebRTCFECType = 0; +pub const GST_WEBRTC_FEC_TYPE_ULP_RED: GstWebRTCFECType = 1; + +pub type GstWebRTCICEComponent = c_int; +pub const GST_WEBRTC_ICE_COMPONENT_RTP: GstWebRTCICEComponent = 0; +pub const GST_WEBRTC_ICE_COMPONENT_RTCP: GstWebRTCICEComponent = 1; + +pub type GstWebRTCICEConnectionState = c_int; +pub const GST_WEBRTC_ICE_CONNECTION_STATE_NEW: GstWebRTCICEConnectionState = 0; +pub const GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING: GstWebRTCICEConnectionState = 1; +pub const GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED: GstWebRTCICEConnectionState = 2; +pub const GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED: GstWebRTCICEConnectionState = 3; +pub const GST_WEBRTC_ICE_CONNECTION_STATE_FAILED: GstWebRTCICEConnectionState = 4; +pub const GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED: GstWebRTCICEConnectionState = 5; +pub const GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED: GstWebRTCICEConnectionState = 6; + +pub type GstWebRTCICEGatheringState = c_int; +pub const GST_WEBRTC_ICE_GATHERING_STATE_NEW: GstWebRTCICEGatheringState = 0; +pub const GST_WEBRTC_ICE_GATHERING_STATE_GATHERING: GstWebRTCICEGatheringState = 1; +pub const GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE: GstWebRTCICEGatheringState = 2; + +pub type GstWebRTCICERole = c_int; +pub const GST_WEBRTC_ICE_ROLE_CONTROLLED: GstWebRTCICERole = 0; +pub const GST_WEBRTC_ICE_ROLE_CONTROLLING: GstWebRTCICERole = 1; + +pub type GstWebRTCICETransportPolicy = c_int; +pub const GST_WEBRTC_ICE_TRANSPORT_POLICY_ALL: GstWebRTCICETransportPolicy = 0; +pub const GST_WEBRTC_ICE_TRANSPORT_POLICY_RELAY: GstWebRTCICETransportPolicy = 1; + +pub type GstWebRTCPeerConnectionState = c_int; +pub const GST_WEBRTC_PEER_CONNECTION_STATE_NEW: GstWebRTCPeerConnectionState = 0; +pub const GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING: GstWebRTCPeerConnectionState = 1; +pub const GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED: GstWebRTCPeerConnectionState = 2; +pub const GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED: GstWebRTCPeerConnectionState = 3; +pub const GST_WEBRTC_PEER_CONNECTION_STATE_FAILED: GstWebRTCPeerConnectionState = 4; +pub const GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED: GstWebRTCPeerConnectionState = 5; + +pub type GstWebRTCPriorityType = c_int; +pub const GST_WEBRTC_PRIORITY_TYPE_VERY_LOW: GstWebRTCPriorityType = 1; +pub const GST_WEBRTC_PRIORITY_TYPE_LOW: GstWebRTCPriorityType = 2; +pub const GST_WEBRTC_PRIORITY_TYPE_MEDIUM: GstWebRTCPriorityType = 3; +pub const GST_WEBRTC_PRIORITY_TYPE_HIGH: GstWebRTCPriorityType = 4; + +pub type GstWebRTCRTPTransceiverDirection = c_int; +pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE: GstWebRTCRTPTransceiverDirection = 0; +pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE: GstWebRTCRTPTransceiverDirection = 1; +pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY: GstWebRTCRTPTransceiverDirection = 2; +pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY: GstWebRTCRTPTransceiverDirection = 3; +pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV: GstWebRTCRTPTransceiverDirection = 4; + +pub type GstWebRTCSCTPTransportState = c_int; +pub const GST_WEBRTC_SCTP_TRANSPORT_STATE_NEW: GstWebRTCSCTPTransportState = 0; +pub const GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTING: GstWebRTCSCTPTransportState = 1; +pub const GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTED: GstWebRTCSCTPTransportState = 2; +pub const GST_WEBRTC_SCTP_TRANSPORT_STATE_CLOSED: GstWebRTCSCTPTransportState = 3; + +pub type GstWebRTCSDPType = c_int; +pub const GST_WEBRTC_SDP_TYPE_OFFER: GstWebRTCSDPType = 1; +pub const GST_WEBRTC_SDP_TYPE_PRANSWER: GstWebRTCSDPType = 2; +pub const GST_WEBRTC_SDP_TYPE_ANSWER: GstWebRTCSDPType = 3; +pub const GST_WEBRTC_SDP_TYPE_ROLLBACK: GstWebRTCSDPType = 4; + +pub type GstWebRTCSignalingState = c_int; +pub const GST_WEBRTC_SIGNALING_STATE_STABLE: GstWebRTCSignalingState = 0; +pub const GST_WEBRTC_SIGNALING_STATE_CLOSED: GstWebRTCSignalingState = 1; +pub const GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER: GstWebRTCSignalingState = 2; +pub const GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER: GstWebRTCSignalingState = 3; +pub const GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER: GstWebRTCSignalingState = 4; +pub const GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER: GstWebRTCSignalingState = 5; + +pub type GstWebRTCStatsType = c_int; +pub const GST_WEBRTC_STATS_CODEC: GstWebRTCStatsType = 1; +pub const GST_WEBRTC_STATS_INBOUND_RTP: GstWebRTCStatsType = 2; +pub const GST_WEBRTC_STATS_OUTBOUND_RTP: GstWebRTCStatsType = 3; +pub const GST_WEBRTC_STATS_REMOTE_INBOUND_RTP: GstWebRTCStatsType = 4; +pub const GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP: GstWebRTCStatsType = 5; +pub const GST_WEBRTC_STATS_CSRC: GstWebRTCStatsType = 6; +pub const GST_WEBRTC_STATS_PEER_CONNECTION: GstWebRTCStatsType = 7; +pub const GST_WEBRTC_STATS_DATA_CHANNEL: GstWebRTCStatsType = 8; +pub const GST_WEBRTC_STATS_STREAM: GstWebRTCStatsType = 9; +pub const GST_WEBRTC_STATS_TRANSPORT: GstWebRTCStatsType = 10; +pub const GST_WEBRTC_STATS_CANDIDATE_PAIR: GstWebRTCStatsType = 11; +pub const GST_WEBRTC_STATS_LOCAL_CANDIDATE: GstWebRTCStatsType = 12; +pub const GST_WEBRTC_STATS_REMOTE_CANDIDATE: GstWebRTCStatsType = 13; +pub const GST_WEBRTC_STATS_CERTIFICATE: GstWebRTCStatsType = 14; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCDTLSTransportClass { + pub parent_class: gst::GstObjectClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCDTLSTransportClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstWebRTCDTLSTransportClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCDataChannelClass { + pub parent_class: gobject::GObjectClass, + pub send_data: Option, + pub send_string: Option, + pub close: Option, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCDataChannelClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstWebRTCDataChannelClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("send_data", &self.send_data) + .field("send_string", &self.send_string) + .field("close", &self.close) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCICETransportClass { + pub parent_class: gst::GstObjectClass, + pub gather_candidates: Option gboolean>, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCICETransportClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstWebRTCICETransportClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("gather_candidates", &self.gather_candidates) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCRTPReceiverClass { + pub parent_class: gst::GstObjectClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCRTPReceiverClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstWebRTCRTPReceiverClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCRTPSenderClass { + pub parent_class: gst::GstObjectClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCRTPSenderClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstWebRTCRTPSenderClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCRTPTransceiverClass { + pub parent_class: gst::GstObjectClass, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCRTPTransceiverClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstWebRTCRTPTransceiverClass @ {:?}", + self as *const _ + )) + .field("parent_class", &self.parent_class) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCSessionDescription { + pub type_: GstWebRTCSDPType, + pub sdp: *mut gst_sdp::GstSDPMessage, +} + +impl ::std::fmt::Debug for GstWebRTCSessionDescription { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!( + "GstWebRTCSessionDescription @ {:?}", + self as *const _ + )) + .field("type_", &self.type_) + .field("sdp", &self.sdp) + .finish() + } +} + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCDTLSTransport { + pub parent: gst::GstObject, + pub transport: *mut GstWebRTCICETransport, + pub state: GstWebRTCDTLSTransportState, + pub is_rtcp: gboolean, + pub client: gboolean, + pub session_id: c_uint, + pub dtlssrtpenc: *mut gst::GstElement, + pub dtlssrtpdec: *mut gst::GstElement, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCDTLSTransport { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstWebRTCDTLSTransport @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("transport", &self.transport) + .field("state", &self.state) + .field("is_rtcp", &self.is_rtcp) + .field("client", &self.client) + .field("session_id", &self.session_id) + .field("dtlssrtpenc", &self.dtlssrtpenc) + .field("dtlssrtpdec", &self.dtlssrtpdec) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCDataChannel { + pub parent: gobject::GObject, + pub lock: glib::GMutex, + pub label: *mut c_char, + pub ordered: gboolean, + pub max_packet_lifetime: c_uint, + pub max_retransmits: c_uint, + pub protocol: *mut c_char, + pub negotiated: gboolean, + pub id: c_int, + pub priority: GstWebRTCPriorityType, + pub ready_state: GstWebRTCDataChannelState, + pub buffered_amount: u64, + pub buffered_amount_low_threshold: u64, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCDataChannel { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstWebRTCDataChannel @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("lock", &self.lock) + .field("label", &self.label) + .field("ordered", &self.ordered) + .field("max_packet_lifetime", &self.max_packet_lifetime) + .field("max_retransmits", &self.max_retransmits) + .field("protocol", &self.protocol) + .field("negotiated", &self.negotiated) + .field("id", &self.id) + .field("priority", &self.priority) + .field("ready_state", &self.ready_state) + .field("buffered_amount", &self.buffered_amount) + .field( + "buffered_amount_low_threshold", + &self.buffered_amount_low_threshold, + ) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCICETransport { + pub parent: gst::GstObject, + pub role: GstWebRTCICERole, + pub component: GstWebRTCICEComponent, + pub state: GstWebRTCICEConnectionState, + pub gathering_state: GstWebRTCICEGatheringState, + pub src: *mut gst::GstElement, + pub sink: *mut gst::GstElement, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCICETransport { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstWebRTCICETransport @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("role", &self.role) + .field("component", &self.component) + .field("state", &self.state) + .field("gathering_state", &self.gathering_state) + .field("src", &self.src) + .field("sink", &self.sink) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCRTPReceiver { + pub parent: gst::GstObject, + pub transport: *mut GstWebRTCDTLSTransport, + pub rtcp_transport: *mut GstWebRTCDTLSTransport, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCRTPReceiver { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstWebRTCRTPReceiver @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("transport", &self.transport) + .field("rtcp_transport", &self.rtcp_transport) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCRTPSender { + pub parent: gst::GstObject, + pub transport: *mut GstWebRTCDTLSTransport, + pub rtcp_transport: *mut GstWebRTCDTLSTransport, + pub send_encodings: *mut glib::GArray, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCRTPSender { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstWebRTCRTPSender @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("transport", &self.transport) + .field("rtcp_transport", &self.rtcp_transport) + .field("send_encodings", &self.send_encodings) + .field("_padding", &self._padding) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstWebRTCRTPTransceiver { + pub parent: gst::GstObject, + pub mline: c_uint, + pub mid: *mut c_char, + pub stopped: gboolean, + pub sender: *mut GstWebRTCRTPSender, + pub receiver: *mut GstWebRTCRTPReceiver, + pub direction: GstWebRTCRTPTransceiverDirection, + pub current_direction: GstWebRTCRTPTransceiverDirection, + pub codec_preferences: *mut gst::GstCaps, + pub _padding: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstWebRTCRTPTransceiver { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstWebRTCRTPTransceiver @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("mline", &self.mline) + .field("mid", &self.mid) + .field("stopped", &self.stopped) + .field("sender", &self.sender) + .field("receiver", &self.receiver) + .field("direction", &self.direction) + .field("current_direction", &self.current_direction) + .field("codec_preferences", &self.codec_preferences) + .field("_padding", &self._padding) + .finish() + } +} + +#[link(name = "gstwebrtc-1.0")] +extern "C" { + + //========================================================================= + // GstWebRTCBundlePolicy + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_webrtc_bundle_policy_get_type() -> GType; + + //========================================================================= + // GstWebRTCDTLSSetup + //========================================================================= + pub fn gst_webrtc_dtls_setup_get_type() -> GType; + + //========================================================================= + // GstWebRTCDTLSTransportState + //========================================================================= + pub fn gst_webrtc_dtls_transport_state_get_type() -> GType; + + //========================================================================= + // GstWebRTCDataChannelState + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_webrtc_data_channel_state_get_type() -> GType; + + //========================================================================= + // GstWebRTCFECType + //========================================================================= + #[cfg(any(feature = "v1_14_1", feature = "dox"))] + pub fn gst_webrtc_fec_type_get_type() -> GType; + + //========================================================================= + // GstWebRTCICEComponent + //========================================================================= + pub fn gst_webrtc_ice_component_get_type() -> GType; + + //========================================================================= + // GstWebRTCICEConnectionState + //========================================================================= + pub fn gst_webrtc_ice_connection_state_get_type() -> GType; + + //========================================================================= + // GstWebRTCICEGatheringState + //========================================================================= + pub fn gst_webrtc_ice_gathering_state_get_type() -> GType; + + //========================================================================= + // GstWebRTCICERole + //========================================================================= + pub fn gst_webrtc_ice_role_get_type() -> GType; + + //========================================================================= + // GstWebRTCICETransportPolicy + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_webrtc_ice_transport_policy_get_type() -> GType; + + //========================================================================= + // GstWebRTCPeerConnectionState + //========================================================================= + pub fn gst_webrtc_peer_connection_state_get_type() -> GType; + + //========================================================================= + // GstWebRTCPriorityType + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_webrtc_priority_type_get_type() -> GType; + + //========================================================================= + // GstWebRTCRTPTransceiverDirection + //========================================================================= + pub fn gst_webrtc_rtp_transceiver_direction_get_type() -> GType; + + //========================================================================= + // GstWebRTCSCTPTransportState + //========================================================================= + #[cfg(any(feature = "v1_16", feature = "dox"))] + pub fn gst_webrtc_sctp_transport_state_get_type() -> GType; + + //========================================================================= + // GstWebRTCSDPType + //========================================================================= + pub fn gst_webrtc_sdp_type_get_type() -> GType; + pub fn gst_webrtc_sdp_type_to_string(type_: GstWebRTCSDPType) -> *const c_char; + + //========================================================================= + // GstWebRTCSignalingState + //========================================================================= + pub fn gst_webrtc_signaling_state_get_type() -> GType; + + //========================================================================= + // GstWebRTCStatsType + //========================================================================= + pub fn gst_webrtc_stats_type_get_type() -> GType; + + //========================================================================= + // GstWebRTCSessionDescription + //========================================================================= + pub fn gst_webrtc_session_description_get_type() -> GType; + pub fn gst_webrtc_session_description_new( + type_: GstWebRTCSDPType, + sdp: *mut gst_sdp::GstSDPMessage, + ) -> *mut GstWebRTCSessionDescription; + pub fn gst_webrtc_session_description_copy( + src: *const GstWebRTCSessionDescription, + ) -> *mut GstWebRTCSessionDescription; + pub fn gst_webrtc_session_description_free(desc: *mut GstWebRTCSessionDescription); + + //========================================================================= + // GstWebRTCDTLSTransport + //========================================================================= + pub fn gst_webrtc_dtls_transport_get_type() -> GType; + pub fn gst_webrtc_dtls_transport_new( + session_id: c_uint, + rtcp: gboolean, + ) -> *mut GstWebRTCDTLSTransport; + pub fn gst_webrtc_dtls_transport_set_transport( + transport: *mut GstWebRTCDTLSTransport, + ice: *mut GstWebRTCICETransport, + ); + + //========================================================================= + // GstWebRTCDataChannel + //========================================================================= + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_webrtc_data_channel_get_type() -> GType; + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_webrtc_data_channel_close(channel: *mut GstWebRTCDataChannel); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_webrtc_data_channel_on_buffered_amount_low(channel: *mut GstWebRTCDataChannel); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_webrtc_data_channel_on_close(channel: *mut GstWebRTCDataChannel); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_webrtc_data_channel_on_error( + channel: *mut GstWebRTCDataChannel, + error: *mut glib::GError, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_webrtc_data_channel_on_message_data( + channel: *mut GstWebRTCDataChannel, + data: *mut glib::GBytes, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_webrtc_data_channel_on_message_string( + channel: *mut GstWebRTCDataChannel, + str: *const c_char, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_webrtc_data_channel_on_open(channel: *mut GstWebRTCDataChannel); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_webrtc_data_channel_send_data( + channel: *mut GstWebRTCDataChannel, + data: *mut glib::GBytes, + ); + #[cfg(any(feature = "v1_18", feature = "dox"))] + pub fn gst_webrtc_data_channel_send_string( + channel: *mut GstWebRTCDataChannel, + str: *const c_char, + ); + + //========================================================================= + // GstWebRTCICETransport + //========================================================================= + pub fn gst_webrtc_ice_transport_get_type() -> GType; + pub fn gst_webrtc_ice_transport_connection_state_change( + ice: *mut GstWebRTCICETransport, + new_state: GstWebRTCICEConnectionState, + ); + pub fn gst_webrtc_ice_transport_gathering_state_change( + ice: *mut GstWebRTCICETransport, + new_state: GstWebRTCICEGatheringState, + ); + pub fn gst_webrtc_ice_transport_new_candidate( + ice: *mut GstWebRTCICETransport, + stream_id: c_uint, + component: GstWebRTCICEComponent, + attr: *mut c_char, + ); + pub fn gst_webrtc_ice_transport_selected_pair_change(ice: *mut GstWebRTCICETransport); + + //========================================================================= + // GstWebRTCRTPReceiver + //========================================================================= + pub fn gst_webrtc_rtp_receiver_get_type() -> GType; + pub fn gst_webrtc_rtp_receiver_new() -> *mut GstWebRTCRTPReceiver; + pub fn gst_webrtc_rtp_receiver_set_rtcp_transport( + receiver: *mut GstWebRTCRTPReceiver, + transport: *mut GstWebRTCDTLSTransport, + ); + pub fn gst_webrtc_rtp_receiver_set_transport( + receiver: *mut GstWebRTCRTPReceiver, + transport: *mut GstWebRTCDTLSTransport, + ); + + //========================================================================= + // GstWebRTCRTPSender + //========================================================================= + pub fn gst_webrtc_rtp_sender_get_type() -> GType; + pub fn gst_webrtc_rtp_sender_new() -> *mut GstWebRTCRTPSender; + pub fn gst_webrtc_rtp_sender_set_rtcp_transport( + sender: *mut GstWebRTCRTPSender, + transport: *mut GstWebRTCDTLSTransport, + ); + pub fn gst_webrtc_rtp_sender_set_transport( + sender: *mut GstWebRTCRTPSender, + transport: *mut GstWebRTCDTLSTransport, + ); + + //========================================================================= + // GstWebRTCRTPTransceiver + //========================================================================= + pub fn gst_webrtc_rtp_transceiver_get_type() -> GType; + +} diff --git a/sys/gstreamer-webrtc-sys/tests/abi.rs b/sys/gstreamer-webrtc-sys/tests/abi.rs new file mode 100644 index 000000000..8a34eeab7 --- /dev/null +++ b/sys/gstreamer-webrtc-sys/tests/abi.rs @@ -0,0 +1,550 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +extern crate gstreamer_webrtc_sys; +extern crate shell_words; +extern crate tempfile; +use gstreamer_webrtc_sys::*; +use std::env; +use std::error::Error; +use std::mem::{align_of, size_of}; +use std::path::Path; +use std::process::Command; +use std::str; +use tempfile::Builder; + +static PACKAGES: &[&str] = &["gstreamer-webrtc-1.0"]; + +#[derive(Clone, Debug)] +struct Compiler { + pub args: Vec, +} + +impl Compiler { + pub fn new() -> Result> { + let mut args = get_var("CC", "cc")?; + args.push("-Wno-deprecated-declarations".to_owned()); + // For %z support in printf when using MinGW. + args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); + args.extend(get_var("CFLAGS", "")?); + args.extend(get_var("CPPFLAGS", "")?); + args.extend(pkg_config_cflags(PACKAGES)?); + Ok(Compiler { args }) + } + + pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { + let arg = match val.into() { + None => format!("-D{}", var), + Some(val) => format!("-D{}={}", var, val), + }; + self.args.push(arg); + } + + pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { + let mut cmd = self.to_command(); + cmd.arg(src); + cmd.arg("-o"); + cmd.arg(out); + let status = cmd.spawn()?.wait()?; + if !status.success() { + return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); + } + Ok(()) + } + + fn to_command(&self) -> Command { + let mut cmd = Command::new(&self.args[0]); + cmd.args(&self.args[1..]); + cmd + } +} + +fn get_var(name: &str, default: &str) -> Result, Box> { + match env::var(name) { + Ok(value) => Ok(shell_words::split(&value)?), + Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), + Err(err) => Err(format!("{} {}", name, err).into()), + } +} + +fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { + if packages.is_empty() { + return Ok(Vec::new()); + } + let mut cmd = Command::new("pkg-config"); + cmd.arg("--cflags"); + cmd.args(packages); + let out = cmd.output()?; + if !out.status.success() { + return Err(format!("command {:?} returned {}", &cmd, out.status).into()); + } + let stdout = str::from_utf8(&out.stdout)?; + Ok(shell_words::split(stdout.trim())?) +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +struct Layout { + size: usize, + alignment: usize, +} + +#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +struct Results { + /// Number of successfully completed tests. + passed: usize, + /// Total number of failed tests (including those that failed to compile). + failed: usize, + /// Number of tests that failed to compile. + failed_to_compile: usize, +} + +impl Results { + fn record_passed(&mut self) { + self.passed += 1; + } + fn record_failed(&mut self) { + self.failed += 1; + } + fn record_failed_to_compile(&mut self) { + self.failed += 1; + self.failed_to_compile += 1; + } + fn summary(&self) -> String { + format!( + "{} passed; {} failed (compilation errors: {})", + self.passed, self.failed, self.failed_to_compile + ) + } + fn expect_total_success(&self) { + if self.failed == 0 { + println!("OK: {}", self.summary()); + } else { + panic!("FAILED: {}", self.summary()); + }; + } +} + +#[test] +fn cross_validate_constants_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + "1", + get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), + "failed to obtain correct constant value for 1" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { + match get_c_value(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(ref c_value) => { + if rust_value == c_value { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Constant value mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_value, c_value + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("constants ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +#[test] +fn cross_validate_layout_with_c() { + let tmpdir = Builder::new() + .prefix("abi") + .tempdir() + .expect("temporary directory"); + let cc = Compiler::new().expect("configured compiler"); + + assert_eq!( + Layout { + size: 1, + alignment: 1 + }, + get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), + "failed to obtain correct layout for char type" + ); + + let mut results: Results = Default::default(); + for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { + match get_c_layout(tmpdir.path(), &cc, name) { + Err(e) => { + results.record_failed_to_compile(); + eprintln!("{}", e); + } + Ok(c_layout) => { + if rust_layout == c_layout { + results.record_passed(); + } else { + results.record_failed(); + eprintln!( + "Layout mismatch for {}\nRust: {:?}\nC: {:?}", + name, rust_layout, &c_layout + ); + } + } + }; + if (i + 1) % 25 == 0 { + println!("layout ... {}", results.summary()); + } + } + results.expect_total_success(); +} + +fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("layout"); + let mut cc = cc.clone(); + cc.define("ABI_TYPE_NAME", name); + cc.compile(Path::new("tests/layout.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let stdout = str::from_utf8(&output.stdout)?; + let mut words = stdout.trim().split_whitespace(); + let size = words.next().unwrap().parse().unwrap(); + let alignment = words.next().unwrap().parse().unwrap(); + Ok(Layout { size, alignment }) +} + +fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { + let exe = dir.join("constant"); + let mut cc = cc.clone(); + cc.define("ABI_CONSTANT_NAME", name); + cc.compile(Path::new("tests/constant.c"), &exe)?; + + let mut abi_cmd = Command::new(exe); + let output = abi_cmd.output()?; + if !output.status.success() { + return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); + } + + let output = str::from_utf8(&output.stdout)?.trim(); + if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { + return Err(format!( + "command {:?} return invalid output, {:?}", + &abi_cmd, &output + ) + .into()); + } + + Ok(String::from(&output[14..(output.len() - 14)])) +} + +const RUST_LAYOUTS: &[(&str, Layout)] = &[ + ( + "GstWebRTCBundlePolicy", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDTLSSetup", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDTLSTransport", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDTLSTransportClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDTLSTransportState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDataChannel", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDataChannelClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCDataChannelState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCFECType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICEComponent", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICEConnectionState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICEGatheringState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICERole", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICETransport", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICETransportClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCICETransportPolicy", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCPeerConnectionState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCPriorityType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPReceiver", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPReceiverClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPSender", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPSenderClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPTransceiver", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPTransceiverClass", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCRTPTransceiverDirection", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCSCTPTransportState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCSDPType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCSessionDescription", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCSignalingState", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), + ( + "GstWebRTCStatsType", + Layout { + size: size_of::(), + alignment: align_of::(), + }, + ), +]; + +const RUST_CONSTANTS: &[(&str, &str)] = &[ + ("(gint) GST_WEBRTC_BUNDLE_POLICY_BALANCED", "1"), + ("(gint) GST_WEBRTC_BUNDLE_POLICY_MAX_BUNDLE", "3"), + ("(gint) GST_WEBRTC_BUNDLE_POLICY_MAX_COMPAT", "2"), + ("(gint) GST_WEBRTC_BUNDLE_POLICY_NONE", "0"), + ("(gint) GST_WEBRTC_DATA_CHANNEL_STATE_CLOSED", "4"), + ("(gint) GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING", "3"), + ("(gint) GST_WEBRTC_DATA_CHANNEL_STATE_CONNECTING", "1"), + ("(gint) GST_WEBRTC_DATA_CHANNEL_STATE_NEW", "0"), + ("(gint) GST_WEBRTC_DATA_CHANNEL_STATE_OPEN", "2"), + ("(gint) GST_WEBRTC_DTLS_SETUP_ACTIVE", "2"), + ("(gint) GST_WEBRTC_DTLS_SETUP_ACTPASS", "1"), + ("(gint) GST_WEBRTC_DTLS_SETUP_NONE", "0"), + ("(gint) GST_WEBRTC_DTLS_SETUP_PASSIVE", "3"), + ("(gint) GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED", "1"), + ("(gint) GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED", "4"), + ("(gint) GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING", "3"), + ("(gint) GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED", "2"), + ("(gint) GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW", "0"), + ("(gint) GST_WEBRTC_FEC_TYPE_NONE", "0"), + ("(gint) GST_WEBRTC_FEC_TYPE_ULP_RED", "1"), + ("(gint) GST_WEBRTC_ICE_COMPONENT_RTCP", "1"), + ("(gint) GST_WEBRTC_ICE_COMPONENT_RTP", "0"), + ("(gint) GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING", "1"), + ("(gint) GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED", "6"), + ("(gint) GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED", "3"), + ("(gint) GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED", "2"), + ("(gint) GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED", "5"), + ("(gint) GST_WEBRTC_ICE_CONNECTION_STATE_FAILED", "4"), + ("(gint) GST_WEBRTC_ICE_CONNECTION_STATE_NEW", "0"), + ("(gint) GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE", "2"), + ("(gint) GST_WEBRTC_ICE_GATHERING_STATE_GATHERING", "1"), + ("(gint) GST_WEBRTC_ICE_GATHERING_STATE_NEW", "0"), + ("(gint) GST_WEBRTC_ICE_ROLE_CONTROLLED", "0"), + ("(gint) GST_WEBRTC_ICE_ROLE_CONTROLLING", "1"), + ("(gint) GST_WEBRTC_ICE_TRANSPORT_POLICY_ALL", "0"), + ("(gint) GST_WEBRTC_ICE_TRANSPORT_POLICY_RELAY", "1"), + ("(gint) GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED", "5"), + ("(gint) GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED", "2"), + ("(gint) GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING", "1"), + ("(gint) GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED", "3"), + ("(gint) GST_WEBRTC_PEER_CONNECTION_STATE_FAILED", "4"), + ("(gint) GST_WEBRTC_PEER_CONNECTION_STATE_NEW", "0"), + ("(gint) GST_WEBRTC_PRIORITY_TYPE_HIGH", "4"), + ("(gint) GST_WEBRTC_PRIORITY_TYPE_LOW", "2"), + ("(gint) GST_WEBRTC_PRIORITY_TYPE_MEDIUM", "3"), + ("(gint) GST_WEBRTC_PRIORITY_TYPE_VERY_LOW", "1"), + ("(gint) GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE", "1"), + ("(gint) GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE", "0"), + ("(gint) GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY", "3"), + ("(gint) GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY", "2"), + ("(gint) GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV", "4"), + ("(gint) GST_WEBRTC_SCTP_TRANSPORT_STATE_CLOSED", "3"), + ("(gint) GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTED", "2"), + ("(gint) GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTING", "1"), + ("(gint) GST_WEBRTC_SCTP_TRANSPORT_STATE_NEW", "0"), + ("(gint) GST_WEBRTC_SDP_TYPE_ANSWER", "3"), + ("(gint) GST_WEBRTC_SDP_TYPE_OFFER", "1"), + ("(gint) GST_WEBRTC_SDP_TYPE_PRANSWER", "2"), + ("(gint) GST_WEBRTC_SDP_TYPE_ROLLBACK", "4"), + ("(gint) GST_WEBRTC_SIGNALING_STATE_CLOSED", "1"), + ("(gint) GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER", "2"), + ("(gint) GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER", "4"), + ("(gint) GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER", "3"), + ( + "(gint) GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER", + "5", + ), + ("(gint) GST_WEBRTC_SIGNALING_STATE_STABLE", "0"), + ("(gint) GST_WEBRTC_STATS_CANDIDATE_PAIR", "11"), + ("(gint) GST_WEBRTC_STATS_CERTIFICATE", "14"), + ("(gint) GST_WEBRTC_STATS_CODEC", "1"), + ("(gint) GST_WEBRTC_STATS_CSRC", "6"), + ("(gint) GST_WEBRTC_STATS_DATA_CHANNEL", "8"), + ("(gint) GST_WEBRTC_STATS_INBOUND_RTP", "2"), + ("(gint) GST_WEBRTC_STATS_LOCAL_CANDIDATE", "12"), + ("(gint) GST_WEBRTC_STATS_OUTBOUND_RTP", "3"), + ("(gint) GST_WEBRTC_STATS_PEER_CONNECTION", "7"), + ("(gint) GST_WEBRTC_STATS_REMOTE_CANDIDATE", "13"), + ("(gint) GST_WEBRTC_STATS_REMOTE_INBOUND_RTP", "4"), + ("(gint) GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP", "5"), + ("(gint) GST_WEBRTC_STATS_STREAM", "9"), + ("(gint) GST_WEBRTC_STATS_TRANSPORT", "10"), +]; diff --git a/sys/gstreamer-webrtc-sys/tests/constant.c b/sys/gstreamer-webrtc-sys/tests/constant.c new file mode 100644 index 000000000..458f66226 --- /dev/null +++ b/sys/gstreamer-webrtc-sys/tests/constant.c @@ -0,0 +1,27 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include + +int main() { + printf(_Generic((ABI_CONSTANT_NAME), + char *: "###gir test###%s###gir test###\n", + const char *: "###gir test###%s###gir test###\n", + char: "###gir test###%c###gir test###\n", + signed char: "###gir test###%hhd###gir test###\n", + unsigned char: "###gir test###%hhu###gir test###\n", + short int: "###gir test###%hd###gir test###\n", + unsigned short int: "###gir test###%hu###gir test###\n", + int: "###gir test###%d###gir test###\n", + unsigned int: "###gir test###%u###gir test###\n", + long: "###gir test###%ld###gir test###\n", + unsigned long: "###gir test###%lu###gir test###\n", + long long: "###gir test###%lld###gir test###\n", + unsigned long long: "###gir test###%llu###gir test###\n", + double: "###gir test###%f###gir test###\n", + long double: "###gir test###%ld###gir test###\n"), + ABI_CONSTANT_NAME); + return 0; +} diff --git a/sys/gstreamer-webrtc-sys/tests/layout.c b/sys/gstreamer-webrtc-sys/tests/layout.c new file mode 100644 index 000000000..9f39e896e --- /dev/null +++ b/sys/gstreamer-webrtc-sys/tests/layout.c @@ -0,0 +1,12 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir @ ad40c01) +// from gir-files (https://github.com/gtk-rs/gir-files @ 18c9a37) +// DO NOT EDIT + +#include "manual.h" +#include +#include + +int main() { + printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME)); + return 0; +} diff --git a/sys/gstreamer-webrtc-sys/tests/manual.h b/sys/gstreamer-webrtc-sys/tests/manual.h new file mode 100644 index 000000000..eab295695 --- /dev/null +++ b/sys/gstreamer-webrtc-sys/tests/manual.h @@ -0,0 +1,3 @@ +// Feel free to edit this file, it won't be regenerated by gir generator unless removed. + +#include