From 0b9edee8d7ddcda9b95d37d75e503798d6ff150d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Mon, 9 Jul 2018 21:39:45 +0200 Subject: [PATCH] Tags: use `SendValue` for generic getters and iterator --- gstreamer/src/tags.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gstreamer/src/tags.rs b/gstreamer/src/tags.rs index d5b95a72a..6aa9c1cd6 100644 --- a/gstreamer/src/tags.rs +++ b/gstreamer/src/tags.rs @@ -14,7 +14,7 @@ use std::mem; use ffi; use glib; use glib::translate::{from_glib, from_glib_full, ToGlib, ToGlibPtr, ToGlibPtrMut}; -use glib::value::{FromValueOptional, SetValue, ToSendValue, TypedValue, Value}; +use glib::value::{FromValueOptional, SendValue, SetValue, ToSendValue, TypedValue, Value}; use glib::StaticType; use miniobject::*; @@ -237,9 +237,9 @@ impl TagListRef { } } - pub fn get_generic(&self, tag_name: &str) -> Option { + pub fn get_generic(&self, tag_name: &str) -> Option { unsafe { - let mut value: Value = mem::zeroed(); + let mut value: SendValue = mem::zeroed(); let found: bool = from_glib(ffi::gst_tag_list_copy_value( value.to_glib_none_mut().0, @@ -279,7 +279,7 @@ impl TagListRef { } } - pub fn get_index_generic<'a>(&'a self, tag_name: &str, idx: u32) -> Option<&'a Value> { + pub fn get_index_generic<'a>(&'a self, tag_name: &str, idx: u32) -> Option<&'a SendValue> { unsafe { let value = ffi::gst_tag_list_get_value_index( self.as_ptr(), @@ -291,7 +291,7 @@ impl TagListRef { return None; } - Some(&*(value as *const Value)) + Some(&*(value as *const SendValue)) } } @@ -461,7 +461,7 @@ impl<'a> GenericTagIterator<'a> { } impl<'a> Iterator for GenericTagIterator<'a> { - type Item = &'a Value; + type Item = &'a SendValue; fn next(&mut self) -> Option { if self.idx >= self.size {