Commit 55f044dd authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Add newtype wrappers and INVALID constants for event/message GroupId and Seqnum

parent 97b786a0
......@@ -796,6 +796,16 @@ status = "generate"
# wrong mutable for context parameter
ignore = true
[[object.function]]
name = "util_group_id_next"
# newtype wrapper
ignore = true
[[object.function]]
name = "util_seqnum_next"
# newtype wrapper
ignore = true
[[object]]
name = "Gst.StateChangeReturn"
status = "generate"
......
......@@ -158,20 +158,6 @@ pub fn util_get_timestamp() -> ClockTime {
}
}
pub fn util_group_id_next() -> u32 {
assert_initialized_main_thread!();
unsafe {
ffi::gst_util_group_id_next()
}
}
pub fn util_seqnum_next() -> u32 {
assert_initialized_main_thread!();
unsafe {
ffi::gst_util_seqnum_next()
}
}
pub fn version() -> (u32, u32, u32, u32) {
assert_initialized_main_thread!();
unsafe {
......
This diff is collapsed.
......@@ -85,3 +85,25 @@ pub fn parse_launchv_full<'a, P: Into<Option<&'a mut ParseContext>>>(
}
}
}
pub fn util_group_id_next() -> ::GroupId {
assert_initialized_main_thread!();
unsafe {
let v = from_glib(ffi::gst_util_group_id_next());
if v == ::GROUP_ID_INVALID {
return from_glib(ffi::gst_util_group_id_next());
}
v
}
}
pub fn util_seqnum_next() -> ::Seqnum {
assert_initialized_main_thread!();
unsafe {
let v = from_glib(ffi::gst_util_seqnum_next());
if v == ::SEQNUM_INVALID {
return from_glib(ffi::gst_util_seqnum_next());
}
v
}
}
......@@ -82,7 +82,7 @@ pub use bufferlist::{BufferList, BufferListRef};
pub mod query;
pub use query::{Query, QueryRef, QueryView};
pub mod event;
pub use event::{Event, EventRef, EventView};
pub use event::{Event, EventRef, EventView, GroupId, Seqnum, GROUP_ID_INVALID, SEQNUM_INVALID};
pub mod context;
pub use context::{Context, ContextRef};
mod static_caps;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment