Add bindings for GStreamer Sdp, Rtsp and RtspServer libraries

Fixes https://github.com/sdroege/gstreamer-sys/pull/8
This commit is contained in:
Mathieu Duponchelle 2018-02-06 18:45:59 +01:00 committed by Sebastian Dröge
parent 7a914c481b
commit 2f22e8c325
25 changed files with 22831 additions and 0 deletions

View file

@ -11,4 +11,7 @@ members = [
"gstreamer-player-sys",
"gstreamer-mpegts-sys",
"gstreamer-net-sys",
"gstreamer-sdp-sys",
"gstreamer-rtsp-sys",
"gstreamer-rtsp-server-sys"
]

17
Gir_GstRtsp.toml Normal file
View file

@ -0,0 +1,17 @@
[options]
girs_dir = "gir-files"
library = "GstRtsp"
version = "1.0"
min_cfg_version = "1.0"
target_path = "gstreamer-rtsp-sys"
work_mode = "sys"
external_libraries = [
"GLib",
"GObject",
"Gio"
]
[external_libraries]
gstreamer="Gst"
gstreamer_sdp="GstSdp"

19
Gir_GstRtspServer.toml Normal file
View file

@ -0,0 +1,19 @@
[options]
girs_dir = "gir-files"
library = "GstRtspServer"
version = "1.0"
min_cfg_version = "1.0"
target_path = "gstreamer-rtsp-server-sys"
work_mode = "sys"
external_libraries = [
"GLib",
"GObject",
"Gio"
]
[external_libraries]
gstreamer="Gst"
gstreamer_net="GstNet"
gstreamer_sdp="GstSdp"
gstreamer_rtsp="GstRtsp"

15
Gir_GstSdp.toml Normal file
View file

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

5018
gir-files/GstRtsp-1.0.gir Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

4309
gir-files/GstSdp-1.0.gir Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,78 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),
specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field).
## [0.4.0] - 2017-12-23
### Added
- GstNet bindings
- Debug impls for basically every type
- Script to automatically regenerate everything
### Changed
- gst_player_[sg]et_multiview_mode() argument types were changed from
GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset
of the former that is allowed here
- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead
of *mut *const c_char
## [0.3.0] - 2017-11-26
### Added
- GstMpegTs bindings
### Changed
- GstDebugColorFlags from an enum to a bitfield
- Updated to bitflags 1.0
- Added support for the "dox" feature to generate documentation for all
possible versions
- Depend on glib-sys/gobject-sys 0.5
### Fixes
- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since
1.12 and 1.12.1 respectively
- All C enums are represented as integers + constants now to prevent undefined
behaviour when out-of-range values are received
## [0.2.1] - 2017-09-10
### Changed
- Add README.md to all crates directly
### Fixed
- Fix various compiler warnings
- Fix versioning/feature mess. Now each library has features for all major
versions and for the correct minor versions that added API.
- Removed Cargo.lock from GIT
## [0.2.0] - 2017-08-28
### Added
- Add GstPlayer bindings
### Changed
- Depend on bitflags 0.9
- Update GIR files to 1.12.1 release
- Fix various errors in the GIR files, backported from GStreamer GIT master
- Depend on gobject-sys/glib-sys 0.4.0 for various improvements
- Regenerated everything with latest GIR
## [0.1.1] - 2017-05-10
### Added
- Add GstTag and GstApp bindings
- Add lots of missing fields to all the structs thanks to GIR improvements
### Changed
- Update GIR files to 1.12.0 release
- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs
- Regenerated everything with latest GIR
## [0.1.0] - 2017-04-09
- Initial release of the autogenerated GStreamer FFI bindings.
[Unreleased]: https://github.com/sdroege/gstreamer-sys/compare/0.4.0...HEAD
[0.4.0]: https://github.com/sdroege/gstreamer-sys/compare/0.3.0...0.4.0
[0.3.0]: https://github.com/sdroege/gstreamer-sys/compare/0.2.1...0.3.0
[0.2.1]: https://github.com/sdroege/gstreamer-sys/compare/0.2.0...0.2.1
[0.2.0]: https://github.com/sdroege/gstreamer-sys/compare/0.1.1...0.2.0
[0.1.1]: https://github.com/sdroege/gstreamer-sys/compare/0.1.0...0.1.1

View file

@ -0,0 +1,55 @@
[badges.travis-ci]
branch = "master"
repository = "sdroege/gstreamer-sys"
[build-dependencies]
pkg-config = "0.3.7"
[dependencies]
bitflags = "1.0"
libc = "0.2"
[dependencies.gio-sys]
git = "https://github.com/gtk-rs/sys"
[dependencies.glib-sys]
git = "https://github.com/gtk-rs/sys"
[dependencies.gobject-sys]
git = "https://github.com/gtk-rs/sys"
[dependencies.gstreamer-net-sys]
path = "../gstreamer-net-sys"
[dependencies.gstreamer-rtsp-sys]
path = "../gstreamer-rtsp-sys"
[dependencies.gstreamer-sdp-sys]
path = "../gstreamer-sdp-sys"
[dependencies.gstreamer-sys]
path = "../gstreamer-sys"
[features]
dox = []
v1_4 = []
v1_6 = ["v1_4"]
v1_8 = ["v1_6"]
v1_10 = ["v1_8"]
v1_12 = ["v1_10"]
[lib]
name = "gstreamer_rtsp_server_sys"
[package]
authors = ["Mathieu Duponchelle <mathieu@centricular.com>"]
build = "build.rs"
description = "FFI bindings to libgstrtspserver-1.0"
homepage = "https://gstreamer.freedesktop.org"
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
license = "MIT"
links = "gstrtspserver-1.0"
name = "gstreamer-rtsp-server-sys"
readme = "README.md"
repository = "https://github.com/sdroege/gstreamer-sys"
version = "0.5.0"

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,31 @@
# gstreamer-rtsp-server-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sys.svg)](https://crates.io/crates/gstreamer-sys) [![Build Status](https://travis-ci.org/sdroege/gstreamer-sys.svg?branch=master)](https://travis-ci.org/sdroege/gstreamer-sys)
[GStreamer](https://gstreamer.freedesktop.org/) (Rtsp Server library) FFI bindings for Rust.
These bindings are providing unsafe FFI API that can be used to interface with
GStreamer. Generally they are meant to be used as the building block for
higher-level abstractions like:
* Application-side bindings for GStreamer: https://github.com/sdroege/gstreamer-rs
* Crate for writing GStreamer plugins in Rust: https://github.com/sdroege/gst-plugin-rs
The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/)
based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/)
API metadata provided by the GStreamer project.
## LICENSE
gstreamer-sys and all crates contained here are licensed under the MIT
license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT).
GStreamer itself is licensed under the Lesser General Public License version
2.1 or (at your option) any later version:
https://www.gnu.org/licenses/lgpl-2.1.html
## Contribution
Any kinds of contributions are welcome as a pull request.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above,
without any additional terms or conditions.

View file

@ -0,0 +1,67 @@
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-rtsp-server-1.0";
let shared_libs = ["gstrtspserver-1.0"];
let version = if cfg!(feature = "v1_12") {
"1.12"
} 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").expect("TARGET environment variable doesn't exist");
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().expect("library path doesn't exist"));
}
}
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,78 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),
specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field).
## [0.4.0] - 2017-12-23
### Added
- GstNet bindings
- Debug impls for basically every type
- Script to automatically regenerate everything
### Changed
- gst_player_[sg]et_multiview_mode() argument types were changed from
GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset
of the former that is allowed here
- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead
of *mut *const c_char
## [0.3.0] - 2017-11-26
### Added
- GstMpegTs bindings
### Changed
- GstDebugColorFlags from an enum to a bitfield
- Updated to bitflags 1.0
- Added support for the "dox" feature to generate documentation for all
possible versions
- Depend on glib-sys/gobject-sys 0.5
### Fixes
- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since
1.12 and 1.12.1 respectively
- All C enums are represented as integers + constants now to prevent undefined
behaviour when out-of-range values are received
## [0.2.1] - 2017-09-10
### Changed
- Add README.md to all crates directly
### Fixed
- Fix various compiler warnings
- Fix versioning/feature mess. Now each library has features for all major
versions and for the correct minor versions that added API.
- Removed Cargo.lock from GIT
## [0.2.0] - 2017-08-28
### Added
- Add GstPlayer bindings
### Changed
- Depend on bitflags 0.9
- Update GIR files to 1.12.1 release
- Fix various errors in the GIR files, backported from GStreamer GIT master
- Depend on gobject-sys/glib-sys 0.4.0 for various improvements
- Regenerated everything with latest GIR
## [0.1.1] - 2017-05-10
### Added
- Add GstTag and GstApp bindings
- Add lots of missing fields to all the structs thanks to GIR improvements
### Changed
- Update GIR files to 1.12.0 release
- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs
- Regenerated everything with latest GIR
## [0.1.0] - 2017-04-09
- Initial release of the autogenerated GStreamer FFI bindings.
[Unreleased]: https://github.com/sdroege/gstreamer-sys/compare/0.4.0...HEAD
[0.4.0]: https://github.com/sdroege/gstreamer-sys/compare/0.3.0...0.4.0
[0.3.0]: https://github.com/sdroege/gstreamer-sys/compare/0.2.1...0.3.0
[0.2.1]: https://github.com/sdroege/gstreamer-sys/compare/0.2.0...0.2.1
[0.2.0]: https://github.com/sdroege/gstreamer-sys/compare/0.1.1...0.2.0
[0.1.1]: https://github.com/sdroege/gstreamer-sys/compare/0.1.0...0.1.1

View file

@ -0,0 +1,50 @@
[build-dependencies]
pkg-config = "0.3.7"
[dependencies]
bitflags = "1.0"
libc = "0.2"
[dependencies.gio-sys]
git = "https://github.com/gtk-rs/sys"
[dependencies.glib-sys]
git = "https://github.com/gtk-rs/sys"
[dependencies.gobject-sys]
git = "https://github.com/gtk-rs/sys"
[dependencies.gstreamer-sdp-sys]
path = "../gstreamer-sdp-sys"
[dependencies.gstreamer-sys]
path = "../gstreamer-sys"
[features]
dox = []
v1_2 = []
v1_2_1 = ["v1_2"]
v1_4 = ["v1_2_1"]
v1_6 = ["v1_4"]
v1_8 = ["v1_6"]
v1_10 = ["v1_8"]
v1_12 = ["v1_10"]
[lib]
name = "gstreamer_rtsp_sys"
[package]
build = "build.rs"
links = "gstrtsp-1.0"
name = "gstreamer-rtsp-sys"
version = "0.5.0"
authors = ["Mathieu Duponchelle <mathieu@centricular.com>"]
description = "FFI bindings to libgstrtsp-1.0"
homepage = "https://gstreamer.freedesktop.org"
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
repository = "https://github.com/sdroege/gstreamer-sys"
license = "MIT"
readme = "README.md"
[badges]
travis-ci = { repository = "sdroege/gstreamer-sys", branch = "master" }

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,31 @@
# gstreamer-rtsp-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sys.svg)](https://crates.io/crates/gstreamer-sys) [![Build Status](https://travis-ci.org/sdroege/gstreamer-sys.svg?branch=master)](https://travis-ci.org/sdroege/gstreamer-sys)
[GStreamer](https://gstreamer.freedesktop.org/) (Rtsp library) FFI bindings for Rust.
These bindings are providing unsafe FFI API that can be used to interface with
GStreamer. Generally they are meant to be used as the building block for
higher-level abstractions like:
* Application-side bindings for GStreamer: https://github.com/sdroege/gstreamer-rs
* Crate for writing GStreamer plugins in Rust: https://github.com/sdroege/gst-plugin-rs
The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/)
based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/)
API metadata provided by the GStreamer project.
## LICENSE
gstreamer-sys and all crates contained here are licensed under the MIT
license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT).
GStreamer itself is licensed under the Lesser General Public License version
2.1 or (at your option) any later version:
https://www.gnu.org/licenses/lgpl-2.1.html
## Contribution
Any kinds of contributions are welcome as a pull request.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above,
without any additional terms or conditions.

View file

@ -0,0 +1,69 @@
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-rtsp-1.0";
let shared_libs = ["gstrtsp-1.0"];
let version = if cfg!(feature = "v1_12") {
"1.12"
} else if cfg!(feature = "v1_6") {
"1.6"
} else if cfg!(feature = "v1_4") {
"1.4"
} else if cfg!(feature = "v1_2_1") {
"1.2.1"
} 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").expect("TARGET environment variable doesn't exist");
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().expect("library path doesn't exist"));
}
}
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,946 @@
// This file was generated by gir (81a781f) from gir-files (???)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
extern crate libc;
#[macro_use] extern crate bitflags;
extern crate glib_sys as glib;
extern crate gobject_sys as gobject;
extern crate gio_sys as gio;
extern crate gstreamer_sys as gst;
extern crate gstreamer_sdp_sys as gst_sdp;
#[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};
// Enums
pub type GstRTSPAuthMethod = c_int;
pub const GST_RTSP_AUTH_NONE: GstRTSPAuthMethod = 0;
pub const GST_RTSP_AUTH_BASIC: GstRTSPAuthMethod = 1;
pub const GST_RTSP_AUTH_DIGEST: GstRTSPAuthMethod = 2;
pub type GstRTSPFamily = c_int;
pub const GST_RTSP_FAM_NONE: GstRTSPFamily = 0;
pub const GST_RTSP_FAM_INET: GstRTSPFamily = 1;
pub const GST_RTSP_FAM_INET6: GstRTSPFamily = 2;
pub type GstRTSPHeaderField = c_int;
pub const GST_RTSP_HDR_INVALID: GstRTSPHeaderField = 0;
pub const GST_RTSP_HDR_ACCEPT: GstRTSPHeaderField = 1;
pub const GST_RTSP_HDR_ACCEPT_ENCODING: GstRTSPHeaderField = 2;
pub const GST_RTSP_HDR_ACCEPT_LANGUAGE: GstRTSPHeaderField = 3;
pub const GST_RTSP_HDR_ALLOW: GstRTSPHeaderField = 4;
pub const GST_RTSP_HDR_AUTHORIZATION: GstRTSPHeaderField = 5;
pub const GST_RTSP_HDR_BANDWIDTH: GstRTSPHeaderField = 6;
pub const GST_RTSP_HDR_BLOCKSIZE: GstRTSPHeaderField = 7;
pub const GST_RTSP_HDR_CACHE_CONTROL: GstRTSPHeaderField = 8;
pub const GST_RTSP_HDR_CONFERENCE: GstRTSPHeaderField = 9;
pub const GST_RTSP_HDR_CONNECTION: GstRTSPHeaderField = 10;
pub const GST_RTSP_HDR_CONTENT_BASE: GstRTSPHeaderField = 11;
pub const GST_RTSP_HDR_CONTENT_ENCODING: GstRTSPHeaderField = 12;
pub const GST_RTSP_HDR_CONTENT_LANGUAGE: GstRTSPHeaderField = 13;
pub const GST_RTSP_HDR_CONTENT_LENGTH: GstRTSPHeaderField = 14;
pub const GST_RTSP_HDR_CONTENT_LOCATION: GstRTSPHeaderField = 15;
pub const GST_RTSP_HDR_CONTENT_TYPE: GstRTSPHeaderField = 16;
pub const GST_RTSP_HDR_CSEQ: GstRTSPHeaderField = 17;
pub const GST_RTSP_HDR_DATE: GstRTSPHeaderField = 18;
pub const GST_RTSP_HDR_EXPIRES: GstRTSPHeaderField = 19;
pub const GST_RTSP_HDR_FROM: GstRTSPHeaderField = 20;
pub const GST_RTSP_HDR_IF_MODIFIED_SINCE: GstRTSPHeaderField = 21;
pub const GST_RTSP_HDR_LAST_MODIFIED: GstRTSPHeaderField = 22;
pub const GST_RTSP_HDR_PROXY_AUTHENTICATE: GstRTSPHeaderField = 23;
pub const GST_RTSP_HDR_PROXY_REQUIRE: GstRTSPHeaderField = 24;
pub const GST_RTSP_HDR_PUBLIC: GstRTSPHeaderField = 25;
pub const GST_RTSP_HDR_RANGE: GstRTSPHeaderField = 26;
pub const GST_RTSP_HDR_REFERER: GstRTSPHeaderField = 27;
pub const GST_RTSP_HDR_REQUIRE: GstRTSPHeaderField = 28;
pub const GST_RTSP_HDR_RETRY_AFTER: GstRTSPHeaderField = 29;
pub const GST_RTSP_HDR_RTP_INFO: GstRTSPHeaderField = 30;
pub const GST_RTSP_HDR_SCALE: GstRTSPHeaderField = 31;
pub const GST_RTSP_HDR_SESSION: GstRTSPHeaderField = 32;
pub const GST_RTSP_HDR_SERVER: GstRTSPHeaderField = 33;
pub const GST_RTSP_HDR_SPEED: GstRTSPHeaderField = 34;
pub const GST_RTSP_HDR_TRANSPORT: GstRTSPHeaderField = 35;
pub const GST_RTSP_HDR_UNSUPPORTED: GstRTSPHeaderField = 36;
pub const GST_RTSP_HDR_USER_AGENT: GstRTSPHeaderField = 37;
pub const GST_RTSP_HDR_VIA: GstRTSPHeaderField = 38;
pub const GST_RTSP_HDR_WWW_AUTHENTICATE: GstRTSPHeaderField = 39;
pub const GST_RTSP_HDR_CLIENT_CHALLENGE: GstRTSPHeaderField = 40;
pub const GST_RTSP_HDR_REAL_CHALLENGE1: GstRTSPHeaderField = 41;
pub const GST_RTSP_HDR_REAL_CHALLENGE2: GstRTSPHeaderField = 42;
pub const GST_RTSP_HDR_REAL_CHALLENGE3: GstRTSPHeaderField = 43;
pub const GST_RTSP_HDR_SUBSCRIBE: GstRTSPHeaderField = 44;
pub const GST_RTSP_HDR_ALERT: GstRTSPHeaderField = 45;
pub const GST_RTSP_HDR_CLIENT_ID: GstRTSPHeaderField = 46;
pub const GST_RTSP_HDR_COMPANY_ID: GstRTSPHeaderField = 47;
pub const GST_RTSP_HDR_GUID: GstRTSPHeaderField = 48;
pub const GST_RTSP_HDR_REGION_DATA: GstRTSPHeaderField = 49;
pub const GST_RTSP_HDR_MAX_ASM_WIDTH: GstRTSPHeaderField = 50;
pub const GST_RTSP_HDR_LANGUAGE: GstRTSPHeaderField = 51;
pub const GST_RTSP_HDR_PLAYER_START_TIME: GstRTSPHeaderField = 52;
pub const GST_RTSP_HDR_LOCATION: GstRTSPHeaderField = 53;
pub const GST_RTSP_HDR_ETAG: GstRTSPHeaderField = 54;
pub const GST_RTSP_HDR_IF_MATCH: GstRTSPHeaderField = 55;
pub const GST_RTSP_HDR_ACCEPT_CHARSET: GstRTSPHeaderField = 56;
pub const GST_RTSP_HDR_SUPPORTED: GstRTSPHeaderField = 57;
pub const GST_RTSP_HDR_VARY: GstRTSPHeaderField = 58;
pub const GST_RTSP_HDR_X_ACCELERATE_STREAMING: GstRTSPHeaderField = 59;
pub const GST_RTSP_HDR_X_ACCEPT_AUTHENT: GstRTSPHeaderField = 60;
pub const GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT: GstRTSPHeaderField = 61;
pub const GST_RTSP_HDR_X_BROADCAST_ID: GstRTSPHeaderField = 62;
pub const GST_RTSP_HDR_X_BURST_STREAMING: GstRTSPHeaderField = 63;
pub const GST_RTSP_HDR_X_NOTICE: GstRTSPHeaderField = 64;
pub const GST_RTSP_HDR_X_PLAYER_LAG_TIME: GstRTSPHeaderField = 65;
pub const GST_RTSP_HDR_X_PLAYLIST: GstRTSPHeaderField = 66;
pub const GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE: GstRTSPHeaderField = 67;
pub const GST_RTSP_HDR_X_PLAYLIST_GEN_ID: GstRTSPHeaderField = 68;
pub const GST_RTSP_HDR_X_PLAYLIST_SEEK_ID: GstRTSPHeaderField = 69;
pub const GST_RTSP_HDR_X_PROXY_CLIENT_AGENT: GstRTSPHeaderField = 70;
pub const GST_RTSP_HDR_X_PROXY_CLIENT_VERB: GstRTSPHeaderField = 71;
pub const GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE: GstRTSPHeaderField = 72;
pub const GST_RTSP_HDR_X_RTP_INFO: GstRTSPHeaderField = 73;
pub const GST_RTSP_HDR_X_STARTUPPROFILE: GstRTSPHeaderField = 74;
pub const GST_RTSP_HDR_TIMESTAMP: GstRTSPHeaderField = 75;
pub const GST_RTSP_HDR_AUTHENTICATION_INFO: GstRTSPHeaderField = 76;
pub const GST_RTSP_HDR_HOST: GstRTSPHeaderField = 77;
pub const GST_RTSP_HDR_PRAGMA: GstRTSPHeaderField = 78;
pub const GST_RTSP_HDR_X_SERVER_IP_ADDRESS: GstRTSPHeaderField = 79;
pub const GST_RTSP_HDR_X_SESSIONCOOKIE: GstRTSPHeaderField = 80;
pub const GST_RTSP_HDR_RTCP_INTERVAL: GstRTSPHeaderField = 81;
pub const GST_RTSP_HDR_KEYMGMT: GstRTSPHeaderField = 82;
pub const GST_RTSP_HDR_LAST: GstRTSPHeaderField = 83;
pub type GstRTSPMsgType = c_int;
pub const GST_RTSP_MESSAGE_INVALID: GstRTSPMsgType = 0;
pub const GST_RTSP_MESSAGE_REQUEST: GstRTSPMsgType = 1;
pub const GST_RTSP_MESSAGE_RESPONSE: GstRTSPMsgType = 2;
pub const GST_RTSP_MESSAGE_HTTP_REQUEST: GstRTSPMsgType = 3;
pub const GST_RTSP_MESSAGE_HTTP_RESPONSE: GstRTSPMsgType = 4;
pub const GST_RTSP_MESSAGE_DATA: GstRTSPMsgType = 5;
pub type GstRTSPRangeUnit = c_int;
pub const GST_RTSP_RANGE_SMPTE: GstRTSPRangeUnit = 0;
pub const GST_RTSP_RANGE_SMPTE_30_DROP: GstRTSPRangeUnit = 1;
pub const GST_RTSP_RANGE_SMPTE_25: GstRTSPRangeUnit = 2;
pub const GST_RTSP_RANGE_NPT: GstRTSPRangeUnit = 3;
pub const GST_RTSP_RANGE_CLOCK: GstRTSPRangeUnit = 4;
pub type GstRTSPResult = c_int;
pub const GST_RTSP_OK: GstRTSPResult = 0;
pub const GST_RTSP_ERROR: GstRTSPResult = -1;
pub const GST_RTSP_EINVAL: GstRTSPResult = -2;
pub const GST_RTSP_EINTR: GstRTSPResult = -3;
pub const GST_RTSP_ENOMEM: GstRTSPResult = -4;
pub const GST_RTSP_ERESOLV: GstRTSPResult = -5;
pub const GST_RTSP_ENOTIMPL: GstRTSPResult = -6;
pub const GST_RTSP_ESYS: GstRTSPResult = -7;
pub const GST_RTSP_EPARSE: GstRTSPResult = -8;
pub const GST_RTSP_EWSASTART: GstRTSPResult = -9;
pub const GST_RTSP_EWSAVERSION: GstRTSPResult = -10;
pub const GST_RTSP_EEOF: GstRTSPResult = -11;
pub const GST_RTSP_ENET: GstRTSPResult = -12;
pub const GST_RTSP_ENOTIP: GstRTSPResult = -13;
pub const GST_RTSP_ETIMEOUT: GstRTSPResult = -14;
pub const GST_RTSP_ETGET: GstRTSPResult = -15;
pub const GST_RTSP_ETPOST: GstRTSPResult = -16;
pub const GST_RTSP_ELAST: GstRTSPResult = -17;
pub type GstRTSPState = c_int;
pub const GST_RTSP_STATE_INVALID: GstRTSPState = 0;
pub const GST_RTSP_STATE_INIT: GstRTSPState = 1;
pub const GST_RTSP_STATE_READY: GstRTSPState = 2;
pub const GST_RTSP_STATE_SEEKING: GstRTSPState = 3;
pub const GST_RTSP_STATE_PLAYING: GstRTSPState = 4;
pub const GST_RTSP_STATE_RECORDING: GstRTSPState = 5;
pub type GstRTSPStatusCode = c_int;
pub const GST_RTSP_STS_INVALID: GstRTSPStatusCode = 0;
pub const GST_RTSP_STS_CONTINUE: GstRTSPStatusCode = 100;
pub const GST_RTSP_STS_OK: GstRTSPStatusCode = 200;
pub const GST_RTSP_STS_CREATED: GstRTSPStatusCode = 201;
pub const GST_RTSP_STS_LOW_ON_STORAGE: GstRTSPStatusCode = 250;
pub const GST_RTSP_STS_MULTIPLE_CHOICES: GstRTSPStatusCode = 300;
pub const GST_RTSP_STS_MOVED_PERMANENTLY: GstRTSPStatusCode = 301;
pub const GST_RTSP_STS_MOVE_TEMPORARILY: GstRTSPStatusCode = 302;
pub const GST_RTSP_STS_SEE_OTHER: GstRTSPStatusCode = 303;
pub const GST_RTSP_STS_NOT_MODIFIED: GstRTSPStatusCode = 304;
pub const GST_RTSP_STS_USE_PROXY: GstRTSPStatusCode = 305;
pub const GST_RTSP_STS_BAD_REQUEST: GstRTSPStatusCode = 400;
pub const GST_RTSP_STS_UNAUTHORIZED: GstRTSPStatusCode = 401;
pub const GST_RTSP_STS_PAYMENT_REQUIRED: GstRTSPStatusCode = 402;
pub const GST_RTSP_STS_FORBIDDEN: GstRTSPStatusCode = 403;
pub const GST_RTSP_STS_NOT_FOUND: GstRTSPStatusCode = 404;
pub const GST_RTSP_STS_METHOD_NOT_ALLOWED: GstRTSPStatusCode = 405;
pub const GST_RTSP_STS_NOT_ACCEPTABLE: GstRTSPStatusCode = 406;
pub const GST_RTSP_STS_PROXY_AUTH_REQUIRED: GstRTSPStatusCode = 407;
pub const GST_RTSP_STS_REQUEST_TIMEOUT: GstRTSPStatusCode = 408;
pub const GST_RTSP_STS_GONE: GstRTSPStatusCode = 410;
pub const GST_RTSP_STS_LENGTH_REQUIRED: GstRTSPStatusCode = 411;
pub const GST_RTSP_STS_PRECONDITION_FAILED: GstRTSPStatusCode = 412;
pub const GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE: GstRTSPStatusCode = 413;
pub const GST_RTSP_STS_REQUEST_URI_TOO_LARGE: GstRTSPStatusCode = 414;
pub const GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE: GstRTSPStatusCode = 415;
pub const GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD: GstRTSPStatusCode = 451;
pub const GST_RTSP_STS_CONFERENCE_NOT_FOUND: GstRTSPStatusCode = 452;
pub const GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH: GstRTSPStatusCode = 453;
pub const GST_RTSP_STS_SESSION_NOT_FOUND: GstRTSPStatusCode = 454;
pub const GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE: GstRTSPStatusCode = 455;
pub const GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE: GstRTSPStatusCode = 456;
pub const GST_RTSP_STS_INVALID_RANGE: GstRTSPStatusCode = 457;
pub const GST_RTSP_STS_PARAMETER_IS_READONLY: GstRTSPStatusCode = 458;
pub const GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED: GstRTSPStatusCode = 459;
pub const GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED: GstRTSPStatusCode = 460;
pub const GST_RTSP_STS_UNSUPPORTED_TRANSPORT: GstRTSPStatusCode = 461;
pub const GST_RTSP_STS_DESTINATION_UNREACHABLE: GstRTSPStatusCode = 462;
pub const GST_RTSP_STS_KEY_MANAGEMENT_FAILURE: GstRTSPStatusCode = 463;
pub const GST_RTSP_STS_INTERNAL_SERVER_ERROR: GstRTSPStatusCode = 500;
pub const GST_RTSP_STS_NOT_IMPLEMENTED: GstRTSPStatusCode = 501;
pub const GST_RTSP_STS_BAD_GATEWAY: GstRTSPStatusCode = 502;
pub const GST_RTSP_STS_SERVICE_UNAVAILABLE: GstRTSPStatusCode = 503;
pub const GST_RTSP_STS_GATEWAY_TIMEOUT: GstRTSPStatusCode = 504;
pub const GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED: GstRTSPStatusCode = 505;
pub const GST_RTSP_STS_OPTION_NOT_SUPPORTED: GstRTSPStatusCode = 551;
pub type GstRTSPTimeType = c_int;
pub const GST_RTSP_TIME_SECONDS: GstRTSPTimeType = 0;
pub const GST_RTSP_TIME_NOW: GstRTSPTimeType = 1;
pub const GST_RTSP_TIME_END: GstRTSPTimeType = 2;
pub const GST_RTSP_TIME_FRAMES: GstRTSPTimeType = 3;
pub const GST_RTSP_TIME_UTC: GstRTSPTimeType = 4;
pub type GstRTSPVersion = c_int;
pub const GST_RTSP_VERSION_INVALID: GstRTSPVersion = 0;
pub const GST_RTSP_VERSION_1_0: GstRTSPVersion = 16;
pub const GST_RTSP_VERSION_1_1: GstRTSPVersion = 17;
// Constants
pub const GST_RTSP_DEFAULT_PORT: c_int = 554;
// Flags
bitflags! {
#[repr(C)]
pub struct GstRTSPEvent: c_uint {
const READ = 1;
const WRITE = 2;
}
}
pub const GST_RTSP_EV_READ: GstRTSPEvent = GstRTSPEvent::READ;
pub const GST_RTSP_EV_WRITE: GstRTSPEvent = GstRTSPEvent::WRITE;
bitflags! {
#[repr(C)]
pub struct GstRTSPLowerTrans: c_uint {
const UNKNOWN = 0;
const UDP = 1;
const UDP_MCAST = 2;
const TCP = 4;
const HTTP = 16;
const TLS = 32;
}
}
pub const GST_RTSP_LOWER_TRANS_UNKNOWN: GstRTSPLowerTrans = GstRTSPLowerTrans::UNKNOWN;
pub const GST_RTSP_LOWER_TRANS_UDP: GstRTSPLowerTrans = GstRTSPLowerTrans::UDP;
pub const GST_RTSP_LOWER_TRANS_UDP_MCAST: GstRTSPLowerTrans = GstRTSPLowerTrans::UDP_MCAST;
pub const GST_RTSP_LOWER_TRANS_TCP: GstRTSPLowerTrans = GstRTSPLowerTrans::TCP;
pub const GST_RTSP_LOWER_TRANS_HTTP: GstRTSPLowerTrans = GstRTSPLowerTrans::HTTP;
pub const GST_RTSP_LOWER_TRANS_TLS: GstRTSPLowerTrans = GstRTSPLowerTrans::TLS;
bitflags! {
#[repr(C)]
pub struct GstRTSPMethod: c_uint {
const INVALID = 0;
const DESCRIBE = 1;
const ANNOUNCE = 2;
const GET_PARAMETER = 4;
const OPTIONS = 8;
const PAUSE = 16;
const PLAY = 32;
const RECORD = 64;
const REDIRECT = 128;
const SETUP = 256;
const SET_PARAMETER = 512;
const TEARDOWN = 1024;
const GET = 2048;
const POST = 4096;
}
}
pub const GST_RTSP_INVALID: GstRTSPMethod = GstRTSPMethod::INVALID;
pub const GST_RTSP_DESCRIBE: GstRTSPMethod = GstRTSPMethod::DESCRIBE;
pub const GST_RTSP_ANNOUNCE: GstRTSPMethod = GstRTSPMethod::ANNOUNCE;
pub const GST_RTSP_GET_PARAMETER: GstRTSPMethod = GstRTSPMethod::GET_PARAMETER;
pub const GST_RTSP_OPTIONS: GstRTSPMethod = GstRTSPMethod::OPTIONS;
pub const GST_RTSP_PAUSE: GstRTSPMethod = GstRTSPMethod::PAUSE;
pub const GST_RTSP_PLAY: GstRTSPMethod = GstRTSPMethod::PLAY;
pub const GST_RTSP_RECORD: GstRTSPMethod = GstRTSPMethod::RECORD;
pub const GST_RTSP_REDIRECT: GstRTSPMethod = GstRTSPMethod::REDIRECT;
pub const GST_RTSP_SETUP: GstRTSPMethod = GstRTSPMethod::SETUP;
pub const GST_RTSP_SET_PARAMETER: GstRTSPMethod = GstRTSPMethod::SET_PARAMETER;
pub const GST_RTSP_TEARDOWN: GstRTSPMethod = GstRTSPMethod::TEARDOWN;
pub const GST_RTSP_GET: GstRTSPMethod = GstRTSPMethod::GET;
pub const GST_RTSP_POST: GstRTSPMethod = GstRTSPMethod::POST;
bitflags! {
#[repr(C)]
pub struct GstRTSPProfile: c_uint {
const UNKNOWN = 0;
const AVP = 1;
const SAVP = 2;
const AVPF = 4;
const SAVPF = 8;
}
}
pub const GST_RTSP_PROFILE_UNKNOWN: GstRTSPProfile = GstRTSPProfile::UNKNOWN;
pub const GST_RTSP_PROFILE_AVP: GstRTSPProfile = GstRTSPProfile::AVP;
pub const GST_RTSP_PROFILE_SAVP: GstRTSPProfile = GstRTSPProfile::SAVP;
pub const GST_RTSP_PROFILE_AVPF: GstRTSPProfile = GstRTSPProfile::AVPF;
pub const GST_RTSP_PROFILE_SAVPF: GstRTSPProfile = GstRTSPProfile::SAVPF;
bitflags! {
#[repr(C)]
pub struct GstRTSPTransMode: c_uint {
const UNKNOWN = 0;
const RTP = 1;
const RDT = 2;
}
}
pub const GST_RTSP_TRANS_UNKNOWN: GstRTSPTransMode = GstRTSPTransMode::UNKNOWN;
pub const GST_RTSP_TRANS_RTP: GstRTSPTransMode = GstRTSPTransMode::RTP;
pub const GST_RTSP_TRANS_RDT: GstRTSPTransMode = GstRTSPTransMode::RDT;
// Unions
#[repr(C)]
#[derive(Copy, Clone)]
pub union GstRTSPMessage_type_data {
pub request: GstRTSPMessage_type_data_request,
pub response: GstRTSPMessage_type_data_response,
pub data: GstRTSPMessage_type_data_data,
}
impl ::std::fmt::Debug for GstRTSPMessage_type_data {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPMessage_type_data @ {:?}", self as *const _))
.field("request", unsafe { &self.request })
.field("response", unsafe { &self.response })
.field("data", unsafe { &self.data })
.finish()
}
}
// Records
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPAuthCredential {
pub scheme: GstRTSPAuthMethod,
pub params: *mut *mut GstRTSPAuthParam,
pub authorization: *mut c_char,
}
impl ::std::fmt::Debug for GstRTSPAuthCredential {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPAuthCredential @ {:?}", self as *const _))
.field("scheme", &self.scheme)
.field("params", &self.params)
.field("authorization", &self.authorization)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPAuthParam {
pub name: *mut c_char,
pub value: *mut c_char,
}
impl ::std::fmt::Debug for GstRTSPAuthParam {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPAuthParam @ {:?}", self as *const _))
.field("name", &self.name)
.field("value", &self.value)
.finish()
}
}
#[repr(C)]
pub struct GstRTSPConnection(c_void);
impl ::std::fmt::Debug for GstRTSPConnection {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPConnection @ {:?}", self as *const _))
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPExtensionInterface {
pub parent: gobject::GTypeInterface,
pub detect_server: Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut GstRTSPMessage) -> gboolean>,
pub before_send: Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut GstRTSPMessage) -> GstRTSPResult>,
pub after_send: Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut GstRTSPMessage, *mut GstRTSPMessage) -> GstRTSPResult>,
pub parse_sdp: Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut gst_sdp::GstSDPMessage, *mut gst::GstStructure) -> GstRTSPResult>,
pub setup_media: Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut gst_sdp::GstSDPMedia) -> GstRTSPResult>,
pub configure_stream: Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut gst::GstCaps) -> gboolean>,
pub get_transports: Option<unsafe extern "C" fn(*mut GstRTSPExtension, GstRTSPLowerTrans, *mut *mut c_char) -> GstRTSPResult>,
pub stream_select: Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut GstRTSPUrl) -> GstRTSPResult>,
pub send: Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut GstRTSPMessage, *mut GstRTSPMessage) -> GstRTSPResult>,
pub receive_request: Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut GstRTSPMessage) -> GstRTSPResult>,
pub _gst_reserved: [gpointer; 4],
}
impl ::std::fmt::Debug for GstRTSPExtensionInterface {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPExtensionInterface @ {:?}", self as *const _))
.field("parent", &self.parent)
.field("detect_server", &self.detect_server)
.field("before_send", &self.before_send)
.field("after_send", &self.after_send)
.field("parse_sdp", &self.parse_sdp)
.field("setup_media", &self.setup_media)
.field("configure_stream", &self.configure_stream)
.field("get_transports", &self.get_transports)
.field("stream_select", &self.stream_select)
.field("send", &self.send)
.field("receive_request", &self.receive_request)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPMessage {
pub type_: GstRTSPMsgType,
pub type_data: GstRTSPMessage_type_data,
pub hdr_fields: *mut glib::GArray,
pub body: *mut u8,
pub body_size: c_uint,
pub _gst_reserved: [gpointer; 4],
}
impl ::std::fmt::Debug for GstRTSPMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPMessage @ {:?}", self as *const _))
.field("type_", &self.type_)
.field("type_data", &self.type_data)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPMessage_type_data_data {
pub channel: u8,
}
impl ::std::fmt::Debug for GstRTSPMessage_type_data_data {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPMessage_type_data_data @ {:?}", self as *const _))
.field("channel", &self.channel)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPMessage_type_data_request {
pub method: GstRTSPMethod,
pub uri: *mut c_char,
pub version: GstRTSPVersion,
}
impl ::std::fmt::Debug for GstRTSPMessage_type_data_request {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPMessage_type_data_request @ {:?}", self as *const _))
.field("method", &self.method)
.field("uri", &self.uri)
.field("version", &self.version)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPMessage_type_data_response {
pub code: GstRTSPStatusCode,
pub reason: *mut c_char,
pub version: GstRTSPVersion,
}
impl ::std::fmt::Debug for GstRTSPMessage_type_data_response {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPMessage_type_data_response @ {:?}", self as *const _))
.field("code", &self.code)
.field("reason", &self.reason)
.field("version", &self.version)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPRange {
pub min: c_int,
pub max: c_int,
}
impl ::std::fmt::Debug for GstRTSPRange {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPRange @ {:?}", self as *const _))
.field("min", &self.min)
.field("max", &self.max)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPTime {
pub type_: GstRTSPTimeType,
pub seconds: c_double,
}
impl ::std::fmt::Debug for GstRTSPTime {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPTime @ {:?}", self as *const _))
.field("type_", &self.type_)
.field("seconds", &self.seconds)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPTime2 {
pub frames: c_double,
pub year: c_uint,
pub month: c_uint,
pub day: c_uint,
}
impl ::std::fmt::Debug for GstRTSPTime2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPTime2 @ {:?}", self as *const _))
.field("frames", &self.frames)
.field("year", &self.year)
.field("month", &self.month)
.field("day", &self.day)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPTimeRange {
pub unit: GstRTSPRangeUnit,
pub min: GstRTSPTime,
pub max: GstRTSPTime,
pub min2: GstRTSPTime2,
pub max2: GstRTSPTime2,
}
impl ::std::fmt::Debug for GstRTSPTimeRange {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPTimeRange @ {:?}", self as *const _))
.field("unit", &self.unit)
.field("min", &self.min)
.field("max", &self.max)
.field("min2", &self.min2)
.field("max2", &self.max2)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPTransport {
pub trans: GstRTSPTransMode,
pub profile: GstRTSPProfile,
pub lower_transport: GstRTSPLowerTrans,
pub destination: *mut c_char,
pub source: *mut c_char,
pub layers: c_uint,
pub mode_play: gboolean,
pub mode_record: gboolean,
pub append: gboolean,
pub interleaved: GstRTSPRange,
pub ttl: c_uint,
pub port: GstRTSPRange,
pub client_port: GstRTSPRange,
pub server_port: GstRTSPRange,
pub ssrc: c_uint,
pub _gst_reserved: [gpointer; 4],
}
impl ::std::fmt::Debug for GstRTSPTransport {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPTransport @ {:?}", self as *const _))
.field("trans", &self.trans)
.field("profile", &self.profile)
.field("lower_transport", &self.lower_transport)
.field("destination", &self.destination)
.field("source", &self.source)
.field("layers", &self.layers)
.field("mode_play", &self.mode_play)
.field("mode_record", &self.mode_record)
.field("append", &self.append)
.field("interleaved", &self.interleaved)
.field("ttl", &self.ttl)
.field("port", &self.port)
.field("client_port", &self.client_port)
.field("server_port", &self.server_port)
.field("ssrc", &self.ssrc)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPUrl {
pub transports: GstRTSPLowerTrans,
pub family: GstRTSPFamily,
pub user: *mut c_char,
pub passwd: *mut c_char,
pub host: *mut c_char,
pub port: u16,
pub abspath: *mut c_char,
pub query: *mut c_char,
}
impl ::std::fmt::Debug for GstRTSPUrl {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPUrl @ {:?}", self as *const _))
.field("transports", &self.transports)
.field("family", &self.family)
.field("user", &self.user)
.field("passwd", &self.passwd)
.field("host", &self.host)
.field("port", &self.port)
.field("abspath", &self.abspath)
.field("query", &self.query)
.finish()
}
}
#[repr(C)]
pub struct GstRTSPWatch(c_void);
impl ::std::fmt::Debug for GstRTSPWatch {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPWatch @ {:?}", self as *const _))
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstRTSPWatchFuncs {
pub message_received: Option<unsafe extern "C" fn(*mut GstRTSPWatch, *mut GstRTSPMessage, gpointer) -> GstRTSPResult>,
pub message_sent: Option<unsafe extern "C" fn(*mut GstRTSPWatch, c_uint, gpointer) -> GstRTSPResult>,
pub closed: Option<unsafe extern "C" fn(*mut GstRTSPWatch, gpointer) -> GstRTSPResult>,
pub error: Option<unsafe extern "C" fn(*mut GstRTSPWatch, GstRTSPResult, gpointer) -> GstRTSPResult>,
pub tunnel_start: Option<unsafe extern "C" fn(*mut GstRTSPWatch, gpointer) -> GstRTSPStatusCode>,
pub tunnel_complete: Option<unsafe extern "C" fn(*mut GstRTSPWatch, gpointer) -> GstRTSPResult>,
pub error_full: Option<unsafe extern "C" fn(*mut GstRTSPWatch, GstRTSPResult, *mut GstRTSPMessage, c_uint, gpointer) -> GstRTSPResult>,
pub tunnel_lost: Option<unsafe extern "C" fn(*mut GstRTSPWatch, gpointer) -> GstRTSPResult>,
pub tunnel_http_response: Option<unsafe extern "C" fn(*mut GstRTSPWatch, *mut GstRTSPMessage, *mut GstRTSPMessage, gpointer) -> GstRTSPResult>,
pub _gst_reserved: [gpointer; 3],
}
impl ::std::fmt::Debug for GstRTSPWatchFuncs {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstRTSPWatchFuncs @ {:?}", self as *const _))
.field("message_received", &self.message_received)
.field("message_sent", &self.message_sent)
.field("closed", &self.closed)
.field("error", &self.error)
.field("tunnel_start", &self.tunnel_start)
.field("tunnel_complete", &self.tunnel_complete)
.field("error_full", &self.error_full)
.field("tunnel_lost", &self.tunnel_lost)
.field("tunnel_http_response", &self.tunnel_http_response)
.finish()
}
}
// Interfaces
#[repr(C)]
pub struct GstRTSPExtension(c_void);
impl ::std::fmt::Debug for GstRTSPExtension {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "GstRTSPExtension @ {:?}", self as *const _)
}
}
extern "C" {
//=========================================================================
// GstRTSPAuthMethod
//=========================================================================
pub fn gst_rtsp_auth_method_get_type() -> GType;
//=========================================================================
// GstRTSPFamily
//=========================================================================
pub fn gst_rtsp_family_get_type() -> GType;
//=========================================================================
// GstRTSPHeaderField
//=========================================================================
pub fn gst_rtsp_header_field_get_type() -> GType;
//=========================================================================
// GstRTSPMsgType
//=========================================================================
pub fn gst_rtsp_msg_type_get_type() -> GType;
//=========================================================================
// GstRTSPRangeUnit
//=========================================================================
pub fn gst_rtsp_range_unit_get_type() -> GType;
//=========================================================================
// GstRTSPResult
//=========================================================================
pub fn gst_rtsp_result_get_type() -> GType;
//=========================================================================
// GstRTSPState
//=========================================================================
pub fn gst_rtsp_state_get_type() -> GType;
//=========================================================================
// GstRTSPStatusCode
//=========================================================================
pub fn gst_rtsp_status_code_get_type() -> GType;
//=========================================================================
// GstRTSPTimeType
//=========================================================================
pub fn gst_rtsp_time_type_get_type() -> GType;
//=========================================================================
// GstRTSPVersion
//=========================================================================
pub fn gst_rtsp_version_get_type() -> GType;
pub fn gst_rtsp_version_as_text(version: GstRTSPVersion) -> *const c_char;
//=========================================================================
// GstRTSPEvent
//=========================================================================
pub fn gst_rtsp_event_get_type() -> GType;
//=========================================================================
// GstRTSPLowerTrans
//=========================================================================
pub fn gst_rtsp_lower_trans_get_type() -> GType;
//=========================================================================
// GstRTSPMethod
//=========================================================================
pub fn gst_rtsp_method_get_type() -> GType;
pub fn gst_rtsp_method_as_text(method: GstRTSPMethod) -> *const c_char;
//=========================================================================
// GstRTSPProfile
//=========================================================================
pub fn gst_rtsp_profile_get_type() -> GType;
//=========================================================================
// GstRTSPTransMode
//=========================================================================
pub fn gst_rtsp_trans_mode_get_type() -> GType;
//=========================================================================
// GstRTSPAuthCredential
//=========================================================================
pub fn gst_rtsp_auth_credential_get_type() -> GType;
//=========================================================================
// GstRTSPAuthParam
//=========================================================================
pub fn gst_rtsp_auth_param_get_type() -> GType;
pub fn gst_rtsp_auth_param_copy(param: *mut GstRTSPAuthParam) -> *mut GstRTSPAuthParam;
pub fn gst_rtsp_auth_param_free(param: *mut GstRTSPAuthParam);
//=========================================================================
// GstRTSPConnection
//=========================================================================
pub fn gst_rtsp_connection_clear_auth_params(conn: *mut GstRTSPConnection);
pub fn gst_rtsp_connection_close(conn: *mut GstRTSPConnection) -> GstRTSPResult;
pub fn gst_rtsp_connection_connect(conn: *mut GstRTSPConnection, timeout: *mut glib::GTimeVal) -> GstRTSPResult;
pub fn gst_rtsp_connection_connect_with_response(conn: *mut GstRTSPConnection, timeout: *mut glib::GTimeVal, response: *mut GstRTSPMessage) -> GstRTSPResult;
pub fn gst_rtsp_connection_do_tunnel(conn: *mut GstRTSPConnection, conn2: *mut GstRTSPConnection) -> GstRTSPResult;
pub fn gst_rtsp_connection_flush(conn: *mut GstRTSPConnection, flush: gboolean) -> GstRTSPResult;
pub fn gst_rtsp_connection_free(conn: *mut GstRTSPConnection) -> GstRTSPResult;
pub fn gst_rtsp_connection_get_ip(conn: *const GstRTSPConnection) -> *const c_char;
pub fn gst_rtsp_connection_get_read_socket(conn: *const GstRTSPConnection) -> *mut gio::GSocket;
pub fn gst_rtsp_connection_get_remember_session_id(conn: *mut GstRTSPConnection) -> gboolean;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_rtsp_connection_get_tls(conn: *mut GstRTSPConnection, error: *mut *mut glib::GError) -> *mut gio::GTlsConnection;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_rtsp_connection_get_tls_database(conn: *mut GstRTSPConnection) -> *mut gio::GTlsDatabase;
#[cfg(any(feature = "v1_6", feature = "dox"))]
pub fn gst_rtsp_connection_get_tls_interaction(conn: *mut GstRTSPConnection) -> *mut gio::GTlsInteraction;
#[cfg(any(feature = "v1_2_1", feature = "dox"))]
pub fn gst_rtsp_connection_get_tls_validation_flags(conn: *mut GstRTSPConnection) -> gio::GTlsCertificateFlags;
pub fn gst_rtsp_connection_get_tunnelid(conn: *const GstRTSPConnection) -> *const c_char;
pub fn gst_rtsp_connection_get_url(conn: *const GstRTSPConnection) -> *mut GstRTSPUrl;
pub fn gst_rtsp_connection_get_write_socket(conn: *const GstRTSPConnection) -> *mut gio::GSocket;
pub fn gst_rtsp_connection_is_tunneled(conn: *const GstRTSPConnection) -> gboolean;
pub fn gst_rtsp_connection_next_timeout(conn: *mut GstRTSPConnection, timeout: *mut glib::GTimeVal) -> GstRTSPResult;
pub fn gst_rtsp_connection_poll(conn: *mut GstRTSPConnection, events: GstRTSPEvent, revents: *mut GstRTSPEvent, timeout: *mut glib::GTimeVal) -> GstRTSPResult;
pub fn gst_rtsp_connection_read(conn: *mut GstRTSPConnection, data: *mut u8, size: c_uint, timeout: *mut glib::GTimeVal) -> GstRTSPResult;
pub fn gst_rtsp_connection_receive(conn: *mut GstRTSPConnection, message: *mut GstRTSPMessage, timeout: *mut glib::GTimeVal) -> GstRTSPResult;
pub fn gst_rtsp_connection_reset_timeout(conn: *mut GstRTSPConnection) -> GstRTSPResult;
pub fn gst_rtsp_connection_send(conn: *mut GstRTSPConnection, message: *mut GstRTSPMessage, timeout: *mut glib::GTimeVal) -> GstRTSPResult;
pub fn gst_rtsp_connection_set_auth(conn: *mut GstRTSPConnection, method: GstRTSPAuthMethod, user: *const c_char, pass: *const c_char) -> GstRTSPResult;
pub fn gst_rtsp_connection_set_auth_param(conn: *mut GstRTSPConnection, param: *const c_char, value: *const c_char);
pub fn gst_rtsp_connection_set_http_mode(conn: *mut GstRTSPConnection, enable: gboolean);
pub fn gst_rtsp_connection_set_ip(conn: *mut GstRTSPConnection, ip: *const c_char);
pub fn gst_rtsp_connection_set_proxy(conn: *mut GstRTSPConnection, host: *const c_char, port: c_uint) -> GstRTSPResult;
pub fn gst_rtsp_connection_set_qos_dscp(conn: *mut GstRTSPConnection, qos_dscp: c_uint) -> GstRTSPResult;
pub fn gst_rtsp_connection_set_remember_session_id(conn: *mut GstRTSPConnection, remember: gboolean);
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_rtsp_connection_set_tls_database(conn: *mut GstRTSPConnection, database: *mut gio::GTlsDatabase);
#[cfg(any(feature = "v1_6", feature = "dox"))]
pub fn gst_rtsp_connection_set_tls_interaction(conn: *mut GstRTSPConnection, interaction: *mut gio::GTlsInteraction);
#[cfg(any(feature = "v1_2_1", feature = "dox"))]
pub fn gst_rtsp_connection_set_tls_validation_flags(conn: *mut GstRTSPConnection, flags: gio::GTlsCertificateFlags) -> gboolean;
pub fn gst_rtsp_connection_set_tunneled(conn: *mut GstRTSPConnection, tunneled: gboolean);
pub fn gst_rtsp_connection_write(conn: *mut GstRTSPConnection, data: *const u8, size: c_uint, timeout: *mut glib::GTimeVal) -> GstRTSPResult;
pub fn gst_rtsp_connection_accept(socket: *mut gio::GSocket, conn: *mut *mut GstRTSPConnection, cancellable: *mut gio::GCancellable) -> GstRTSPResult;
pub fn gst_rtsp_connection_create(url: *const GstRTSPUrl, conn: *mut *mut GstRTSPConnection) -> GstRTSPResult;
pub fn gst_rtsp_connection_create_from_socket(socket: *mut gio::GSocket, ip: *const c_char, port: u16, initial_buffer: *const c_char, conn: *mut *mut GstRTSPConnection) -> GstRTSPResult;
//=========================================================================
// GstRTSPMessage
//=========================================================================
pub fn gst_rtsp_message_add_header(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField, value: *const c_char) -> GstRTSPResult;
#[cfg(any(feature = "v1_6", feature = "dox"))]
pub fn gst_rtsp_message_add_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, value: *const c_char) -> GstRTSPResult;
pub fn gst_rtsp_message_append_headers(msg: *const GstRTSPMessage, str: *mut glib::GString) -> GstRTSPResult;
pub fn gst_rtsp_message_dump(msg: *mut GstRTSPMessage) -> GstRTSPResult;
pub fn gst_rtsp_message_free(msg: *mut GstRTSPMessage) -> GstRTSPResult;
pub fn gst_rtsp_message_get_body(msg: *const GstRTSPMessage, data: *mut *mut u8, size: *mut c_uint) -> GstRTSPResult;
pub fn gst_rtsp_message_get_header(msg: *const GstRTSPMessage, field: GstRTSPHeaderField, value: *mut *mut c_char, indx: c_int) -> GstRTSPResult;
#[cfg(any(feature = "v1_6", feature = "dox"))]
pub fn gst_rtsp_message_get_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, value: *mut *mut c_char, index: c_int) -> GstRTSPResult;
pub fn gst_rtsp_message_get_type(msg: *mut GstRTSPMessage) -> GstRTSPMsgType;
pub fn gst_rtsp_message_init(msg: *mut GstRTSPMessage) -> GstRTSPResult;
pub fn gst_rtsp_message_init_data(msg: *mut GstRTSPMessage, channel: u8) -> GstRTSPResult;
pub fn gst_rtsp_message_init_request(msg: *mut GstRTSPMessage, method: GstRTSPMethod, uri: *const c_char) -> GstRTSPResult;
pub fn gst_rtsp_message_init_response(msg: *mut GstRTSPMessage, code: GstRTSPStatusCode, reason: *const c_char, request: *const GstRTSPMessage) -> GstRTSPResult;
#[cfg(any(feature = "v1_12", feature = "dox"))]
pub fn gst_rtsp_message_parse_auth_credentials(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField) -> *mut *mut GstRTSPAuthCredential;
pub fn gst_rtsp_message_parse_data(msg: *mut GstRTSPMessage, channel: *mut u8) -> GstRTSPResult;
pub fn gst_rtsp_message_parse_request(msg: *mut GstRTSPMessage, method: *mut GstRTSPMethod, uri: *mut *const c_char, version: *mut GstRTSPVersion) -> GstRTSPResult;
pub fn gst_rtsp_message_parse_response(msg: *mut GstRTSPMessage, code: *mut GstRTSPStatusCode, reason: *mut *const c_char, version: *mut GstRTSPVersion) -> GstRTSPResult;
pub fn gst_rtsp_message_remove_header(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField, indx: c_int) -> GstRTSPResult;
#[cfg(any(feature = "v1_6", feature = "dox"))]
pub fn gst_rtsp_message_remove_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, index: c_int) -> GstRTSPResult;
pub fn gst_rtsp_message_set_body(msg: *mut GstRTSPMessage, data: *mut u8, size: c_uint) -> GstRTSPResult;
pub fn gst_rtsp_message_steal_body(msg: *mut GstRTSPMessage, data: *mut *mut u8, size: *mut c_uint) -> GstRTSPResult;
pub fn gst_rtsp_message_take_body(msg: *mut GstRTSPMessage, data: *mut u8, size: c_uint) -> GstRTSPResult;
pub fn gst_rtsp_message_take_header(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField, value: *mut c_char) -> GstRTSPResult;
#[cfg(any(feature = "v1_6", feature = "dox"))]
pub fn gst_rtsp_message_take_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, value: *mut c_char) -> GstRTSPResult;
pub fn gst_rtsp_message_unset(msg: *mut GstRTSPMessage) -> GstRTSPResult;
pub fn gst_rtsp_message_new(msg: *mut *mut GstRTSPMessage) -> GstRTSPResult;
pub fn gst_rtsp_message_new_data(msg: *mut *mut GstRTSPMessage, channel: u8) -> GstRTSPResult;
pub fn gst_rtsp_message_new_request(msg: *mut *mut GstRTSPMessage, method: GstRTSPMethod, uri: *const c_char) -> GstRTSPResult;
pub fn gst_rtsp_message_new_response(msg: *mut *mut GstRTSPMessage, code: GstRTSPStatusCode, reason: *const c_char, request: *const GstRTSPMessage) -> GstRTSPResult;
//=========================================================================
// GstRTSPRange
//=========================================================================
pub fn gst_rtsp_range_convert_units(range: *mut GstRTSPTimeRange, unit: GstRTSPRangeUnit) -> gboolean;
pub fn gst_rtsp_range_free(range: *mut GstRTSPTimeRange);
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_rtsp_range_get_times(range: *const GstRTSPTimeRange, min: *mut gst::GstClockTime, max: *mut gst::GstClockTime) -> gboolean;
pub fn gst_rtsp_range_parse(rangestr: *const c_char, range: *mut *mut GstRTSPTimeRange) -> GstRTSPResult;
pub fn gst_rtsp_range_to_string(range: *const GstRTSPTimeRange) -> *mut c_char;
//=========================================================================
// GstRTSPTransport
//=========================================================================
pub fn gst_rtsp_transport_as_text(transport: *mut GstRTSPTransport) -> *mut c_char;
pub fn gst_rtsp_transport_free(transport: *mut GstRTSPTransport) -> GstRTSPResult;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_rtsp_transport_get_media_type(transport: *mut GstRTSPTransport, media_type: *mut *const c_char) -> GstRTSPResult;
pub fn gst_rtsp_transport_init(transport: *mut GstRTSPTransport) -> GstRTSPResult;
pub fn gst_rtsp_transport_get_manager(trans: GstRTSPTransMode, manager: *mut *const c_char, option: c_uint) -> GstRTSPResult;
pub fn gst_rtsp_transport_get_mime(trans: GstRTSPTransMode, mime: *mut *const c_char) -> GstRTSPResult;
pub fn gst_rtsp_transport_new(transport: *mut *mut GstRTSPTransport) -> GstRTSPResult;
pub fn gst_rtsp_transport_parse(str: *const c_char, transport: *mut GstRTSPTransport) -> GstRTSPResult;
//=========================================================================
// GstRTSPUrl
//=========================================================================
pub fn gst_rtsp_url_get_type() -> GType;
pub fn gst_rtsp_url_copy(url: *const GstRTSPUrl) -> *mut GstRTSPUrl;
pub fn gst_rtsp_url_decode_path_components(url: *const GstRTSPUrl) -> *mut *mut c_char;
pub fn gst_rtsp_url_free(url: *mut GstRTSPUrl);
pub fn gst_rtsp_url_get_port(url: *const GstRTSPUrl, port: *mut u16) -> GstRTSPResult;
pub fn gst_rtsp_url_get_request_uri(url: *const GstRTSPUrl) -> *mut c_char;
pub fn gst_rtsp_url_set_port(url: *mut GstRTSPUrl, port: u16) -> GstRTSPResult;
pub fn gst_rtsp_url_parse(urlstr: *const c_char, url: *mut *mut GstRTSPUrl) -> GstRTSPResult;
//=========================================================================
// GstRTSPWatch
//=========================================================================
pub fn gst_rtsp_watch_attach(watch: *mut GstRTSPWatch, context: *mut glib::GMainContext) -> c_uint;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_rtsp_watch_get_send_backlog(watch: *mut GstRTSPWatch, bytes: *mut size_t, messages: *mut c_uint);
pub fn gst_rtsp_watch_reset(watch: *mut GstRTSPWatch);
pub fn gst_rtsp_watch_send_message(watch: *mut GstRTSPWatch, message: *mut GstRTSPMessage, id: *mut c_uint) -> GstRTSPResult;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_rtsp_watch_set_flushing(watch: *mut GstRTSPWatch, flushing: gboolean);
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_rtsp_watch_set_send_backlog(watch: *mut GstRTSPWatch, bytes: size_t, messages: c_uint);
pub fn gst_rtsp_watch_unref(watch: *mut GstRTSPWatch);
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_rtsp_watch_wait_backlog(watch: *mut GstRTSPWatch, timeout: *mut glib::GTimeVal) -> GstRTSPResult;
pub fn gst_rtsp_watch_write_data(watch: *mut GstRTSPWatch, data: *mut u8, size: c_uint, id: *mut c_uint) -> GstRTSPResult;
pub fn gst_rtsp_watch_new(conn: *mut GstRTSPConnection, funcs: *mut GstRTSPWatchFuncs, user_data: gpointer, notify: glib::GDestroyNotify) -> *mut GstRTSPWatch;
//=========================================================================
// GstRTSPExtension
//=========================================================================
pub fn gst_rtsp_extension_get_type() -> GType;
pub fn gst_rtsp_extension_after_send(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage, resp: *mut GstRTSPMessage) -> GstRTSPResult;
pub fn gst_rtsp_extension_before_send(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage) -> GstRTSPResult;
pub fn gst_rtsp_extension_configure_stream(ext: *mut GstRTSPExtension, caps: *mut gst::GstCaps) -> gboolean;
pub fn gst_rtsp_extension_detect_server(ext: *mut GstRTSPExtension, resp: *mut GstRTSPMessage) -> gboolean;
pub fn gst_rtsp_extension_get_transports(ext: *mut GstRTSPExtension, protocols: GstRTSPLowerTrans, transport: *mut *mut c_char) -> GstRTSPResult;
pub fn gst_rtsp_extension_parse_sdp(ext: *mut GstRTSPExtension, sdp: *mut gst_sdp::GstSDPMessage, s: *mut gst::GstStructure) -> GstRTSPResult;
pub fn gst_rtsp_extension_receive_request(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage) -> GstRTSPResult;
pub fn gst_rtsp_extension_send(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage, resp: *mut GstRTSPMessage) -> GstRTSPResult;
pub fn gst_rtsp_extension_setup_media(ext: *mut GstRTSPExtension, media: *mut gst_sdp::GstSDPMedia) -> GstRTSPResult;
pub fn gst_rtsp_extension_stream_select(ext: *mut GstRTSPExtension, url: *mut GstRTSPUrl) -> GstRTSPResult;
//=========================================================================
// Other functions
//=========================================================================
#[cfg(any(feature = "v1_12", feature = "dox"))]
pub fn gst_rtsp_auth_credentials_free(credentials: *mut *mut GstRTSPAuthCredential);
pub fn gst_rtsp_find_header_field(header: *const c_char) -> GstRTSPHeaderField;
pub fn gst_rtsp_find_method(method: *const c_char) -> GstRTSPMethod;
#[cfg(any(feature = "v1_12", feature = "dox"))]
pub fn gst_rtsp_generate_digest_auth_response(algorithm: *const c_char, method: *const c_char, realm: *const c_char, username: *const c_char, password: *const c_char, uri: *const c_char, nonce: *const c_char) -> *mut c_char;
pub fn gst_rtsp_header_allow_multiple(field: GstRTSPHeaderField) -> gboolean;
pub fn gst_rtsp_header_as_text(field: GstRTSPHeaderField) -> *const c_char;
pub fn gst_rtsp_options_as_text(options: GstRTSPMethod) -> *mut c_char;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_rtsp_options_from_text(options: *const c_char) -> GstRTSPMethod;
pub fn gst_rtsp_status_as_text(code: GstRTSPStatusCode) -> *const c_char;
pub fn gst_rtsp_strresult(result: GstRTSPResult) -> *mut c_char;
}

View file

@ -0,0 +1,78 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),
specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field).
## [0.4.0] - 2017-12-23
### Added
- GstNet bindings
- Debug impls for basically every type
- Script to automatically regenerate everything
### Changed
- gst_player_[sg]et_multiview_mode() argument types were changed from
GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset
of the former that is allowed here
- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead
of *mut *const c_char
## [0.3.0] - 2017-11-26
### Added
- GstMpegTs bindings
### Changed
- GstDebugColorFlags from an enum to a bitfield
- Updated to bitflags 1.0
- Added support for the "dox" feature to generate documentation for all
possible versions
- Depend on glib-sys/gobject-sys 0.5
### Fixes
- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since
1.12 and 1.12.1 respectively
- All C enums are represented as integers + constants now to prevent undefined
behaviour when out-of-range values are received
## [0.2.1] - 2017-09-10
### Changed
- Add README.md to all crates directly
### Fixed
- Fix various compiler warnings
- Fix versioning/feature mess. Now each library has features for all major
versions and for the correct minor versions that added API.
- Removed Cargo.lock from GIT
## [0.2.0] - 2017-08-28
### Added
- Add GstPlayer bindings
### Changed
- Depend on bitflags 0.9
- Update GIR files to 1.12.1 release
- Fix various errors in the GIR files, backported from GStreamer GIT master
- Depend on gobject-sys/glib-sys 0.4.0 for various improvements
- Regenerated everything with latest GIR
## [0.1.1] - 2017-05-10
### Added
- Add GstTag and GstApp bindings
- Add lots of missing fields to all the structs thanks to GIR improvements
### Changed
- Update GIR files to 1.12.0 release
- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs
- Regenerated everything with latest GIR
## [0.1.0] - 2017-04-09
- Initial release of the autogenerated GStreamer FFI bindings.
[Unreleased]: https://github.com/sdroege/gstreamer-sys/compare/0.4.0...HEAD
[0.4.0]: https://github.com/sdroege/gstreamer-sys/compare/0.3.0...0.4.0
[0.3.0]: https://github.com/sdroege/gstreamer-sys/compare/0.2.1...0.3.0
[0.2.1]: https://github.com/sdroege/gstreamer-sys/compare/0.2.0...0.2.1
[0.2.0]: https://github.com/sdroege/gstreamer-sys/compare/0.1.1...0.2.0
[0.1.1]: https://github.com/sdroege/gstreamer-sys/compare/0.1.0...0.1.1

View file

@ -0,0 +1,44 @@
[build-dependencies]
pkg-config = "0.3.7"
[dependencies]
bitflags = "1.0"
libc = "0.2"
[dependencies.glib-sys]
git = "https://github.com/gtk-rs/sys"
[dependencies.gobject-sys]
git = "https://github.com/gtk-rs/sys"
[dependencies.gstreamer-sys]
path = "../gstreamer-sys"
[features]
dox = []
v1_2 = []
v1_4 = ["v1_2"]
v1_6 = ["v1_4"]
v1_8 = ["v1_4"]
v1_8_1 = ["v1_8"]
v1_10 = ["v1_8_1"]
v1_12 = ["v1_10"]
[lib]
name = "gstreamer_sdp_sys"
[package]
build = "build.rs"
links = "gstsdp-1.0"
name = "gstreamer-sdp-sys"
version = "0.5.0"
authors = ["Mathieu Duponchelle <mathieu@centricular.com>"]
description = "FFI bindings to libgstsdp-1.0"
homepage = "https://gstreamer.freedesktop.org"
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
repository = "https://github.com/sdroege/gstreamer-sys"
license = "MIT"
readme = "README.md"
[badges]
travis-ci = { repository = "sdroege/gstreamer-sys", branch = "master" }

23
gstreamer-sdp-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,31 @@
# gstreamer-sdp-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sys.svg)](https://crates.io/crates/gstreamer-sys) [![Build Status](https://travis-ci.org/sdroege/gstreamer-sys.svg?branch=master)](https://travis-ci.org/sdroege/gstreamer-sys)
[GStreamer](https://gstreamer.freedesktop.org/) (Sdp library) FFI bindings for Rust.
These bindings are providing unsafe FFI API that can be used to interface with
GStreamer. Generally they are meant to be used as the building block for
higher-level abstractions like:
* Application-side bindings for GStreamer: https://github.com/sdroege/gstreamer-rs
* Crate for writing GStreamer plugins in Rust: https://github.com/sdroege/gst-plugin-rs
The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/)
based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/)
API metadata provided by the GStreamer project.
## LICENSE
gstreamer-sys and all crates contained here are licensed under the MIT
license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT).
GStreamer itself is licensed under the Lesser General Public License version
2.1 or (at your option) any later version:
https://www.gnu.org/licenses/lgpl-2.1.html
## Contribution
Any kinds of contributions are welcome as a pull request.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above,
without any additional terms or conditions.

View file

@ -0,0 +1,67 @@
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-sdp-1.0";
let shared_libs = ["gstsdp-1.0"];
let version = if cfg!(feature = "v1_8_1") {
"1.8.1"
} else if cfg!(feature = "v1_8") {
"1.8"
} else if cfg!(feature = "v1_4") {
"1.4"
} 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").expect("TARGET environment variable doesn't exist");
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().expect("library path doesn't exist"));
}
}
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,853 @@
// This file was generated by gir (81a781f) from gir-files (???)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
extern crate libc;
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, intptr_t, uintptr_t, time_t, FILE};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType, Volatile};
// Enums
pub type GstMIKEYCacheType = c_int;
pub const GST_MIKEY_CACHE_NONE: GstMIKEYCacheType = 0;
pub const GST_MIKEY_CACHE_ALWAYS: GstMIKEYCacheType = 1;
pub const GST_MIKEY_CACHE_FOR_CSB: GstMIKEYCacheType = 2;
pub type GstMIKEYEncAlg = c_int;
pub const GST_MIKEY_ENC_NULL: GstMIKEYEncAlg = 0;
pub const GST_MIKEY_ENC_AES_CM_128: GstMIKEYEncAlg = 1;
pub const GST_MIKEY_ENC_AES_KW_128: GstMIKEYEncAlg = 2;
pub type GstMIKEYKVType = c_int;
pub const GST_MIKEY_KV_NULL: GstMIKEYKVType = 0;
pub const GST_MIKEY_KV_SPI: GstMIKEYKVType = 1;
pub const GST_MIKEY_KV_INTERVAL: GstMIKEYKVType = 2;
pub type GstMIKEYKeyDataType = c_int;
pub const GST_MIKEY_KD_TGK: GstMIKEYKeyDataType = 0;
pub const GST_MIKEY_KD_TEK: GstMIKEYKeyDataType = 2;
pub type GstMIKEYMacAlg = c_int;
pub const GST_MIKEY_MAC_NULL: GstMIKEYMacAlg = 0;
pub const GST_MIKEY_MAC_HMAC_SHA_1_160: GstMIKEYMacAlg = 1;
pub type MIKEYMapType = c_int;
pub const GST_MIKEY_MAP_TYPE_SRTP: MIKEYMapType = 0;
pub type GstMIKEYMapType = MIKEYMapType;
pub type MIKEYPRFFunc = c_int;
pub const GST_MIKEY_PRF_MIKEY_1: MIKEYPRFFunc = 0;
pub type GstMIKEYPRFFunc = MIKEYPRFFunc;
pub type GstMIKEYPayloadType = c_int;
pub const GST_MIKEY_PT_LAST: GstMIKEYPayloadType = 0;
pub const GST_MIKEY_PT_KEMAC: GstMIKEYPayloadType = 1;
pub const GST_MIKEY_PT_PKE: GstMIKEYPayloadType = 2;
pub const GST_MIKEY_PT_DH: GstMIKEYPayloadType = 3;
pub const GST_MIKEY_PT_SIGN: GstMIKEYPayloadType = 4;
pub const GST_MIKEY_PT_T: GstMIKEYPayloadType = 5;
pub const GST_MIKEY_PT_ID: GstMIKEYPayloadType = 6;
pub const GST_MIKEY_PT_CERT: GstMIKEYPayloadType = 7;
pub const GST_MIKEY_PT_CHASH: GstMIKEYPayloadType = 8;
pub const GST_MIKEY_PT_V: GstMIKEYPayloadType = 9;
pub const GST_MIKEY_PT_SP: GstMIKEYPayloadType = 10;
pub const GST_MIKEY_PT_RAND: GstMIKEYPayloadType = 11;
pub const GST_MIKEY_PT_ERR: GstMIKEYPayloadType = 12;
pub const GST_MIKEY_PT_KEY_DATA: GstMIKEYPayloadType = 20;
pub const GST_MIKEY_PT_GEN_EXT: GstMIKEYPayloadType = 21;
pub type MIKEYSecProto = c_int;
pub const GST_MIKEY_SEC_PROTO_SRTP: MIKEYSecProto = 0;
pub type GstMIKEYSecProto = MIKEYSecProto;
pub type GstMIKEYSecSRTP = c_int;
pub const GST_MIKEY_SP_SRTP_ENC_ALG: GstMIKEYSecSRTP = 0;
pub const GST_MIKEY_SP_SRTP_ENC_KEY_LEN: GstMIKEYSecSRTP = 1;
pub const GST_MIKEY_SP_SRTP_AUTH_ALG: GstMIKEYSecSRTP = 2;
pub const GST_MIKEY_SP_SRTP_AUTH_KEY_LEN: GstMIKEYSecSRTP = 3;
pub const GST_MIKEY_SP_SRTP_SALT_KEY_LEN: GstMIKEYSecSRTP = 4;
pub const GST_MIKEY_SP_SRTP_PRF: GstMIKEYSecSRTP = 5;
pub const GST_MIKEY_SP_SRTP_KEY_DERIV_RATE: GstMIKEYSecSRTP = 6;
pub const GST_MIKEY_SP_SRTP_SRTP_ENC: GstMIKEYSecSRTP = 7;
pub const GST_MIKEY_SP_SRTP_SRTCP_ENC: GstMIKEYSecSRTP = 8;
pub const GST_MIKEY_SP_SRTP_FEC_ORDER: GstMIKEYSecSRTP = 9;
pub const GST_MIKEY_SP_SRTP_SRTP_AUTH: GstMIKEYSecSRTP = 10;
pub const GST_MIKEY_SP_SRTP_AUTH_TAG_LEN: GstMIKEYSecSRTP = 11;
pub const GST_MIKEY_SP_SRTP_SRTP_PREFIX_LEN: GstMIKEYSecSRTP = 12;
pub type GstMIKEYTSType = c_int;
pub const GST_MIKEY_TS_TYPE_NTP_UTC: GstMIKEYTSType = 0;
pub const GST_MIKEY_TS_TYPE_NTP: GstMIKEYTSType = 1;
pub const GST_MIKEY_TS_TYPE_COUNTER: GstMIKEYTSType = 2;
pub type GstMIKEYType = c_int;
pub const GST_MIKEY_TYPE_INVALID: GstMIKEYType = -1;
pub const GST_MIKEY_TYPE_PSK_INIT: GstMIKEYType = 0;
pub const GST_MIKEY_TYPE_PSK_VERIFY: GstMIKEYType = 1;
pub const GST_MIKEY_TYPE_PK_INIT: GstMIKEYType = 2;
pub const GST_MIKEY_TYPE_PK_VERIFY: GstMIKEYType = 3;
pub const GST_MIKEY_TYPE_DH_INIT: GstMIKEYType = 4;
pub const GST_MIKEY_TYPE_DH_RESP: GstMIKEYType = 5;
pub const GST_MIKEY_TYPE_ERROR: GstMIKEYType = 6;
pub type GstSDPResult = c_int;
pub const GST_SDP_OK: GstSDPResult = 0;
pub const GST_SDP_EINVAL: GstSDPResult = -1;
// Constants
pub const GST_MIKEY_VERSION: c_int = 1;
pub const GST_SDP_BWTYPE_AS: *const c_char = b"AS\0" as *const u8 as *const c_char;
pub const GST_SDP_BWTYPE_CT: *const c_char = b"CT\0" as *const u8 as *const c_char;
pub const GST_SDP_BWTYPE_EXT_PREFIX: *const c_char = b"X-\0" as *const u8 as *const c_char;
pub const GST_SDP_BWTYPE_RR: *const c_char = b"RR\0" as *const u8 as *const c_char;
pub const GST_SDP_BWTYPE_RS: *const c_char = b"RS\0" as *const u8 as *const c_char;
pub const GST_SDP_BWTYPE_TIAS: *const c_char = b"TIAS\0" as *const u8 as *const c_char;
// Records
#[repr(C)]
pub struct GstMIKEYDecryptInfo(c_void);
impl ::std::fmt::Debug for GstMIKEYDecryptInfo {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYDecryptInfo @ {:?}", self as *const _))
.finish()
}
}
#[repr(C)]
pub struct GstMIKEYEncryptInfo(c_void);
impl ::std::fmt::Debug for GstMIKEYEncryptInfo {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYEncryptInfo @ {:?}", self as *const _))
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstMIKEYMapSRTP {
pub policy: u8,
pub ssrc: u32,
pub roc: u32,
}
impl ::std::fmt::Debug for GstMIKEYMapSRTP {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYMapSRTP @ {:?}", self as *const _))
.field("policy", &self.policy)
.field("ssrc", &self.ssrc)
.field("roc", &self.roc)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstMIKEYMessage {
pub mini_object: gst::GstMiniObject,
pub version: u8,
pub type_: GstMIKEYType,
pub V: gboolean,
pub prf_func: GstMIKEYPRFFunc,
pub CSB_id: u32,
pub map_type: GstMIKEYMapType,
pub map_info: *mut glib::GArray,
pub payloads: *mut glib::GArray,
}
impl ::std::fmt::Debug for GstMIKEYMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYMessage @ {:?}", self as *const _))
.field("version", &self.version)
.field("type_", &self.type_)
.field("V", &self.V)
.field("prf_func", &self.prf_func)
.field("CSB_id", &self.CSB_id)
.field("map_type", &self.map_type)
.field("map_info", &self.map_info)
.field("payloads", &self.payloads)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstMIKEYPayload {
pub mini_object: gst::GstMiniObject,
pub type_: GstMIKEYPayloadType,
pub len: c_uint,
}
impl ::std::fmt::Debug for GstMIKEYPayload {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYPayload @ {:?}", self as *const _))
.field("type_", &self.type_)
.field("len", &self.len)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstMIKEYPayloadKEMAC {
pub pt: GstMIKEYPayload,
pub enc_alg: GstMIKEYEncAlg,
pub mac_alg: GstMIKEYMacAlg,
pub subpayloads: *mut glib::GArray,
}
impl ::std::fmt::Debug for GstMIKEYPayloadKEMAC {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYPayloadKEMAC @ {:?}", self as *const _))
.field("pt", &self.pt)
.field("enc_alg", &self.enc_alg)
.field("mac_alg", &self.mac_alg)
.field("subpayloads", &self.subpayloads)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstMIKEYPayloadKeyData {
pub pt: GstMIKEYPayload,
pub key_type: GstMIKEYKeyDataType,
pub key_len: u16,
pub key_data: *mut u8,
pub salt_len: u16,
pub salt_data: *mut u8,
pub kv_type: GstMIKEYKVType,
pub kv_len: [u8; 2],
pub kv_data: [u8; 2],
}
impl ::std::fmt::Debug for GstMIKEYPayloadKeyData {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYPayloadKeyData @ {:?}", self as *const _))
.field("pt", &self.pt)
.field("key_type", &self.key_type)
.field("key_len", &self.key_len)
.field("key_data", &self.key_data)
.field("salt_len", &self.salt_len)
.field("salt_data", &self.salt_data)
.field("kv_type", &self.kv_type)
.field("kv_len", &self.kv_len)
.field("kv_data", &self.kv_data)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstMIKEYPayloadPKE {
pub pt: GstMIKEYPayload,
pub C: GstMIKEYCacheType,
pub data_len: u16,
pub data: *mut u8,
}
impl ::std::fmt::Debug for GstMIKEYPayloadPKE {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYPayloadPKE @ {:?}", self as *const _))
.field("pt", &self.pt)
.field("C", &self.C)
.field("data_len", &self.data_len)
.field("data", &self.data)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstMIKEYPayloadRAND {
pub pt: GstMIKEYPayload,
pub len: u8,
pub rand: *mut u8,
}
impl ::std::fmt::Debug for GstMIKEYPayloadRAND {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYPayloadRAND @ {:?}", self as *const _))
.field("pt", &self.pt)
.field("len", &self.len)
.field("rand", &self.rand)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstMIKEYPayloadSP {
pub pt: GstMIKEYPayload,
pub policy: c_uint,
pub proto: GstMIKEYSecProto,
pub params: *mut glib::GArray,
}
impl ::std::fmt::Debug for GstMIKEYPayloadSP {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYPayloadSP @ {:?}", self as *const _))
.field("pt", &self.pt)
.field("policy", &self.policy)
.field("proto", &self.proto)
.field("params", &self.params)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstMIKEYPayloadSPParam {
pub type_: u8,
pub len: u8,
pub val: *mut u8,
}
impl ::std::fmt::Debug for GstMIKEYPayloadSPParam {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYPayloadSPParam @ {:?}", self as *const _))
.field("type_", &self.type_)
.field("len", &self.len)
.field("val", &self.val)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstMIKEYPayloadT {
pub pt: GstMIKEYPayload,
pub type_: GstMIKEYTSType,
pub ts_value: *mut u8,
}
impl ::std::fmt::Debug for GstMIKEYPayloadT {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstMIKEYPayloadT @ {:?}", self as *const _))
.field("pt", &self.pt)
.field("type_", &self.type_)
.field("ts_value", &self.ts_value)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstSDPAttribute {
pub key: *mut c_char,
pub value: *mut c_char,
}
impl ::std::fmt::Debug for GstSDPAttribute {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstSDPAttribute @ {:?}", self as *const _))
.field("key", &self.key)
.field("value", &self.value)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstSDPBandwidth {
pub bwtype: *mut c_char,
pub bandwidth: c_uint,
}
impl ::std::fmt::Debug for GstSDPBandwidth {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstSDPBandwidth @ {:?}", self as *const _))
.field("bwtype", &self.bwtype)
.field("bandwidth", &self.bandwidth)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstSDPConnection {
pub nettype: *mut c_char,
pub addrtype: *mut c_char,
pub address: *mut c_char,
pub ttl: c_uint,
pub addr_number: c_uint,
}
impl ::std::fmt::Debug for GstSDPConnection {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstSDPConnection @ {:?}", self as *const _))
.field("nettype", &self.nettype)
.field("addrtype", &self.addrtype)
.field("address", &self.address)
.field("ttl", &self.ttl)
.field("addr_number", &self.addr_number)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstSDPKey {
pub type_: *mut c_char,
pub data: *mut c_char,
}
impl ::std::fmt::Debug for GstSDPKey {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstSDPKey @ {:?}", self as *const _))
.field("type_", &self.type_)
.field("data", &self.data)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstSDPMedia {
pub media: *mut c_char,
pub port: c_uint,
pub num_ports: c_uint,
pub proto: *mut c_char,
pub fmts: *mut glib::GArray,
pub information: *mut c_char,
pub connections: *mut glib::GArray,
pub bandwidths: *mut glib::GArray,
pub key: GstSDPKey,
pub attributes: *mut glib::GArray,
}
impl ::std::fmt::Debug for GstSDPMedia {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstSDPMedia @ {:?}", self as *const _))
.field("media", &self.media)
.field("port", &self.port)
.field("num_ports", &self.num_ports)
.field("proto", &self.proto)
.field("fmts", &self.fmts)
.field("information", &self.information)
.field("connections", &self.connections)
.field("bandwidths", &self.bandwidths)
.field("key", &self.key)
.field("attributes", &self.attributes)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstSDPMessage {
pub version: *mut c_char,
pub origin: GstSDPOrigin,
pub session_name: *mut c_char,
pub information: *mut c_char,
pub uri: *mut c_char,
pub emails: *mut glib::GArray,
pub phones: *mut glib::GArray,
pub connection: GstSDPConnection,
pub bandwidths: *mut glib::GArray,
pub times: *mut glib::GArray,
pub zones: *mut glib::GArray,
pub key: GstSDPKey,
pub attributes: *mut glib::GArray,
pub medias: *mut glib::GArray,
}
impl ::std::fmt::Debug for GstSDPMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstSDPMessage @ {:?}", self as *const _))
.field("version", &self.version)
.field("origin", &self.origin)
.field("session_name", &self.session_name)
.field("information", &self.information)
.field("uri", &self.uri)
.field("emails", &self.emails)
.field("phones", &self.phones)
.field("connection", &self.connection)
.field("bandwidths", &self.bandwidths)
.field("times", &self.times)
.field("zones", &self.zones)
.field("key", &self.key)
.field("attributes", &self.attributes)
.field("medias", &self.medias)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstSDPOrigin {
pub username: *mut c_char,
pub sess_id: *mut c_char,
pub sess_version: *mut c_char,
pub nettype: *mut c_char,
pub addrtype: *mut c_char,
pub addr: *mut c_char,
}
impl ::std::fmt::Debug for GstSDPOrigin {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstSDPOrigin @ {:?}", self as *const _))
.field("username", &self.username)
.field("sess_id", &self.sess_id)
.field("sess_version", &self.sess_version)
.field("nettype", &self.nettype)
.field("addrtype", &self.addrtype)
.field("addr", &self.addr)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstSDPTime {
pub start: *mut c_char,
pub stop: *mut c_char,
pub repeat: *mut glib::GArray,
}
impl ::std::fmt::Debug for GstSDPTime {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstSDPTime @ {:?}", self as *const _))
.field("start", &self.start)
.field("stop", &self.stop)
.field("repeat", &self.repeat)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstSDPZone {
pub time: *mut c_char,
pub typed_time: *mut c_char,
}
impl ::std::fmt::Debug for GstSDPZone {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstSDPZone @ {:?}", self as *const _))
.field("time", &self.time)
.field("typed_time", &self.typed_time)
.finish()
}
}
extern "C" {
//=========================================================================
// GstMIKEYMessage
//=========================================================================
pub fn gst_mikey_message_get_type() -> GType;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_new() -> *mut GstMIKEYMessage;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_new_from_bytes(bytes: *mut glib::GBytes, info: *mut GstMIKEYDecryptInfo, error: *mut *mut glib::GError) -> *mut GstMIKEYMessage;
#[cfg(any(feature = "v1_8", feature = "dox"))]
pub fn gst_mikey_message_new_from_caps(caps: *mut gst::GstCaps) -> *mut GstMIKEYMessage;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_new_from_data(data: gconstpointer, size: size_t, info: *mut GstMIKEYDecryptInfo, error: *mut *mut glib::GError) -> *mut GstMIKEYMessage;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_add_cs_srtp(msg: *mut GstMIKEYMessage, policy: u8, ssrc: u32, roc: u32) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_add_payload(msg: *mut GstMIKEYMessage, payload: *mut GstMIKEYPayload) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_add_pke(msg: *mut GstMIKEYMessage, C: GstMIKEYCacheType, data_len: u16, data: *mut u8) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_add_rand(msg: *mut GstMIKEYMessage, len: u8, rand: *mut u8) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_add_rand_len(msg: *mut GstMIKEYMessage, len: u8) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_add_t(msg: *mut GstMIKEYMessage, type_: GstMIKEYTSType, ts_value: *mut u8) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_add_t_now_ntp_utc(msg: *mut GstMIKEYMessage) -> gboolean;
#[cfg(any(feature = "v1_8", feature = "dox"))]
pub fn gst_mikey_message_base64_encode(msg: *mut GstMIKEYMessage) -> *mut c_char;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_find_payload(msg: *const GstMIKEYMessage, type_: GstMIKEYPayloadType, nth: c_uint) -> *const GstMIKEYPayload;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_get_cs_srtp(msg: *const GstMIKEYMessage, idx: c_uint) -> *const GstMIKEYMapSRTP;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_get_n_cs(msg: *const GstMIKEYMessage) -> c_uint;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_get_n_payloads(msg: *const GstMIKEYMessage) -> c_uint;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_get_payload(msg: *const GstMIKEYMessage, idx: c_uint) -> *const GstMIKEYPayload;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_insert_cs_srtp(msg: *mut GstMIKEYMessage, idx: c_int, map: *const GstMIKEYMapSRTP) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_insert_payload(msg: *mut GstMIKEYMessage, idx: c_uint, payload: *mut GstMIKEYPayload) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_remove_cs_srtp(msg: *mut GstMIKEYMessage, idx: c_int) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_remove_payload(msg: *mut GstMIKEYMessage, idx: c_uint) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_replace_cs_srtp(msg: *mut GstMIKEYMessage, idx: c_int, map: *const GstMIKEYMapSRTP) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_replace_payload(msg: *mut GstMIKEYMessage, idx: c_uint, payload: *mut GstMIKEYPayload) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_set_info(msg: *mut GstMIKEYMessage, version: u8, type_: GstMIKEYType, V: gboolean, prf_func: GstMIKEYPRFFunc, CSB_id: u32, map_type: GstMIKEYMapType) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_message_to_bytes(msg: *mut GstMIKEYMessage, info: *mut GstMIKEYEncryptInfo, error: *mut *mut glib::GError) -> *mut glib::GBytes;
#[cfg(any(feature = "v1_8_1", feature = "dox"))]
pub fn gst_mikey_message_to_caps(msg: *const GstMIKEYMessage, caps: *mut gst::GstCaps) -> gboolean;
//=========================================================================
// GstMIKEYPayload
//=========================================================================
pub fn gst_mikey_payload_get_type() -> GType;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_new(type_: GstMIKEYPayloadType) -> *mut GstMIKEYPayload;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_kemac_add_sub(payload: *mut GstMIKEYPayload, newpay: *mut GstMIKEYPayload) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_kemac_get_n_sub(payload: *const GstMIKEYPayload) -> c_uint;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_kemac_get_sub(payload: *const GstMIKEYPayload, idx: c_uint) -> *const GstMIKEYPayload;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_kemac_remove_sub(payload: *mut GstMIKEYPayload, idx: c_uint) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_kemac_set(payload: *mut GstMIKEYPayload, enc_alg: GstMIKEYEncAlg, mac_alg: GstMIKEYMacAlg) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_key_data_set_interval(payload: *mut GstMIKEYPayload, vf_len: u8, vf_data: *mut u8, vt_len: u8, vt_data: *mut u8) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_key_data_set_key(payload: *mut GstMIKEYPayload, key_type: GstMIKEYKeyDataType, key_len: u16, key_data: *mut u8) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_key_data_set_salt(payload: *mut GstMIKEYPayload, salt_len: u16, salt_data: *mut u8) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_key_data_set_spi(payload: *mut GstMIKEYPayload, spi_len: u8, spi_data: *mut u8) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_pke_set(payload: *mut GstMIKEYPayload, C: GstMIKEYCacheType, data_len: u16, data: *mut u8) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_rand_set(payload: *mut GstMIKEYPayload, len: u8, rand: *mut u8) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_sp_add_param(payload: *mut GstMIKEYPayload, type_: u8, len: u8, val: *mut u8) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_sp_get_n_params(payload: *const GstMIKEYPayload) -> c_uint;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_sp_get_param(payload: *const GstMIKEYPayload, idx: c_uint) -> *const GstMIKEYPayloadSPParam;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_sp_remove_param(payload: *mut GstMIKEYPayload, idx: c_uint) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_sp_set(payload: *mut GstMIKEYPayload, policy: c_uint, proto: GstMIKEYSecProto) -> gboolean;
#[cfg(any(feature = "v1_4", feature = "dox"))]
pub fn gst_mikey_payload_t_set(payload: *mut GstMIKEYPayload, type_: GstMIKEYTSType, ts_value: *mut u8) -> gboolean;
//=========================================================================
// GstSDPAttribute
//=========================================================================
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_attribute_clear(attr: *mut GstSDPAttribute) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_attribute_set(attr: *mut GstSDPAttribute, key: *const c_char, value: *const c_char) -> GstSDPResult;
//=========================================================================
// GstSDPBandwidth
//=========================================================================
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_bandwidth_clear(bw: *mut GstSDPBandwidth) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_bandwidth_set(bw: *mut GstSDPBandwidth, bwtype: *const c_char, bandwidth: c_uint) -> GstSDPResult;
//=========================================================================
// GstSDPConnection
//=========================================================================
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_connection_clear(conn: *mut GstSDPConnection) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_connection_set(conn: *mut GstSDPConnection, nettype: *const c_char, addrtype: *const c_char, address: *const c_char, ttl: c_uint, addr_number: c_uint) -> GstSDPResult;
//=========================================================================
// GstSDPMedia
//=========================================================================
pub fn gst_sdp_media_add_attribute(media: *mut GstSDPMedia, key: *const c_char, value: *const c_char) -> GstSDPResult;
pub fn gst_sdp_media_add_bandwidth(media: *mut GstSDPMedia, bwtype: *const c_char, bandwidth: c_uint) -> GstSDPResult;
pub fn gst_sdp_media_add_connection(media: *mut GstSDPMedia, nettype: *const c_char, addrtype: *const c_char, address: *const c_char, ttl: c_uint, addr_number: c_uint) -> GstSDPResult;
pub fn gst_sdp_media_add_format(media: *mut GstSDPMedia, format: *const c_char) -> GstSDPResult;
pub fn gst_sdp_media_as_text(media: *const GstSDPMedia) -> *mut c_char;
pub fn gst_sdp_media_attributes_len(media: *const GstSDPMedia) -> c_uint;
#[cfg(any(feature = "v1_8", feature = "dox"))]
pub fn gst_sdp_media_attributes_to_caps(media: *const GstSDPMedia, caps: *mut gst::GstCaps) -> GstSDPResult;
pub fn gst_sdp_media_bandwidths_len(media: *const GstSDPMedia) -> c_uint;
pub fn gst_sdp_media_connections_len(media: *const GstSDPMedia) -> c_uint;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_copy(media: *const GstSDPMedia, copy: *mut *mut GstSDPMedia) -> GstSDPResult;
pub fn gst_sdp_media_formats_len(media: *const GstSDPMedia) -> c_uint;
pub fn gst_sdp_media_free(media: *mut GstSDPMedia) -> GstSDPResult;
pub fn gst_sdp_media_get_attribute(media: *const GstSDPMedia, idx: c_uint) -> *const GstSDPAttribute;
pub fn gst_sdp_media_get_attribute_val(media: *const GstSDPMedia, key: *const c_char) -> *const c_char;
pub fn gst_sdp_media_get_attribute_val_n(media: *const GstSDPMedia, key: *const c_char, nth: c_uint) -> *const c_char;
pub fn gst_sdp_media_get_bandwidth(media: *const GstSDPMedia, idx: c_uint) -> *const GstSDPBandwidth;
#[cfg(any(feature = "v1_8", feature = "dox"))]
pub fn gst_sdp_media_get_caps_from_media(media: *const GstSDPMedia, pt: c_int) -> *mut gst::GstCaps;
pub fn gst_sdp_media_get_connection(media: *const GstSDPMedia, idx: c_uint) -> *const GstSDPConnection;
pub fn gst_sdp_media_get_format(media: *const GstSDPMedia, idx: c_uint) -> *const c_char;
pub fn gst_sdp_media_get_information(media: *const GstSDPMedia) -> *const c_char;
pub fn gst_sdp_media_get_key(media: *const GstSDPMedia) -> *const GstSDPKey;
pub fn gst_sdp_media_get_media(media: *const GstSDPMedia) -> *const c_char;
pub fn gst_sdp_media_get_num_ports(media: *const GstSDPMedia) -> c_uint;
pub fn gst_sdp_media_get_port(media: *const GstSDPMedia) -> c_uint;
pub fn gst_sdp_media_get_proto(media: *const GstSDPMedia) -> *const c_char;
pub fn gst_sdp_media_init(media: *mut GstSDPMedia) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_insert_attribute(media: *mut GstSDPMedia, idx: c_int, attr: *mut GstSDPAttribute) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_insert_bandwidth(media: *mut GstSDPMedia, idx: c_int, bw: *mut GstSDPBandwidth) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_insert_connection(media: *mut GstSDPMedia, idx: c_int, conn: *mut GstSDPConnection) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_insert_format(media: *mut GstSDPMedia, idx: c_int, format: *const c_char) -> GstSDPResult;
#[cfg(any(feature = "v1_8_1", feature = "dox"))]
pub fn gst_sdp_media_parse_keymgmt(media: *const GstSDPMedia, mikey: *mut *mut GstMIKEYMessage) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_remove_attribute(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_remove_bandwidth(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_remove_connection(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_remove_format(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_replace_attribute(media: *mut GstSDPMedia, idx: c_uint, attr: *mut GstSDPAttribute) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_replace_bandwidth(media: *mut GstSDPMedia, idx: c_uint, bw: *mut GstSDPBandwidth) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_replace_connection(media: *mut GstSDPMedia, idx: c_uint, conn: *mut GstSDPConnection) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_media_replace_format(media: *mut GstSDPMedia, idx: c_uint, format: *const c_char) -> GstSDPResult;
pub fn gst_sdp_media_set_information(media: *mut GstSDPMedia, information: *const c_char) -> GstSDPResult;
pub fn gst_sdp_media_set_key(media: *mut GstSDPMedia, type_: *const c_char, data: *const c_char) -> GstSDPResult;
pub fn gst_sdp_media_set_media(media: *mut GstSDPMedia, med: *const c_char) -> GstSDPResult;
pub fn gst_sdp_media_set_port_info(media: *mut GstSDPMedia, port: c_uint, num_ports: c_uint) -> GstSDPResult;
pub fn gst_sdp_media_set_proto(media: *mut GstSDPMedia, proto: *const c_char) -> GstSDPResult;
pub fn gst_sdp_media_uninit(media: *mut GstSDPMedia) -> GstSDPResult;
pub fn gst_sdp_media_new(media: *mut *mut GstSDPMedia) -> GstSDPResult;
#[cfg(any(feature = "v1_8", feature = "dox"))]
pub fn gst_sdp_media_set_media_from_caps(caps: *const gst::GstCaps, media: *mut GstSDPMedia) -> GstSDPResult;
//=========================================================================
// GstSDPMessage
//=========================================================================
pub fn gst_sdp_message_get_type() -> GType;
pub fn gst_sdp_message_add_attribute(msg: *mut GstSDPMessage, key: *const c_char, value: *const c_char) -> GstSDPResult;
pub fn gst_sdp_message_add_bandwidth(msg: *mut GstSDPMessage, bwtype: *const c_char, bandwidth: c_uint) -> GstSDPResult;
pub fn gst_sdp_message_add_email(msg: *mut GstSDPMessage, email: *const c_char) -> GstSDPResult;
pub fn gst_sdp_message_add_media(msg: *mut GstSDPMessage, media: *mut GstSDPMedia) -> GstSDPResult;
pub fn gst_sdp_message_add_phone(msg: *mut GstSDPMessage, phone: *const c_char) -> GstSDPResult;
pub fn gst_sdp_message_add_time(msg: *mut GstSDPMessage, start: *const c_char, stop: *const c_char, repeat: *mut *mut c_char) -> GstSDPResult;
pub fn gst_sdp_message_add_zone(msg: *mut GstSDPMessage, adj_time: *const c_char, typed_time: *const c_char) -> GstSDPResult;
pub fn gst_sdp_message_as_text(msg: *const GstSDPMessage) -> *mut c_char;
pub fn gst_sdp_message_attributes_len(msg: *const GstSDPMessage) -> c_uint;
#[cfg(any(feature = "v1_8", feature = "dox"))]
pub fn gst_sdp_message_attributes_to_caps(msg: *const GstSDPMessage, caps: *mut gst::GstCaps) -> GstSDPResult;
pub fn gst_sdp_message_bandwidths_len(msg: *const GstSDPMessage) -> c_uint;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_copy(msg: *const GstSDPMessage, copy: *mut *mut GstSDPMessage) -> GstSDPResult;
pub fn gst_sdp_message_dump(msg: *const GstSDPMessage) -> GstSDPResult;
pub fn gst_sdp_message_emails_len(msg: *const GstSDPMessage) -> c_uint;
pub fn gst_sdp_message_free(msg: *mut GstSDPMessage) -> GstSDPResult;
pub fn gst_sdp_message_get_attribute(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPAttribute;
pub fn gst_sdp_message_get_attribute_val(msg: *const GstSDPMessage, key: *const c_char) -> *const c_char;
pub fn gst_sdp_message_get_attribute_val_n(msg: *const GstSDPMessage, key: *const c_char, nth: c_uint) -> *const c_char;
pub fn gst_sdp_message_get_bandwidth(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPBandwidth;
pub fn gst_sdp_message_get_connection(msg: *const GstSDPMessage) -> *const GstSDPConnection;
pub fn gst_sdp_message_get_email(msg: *const GstSDPMessage, idx: c_uint) -> *const c_char;
pub fn gst_sdp_message_get_information(msg: *const GstSDPMessage) -> *const c_char;
pub fn gst_sdp_message_get_key(msg: *const GstSDPMessage) -> *const GstSDPKey;
pub fn gst_sdp_message_get_media(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPMedia;
pub fn gst_sdp_message_get_origin(msg: *const GstSDPMessage) -> *const GstSDPOrigin;
pub fn gst_sdp_message_get_phone(msg: *const GstSDPMessage, idx: c_uint) -> *const c_char;
pub fn gst_sdp_message_get_session_name(msg: *const GstSDPMessage) -> *const c_char;
pub fn gst_sdp_message_get_time(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPTime;
pub fn gst_sdp_message_get_uri(msg: *const GstSDPMessage) -> *const c_char;
pub fn gst_sdp_message_get_version(msg: *const GstSDPMessage) -> *const c_char;
pub fn gst_sdp_message_get_zone(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPZone;
pub fn gst_sdp_message_init(msg: *mut GstSDPMessage) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_insert_attribute(msg: *mut GstSDPMessage, idx: c_int, attr: *mut GstSDPAttribute) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_insert_bandwidth(msg: *mut GstSDPMessage, idx: c_int, bw: *mut GstSDPBandwidth) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_insert_email(msg: *mut GstSDPMessage, idx: c_int, email: *const c_char) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_insert_phone(msg: *mut GstSDPMessage, idx: c_int, phone: *const c_char) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_insert_time(msg: *mut GstSDPMessage, idx: c_int, t: *mut GstSDPTime) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_insert_zone(msg: *mut GstSDPMessage, idx: c_int, zone: *mut GstSDPZone) -> GstSDPResult;
pub fn gst_sdp_message_medias_len(msg: *const GstSDPMessage) -> c_uint;
#[cfg(any(feature = "v1_8_1", feature = "dox"))]
pub fn gst_sdp_message_parse_keymgmt(msg: *const GstSDPMessage, mikey: *mut *mut GstMIKEYMessage) -> GstSDPResult;
pub fn gst_sdp_message_phones_len(msg: *const GstSDPMessage) -> c_uint;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_remove_attribute(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_remove_bandwidth(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_remove_email(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_remove_phone(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_remove_time(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_remove_zone(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_replace_attribute(msg: *mut GstSDPMessage, idx: c_uint, attr: *mut GstSDPAttribute) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_replace_bandwidth(msg: *mut GstSDPMessage, idx: c_uint, bw: *mut GstSDPBandwidth) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_replace_email(msg: *mut GstSDPMessage, idx: c_uint, email: *const c_char) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_replace_phone(msg: *mut GstSDPMessage, idx: c_uint, phone: *const c_char) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_replace_time(msg: *mut GstSDPMessage, idx: c_uint, t: *mut GstSDPTime) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_message_replace_zone(msg: *mut GstSDPMessage, idx: c_uint, zone: *mut GstSDPZone) -> GstSDPResult;
pub fn gst_sdp_message_set_connection(msg: *mut GstSDPMessage, nettype: *const c_char, addrtype: *const c_char, address: *const c_char, ttl: c_uint, addr_number: c_uint) -> GstSDPResult;
pub fn gst_sdp_message_set_information(msg: *mut GstSDPMessage, information: *const c_char) -> GstSDPResult;
pub fn gst_sdp_message_set_key(msg: *mut GstSDPMessage, type_: *const c_char, data: *const c_char) -> GstSDPResult;
pub fn gst_sdp_message_set_origin(msg: *mut GstSDPMessage, username: *const c_char, sess_id: *const c_char, sess_version: *const c_char, nettype: *const c_char, addrtype: *const c_char, addr: *const c_char) -> GstSDPResult;
pub fn gst_sdp_message_set_session_name(msg: *mut GstSDPMessage, session_name: *const c_char) -> GstSDPResult;
pub fn gst_sdp_message_set_uri(msg: *mut GstSDPMessage, uri: *const c_char) -> GstSDPResult;
pub fn gst_sdp_message_set_version(msg: *mut GstSDPMessage, version: *const c_char) -> GstSDPResult;
pub fn gst_sdp_message_times_len(msg: *const GstSDPMessage) -> c_uint;
pub fn gst_sdp_message_uninit(msg: *mut GstSDPMessage) -> GstSDPResult;
pub fn gst_sdp_message_zones_len(msg: *const GstSDPMessage) -> c_uint;
pub fn gst_sdp_message_as_uri(scheme: *const c_char, msg: *const GstSDPMessage) -> *mut c_char;
pub fn gst_sdp_message_new(msg: *mut *mut GstSDPMessage) -> GstSDPResult;
pub fn gst_sdp_message_parse_buffer(data: *mut u8, size: c_uint, msg: *mut GstSDPMessage) -> GstSDPResult;
pub fn gst_sdp_message_parse_uri(uri: *const c_char, msg: *mut GstSDPMessage) -> GstSDPResult;
//=========================================================================
// GstSDPTime
//=========================================================================
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_time_clear(t: *mut GstSDPTime) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_time_set(t: *mut GstSDPTime, start: *const c_char, stop: *const c_char, repeat: *mut *mut c_char) -> GstSDPResult;
//=========================================================================
// GstSDPZone
//=========================================================================
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_zone_clear(zone: *mut GstSDPZone) -> GstSDPResult;
#[cfg(any(feature = "v1_2", feature = "dox"))]
pub fn gst_sdp_zone_set(zone: *mut GstSDPZone, adj_time: *const c_char, typed_time: *const c_char) -> GstSDPResult;
//=========================================================================
// Other functions
//=========================================================================
pub fn gst_sdp_address_is_multicast(nettype: *const c_char, addrtype: *const c_char, addr: *const c_char) -> gboolean;
#[cfg(any(feature = "v1_8", feature = "dox"))]
pub fn gst_sdp_make_keymgmt(uri: *const c_char, base64: *const c_char) -> *mut c_char;
}