mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 00:26:31 +00:00
post fix-getters manual updates
This commit is contained in:
parent
53be8e5f58
commit
99616ec0b4
10 changed files with 15 additions and 15 deletions
|
@ -60,7 +60,7 @@ fn create_pipeline() -> Result<gst::Pipeline, Error> {
|
|||
.expect("Failed to create video info");
|
||||
|
||||
appsrc.set_caps(Some(&video_info.to_caps().unwrap()));
|
||||
appsrc.set_property_format(gst::Format::Time);
|
||||
appsrc.set_format(gst::Format::Time);
|
||||
|
||||
// Our frame counter, that is stored in the mutable environment
|
||||
// of the closure of the need-data callback
|
||||
|
|
|
@ -356,7 +356,7 @@ impl App {
|
|||
use glutin::platform::unix::WindowExtUnix;
|
||||
use glutin::platform::ContextTraitExt;
|
||||
|
||||
let api = App::map_gl_api(windowed_context.api());
|
||||
let api = App::map_gl_api(windowed_context.get_api());
|
||||
|
||||
let (gl_context, gl_display, platform) = match unsafe { windowed_context.raw_handle() }
|
||||
{
|
||||
|
@ -365,7 +365,7 @@ impl App {
|
|||
let mut gl_display = None;
|
||||
|
||||
#[cfg(feature = "gst-gl-egl")]
|
||||
if let Some(display) = unsafe { windowed_context.egl_display() } {
|
||||
if let Some(display) = unsafe { windowed_context.get_egl_display() } {
|
||||
gl_display = Some(
|
||||
unsafe { gst_gl_egl::GLDisplayEGL::with_egl_display(display as usize) }
|
||||
.unwrap()
|
||||
|
@ -610,7 +610,7 @@ fn main_loop(app: App) -> Result<(), Error> {
|
|||
|
||||
println!(
|
||||
"Pixel format of the window's GL context {:?}",
|
||||
app.windowed_context.pixel_format()
|
||||
app.windowed_context.get_pixel_format()
|
||||
);
|
||||
|
||||
let gl = load(&app.windowed_context);
|
||||
|
|
|
@ -585,7 +585,7 @@ mod tests {
|
|||
|
||||
let video_profile: EncodingVideoProfile =
|
||||
glib::object::Cast::downcast(video_profile).ok().unwrap();
|
||||
assert_eq!(video_profile.variableframerate(), VARIABLE_FRAMERATE);
|
||||
assert_eq!(video_profile.is_variableframerate(), VARIABLE_FRAMERATE);
|
||||
assert_eq!(video_profile.pass(), PASS);
|
||||
|
||||
let restriction = gst::Caps::new_simple("video/x-raw", &[("format", &"NV12")]);
|
||||
|
|
|
@ -369,7 +369,7 @@ mod tests {
|
|||
assert_eq!(rtp_buffer.seq(), 42);
|
||||
|
||||
rtp_buffer.set_marker(true);
|
||||
assert!(rtp_buffer.marker());
|
||||
assert!(rtp_buffer.is_marker());
|
||||
|
||||
rtp_buffer.set_payload_type(43);
|
||||
assert_eq!(rtp_buffer.payload_type(), 43);
|
||||
|
@ -394,7 +394,7 @@ mod tests {
|
|||
assert!(rtp_buffer.get_csrc(2).is_none());
|
||||
|
||||
rtp_buffer.set_extension(true);
|
||||
assert_eq!(rtp_buffer.extension(), true);
|
||||
assert_eq!(rtp_buffer.is_extension(), true);
|
||||
|
||||
assert_eq!(rtp_buffer.extension_bytes(), None);
|
||||
}
|
||||
|
|
|
@ -136,11 +136,11 @@ pub trait ElementExtManual: 'static {
|
|||
fn set_state(&self, state: State) -> Result<StateChangeSuccess, StateChangeError>;
|
||||
|
||||
fn current_state(&self) -> State {
|
||||
self.state(ClockTime::from(0)).1
|
||||
self.get_state(ClockTime::from(0)).1
|
||||
}
|
||||
|
||||
fn pending_state(&self) -> State {
|
||||
self.state(ClockTime::from(0)).2
|
||||
self.get_state(ClockTime::from(0)).2
|
||||
}
|
||||
|
||||
fn query(&self, query: &mut QueryRef) -> bool;
|
||||
|
|
|
@ -108,7 +108,7 @@ macro_rules! result_from_gboolean(
|
|||
);
|
||||
|
||||
#[derive(Debug, Clone, Error)]
|
||||
#[error("Error {:?}: {:?} at {}:{}", .category.get_name(), .bool_error.message, .bool_error.filename, .bool_error.line)]
|
||||
#[error("Error {:?}: {:?} at {}:{}", .category.name(), .bool_error.message, .bool_error.filename, .bool_error.line)]
|
||||
pub struct LoggableError {
|
||||
category: crate::DebugCategory,
|
||||
bool_error: glib::BoolError,
|
||||
|
|
|
@ -111,7 +111,7 @@ impl GhostPad {
|
|||
) -> Result<Self, glib::BoolError> {
|
||||
skip_assert_initialized!();
|
||||
|
||||
if target.direction() != templ.property_direction() {
|
||||
if target.direction() != templ.direction() {
|
||||
return Err(glib::bool_error!(
|
||||
"Template and target have different directions"
|
||||
));
|
||||
|
|
|
@ -1682,7 +1682,7 @@ impl<T: IsA<Pad> + IsA<glib::Object> + glib::object::IsClass> PadBuilder<T> {
|
|||
type_,
|
||||
&[
|
||||
("name", &name),
|
||||
("direction", &templ.property_direction()),
|
||||
("direction", &templ.direction()),
|
||||
("template", templ),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -53,7 +53,7 @@ impl Promise {
|
|||
let promise: Borrowed<Promise> = from_glib_borrow(promise);
|
||||
|
||||
let res = match promise.wait() {
|
||||
PromiseResult::Replied => Ok(promise.reply()),
|
||||
PromiseResult::Replied => Ok(promise.get_reply()),
|
||||
PromiseResult::Interrupted => Err(PromiseError::Interrupted),
|
||||
PromiseResult::Expired => Err(PromiseError::Expired),
|
||||
PromiseResult::Pending => {
|
||||
|
@ -103,7 +103,7 @@ impl Promise {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn reply(&self) -> Option<&StructureRef> {
|
||||
pub fn get_reply(&self) -> Option<&StructureRef> {
|
||||
unsafe {
|
||||
let s = ffi::gst_promise_get_reply(self.to_glib_none().0);
|
||||
if s.is_null() {
|
||||
|
|
|
@ -127,7 +127,7 @@ fn main() {
|
|||
.dynamic_cast::<AppSrc>()
|
||||
.expect("Source element is expected to be an appsrc!");
|
||||
appsrc.set_caps(Some(&audio_caps));
|
||||
appsrc.set_property_format(gst::Format::Time);
|
||||
appsrc.set_format(gst::Format::Time);
|
||||
|
||||
let appsink = appsink
|
||||
.dynamic_cast::<AppSink>()
|
||||
|
|
Loading…
Reference in a new issue