Use GFV::none_for_format where applicable

This commit is contained in:
François Laignel 2022-10-08 18:29:10 +02:00
parent 4c57a97d4d
commit 7818ac658b
5 changed files with 11 additions and 10 deletions

View file

@ -276,8 +276,8 @@ impl Encrypter {
let format = q.format(); let format = q.format();
q.set( q.set(
false, false,
gst::GenericFormattedValue::Other(format, -1), gst::GenericFormattedValue::none_for_format(format),
gst::GenericFormattedValue::Other(format, -1), gst::GenericFormattedValue::none_for_format(format),
); );
gst::log!(CAT, obj: pad, "Returning {:?}", q.query_mut()); gst::log!(CAT, obj: pad, "Returning {:?}", q.query_mut());
true true

View file

@ -1620,8 +1620,8 @@ impl ToggleRecord {
let format = q.format(); let format = q.format();
q.set( q.set(
false, false,
gst::GenericFormattedValue::new(format, -1), gst::GenericFormattedValue::none_for_format(format),
gst::GenericFormattedValue::new(format, -1), gst::GenericFormattedValue::none_for_format(format),
); );
gst::log!(CAT, obj: pad, "Returning {:?}", q.query_mut()); gst::log!(CAT, obj: pad, "Returning {:?}", q.query_mut());

View file

@ -14,6 +14,7 @@
* Since: plugins-rs-0.4.0 * Since: plugins-rs-0.4.0
*/ */
use gst::glib; use gst::glib;
#[cfg(feature = "doc")]
use gst::prelude::*; use gst::prelude::*;
#[allow(non_camel_case_types, non_upper_case_globals, unused)] #[allow(non_camel_case_types, non_upper_case_globals, unused)]

View file

@ -407,11 +407,11 @@ impl MccEnc {
match query.view_mut() { match query.view_mut() {
QueryViewMut::Seeking(q) => { QueryViewMut::Seeking(q) => {
// We don't support any seeking at all // We don't support any seeking at all
let fmt = q.format(); let format = q.format();
q.set( q.set(
false, false,
gst::GenericFormattedValue::Other(fmt, -1), gst::GenericFormattedValue::none_for_format(format),
gst::GenericFormattedValue::Other(fmt, -1), gst::GenericFormattedValue::none_for_format(format),
); );
true true
} }

View file

@ -343,11 +343,11 @@ impl SccEnc {
match query.view_mut() { match query.view_mut() {
QueryViewMut::Seeking(q) => { QueryViewMut::Seeking(q) => {
// We don't support any seeking at all // We don't support any seeking at all
let fmt = q.format(); let format = q.format();
q.set( q.set(
false, false,
gst::GenericFormattedValue::Other(fmt, -1), gst::GenericFormattedValue::none_for_format(format),
gst::GenericFormattedValue::Other(fmt, -1), gst::GenericFormattedValue::none_for_format(format),
); );
true true
} }