play: Add bindings for new pipeline-dump-in-error-details config

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1368>
This commit is contained in:
Sebastian Dröge 2023-12-21 13:44:43 +02:00
parent 52bd716a80
commit dae3d30fae

View file

@ -45,23 +45,6 @@ impl PlayConfig {
unsafe { ffi::gst_play_config_get_position_update_interval(self.0.to_glib_none().0) }
}
#[doc(alias = "get_seek_accurate")]
pub fn is_seek_accurate(&self) -> bool {
skip_assert_initialized!();
unsafe {
from_glib(ffi::gst_play_config_get_seek_accurate(
self.0.to_glib_none().0,
))
}
}
#[doc(alias = "get_user_agent")]
#[doc(alias = "gst_play_config_get_user_agent")]
pub fn user_agent(&self) -> Option<String> {
skip_assert_initialized!();
unsafe { from_glib_full(ffi::gst_play_config_get_user_agent(self.0.to_glib_none().0)) }
}
#[doc(alias = "gst_play_config_set_position_update_interval")]
pub fn set_position_update_interval(&mut self, interval: u32) {
skip_assert_initialized!();
@ -73,6 +56,16 @@ impl PlayConfig {
}
}
#[doc(alias = "get_seek_accurate")]
pub fn is_seek_accurate(&self) -> bool {
skip_assert_initialized!();
unsafe {
from_glib(ffi::gst_play_config_get_seek_accurate(
self.0.to_glib_none().0,
))
}
}
pub fn set_seek_accurate(&mut self, accurate: bool) {
skip_assert_initialized!();
// FIXME: Work-around for
@ -80,6 +73,13 @@ impl PlayConfig {
self.set("accurate-seek", accurate);
}
#[doc(alias = "get_user_agent")]
#[doc(alias = "gst_play_config_get_user_agent")]
pub fn user_agent(&self) -> Option<String> {
skip_assert_initialized!();
unsafe { from_glib_full(ffi::gst_play_config_get_user_agent(self.0.to_glib_none().0)) }
}
#[doc(alias = "gst_play_config_set_user_agent")]
pub fn set_user_agent(&mut self, agent: &str) {
skip_assert_initialized!();
@ -90,6 +90,31 @@ impl PlayConfig {
);
}
}
#[cfg(feature = "v1_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
#[doc(alias = "gst_play_config_get_pipeline_dump_in_error_details")]
pub fn pipeline_dump_in_error_details(&self) -> bool {
skip_assert_initialized!();
unsafe {
from_glib(ffi::gst_play_config_get_pipeline_dump_in_error_details(
self.0.to_glib_none().0,
))
}
}
#[cfg(feature = "v1_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
#[doc(alias = "gst_play_config_set_pipeline_dump_in_error_details")]
pub fn set_pipeline_dump_in_error_details(&mut self, pipeline_dump_in_error_details: bool) {
skip_assert_initialized!();
unsafe {
ffi::gst_play_config_set_pipeline_dump_in_error_details(
self.0.to_glib_none_mut().0,
pipeline_dump_in_error_details.into_glib(),
);
}
}
}
impl IntoGlibPtr<*mut gst::ffi::GstStructure> for PlayConfig {