Add -sys bindings for GStreamer base, audio, video, tag, pbutils

This commit is contained in:
Sebastian Dröge 2017-04-09 13:34:20 +03:00
parent 235840cf05
commit 1fdcf48303
32 changed files with 44365 additions and 2 deletions

View file

@ -1,3 +1,10 @@
[workspace] [workspace]
members = ["gstreamer-sys"] members = [
"gstreamer-sys",
"gstreamer-base-sys",
"gstreamer-tag-sys",
"gstreamer-audio-sys",
"gstreamer-video-sys",
"gstreamer-pbutils-sys",
]

15
Gir_GstAudio.toml Normal file
View file

@ -0,0 +1,15 @@
[options]
girs_dir = "gir-files"
library = "GstAudio"
version = "1.0"
min_cfg_version = "1.0"
target_path = "gstreamer-audio-sys"
work_mode = "sys"
external_libraries = [
"GLib",
"GObject",
"Gst",
"GstBase",
"GstTag",
]

13
Gir_GstBase.toml Normal file
View file

@ -0,0 +1,13 @@
[options]
girs_dir = "gir-files"
library = "GstBase"
version = "1.0"
min_cfg_version = "1.0"
target_path = "gstreamer-base-sys"
work_mode = "sys"
external_libraries = [
"GLib",
"GObject",
"Gst",
]

16
Gir_GstPbutils.toml Normal file
View file

@ -0,0 +1,16 @@
[options]
girs_dir = "gir-files"
library = "GstPbutils"
version = "1.0"
min_cfg_version = "1.0"
target_path = "gstreamer-pbutils-sys"
work_mode = "sys"
external_libraries = [
"GLib",
"GObject",
"Gst",
"GstTag",
"GstAudio",
"GstVideo",
]

14
Gir_GstTag.toml Normal file
View file

@ -0,0 +1,14 @@
[options]
girs_dir = "gir-files"
library = "GstTag"
version = "1.0"
min_cfg_version = "1.0"
target_path = "gstreamer-tag-sys"
work_mode = "sys"
external_libraries = [
"GLib",
"GObject",
"Gst",
"GstBase",
]

14
Gir_GstVideo.toml Normal file
View file

@ -0,0 +1,14 @@
[options]
girs_dir = "gir-files"
library = "GstVideo"
version = "1.0"
min_cfg_version = "1.0"
target_path = "gstreamer-video-sys"
work_mode = "sys"
external_libraries = [
"GLib",
"GObject",
"Gst",
"GstBase",
]

8930
gir-files/GstAudio-1.0.gir Normal file

File diff suppressed because it is too large Load diff

11120
gir-files/GstBase-1.0.gir Normal file

File diff suppressed because it is too large Load diff

3976
gir-files/GstPbutils-1.0.gir Normal file

File diff suppressed because it is too large Load diff

1741
gir-files/GstTag-1.0.gir Normal file

File diff suppressed because it is too large Load diff

13325
gir-files/GstVideo-1.0.gir Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,52 @@
[build-dependencies]
pkg-config = "0.3.7"
[dependencies]
bitflags = "0.8"
glib-sys = "0.3"
gobject-sys = "0.3"
libc = "0.2"
[dependencies.gstreamer-sys]
path = "../gstreamer-sys"
version = "0.1.0"
[dependencies.gstreamer-base-sys]
path = "../gstreamer-base-sys"
version = "0.1.0"
[dependencies.gstreamer-tag-sys]
path = "../gstreamer-tag-sys"
version = "0.1.0"
[features]
v1_0_10 = []
v1_10 = ["v1_8"]
v1_12 = ["v1_10"]
v1_2 = ["v1_0_10"]
v1_2_3 = ["v1_2"]
v1_4 = ["v1_2_3"]
v1_6 = ["v1_4"]
v1_8 = ["v1_6"]
[lib]
name = "gstreamer_audio_sys"
[package]
build = "build.rs"
links = "gstaudio-1.0"
name = "gstreamer-audio-sys"
version = "0.1.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
description = "FFI bindings to libgstaudio-1.0"
homepage = "https://gstreamer.freedesktop.org"
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
repository = "https://github.com/sdroege/gstreamer-sys"
license = "MIT"
include = [
"src/*.rs",
"Cargo.toml",
"build.rs",
"LICENSE",
]

View file

@ -0,0 +1,23 @@
The MIT License (MIT)
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>.
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.

View file

@ -0,0 +1,68 @@
extern crate pkg_config;
use pkg_config::{Config, Error};
use std::env;
use std::io::prelude::*;
use std::io;
use std::process;
fn main() {
if let Err(s) = find() {
let _ = writeln!(io::stderr(), "{}", s);
process::exit(1);
}
}
fn find() -> Result<(), Error> {
let package_name = "gstreamer-audio-1.0";
let shared_libs = ["gstaudio-1.0"];
let version = if cfg!(feature = "v1_12") {
"1.12"
} else if cfg!(feature = "v1_10") {
"1.10"
} else if cfg!(feature = "v1_8") {
"1.8"
} else if cfg!(feature = "v1_6") {
"1.6"
} else {
"1.0"
};
if let Ok(lib_dir) = env::var("GTK_LIB_DIR") {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
println!("cargo:rustc-link-search=native={}", lib_dir);
return Ok(())
}
let target = env::var("TARGET").unwrap();
let hardcode_shared_libs = target.contains("windows");
let mut config = Config::new();
config.atleast_version(version);
if hardcode_shared_libs {
config.cargo_metadata(false);
}
match config.probe(package_name) {
Ok(library) => {
if hardcode_shared_libs {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
for path in library.link_paths.iter() {
println!("cargo:rustc-link-search=native={}", path.to_str().unwrap());
}
}
Ok(())
}
Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
Ok(())
}
Err(err) => Err(err),
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,44 @@
[build-dependencies]
pkg-config = "0.3.7"
[dependencies]
bitflags = "0.8"
glib-sys = "0.3"
gobject-sys = "0.3"
libc = "0.2"
[dependencies.gstreamer-sys]
path = "../gstreamer-sys"
version = "0.1.0"
[features]
v1_0_10 = []
v1_10 = ["v1_8"]
v1_12 = ["v1_10"]
v1_2 = ["v1_0_10"]
v1_2_3 = ["v1_2"]
v1_4 = ["v1_2_3"]
v1_6 = ["v1_4"]
v1_8 = ["v1_6"]
[lib]
name = "gstreamer_base_sys"
[package]
build = "build.rs"
links = "gstbase-1.0"
name = "gstreamer-base-sys"
version = "0.1.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
description = "FFI bindings to libgstbase-1.0"
homepage = "https://gstreamer.freedesktop.org"
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
repository = "https://github.com/sdroege/gstreamer-sys"
license = "MIT"
include = [
"src/*.rs",
"Cargo.toml",
"build.rs",
"LICENSE",
]

View file

@ -0,0 +1,23 @@
The MIT License (MIT)
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>.
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.

View file

@ -0,0 +1,70 @@
extern crate pkg_config;
use pkg_config::{Config, Error};
use std::env;
use std::io::prelude::*;
use std::io;
use std::process;
fn main() {
if let Err(s) = find() {
let _ = writeln!(io::stderr(), "{}", s);
process::exit(1);
}
}
fn find() -> Result<(), Error> {
let package_name = "gstreamer-base-1.0";
let shared_libs = ["gstbase-1.0"];
let version = if cfg!(feature = "v1_12") {
"1.12"
} else if cfg!(feature = "v1_10") {
"1.10"
} else if cfg!(feature = "v1_6") {
"1.6"
} else if cfg!(feature = "v1_4") {
"1.4"
} else if cfg!(feature = "v1_2") {
"1.2"
} else {
"1.0"
};
if let Ok(lib_dir) = env::var("GTK_LIB_DIR") {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
println!("cargo:rustc-link-search=native={}", lib_dir);
return Ok(())
}
let target = env::var("TARGET").unwrap();
let hardcode_shared_libs = target.contains("windows");
let mut config = Config::new();
config.atleast_version(version);
if hardcode_shared_libs {
config.cargo_metadata(false);
}
match config.probe(package_name) {
Ok(library) => {
if hardcode_shared_libs {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
for path in library.link_paths.iter() {
println!("cargo:rustc-link-search=native={}", path.to_str().unwrap());
}
}
Ok(())
}
Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
Ok(())
}
Err(err) => Err(err),
}
}

View file

@ -0,0 +1,826 @@
// This file was generated by gir (10e1d4f) from gir-files (???)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals)]
extern crate libc;
#[macro_use] extern crate bitflags;
extern crate glib_sys as glib;
extern crate gobject_sys as gobject;
extern crate gstreamer_sys as gst;
#[allow(unused_imports)]
use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double,
c_short, c_ushort, c_long, c_ulong,
c_void, size_t, ssize_t, time_t, FILE};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType, Volatile};
// 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
bitflags! {
#[repr(C)]
pub flags GstBaseParseFrameFlags: c_uint {
const GST_BASE_PARSE_FRAME_FLAG_NONE = 0,
const GST_BASE_PARSE_FRAME_FLAG_NEW_FRAME = 1,
const GST_BASE_PARSE_FRAME_FLAG_NO_FRAME = 2,
const GST_BASE_PARSE_FRAME_FLAG_CLIP = 4,
const GST_BASE_PARSE_FRAME_FLAG_DROP = 8,
const GST_BASE_PARSE_FRAME_FLAG_QUEUE = 16,
}
}
bitflags! {
#[repr(C)]
pub flags GstBaseSrcFlags: c_uint {
const GST_BASE_SRC_FLAG_STARTING = 16384,
const GST_BASE_SRC_FLAG_STARTED = 32768,
const GST_BASE_SRC_FLAG_LAST = 1048576,
}
}
bitflags! {
#[repr(C)]
pub flags GstCollectPadsStateFlags: c_uint {
const GST_COLLECT_PADS_STATE_EOS = 1,
const GST_COLLECT_PADS_STATE_FLUSHING = 2,
const GST_COLLECT_PADS_STATE_NEW_SEGMENT = 4,
const GST_COLLECT_PADS_STATE_WAITING = 8,
const GST_COLLECT_PADS_STATE_LOCKED = 16,
}
}
// Callbacks
pub type GstCollectDataDestroyNotify = Option<unsafe extern "C" fn(*mut GstCollectData)>;
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<unsafe extern "C" fn(*mut GstCollectPads, gpointer)>;
pub type GstCollectPadsFunction = Option<unsafe extern "C" fn(*mut GstCollectPads, gpointer) -> gst::GstFlowReturn>;
pub type GstCollectPadsQueryFunction = Option<unsafe extern "C" fn(*mut GstCollectPads, *mut GstCollectData, *mut gst::GstQuery, gpointer) -> gboolean>;
pub type GstDataQueueCheckFullFunction = Option<unsafe extern "C" fn(*mut GstDataQueue, c_uint, c_uint, u64, gpointer) -> gboolean>;
pub type GstDataQueueEmptyCallback = Option<unsafe extern "C" fn(*mut GstDataQueue, gpointer)>;
pub type GstDataQueueFullCallback = Option<unsafe extern "C" fn(*mut GstDataQueue, gpointer)>;
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);
#[repr(C)]
pub struct GstBaseParseClass {
pub parent_class: gst::GstElementClass,
pub start: Option<unsafe extern "C" fn(*mut GstBaseParse) -> gboolean>,
pub stop: Option<unsafe extern "C" fn(*mut GstBaseParse) -> gboolean>,
pub set_sink_caps: Option<unsafe extern "C" fn(*mut GstBaseParse, *mut gst::GstCaps) -> 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<unsafe extern "C" fn(*mut GstBaseParse, *mut gst::GstEvent) -> gboolean>,
pub src_event: Option<unsafe extern "C" fn(*mut GstBaseParse, *mut gst::GstEvent) -> gboolean>,
pub get_sink_caps: Option<unsafe extern "C" fn(*mut GstBaseParse, *mut gst::GstCaps) -> *mut gst::GstCaps>,
pub detect: Option<unsafe extern "C" fn(*mut GstBaseParse, *mut gst::GstBuffer) -> gst::GstFlowReturn>,
pub sink_query: Option<unsafe extern "C" fn(*mut GstBaseParse, *mut gst::GstQuery) -> gboolean>,
pub src_query: Option<unsafe extern "C" fn(*mut GstBaseParse, *mut gst::GstQuery) -> gboolean>,
_gst_reserved: [gpointer; 18],
}
#[repr(C)]
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,
size: c_int,
_gst_reserved_i: [c_uint; 2],
_gst_reserved_p: [gpointer; 2],
_private_flags: c_uint,
}
#[repr(C)]
pub struct GstBaseParsePrivate(c_void);
#[repr(C)]
pub struct GstBaseSinkClass {
pub parent_class: gst::GstElementClass,
pub get_caps: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstCaps) -> *mut gst::GstCaps>,
pub set_caps: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstCaps) -> gboolean>,
pub fixate: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstCaps) -> *mut gst::GstCaps>,
pub activate_pull: Option<unsafe extern "C" fn(*mut GstBaseSink, gboolean) -> gboolean>,
pub get_times: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstBuffer, *mut gst::GstClockTime, *mut gst::GstClockTime)>,
pub propose_allocation: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstQuery) -> gboolean>,
pub start: Option<unsafe extern "C" fn(*mut GstBaseSink) -> gboolean>,
pub stop: Option<unsafe extern "C" fn(*mut GstBaseSink) -> gboolean>,
pub unlock: Option<unsafe extern "C" fn(*mut GstBaseSink) -> gboolean>,
pub unlock_stop: Option<unsafe extern "C" fn(*mut GstBaseSink) -> gboolean>,
pub query: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstQuery) -> gboolean>,
pub event: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstEvent) -> gboolean>,
pub wait_event: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstEvent) -> gst::GstFlowReturn>,
pub prepare: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstBuffer) -> gst::GstFlowReturn>,
pub prepare_list: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstBufferList) -> gst::GstFlowReturn>,
pub preroll: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstBuffer) -> gst::GstFlowReturn>,
pub render: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstBuffer) -> gst::GstFlowReturn>,
pub render_list: Option<unsafe extern "C" fn(*mut GstBaseSink, *mut gst::GstBufferList) -> gst::GstFlowReturn>,
_gst_reserved: [gpointer; 20],
}
#[repr(C)]
pub struct GstBaseSinkPrivate(c_void);
#[repr(C)]
pub struct GstBaseSrcClass {
pub parent_class: gst::GstElementClass,
pub get_caps: Option<unsafe extern "C" fn(*mut GstBaseSrc, *mut gst::GstCaps) -> *mut gst::GstCaps>,
pub negotiate: Option<unsafe extern "C" fn(*mut GstBaseSrc) -> gboolean>,
pub fixate: Option<unsafe extern "C" fn(*mut GstBaseSrc, *mut gst::GstCaps) -> *mut gst::GstCaps>,
pub set_caps: Option<unsafe extern "C" fn(*mut GstBaseSrc, *mut gst::GstCaps) -> gboolean>,
pub decide_allocation: Option<unsafe extern "C" fn(*mut GstBaseSrc, *mut gst::GstQuery) -> gboolean>,
pub start: Option<unsafe extern "C" fn(*mut GstBaseSrc) -> gboolean>,
pub stop: Option<unsafe extern "C" fn(*mut GstBaseSrc) -> gboolean>,
pub get_times: Option<unsafe extern "C" fn(*mut GstBaseSrc, *mut gst::GstBuffer, *mut gst::GstClockTime, *mut gst::GstClockTime)>,
pub get_size: Option<unsafe extern "C" fn(*mut GstBaseSrc, *mut u64) -> gboolean>,
pub is_seekable: Option<unsafe extern "C" fn(*mut GstBaseSrc) -> gboolean>,
pub prepare_seek_segment: Option<unsafe extern "C" fn(*mut GstBaseSrc, *mut gst::GstEvent, *mut gst::GstSegment) -> gboolean>,
pub do_seek: Option<unsafe extern "C" fn(*mut GstBaseSrc, *mut gst::GstSegment) -> gboolean>,
pub unlock: Option<unsafe extern "C" fn(*mut GstBaseSrc) -> gboolean>,
pub unlock_stop: Option<unsafe extern "C" fn(*mut GstBaseSrc) -> gboolean>,
pub query: Option<unsafe extern "C" fn(*mut GstBaseSrc, *mut gst::GstQuery) -> gboolean>,
pub event: Option<unsafe extern "C" fn(*mut GstBaseSrc, *mut gst::GstEvent) -> 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>,
_gst_reserved: [gpointer; 20],
}
#[repr(C)]
pub struct GstBaseSrcPrivate(c_void);
#[repr(C)]
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<unsafe extern "C" fn(*mut GstBaseTransform, *mut gst::GstQuery) -> 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<unsafe extern "C" fn(*mut GstBaseTransform) -> gboolean>,
pub stop: Option<unsafe extern "C" fn(*mut GstBaseTransform) -> gboolean>,
pub sink_event: Option<unsafe extern "C" fn(*mut GstBaseTransform, *mut gst::GstEvent) -> gboolean>,
pub src_event: Option<unsafe extern "C" fn(*mut GstBaseTransform, *mut gst::GstEvent) -> 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<unsafe extern "C" fn(*mut GstBaseTransform, *mut gst::GstBuffer)>,
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>,
_gst_reserved: [gpointer; 18],
}
#[repr(C)]
pub struct GstBaseTransformPrivate(c_void);
#[repr(C)]
pub struct GstBitReader {
pub data: *mut u8,
pub size: c_uint,
pub byte: c_uint,
pub bit: c_uint,
_gst_reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstByteReader {
pub data: *mut u8,
pub size: c_uint,
pub byte: c_uint,
_gst_reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstByteWriter {
pub parent: GstByteReader,
pub alloc_size: c_uint,
pub fixed: gboolean,
pub owned: gboolean,
_gst_reserved: [gpointer; 4],
}
#[repr(C)]
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,
state: GstCollectPadsStateFlags,
priv_: *mut GstCollectDataPrivate,
_truncated_record_marker: c_void,
//union,
}
#[repr(C)]
pub struct GstCollectDataPrivate(c_void);
#[repr(C)]
pub struct GstCollectPadsClass {
pub parent_class: gst::GstObjectClass,
_gst_reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstCollectPadsPrivate(c_void);
#[repr(C)]
pub struct GstDataQueueClass {
pub parent_class: gobject::GObjectClass,
pub empty: Option<unsafe extern "C" fn(*mut GstDataQueue)>,
pub full: Option<unsafe extern "C" fn(*mut GstDataQueue)>,
pub _gst_reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstDataQueueItem {
pub object: *mut gst::GstMiniObject,
pub size: c_uint,
pub duration: u64,
pub visible: gboolean,
pub destroy: glib::GDestroyNotify,
_gst_reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstDataQueuePrivate(c_void);
#[repr(C)]
pub struct GstDataQueueSize {
pub visible: c_uint,
pub bytes: c_uint,
pub time: u64,
}
#[repr(C)]
pub struct GstFlowCombiner(c_void);
#[repr(C)]
pub struct GstPushSrcClass {
pub parent_class: GstBaseSrcClass,
pub create: Option<unsafe extern "C" fn(*mut GstPushSrc, *mut gst::GstBuffer) -> gst::GstFlowReturn>,
pub alloc: Option<unsafe extern "C" fn(*mut GstPushSrc, *mut gst::GstBuffer) -> gst::GstFlowReturn>,
pub fill: Option<unsafe extern "C" fn(*mut GstPushSrc, *mut gst::GstBuffer) -> gst::GstFlowReturn>,
_gst_reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstQueueArray(c_void);
// Classes
#[repr(C)]
pub struct GstAdapter(c_void);
#[repr(C)]
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,
_gst_reserved: [gpointer; 20],
priv_: *mut GstBaseParsePrivate,
}
#[repr(C)]
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,
_truncated_record_marker: c_void,
//union,
//preroll_cond: GCond,
//eos: gboolean,
//need_preroll: gboolean,
//have_preroll: gboolean,
//playing_async: gboolean,
//have_newsegment: gboolean,
//segment: GstSegment,
//clock_id: GstClockID,
//sync: gboolean,
//flushing: gboolean,
//running: gboolean,
//max_lateness: gint64,
//priv: GstBaseSinkPrivate*,
//_gst_reserved: gpointer,
}
#[repr(C)]
pub struct GstBaseSrc {
pub element: gst::GstElement,
pub srcpad: *mut gst::GstPad,
_truncated_record_marker: c_void,
//union,
//live_cond: GCond,
//is_live: gboolean,
//live_running: gboolean,
//blocksize: guint,
//can_activate_push: gboolean,
//random_access: gboolean,
//clock_id: GstClockID,
//segment: GstSegment,
//need_newsegment: gboolean,
//num_buffers: gint,
//num_buffers_left: gint,
//typefind: gboolean,
//running: gboolean,
//pending_seek: GstEvent*,
//priv: GstBaseSrcPrivate*,
//_gst_reserved: gpointer,
}
#[repr(C)]
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,
priv_: *mut GstBaseTransformPrivate,
_gst_reserved: [gpointer; 19],
}
#[repr(C)]
pub struct GstCollectPads {
pub object: gst::GstObject,
pub data: *mut glib::GSList,
stream_lock: glib::GRecMutex,
priv_: *mut GstCollectPadsPrivate,
_gst_reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstDataQueue {
pub object: gobject::GObject,
priv_: *mut GstDataQueuePrivate,
_gst_reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstPushSrc {
pub parent: GstBaseSrc,
_gst_reserved: [gpointer; 4],
}
extern "C" {
//=========================================================================
// 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;
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: *mut 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: *mut u8, size: c_uint) -> *mut GstBitReader;
//=========================================================================
// 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 *mut 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 *mut c_char) -> gboolean;
#[cfg(feature = "v1_6")]
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: *mut 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;
#[cfg(feature = "v1_6")]
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 *mut 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 *mut c_char) -> gboolean;
#[cfg(feature = "v1_6")]
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: *mut 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: *mut 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: *mut u16) -> gboolean;
pub fn gst_byte_writer_put_string_utf32(writer: *mut GstByteWriter, data: *mut u32) -> gboolean;
pub fn gst_byte_writer_put_string_utf8(writer: *mut GstByteWriter, data: *mut 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;
#[cfg(feature = "v1_4")]
pub fn gst_flow_combiner_new() -> *mut GstFlowCombiner;
#[cfg(feature = "v1_4")]
pub fn gst_flow_combiner_add_pad(combiner: *mut GstFlowCombiner, pad: *mut gst::GstPad);
#[cfg(feature = "v1_6")]
pub fn gst_flow_combiner_clear(combiner: *mut GstFlowCombiner);
#[cfg(feature = "v1_4")]
pub fn gst_flow_combiner_free(combiner: *mut GstFlowCombiner);
#[cfg(feature = "v1_4")]
pub fn gst_flow_combiner_remove_pad(combiner: *mut GstFlowCombiner, pad: *mut gst::GstPad);
#[cfg(feature = "v1_6")]
pub fn gst_flow_combiner_reset(combiner: *mut GstFlowCombiner);
#[cfg(feature = "v1_4")]
pub fn gst_flow_combiner_update_flow(combiner: *mut GstFlowCombiner, fret: gst::GstFlowReturn) -> gst::GstFlowReturn;
#[cfg(feature = "v1_6")]
pub fn gst_flow_combiner_update_pad_flow(combiner: *mut GstFlowCombiner, pad: *mut gst::GstPad, fret: gst::GstFlowReturn) -> gst::GstFlowReturn;
//=========================================================================
// GstQueueArray
//=========================================================================
#[cfg(feature = "v1_2")]
pub fn gst_queue_array_drop_element(array: *mut GstQueueArray, idx: c_uint) -> gpointer;
#[cfg(feature = "v1_6")]
pub fn gst_queue_array_drop_struct(array: *mut GstQueueArray, idx: c_uint, p_struct: gpointer) -> gboolean;
#[cfg(feature = "v1_2")]
pub fn gst_queue_array_find(array: *mut GstQueueArray, func: glib::GCompareFunc, data: gpointer) -> c_uint;
#[cfg(feature = "v1_2")]
pub fn gst_queue_array_free(array: *mut GstQueueArray);
#[cfg(feature = "v1_2")]
pub fn gst_queue_array_get_length(array: *mut GstQueueArray) -> c_uint;
#[cfg(feature = "v1_2")]
pub fn gst_queue_array_is_empty(array: *mut GstQueueArray) -> gboolean;
#[cfg(feature = "v1_2")]
pub fn gst_queue_array_peek_head(array: *mut GstQueueArray) -> gpointer;
#[cfg(feature = "v1_6")]
pub fn gst_queue_array_peek_head_struct(array: *mut GstQueueArray) -> gpointer;
#[cfg(feature = "v1_2")]
pub fn gst_queue_array_pop_head(array: *mut GstQueueArray) -> gpointer;
#[cfg(feature = "v1_6")]
pub fn gst_queue_array_pop_head_struct(array: *mut GstQueueArray) -> gpointer;
#[cfg(feature = "v1_2")]
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(feature = "v1_2")]
pub fn gst_queue_array_new(initial_size: c_uint) -> *mut GstQueueArray;
#[cfg(feature = "v1_6")]
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);
#[cfg(feature = "v1_4")]
pub fn gst_adapter_copy_bytes(adapter: *mut GstAdapter, offset: size_t, size: size_t) -> *mut glib::GBytes;
pub fn gst_adapter_distance_from_discont(adapter: *mut GstAdapter) -> u64;
#[cfg(feature = "v1_10")]
pub fn gst_adapter_dts_at_discont(adapter: *mut GstAdapter) -> gst::GstClockTime;
pub fn gst_adapter_flush(adapter: *mut GstAdapter, flush: size_t);
#[cfg(feature = "v1_6")]
pub fn gst_adapter_get_buffer(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBuffer;
#[cfg(feature = "v1_6")]
pub fn gst_adapter_get_buffer_fast(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBuffer;
#[cfg(feature = "v1_6")]
pub fn gst_adapter_get_buffer_list(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBufferList;
#[cfg(feature = "v1_6")]
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(feature = "v1_10")]
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;
#[cfg(feature = "v1_2")]
pub fn gst_adapter_prev_dts_at_offset(adapter: *mut GstAdapter, offset: size_t, distance: *mut u64) -> gst::GstClockTime;
#[cfg(feature = "v1_10")]
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;
#[cfg(feature = "v1_2")]
pub fn gst_adapter_prev_pts_at_offset(adapter: *mut GstAdapter, offset: size_t, distance: *mut u64) -> gst::GstClockTime;
#[cfg(feature = "v1_10")]
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;
#[cfg(feature = "v1_2")]
pub fn gst_adapter_take_buffer_fast(adapter: *mut GstAdapter, nbytes: size_t) -> *mut gst::GstBuffer;
#[cfg(feature = "v1_6")]
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);
//=========================================================================
// 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(feature = "v1_12")]
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;
#[cfg(feature = "v1_6")]
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);
#[cfg(feature = "v1_2")]
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(feature = "v1_12")]
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;
#[cfg(feature = "v1_2")]
pub fn gst_base_sink_get_max_bitrate(sink: *mut GstBaseSink) -> u64;
pub fn gst_base_sink_get_max_lateness(sink: *mut GstBaseSink) -> i64;
pub fn gst_base_sink_get_render_delay(sink: *mut GstBaseSink) -> gst::GstClockTime;
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(feature = "v1_12")]
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);
#[cfg(feature = "v1_2")]
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);
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;
pub fn gst_base_src_new_seamless_segment(src: *mut GstBaseSrc, start: i64, stop: i64, time: i64) -> 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);
#[cfg(feature = "v1_4")]
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;
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;
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);
#[cfg(feature = "v1_0_1")]
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);
#[cfg(feature = "v1_6")]
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);
#[cfg(feature = "v1_4")]
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);
#[cfg(feature = "v1_4")]
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;
#[cfg(feature = "v1_2")]
pub fn gst_data_queue_new(checkfull: GstDataQueueCheckFullFunction, fullcallback: GstDataQueueFullCallback, emptycallback: GstDataQueueEmptyCallback, checkdata: gpointer) -> *mut GstDataQueue;
#[cfg(feature = "v1_2")]
pub fn gst_data_queue_drop_head(queue: *mut GstDataQueue, type_: GType) -> gboolean;
#[cfg(feature = "v1_2")]
pub fn gst_data_queue_flush(queue: *mut GstDataQueue);
#[cfg(feature = "v1_2")]
pub fn gst_data_queue_get_level(queue: *mut GstDataQueue, level: *mut GstDataQueueSize);
#[cfg(feature = "v1_2")]
pub fn gst_data_queue_is_empty(queue: *mut GstDataQueue) -> gboolean;
#[cfg(feature = "v1_2")]
pub fn gst_data_queue_is_full(queue: *mut GstDataQueue) -> gboolean;
#[cfg(feature = "v1_2")]
pub fn gst_data_queue_limits_changed(queue: *mut GstDataQueue);
#[cfg(feature = "v1_2")]
pub fn gst_data_queue_peek(queue: *mut GstDataQueue, item: *mut *mut GstDataQueueItem) -> gboolean;
#[cfg(feature = "v1_2")]
pub fn gst_data_queue_pop(queue: *mut GstDataQueue, item: *mut *mut GstDataQueueItem) -> gboolean;
#[cfg(feature = "v1_2")]
pub fn gst_data_queue_push(queue: *mut GstDataQueue, item: *mut GstDataQueueItem) -> gboolean;
#[cfg(feature = "v1_2")]
pub fn gst_data_queue_push_force(queue: *mut GstDataQueue, item: *mut GstDataQueueItem) -> gboolean;
#[cfg(feature = "v1_2")]
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;
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;
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;
}

View file

@ -0,0 +1,56 @@
[build-dependencies]
pkg-config = "0.3.7"
[dependencies]
bitflags = "0.8"
glib-sys = "0.3"
gobject-sys = "0.3"
libc = "0.2"
[dependencies.gstreamer-sys]
path = "../gstreamer-sys"
version = "0.1.0"
[dependencies.gstreamer-audio-sys]
path = "../gstreamer-audio-sys"
version = "0.1.0"
[dependencies.gstreamer-video-sys]
path = "../gstreamer-video-sys"
version = "0.1.0"
[dependencies.gstreamer-tag-sys]
path = "../gstreamer-tag-sys"
version = "0.1.0"
[features]
v1_0_10 = []
v1_10 = ["v1_8"]
v1_12 = ["v1_10"]
v1_2 = ["v1_0_10"]
v1_2_3 = ["v1_2"]
v1_4 = ["v1_2_3"]
v1_6 = ["v1_4"]
v1_8 = ["v1_6"]
[lib]
name = "gstreamer_pbutils_sys"
[package]
build = "build.rs"
links = "gstpbutils-1.0"
name = "gstreamer-pbutils-sys"
version = "0.1.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
description = "FFI bindings to libgstpbutils-1.0"
homepage = "https://gstreamer.freedesktop.org"
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
repository = "https://github.com/sdroege/gstreamer-sys"
license = "MIT"
include = [
"src/*.rs",
"Cargo.toml",
"build.rs",
"LICENSE",
]

View file

@ -0,0 +1,23 @@
The MIT License (MIT)
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>.
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.

View file

@ -0,0 +1,64 @@
extern crate pkg_config;
use pkg_config::{Config, Error};
use std::env;
use std::io::prelude::*;
use std::io;
use std::process;
fn main() {
if let Err(s) = find() {
let _ = writeln!(io::stderr(), "{}", s);
process::exit(1);
}
}
fn find() -> Result<(), Error> {
let package_name = "gstreamer-pbutils-1.0";
let shared_libs = ["gstpbutils-1.0"];
let version = if cfg!(feature = "v1_8") {
"1.8"
} else if cfg!(feature = "v1_6") {
"1.6"
} else {
"1.0"
};
if let Ok(lib_dir) = env::var("GTK_LIB_DIR") {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
println!("cargo:rustc-link-search=native={}", lib_dir);
return Ok(())
}
let target = env::var("TARGET").unwrap();
let hardcode_shared_libs = target.contains("windows");
let mut config = Config::new();
config.atleast_version(version);
if hardcode_shared_libs {
config.cargo_metadata(false);
}
match config.probe(package_name) {
Ok(library) => {
if hardcode_shared_libs {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
for path in library.link_paths.iter() {
println!("cargo:rustc-link-search=native={}", path.to_str().unwrap());
}
}
Ok(())
}
Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
Ok(())
}
Err(err) => Err(err),
}
}

View file

@ -0,0 +1,467 @@
// This file was generated by gir (10e1d4f+) from gir-files (???)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals)]
extern crate libc;
#[macro_use] extern crate bitflags;
extern crate glib_sys as glib;
extern crate gobject_sys as gobject;
extern crate gstreamer_sys as gst;
extern crate gstreamer_tag_sys as gst_tag;
extern crate gstreamer_audio_sys as gst_audio;
extern crate gstreamer_video_sys as gst_video;
#[allow(unused_imports)]
use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double,
c_short, c_ushort, c_long, c_ulong,
c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType, Volatile};
// 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
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(C)]
pub enum GstAudioVisualizerShader {
None = 0,
Fade = 1,
FadeAndMoveUp = 2,
FadeAndMoveDown = 3,
FadeAndMoveLeft = 4,
FadeAndMoveRight = 5,
FadeAndMoveHorizOut = 6,
FadeAndMoveHorizIn = 7,
FadeAndMoveVertOut = 8,
FadeAndMoveVertIn = 9,
}
pub const GST_AUDIO_VISUALIZER_SHADER_NONE: GstAudioVisualizerShader = GstAudioVisualizerShader::None;
pub const GST_AUDIO_VISUALIZER_SHADER_FADE: GstAudioVisualizerShader = GstAudioVisualizerShader::Fade;
pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP: GstAudioVisualizerShader = GstAudioVisualizerShader::FadeAndMoveUp;
pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN: GstAudioVisualizerShader = GstAudioVisualizerShader::FadeAndMoveDown;
pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT: GstAudioVisualizerShader = GstAudioVisualizerShader::FadeAndMoveLeft;
pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT: GstAudioVisualizerShader = GstAudioVisualizerShader::FadeAndMoveRight;
pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT: GstAudioVisualizerShader = GstAudioVisualizerShader::FadeAndMoveHorizOut;
pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN: GstAudioVisualizerShader = GstAudioVisualizerShader::FadeAndMoveHorizIn;
pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT: GstAudioVisualizerShader = GstAudioVisualizerShader::FadeAndMoveVertOut;
pub const GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN: GstAudioVisualizerShader = GstAudioVisualizerShader::FadeAndMoveVertIn;
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(C)]
pub enum GstDiscovererResult {
Ok = 0,
UriInvalid = 1,
Error = 2,
Timeout = 3,
Busy = 4,
MissingPlugins = 5,
}
pub const GST_DISCOVERER_OK: GstDiscovererResult = GstDiscovererResult::Ok;
pub const GST_DISCOVERER_URI_INVALID: GstDiscovererResult = GstDiscovererResult::UriInvalid;
pub const GST_DISCOVERER_ERROR: GstDiscovererResult = GstDiscovererResult::Error;
pub const GST_DISCOVERER_TIMEOUT: GstDiscovererResult = GstDiscovererResult::Timeout;
pub const GST_DISCOVERER_BUSY: GstDiscovererResult = GstDiscovererResult::Busy;
pub const GST_DISCOVERER_MISSING_PLUGINS: GstDiscovererResult = GstDiscovererResult::MissingPlugins;
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(C)]
pub enum GstInstallPluginsReturn {
Success = 0,
NotFound = 1,
Error = 2,
PartialSuccess = 3,
UserAbort = 4,
Crashed = 100,
Invalid = 101,
StartedOk = 200,
InternalFailure = 201,
HelperMissing = 202,
InstallInProgress = 203,
}
pub const GST_INSTALL_PLUGINS_SUCCESS: GstInstallPluginsReturn = GstInstallPluginsReturn::Success;
pub const GST_INSTALL_PLUGINS_NOT_FOUND: GstInstallPluginsReturn = GstInstallPluginsReturn::NotFound;
pub const GST_INSTALL_PLUGINS_ERROR: GstInstallPluginsReturn = GstInstallPluginsReturn::Error;
pub const GST_INSTALL_PLUGINS_PARTIAL_SUCCESS: GstInstallPluginsReturn = GstInstallPluginsReturn::PartialSuccess;
pub const GST_INSTALL_PLUGINS_USER_ABORT: GstInstallPluginsReturn = GstInstallPluginsReturn::UserAbort;
pub const GST_INSTALL_PLUGINS_CRASHED: GstInstallPluginsReturn = GstInstallPluginsReturn::Crashed;
pub const GST_INSTALL_PLUGINS_INVALID: GstInstallPluginsReturn = GstInstallPluginsReturn::Invalid;
pub const GST_INSTALL_PLUGINS_STARTED_OK: GstInstallPluginsReturn = GstInstallPluginsReturn::StartedOk;
pub const GST_INSTALL_PLUGINS_INTERNAL_FAILURE: GstInstallPluginsReturn = GstInstallPluginsReturn::InternalFailure;
pub const GST_INSTALL_PLUGINS_HELPER_MISSING: GstInstallPluginsReturn = GstInstallPluginsReturn::HelperMissing;
pub const GST_INSTALL_PLUGINS_INSTALL_IN_PROGRESS: GstInstallPluginsReturn = GstInstallPluginsReturn::InstallInProgress;
// 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;
pub const GST_PLUGINS_BASE_VERSION_MAJOR: c_int = 1;
pub const GST_PLUGINS_BASE_VERSION_MICRO: c_int = 90;
pub const GST_PLUGINS_BASE_VERSION_MINOR: c_int = 11;
pub const GST_PLUGINS_BASE_VERSION_NANO: c_int = 0;
// Flags
bitflags! {
#[repr(C)]
pub flags GstDiscovererSerializeFlags: c_uint {
const GST_DISCOVERER_SERIALIZE_BASIC = 0,
const GST_DISCOVERER_SERIALIZE_CAPS = 1,
const GST_DISCOVERER_SERIALIZE_TAGS = 2,
const GST_DISCOVERER_SERIALIZE_MISC = 4,
const GST_DISCOVERER_SERIALIZE_ALL = 7,
}
}
// Callbacks
pub type GstAudioVisualizerShaderFunc = Option<unsafe extern "C" fn(*mut GstAudioVisualizer, *const gst_video::GstVideoFrame, *mut gst_video::GstVideoFrame)>;
pub type GstInstallPluginsResultFunc = Option<unsafe extern "C" fn(GstInstallPluginsReturn, gpointer)>;
// Records
#[repr(C)]
pub struct GstAudioVisualizerClass {
pub parent_class: gst::GstElementClass,
pub setup: Option<unsafe extern "C" fn(*mut GstAudioVisualizer) -> gboolean>,
pub render: Option<unsafe extern "C" fn(*mut GstAudioVisualizer, *mut gst::GstBuffer, *mut gst_video::GstVideoFrame) -> gboolean>,
pub decide_allocation: Option<unsafe extern "C" fn(*mut GstAudioVisualizer, *mut gst::GstQuery) -> gboolean>,
}
#[repr(C)]
pub struct GstAudioVisualizerPrivate(c_void);
#[repr(C)]
pub struct GstDiscovererClass {
pub parentclass: gobject::GObjectClass,
pub finished: Option<unsafe extern "C" fn(*mut GstDiscoverer)>,
pub starting: Option<unsafe extern "C" fn(*mut GstDiscoverer)>,
pub discovered: Option<unsafe extern "C" fn(*mut GstDiscoverer, *mut GstDiscovererInfo, *const glib::GError)>,
pub source_setup: Option<unsafe extern "C" fn(*mut GstDiscoverer, *mut gst::GstElement)>,
pub _reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstDiscovererPrivate(c_void);
#[repr(C)]
pub struct GstEncodingAudioProfileClass(c_void);
#[repr(C)]
pub struct GstEncodingContainerProfileClass(c_void);
#[repr(C)]
pub struct GstEncodingProfileClass(c_void);
#[repr(C)]
pub struct GstEncodingVideoProfileClass(c_void);
#[repr(C)]
pub struct GstInstallPluginsContext(c_void);
// Classes
#[repr(C)]
pub struct GstAudioVisualizer {
pub parent: gst::GstElement,
pub req_spf: c_uint,
pub vinfo: gst_video::GstVideoInfo,
pub ainfo: gst_audio::GstAudioInfo,
priv_: *mut GstAudioVisualizerPrivate,
}
#[repr(C)]
pub struct GstDiscoverer {
pub parent: gobject::GObject,
priv_: *mut GstDiscovererPrivate,
_reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstDiscovererAudioInfo(c_void);
#[repr(C)]
pub struct GstDiscovererContainerInfo(c_void);
#[repr(C)]
pub struct GstDiscovererInfo(c_void);
#[repr(C)]
pub struct GstDiscovererStreamInfo(c_void);
#[repr(C)]
pub struct GstDiscovererSubtitleInfo(c_void);
#[repr(C)]
pub struct GstDiscovererVideoInfo(c_void);
#[repr(C)]
pub struct GstEncodingAudioProfile(c_void);
#[repr(C)]
pub struct GstEncodingContainerProfile(c_void);
#[repr(C)]
pub struct GstEncodingProfile(c_void);
#[repr(C)]
pub struct GstEncodingTarget(c_void);
#[repr(C)]
pub struct GstEncodingVideoProfile(c_void);
extern "C" {
//=========================================================================
// GstInstallPluginsReturn
//=========================================================================
pub fn gst_install_plugins_return_get_name(ret: GstInstallPluginsReturn) -> *const c_char;
//=========================================================================
// GstInstallPluginsContext
//=========================================================================
pub fn gst_install_plugins_context_get_type() -> GType;
pub fn gst_install_plugins_context_new() -> *mut GstInstallPluginsContext;
pub fn gst_install_plugins_context_free(ctx: *mut GstInstallPluginsContext);
#[cfg(feature = "v1_6")]
pub fn gst_install_plugins_context_set_confirm_search(ctx: *mut GstInstallPluginsContext, confirm_search: gboolean);
#[cfg(feature = "v1_6")]
pub fn gst_install_plugins_context_set_desktop_id(ctx: *mut GstInstallPluginsContext, desktop_id: *const c_char);
#[cfg(feature = "v1_6")]
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;
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;
#[cfg(feature = "v1_6")]
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;
pub fn gst_discoverer_info_get_misc(info: *const GstDiscovererInfo) -> *const gst::GstStructure;
#[cfg(feature = "v1_4")]
pub fn gst_discoverer_info_get_missing_elements_installer_details(info: *const GstDiscovererInfo) -> *mut *mut 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;
#[cfg(feature = "v1_6")]
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;
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;
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);
//=========================================================================
// 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;
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;
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;
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;
#[cfg(feature = "v1_8")]
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;
#[cfg(feature = "v1_8")]
pub fn gst_codec_utils_opus_create_caps_from_header(header: *mut gst::GstBuffer, comments: *mut gst::GstBuffer) -> *mut gst::GstCaps;
#[cfg(feature = "v1_8")]
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;
#[cfg(feature = "v1_8")]
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: u8) -> gboolean;
#[cfg(feature = "v1_8")]
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: u8, 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: *mut *mut 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: *mut *mut 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;
}

View file

@ -1,4 +1,4 @@
// This file was generated by gir (8e8472c) from gir-files (???) // This file was generated by gir (10e1d4f) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals)] #![allow(non_camel_case_types, non_upper_case_globals)]

View file

@ -0,0 +1,48 @@
[build-dependencies]
pkg-config = "0.3.7"
[dependencies]
bitflags = "0.8"
glib-sys = "0.3"
gobject-sys = "0.3"
libc = "0.2"
[dependencies.gstreamer-sys]
path = "../gstreamer-sys"
version = "0.1.0"
[dependencies.gstreamer-base-sys]
path = "../gstreamer-base-sys"
version = "0.1.0"
[features]
v1_0_10 = []
v1_10 = ["v1_8"]
v1_12 = ["v1_10"]
v1_2 = ["v1_0_10"]
v1_2_3 = ["v1_2"]
v1_4 = ["v1_2_3"]
v1_6 = ["v1_4"]
v1_8 = ["v1_6"]
[lib]
name = "gstreamer_tag_sys"
[package]
build = "build.rs"
links = "gsttag-1.0"
name = "gstreamer-tag-sys"
version = "0.1.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
description = "FFI bindings to libgsttag-1.0"
homepage = "https://gstreamer.freedesktop.org"
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
repository = "https://github.com/sdroege/gstreamer-sys"
license = "MIT"
include = [
"src/*.rs",
"Cargo.toml",
"build.rs",
"LICENSE",
]

23
gstreamer-tag-sys/LICENSE Normal file
View file

@ -0,0 +1,23 @@
The MIT License (MIT)
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>.
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.

View file

@ -0,0 +1,62 @@
extern crate pkg_config;
use pkg_config::{Config, Error};
use std::env;
use std::io::prelude::*;
use std::io;
use std::process;
fn main() {
if let Err(s) = find() {
let _ = writeln!(io::stderr(), "{}", s);
process::exit(1);
}
}
fn find() -> Result<(), Error> {
let package_name = "gstreamer-tag-1.0";
let shared_libs = ["gsttag-1.0"];
let version = if cfg!(feature = "v1_10") {
"1.10"
} else {
"1.0"
};
if let Ok(lib_dir) = env::var("GTK_LIB_DIR") {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
println!("cargo:rustc-link-search=native={}", lib_dir);
return Ok(())
}
let target = env::var("TARGET").unwrap();
let hardcode_shared_libs = target.contains("windows");
let mut config = Config::new();
config.atleast_version(version);
if hardcode_shared_libs {
config.cargo_metadata(false);
}
match config.probe(package_name) {
Ok(library) => {
if hardcode_shared_libs {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
for path in library.link_paths.iter() {
println!("cargo:rustc-link-search=native={}", path.to_str().unwrap());
}
}
Ok(())
}
Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
Ok(())
}
Err(err) => Err(err),
}
}

View file

@ -0,0 +1,253 @@
// This file was generated by gir (10e1d4f) from gir-files (???)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals)]
extern crate libc;
#[macro_use] extern crate bitflags;
extern crate glib_sys as glib;
extern crate gobject_sys as gobject;
extern crate gstreamer_sys as gst;
extern crate gstreamer_base_sys as gst_base;
#[allow(unused_imports)]
use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double,
c_short, c_ushort, c_long, c_ulong,
c_void, size_t, ssize_t, time_t, FILE};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType, Volatile};
// Enums
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(C)]
pub enum GstTagDemuxResult {
BrokenTag = 0,
Again = 1,
Ok = 2,
}
pub const GST_TAG_DEMUX_RESULT_BROKEN_TAG: GstTagDemuxResult = GstTagDemuxResult::BrokenTag;
pub const GST_TAG_DEMUX_RESULT_AGAIN: GstTagDemuxResult = GstTagDemuxResult::Again;
pub const GST_TAG_DEMUX_RESULT_OK: GstTagDemuxResult = GstTagDemuxResult::Ok;
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(C)]
pub enum GstTagImageType {
None = -1,
Undefined = 0,
FrontCover = 1,
BackCover = 2,
LeafletPage = 3,
Medium = 4,
LeadArtist = 5,
Artist = 6,
Conductor = 7,
BandOrchestra = 8,
Composer = 9,
Lyricist = 10,
RecordingLocation = 11,
DuringRecording = 12,
DuringPerformance = 13,
VideoCapture = 14,
Fish = 15,
Illustration = 16,
BandArtistLogo = 17,
PublisherStudioLogo = 18,
}
pub const GST_TAG_IMAGE_TYPE_NONE: GstTagImageType = GstTagImageType::None;
pub const GST_TAG_IMAGE_TYPE_UNDEFINED: GstTagImageType = GstTagImageType::Undefined;
pub const GST_TAG_IMAGE_TYPE_FRONT_COVER: GstTagImageType = GstTagImageType::FrontCover;
pub const GST_TAG_IMAGE_TYPE_BACK_COVER: GstTagImageType = GstTagImageType::BackCover;
pub const GST_TAG_IMAGE_TYPE_LEAFLET_PAGE: GstTagImageType = GstTagImageType::LeafletPage;
pub const GST_TAG_IMAGE_TYPE_MEDIUM: GstTagImageType = GstTagImageType::Medium;
pub const GST_TAG_IMAGE_TYPE_LEAD_ARTIST: GstTagImageType = GstTagImageType::LeadArtist;
pub const GST_TAG_IMAGE_TYPE_ARTIST: GstTagImageType = GstTagImageType::Artist;
pub const GST_TAG_IMAGE_TYPE_CONDUCTOR: GstTagImageType = GstTagImageType::Conductor;
pub const GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA: GstTagImageType = GstTagImageType::BandOrchestra;
pub const GST_TAG_IMAGE_TYPE_COMPOSER: GstTagImageType = GstTagImageType::Composer;
pub const GST_TAG_IMAGE_TYPE_LYRICIST: GstTagImageType = GstTagImageType::Lyricist;
pub const GST_TAG_IMAGE_TYPE_RECORDING_LOCATION: GstTagImageType = GstTagImageType::RecordingLocation;
pub const GST_TAG_IMAGE_TYPE_DURING_RECORDING: GstTagImageType = GstTagImageType::DuringRecording;
pub const GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE: GstTagImageType = GstTagImageType::DuringPerformance;
pub const GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE: GstTagImageType = GstTagImageType::VideoCapture;
pub const GST_TAG_IMAGE_TYPE_FISH: GstTagImageType = GstTagImageType::Fish;
pub const GST_TAG_IMAGE_TYPE_ILLUSTRATION: GstTagImageType = GstTagImageType::Illustration;
pub const GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO: GstTagImageType = GstTagImageType::BandArtistLogo;
pub const GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO: GstTagImageType = GstTagImageType::PublisherStudioLogo;
// Constants
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_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
bitflags! {
#[repr(C)]
pub flags GstTagLicenseFlags: c_uint {
const GST_TAG_LICENSE_PERMITS_REPRODUCTION = 1,
const GST_TAG_LICENSE_PERMITS_DISTRIBUTION = 2,
const GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS = 4,
const GST_TAG_LICENSE_PERMITS_SHARING = 8,
const GST_TAG_LICENSE_REQUIRES_NOTICE = 256,
const GST_TAG_LICENSE_REQUIRES_ATTRIBUTION = 512,
const GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE = 1024,
const GST_TAG_LICENSE_REQUIRES_SOURCE_CODE = 2048,
const GST_TAG_LICENSE_REQUIRES_COPYLEFT = 4096,
const GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT = 8192,
const GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE = 65536,
const GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE = 131072,
const GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE = 16777216,
const GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE = 33554432,
}
}
// Records
#[repr(C)]
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>,
reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstTagDemuxPrivate(c_void);
#[repr(C)]
pub struct GstTagMuxClass {
pub parent_class: gst::GstElementClass,
pub render_start_tag: Option<unsafe extern "C" fn(*mut GstTagMux, *const gst::GstTagList) -> *mut gst::GstBuffer>,
pub render_end_tag: Option<unsafe extern "C" fn(*mut GstTagMux, *const gst::GstTagList) -> *mut gst::GstBuffer>,
_gst_reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstTagMuxPrivate(c_void);
#[repr(C)]
pub struct GstTagXmpWriterInterface {
pub parent: gobject::GTypeInterface,
}
// Classes
#[repr(C)]
pub struct GstTagDemux {
pub element: gst::GstElement,
priv_: *mut GstTagDemuxPrivate,
reserved: [gpointer; 4],
}
#[repr(C)]
pub struct GstTagMux {
pub element: gst::GstElement,
priv_: *mut GstTagMuxPrivate,
_gst_reserved: [gpointer; 4],
}
// Interfaces
#[repr(C)]
pub struct GstTagXmpWriter(c_void);
extern "C" {
//=========================================================================
// 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) -> *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);
}

View file

@ -0,0 +1,48 @@
[build-dependencies]
pkg-config = "0.3.7"
[dependencies]
bitflags = "0.8"
glib-sys = "0.3"
gobject-sys = "0.3"
libc = "0.2"
[dependencies.gstreamer-sys]
path = "../gstreamer-sys"
version = "0.1.0"
[dependencies.gstreamer-base-sys]
path = "../gstreamer-base-sys"
version = "0.1.0"
[features]
v1_0_10 = []
v1_10 = ["v1_8"]
v1_12 = ["v1_10"]
v1_2 = ["v1_0_10"]
v1_2_3 = ["v1_2"]
v1_4 = ["v1_2_3"]
v1_6 = ["v1_4"]
v1_8 = ["v1_6"]
[lib]
name = "gstreamer_video_sys"
[package]
build = "build.rs"
links = "gstvideo-1.0"
name = "gstreamer-video-sys"
version = "0.1.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
description = "FFI bindings to libgstvideo-1.0"
homepage = "https://gstreamer.freedesktop.org"
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
repository = "https://github.com/sdroege/gstreamer-sys"
license = "MIT"
include = [
"src/*.rs",
"Cargo.toml",
"build.rs",
"LICENSE",
]

View file

@ -0,0 +1,23 @@
The MIT License (MIT)
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>.
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.

View file

@ -0,0 +1,74 @@
extern crate pkg_config;
use pkg_config::{Config, Error};
use std::env;
use std::io::prelude::*;
use std::io;
use std::process;
fn main() {
if let Err(s) = find() {
let _ = writeln!(io::stderr(), "{}", s);
process::exit(1);
}
}
fn find() -> Result<(), Error> {
let package_name = "gstreamer-video-1.0";
let shared_libs = ["gstvideo-1.0"];
let version = if cfg!(feature = "v1_12") {
"1.12"
} else if cfg!(feature = "v1_10") {
"1.10"
} else if cfg!(feature = "v1_8") {
"1.8"
} else if cfg!(feature = "v1_6") {
"1.6"
} else if cfg!(feature = "v1_4") {
"1.4"
} else if cfg!(feature = "v1_2_2") {
"1.2.2"
} else if cfg!(feature = "v1_2") {
"1.2"
} else {
"1.0"
};
if let Ok(lib_dir) = env::var("GTK_LIB_DIR") {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
println!("cargo:rustc-link-search=native={}", lib_dir);
return Ok(())
}
let target = env::var("TARGET").unwrap();
let hardcode_shared_libs = target.contains("windows");
let mut config = Config::new();
config.atleast_version(version);
if hardcode_shared_libs {
config.cargo_metadata(false);
}
match config.probe(package_name) {
Ok(library) => {
if hardcode_shared_libs {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
for path in library.link_paths.iter() {
println!("cargo:rustc-link-search=native={}", path.to_str().unwrap());
}
}
Ok(())
}
Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
Ok(())
}
Err(err) => Err(err),
}
}

File diff suppressed because it is too large Load diff