From bd0cbe99b310007e56c7a735f8f2eb17a93c0c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 22 Jan 2019 17:43:29 +0200 Subject: [PATCH] Add more Debug impls to everything possible --- gstreamer-audio/src/audio_info.rs | 1 + gstreamer-base/src/flow_combiner.rs | 2 +- .../src/discoverer_stream_info.rs | 1 + gstreamer-pbutils/src/encoding_profile.rs | 4 ++++ gstreamer-rtsp-server/src/rtsp_context.rs | 10 ++++---- gstreamer-sdp/src/mikey_decrypt_info.rs | 2 ++ gstreamer-sdp/src/mikey_encrypt_info.rs | 2 ++ gstreamer-sdp/src/mikey_map_s_r_t_p.rs | 1 + gstreamer-sdp/src/mikey_payload_s_p_param.rs | 1 + gstreamer-sdp/src/sdp_attribute.rs | 1 + gstreamer-sdp/src/sdp_bandwidth.rs | 1 + gstreamer-sdp/src/sdp_connection.rs | 1 + gstreamer-sdp/src/sdp_key.rs | 2 ++ gstreamer-sdp/src/sdp_media.rs | 1 + gstreamer-sdp/src/sdp_message.rs | 1 + gstreamer-sdp/src/sdp_origin.rs | 1 + gstreamer-sdp/src/sdp_time.rs | 1 + gstreamer-sdp/src/sdp_zone.rs | 1 + gstreamer-video/src/video_frame.rs | 2 ++ gstreamer-video/src/video_info.rs | 1 + gstreamer/src/buffer.rs | 1 + gstreamer/src/bufferlist.rs | 1 + gstreamer/src/bus.rs | 2 ++ gstreamer/src/caps.rs | 2 ++ gstreamer/src/caps_features.rs | 1 + gstreamer/src/clock.rs | 1 + gstreamer/src/iterator.rs | 1 + gstreamer/src/pad.rs | 3 +++ gstreamer/src/parse_context.rs | 1 + gstreamer/src/promise.rs | 1 + gstreamer/src/static_caps.rs | 12 ++++++++++ gstreamer/src/static_pad_template.rs | 24 ++++++++++++++++++- gstreamer/src/stream_collection.rs | 1 + gstreamer/src/structure.rs | 3 +++ gstreamer/src/tags.rs | 4 ++++ gstreamer/src/typefind.rs | 2 ++ 36 files changed, 91 insertions(+), 6 deletions(-) diff --git a/gstreamer-audio/src/audio_info.rs b/gstreamer-audio/src/audio_info.rs index 3039efca9..46a579cd7 100644 --- a/gstreamer-audio/src/audio_info.rs +++ b/gstreamer-audio/src/audio_info.rs @@ -37,6 +37,7 @@ impl fmt::Debug for AudioInfo { } } +#[derive(Debug)] pub struct AudioInfoBuilder<'a> { format: ::AudioFormat, rate: u32, diff --git a/gstreamer-base/src/flow_combiner.rs b/gstreamer-base/src/flow_combiner.rs index 96c1da6f7..1f021c6bb 100644 --- a/gstreamer-base/src/flow_combiner.rs +++ b/gstreamer-base/src/flow_combiner.rs @@ -13,7 +13,7 @@ use gobject_ffi; use gst; glib_wrapper! { - #[derive(Debug)] + #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct FlowCombiner(Shared); match fn { diff --git a/gstreamer-pbutils/src/discoverer_stream_info.rs b/gstreamer-pbutils/src/discoverer_stream_info.rs index 81a002340..953cc190b 100644 --- a/gstreamer-pbutils/src/discoverer_stream_info.rs +++ b/gstreamer-pbutils/src/discoverer_stream_info.rs @@ -10,6 +10,7 @@ use DiscovererStreamInfo; use DiscovererStreamInfoExt; +#[derive(Debug)] pub struct Iter { stream_info: Option, direction_forward: bool, diff --git a/gstreamer-pbutils/src/encoding_profile.rs b/gstreamer-pbutils/src/encoding_profile.rs index fe648ec28..5b7ff28cb 100644 --- a/gstreamer-pbutils/src/encoding_profile.rs +++ b/gstreamer-pbutils/src/encoding_profile.rs @@ -255,6 +255,7 @@ impl error::Error for EncodingProfileBuilderError { } } +#[derive(Debug)] struct EncodingProfileBuilderCommonData<'a> { name: Option<&'a str>, description: Option<&'a str>, @@ -360,6 +361,7 @@ fn set_common_fields( profile.set_presence(base_data.presence); } +#[derive(Debug)] pub struct EncodingAudioProfileBuilder<'a> { base: EncodingProfileBuilderCommonData<'a>, } @@ -390,6 +392,7 @@ impl<'a> EncodingAudioProfileBuilder<'a> { } } +#[derive(Debug)] pub struct EncodingVideoProfileBuilder<'a> { base: EncodingProfileBuilderCommonData<'a>, pass: u32, @@ -437,6 +440,7 @@ impl<'a> EncodingVideoProfileBuilder<'a> { } } +#[derive(Debug)] pub struct EncodingContainerProfileBuilder<'a> { base: EncodingProfileBuilderCommonData<'a>, profiles: Vec, diff --git a/gstreamer-rtsp-server/src/rtsp_context.rs b/gstreamer-rtsp-server/src/rtsp_context.rs index 164e0b63a..003163bb6 100644 --- a/gstreamer-rtsp-server/src/rtsp_context.rs +++ b/gstreamer-rtsp-server/src/rtsp_context.rs @@ -8,9 +8,10 @@ use ffi; use glib; +use std::ptr; -#[derive(PartialEq, Eq)] -pub struct RTSPContext(*mut ffi::GstRTSPContext); +#[derive(Debug, PartialEq, Eq)] +pub struct RTSPContext(ptr::NonNull); impl RTSPContext { pub fn with_current_context T, T>(func: F) -> Option { @@ -20,7 +21,7 @@ impl RTSPContext { return None; } - let ctx = RTSPContext(ptr); + let ctx = RTSPContext(ptr::NonNull::new_unchecked(ptr)); Some(func(&ctx)) } } @@ -32,6 +33,7 @@ impl RTSPContext { impl glib::translate::FromGlibPtrBorrow<*mut ffi::GstRTSPContext> for RTSPContext { #[inline] unsafe fn from_glib_borrow(ptr: *mut ffi::GstRTSPContext) -> Self { - RTSPContext(ptr) + assert!(!ptr.is_null()); + RTSPContext(ptr::NonNull::new_unchecked(ptr)) } } diff --git a/gstreamer-sdp/src/mikey_decrypt_info.rs b/gstreamer-sdp/src/mikey_decrypt_info.rs index c97077351..bc4538028 100644 --- a/gstreamer-sdp/src/mikey_decrypt_info.rs +++ b/gstreamer-sdp/src/mikey_decrypt_info.rs @@ -8,4 +8,6 @@ use ffi; +#[repr(C)] +#[derive(Debug)] pub struct MIKEYDecryptInfo(ffi::GstMIKEYDecryptInfo); diff --git a/gstreamer-sdp/src/mikey_encrypt_info.rs b/gstreamer-sdp/src/mikey_encrypt_info.rs index cac799083..b2457c3a3 100644 --- a/gstreamer-sdp/src/mikey_encrypt_info.rs +++ b/gstreamer-sdp/src/mikey_encrypt_info.rs @@ -8,4 +8,6 @@ use ffi; +#[repr(C)] +#[derive(Debug)] pub struct MIKEYEncryptInfo(ffi::GstMIKEYEncryptInfo); diff --git a/gstreamer-sdp/src/mikey_map_s_r_t_p.rs b/gstreamer-sdp/src/mikey_map_s_r_t_p.rs index 9959cde8e..ee099f269 100644 --- a/gstreamer-sdp/src/mikey_map_s_r_t_p.rs +++ b/gstreamer-sdp/src/mikey_map_s_r_t_p.rs @@ -9,6 +9,7 @@ use ffi; #[repr(C)] +#[derive(Debug)] pub struct MIKEYMapSRTP(ffi::GstMIKEYMapSRTP); impl MIKEYMapSRTP { diff --git a/gstreamer-sdp/src/mikey_payload_s_p_param.rs b/gstreamer-sdp/src/mikey_payload_s_p_param.rs index 125e112d3..a9bcaa122 100644 --- a/gstreamer-sdp/src/mikey_payload_s_p_param.rs +++ b/gstreamer-sdp/src/mikey_payload_s_p_param.rs @@ -11,6 +11,7 @@ use std::slice; use ffi; #[repr(C)] +#[derive(Debug)] pub struct MIKEYPayloadSPParam(ffi::GstMIKEYPayloadSPParam); impl MIKEYPayloadSPParam { diff --git a/gstreamer-sdp/src/sdp_attribute.rs b/gstreamer-sdp/src/sdp_attribute.rs index b2f78d839..6720092f0 100644 --- a/gstreamer-sdp/src/sdp_attribute.rs +++ b/gstreamer-sdp/src/sdp_attribute.rs @@ -13,6 +13,7 @@ use ffi; use glib::translate::*; #[repr(C)] +#[derive(Debug)] pub struct SDPAttribute(pub(crate) ffi::GstSDPAttribute); impl SDPAttribute { diff --git a/gstreamer-sdp/src/sdp_bandwidth.rs b/gstreamer-sdp/src/sdp_bandwidth.rs index 3436f9388..4b0292a4f 100644 --- a/gstreamer-sdp/src/sdp_bandwidth.rs +++ b/gstreamer-sdp/src/sdp_bandwidth.rs @@ -13,6 +13,7 @@ use ffi; use glib::translate::*; #[repr(C)] +#[derive(Debug)] pub struct SDPBandwidth(pub(crate) ffi::GstSDPBandwidth); impl SDPBandwidth { diff --git a/gstreamer-sdp/src/sdp_connection.rs b/gstreamer-sdp/src/sdp_connection.rs index b984e4763..6d1f61aaa 100644 --- a/gstreamer-sdp/src/sdp_connection.rs +++ b/gstreamer-sdp/src/sdp_connection.rs @@ -13,6 +13,7 @@ use ffi; use glib::translate::*; #[repr(C)] +#[derive(Debug)] pub struct SDPConnection(pub(crate) ffi::GstSDPConnection); impl SDPConnection { diff --git a/gstreamer-sdp/src/sdp_key.rs b/gstreamer-sdp/src/sdp_key.rs index 2fb1660bb..ef470e2ea 100644 --- a/gstreamer-sdp/src/sdp_key.rs +++ b/gstreamer-sdp/src/sdp_key.rs @@ -10,6 +10,8 @@ use std::ffi::CStr; use ffi; +#[repr(C)] +#[derive(Debug)] pub struct SDPKey(ffi::GstSDPKey); impl SDPKey { diff --git a/gstreamer-sdp/src/sdp_media.rs b/gstreamer-sdp/src/sdp_media.rs index 9cf87dad5..0109c246a 100644 --- a/gstreamer-sdp/src/sdp_media.rs +++ b/gstreamer-sdp/src/sdp_media.rs @@ -23,6 +23,7 @@ use sdp_key::SDPKey; use MIKEYMessage; glib_wrapper! { + #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct SDPMedia(Boxed); match fn { diff --git a/gstreamer-sdp/src/sdp_message.rs b/gstreamer-sdp/src/sdp_message.rs index 733e5bbf8..e925dea2e 100644 --- a/gstreamer-sdp/src/sdp_message.rs +++ b/gstreamer-sdp/src/sdp_message.rs @@ -31,6 +31,7 @@ use sdp_zone::SDPZone; use MIKEYMessage; glib_wrapper! { + #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct SDPMessage(Boxed); match fn { diff --git a/gstreamer-sdp/src/sdp_origin.rs b/gstreamer-sdp/src/sdp_origin.rs index 8f3bc2e08..bc0040168 100644 --- a/gstreamer-sdp/src/sdp_origin.rs +++ b/gstreamer-sdp/src/sdp_origin.rs @@ -11,6 +11,7 @@ use std::ffi::CStr; use ffi; #[repr(C)] +#[derive(Debug)] pub struct SDPOrigin(pub(crate) ffi::GstSDPOrigin); impl SDPOrigin { diff --git a/gstreamer-sdp/src/sdp_time.rs b/gstreamer-sdp/src/sdp_time.rs index 849ddbbb4..685d98971 100644 --- a/gstreamer-sdp/src/sdp_time.rs +++ b/gstreamer-sdp/src/sdp_time.rs @@ -14,6 +14,7 @@ use ffi; use glib::translate::*; #[repr(C)] +#[derive(Debug)] pub struct SDPTime(pub(crate) ffi::GstSDPTime); impl SDPTime { diff --git a/gstreamer-sdp/src/sdp_zone.rs b/gstreamer-sdp/src/sdp_zone.rs index e9c925750..f94826b9a 100644 --- a/gstreamer-sdp/src/sdp_zone.rs +++ b/gstreamer-sdp/src/sdp_zone.rs @@ -13,6 +13,7 @@ use ffi; use glib::translate::*; #[repr(C)] +#[derive(Debug)] pub struct SDPZone(pub(crate) ffi::GstSDPZone); impl SDPZone { diff --git a/gstreamer-video/src/video_frame.rs b/gstreamer-video/src/video_frame.rs index b1c85e138..0c4e54a1f 100644 --- a/gstreamer-video/src/video_frame.rs +++ b/gstreamer-video/src/video_frame.rs @@ -23,6 +23,7 @@ use std::slice; pub enum Readable {} pub enum Writable {} +#[derive(Debug)] pub struct VideoFrame( ffi::GstVideoFrame, Option, @@ -338,6 +339,7 @@ impl VideoFrame { } } +#[derive(Debug)] pub struct VideoFrameRef(ffi::GstVideoFrame, Option, ::VideoInfo, bool); impl<'a> VideoFrameRef<&'a gst::BufferRef> { diff --git a/gstreamer-video/src/video_info.rs b/gstreamer-video/src/video_info.rs index 8337b3954..2e71cb53b 100644 --- a/gstreamer-video/src/video_info.rs +++ b/gstreamer-video/src/video_info.rs @@ -221,6 +221,7 @@ impl fmt::Debug for VideoInfo { } } +#[derive(Debug)] pub struct VideoInfoBuilder<'a> { format: ::VideoFormat, width: u32, diff --git a/gstreamer/src/buffer.rs b/gstreamer/src/buffer.rs index 49c1b2b98..9285513e5 100644 --- a/gstreamer/src/buffer.rs +++ b/gstreamer/src/buffer.rs @@ -402,6 +402,7 @@ impl BufferRef { macro_rules! define_iter( ($name:ident, $typ:ty, $mtyp:ty, $prepare_buffer:expr, $from_ptr:expr) => { + #[derive(Debug)] pub struct $name<'a, T: MetaAPI + 'a> { buffer: $typ, state: glib_ffi::gpointer, diff --git a/gstreamer/src/bufferlist.rs b/gstreamer/src/bufferlist.rs index 0342b66f1..f7517fc39 100644 --- a/gstreamer/src/bufferlist.rs +++ b/gstreamer/src/bufferlist.rs @@ -119,6 +119,7 @@ impl fmt::Debug for BufferListRef { } } +#[derive(Debug)] pub struct Iter<'a> { list: &'a BufferListRef, idx: u32, diff --git a/gstreamer/src/bus.rs b/gstreamer/src/bus.rs index b24008320..ca98cff37 100644 --- a/gstreamer/src/bus.rs +++ b/gstreamer/src/bus.rs @@ -150,6 +150,7 @@ impl Bus { } } +#[derive(Debug)] pub struct Iter<'a> { bus: &'a Bus, timeout: ::ClockTime, @@ -171,6 +172,7 @@ mod futures { use futures_core::{Async, Poll}; use std::sync::{Arc, Mutex}; + #[derive(Debug)] pub struct BusStream(Bus, Arc>>); impl BusStream { diff --git a/gstreamer/src/caps.rs b/gstreamer/src/caps.rs index 1a8639ca7..b676c65a6 100644 --- a/gstreamer/src/caps.rs +++ b/gstreamer/src/caps.rs @@ -343,6 +343,7 @@ impl CapsRef { macro_rules! define_iter( ($name:ident, $typ:ty, $styp:ty, $get_item:expr) => { + #[derive(Debug)] pub struct $name<'a> { caps: $typ, idx: u32, @@ -491,6 +492,7 @@ impl PartialEq for CapsRef { impl Eq for CapsRef {} +#[derive(Debug)] pub struct Builder<'a> { s: ::Structure, features: Option<&'a [&'a str]>, diff --git a/gstreamer/src/caps_features.rs b/gstreamer/src/caps_features.rs index 07931679d..16ec6e928 100644 --- a/gstreamer/src/caps_features.rs +++ b/gstreamer/src/caps_features.rs @@ -364,6 +364,7 @@ impl CapsFeaturesRef { } } +#[derive(Debug)] pub struct Iter<'a> { caps_features: &'a CapsFeaturesRef, idx: u32, diff --git a/gstreamer/src/clock.rs b/gstreamer/src/clock.rs index ffc858286..9eef70b17 100644 --- a/gstreamer/src/clock.rs +++ b/gstreamer/src/clock.rs @@ -24,6 +24,7 @@ use ClockTime; use ClockTimeDiff; glib_wrapper! { + #[derive(Debug, Hash)] pub struct ClockId(Shared); match fn { diff --git a/gstreamer/src/iterator.rs b/gstreamer/src/iterator.rs index b2a56c456..1d70ad322 100644 --- a/gstreamer/src/iterator.rs +++ b/gstreamer/src/iterator.rs @@ -48,6 +48,7 @@ impl Error for IteratorError { } // Implemented manually so that we can use generics for the item +#[derive(Debug)] pub struct Iterator { iter: ptr::NonNull, borrowed: bool, diff --git a/gstreamer/src/pad.rs b/gstreamer/src/pad.rs index 042db7a1a..6b8f6a600 100644 --- a/gstreamer/src/pad.rs +++ b/gstreamer/src/pad.rs @@ -82,6 +82,7 @@ impl FromGlib for PadProbeId { } } +#[derive(Debug)] pub struct PadProbeInfo<'a> { pub mask: PadProbeType, pub id: PadProbeId, @@ -90,6 +91,7 @@ pub struct PadProbeInfo<'a> { pub data: Option>, } +#[derive(Debug)] pub enum PadProbeData<'a> { Buffer(Buffer), BufferList(BufferList), @@ -99,6 +101,7 @@ pub enum PadProbeData<'a> { __Unknown(*mut ffi::GstMiniObject), } +#[derive(Debug)] pub struct StreamLock(Pad); impl Drop for StreamLock { fn drop(&mut self) { diff --git a/gstreamer/src/parse_context.rs b/gstreamer/src/parse_context.rs index 454ef2a6d..6ce80538f 100644 --- a/gstreamer/src/parse_context.rs +++ b/gstreamer/src/parse_context.rs @@ -11,6 +11,7 @@ use glib::translate::*; use gobject_ffi; glib_wrapper! { + #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct ParseContext(Boxed); match fn { diff --git a/gstreamer/src/promise.rs b/gstreamer/src/promise.rs index 63debebff..b2500d9ce 100644 --- a/gstreamer/src/promise.rs +++ b/gstreamer/src/promise.rs @@ -14,6 +14,7 @@ use Structure; use StructureRef; glib_wrapper! { + #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Promise(Shared); match fn { diff --git a/gstreamer/src/static_caps.rs b/gstreamer/src/static_caps.rs index 3882a25fc..37b269122 100644 --- a/gstreamer/src/static_caps.rs +++ b/gstreamer/src/static_caps.rs @@ -15,6 +15,8 @@ use gobject_ffi; use glib; use glib::translate::{from_glib_full, FromGlibPtrNone, ToGlibPtr, ToGlibPtrMut}; +use std::ffi::CStr; +use std::fmt; use std::ptr; #[repr(C)] @@ -29,6 +31,16 @@ impl StaticCaps { unsafe impl Send for StaticCaps {} unsafe impl Sync for StaticCaps {} +impl fmt::Debug for StaticCaps { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.debug_struct("StaticCaps") + .field("str", &unsafe { + CStr::from_ptr(self.0.as_ref().string).to_str() + }) + .finish() + } +} + impl glib::types::StaticType for StaticCaps { fn static_type() -> glib::types::Type { unsafe { glib::translate::from_glib(ffi::gst_static_caps_get_type()) } diff --git a/gstreamer/src/static_pad_template.rs b/gstreamer/src/static_pad_template.rs index 486e6ef57..94df90ee8 100644 --- a/gstreamer/src/static_pad_template.rs +++ b/gstreamer/src/static_pad_template.rs @@ -14,9 +14,12 @@ use glib_ffi; use gobject_ffi; use glib; -use glib::translate::{from_glib, from_glib_full, FromGlibPtrNone, ToGlibPtr, ToGlibPtrMut}; +use glib::translate::{ + from_glib, from_glib_full, from_glib_none, FromGlibPtrNone, ToGlibPtr, ToGlibPtrMut, +}; use std::ffi::CStr; +use std::fmt; use std::ptr; #[repr(C)] @@ -51,6 +54,25 @@ impl StaticPadTemplate { unsafe impl Send for StaticPadTemplate {} unsafe impl Sync for StaticPadTemplate {} +impl fmt::Debug for StaticPadTemplate { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.debug_struct("StaticPadTemplate") + .field("name_template", &unsafe { + CStr::from_ptr(self.0.as_ref().name_template).to_str() + }) + .field("direction", &unsafe { + from_glib::<_, ::PadDirection>(self.0.as_ref().direction) + }) + .field("presence", &unsafe { + from_glib::<_, ::PadPresence>(self.0.as_ref().presence) + }) + .field("static_caps", &unsafe { + from_glib_none::<_, ::StaticCaps>(&self.0.as_ref().static_caps as *const _) + }) + .finish() + } +} + impl glib::types::StaticType for StaticPadTemplate { fn static_type() -> glib::types::Type { unsafe { glib::translate::from_glib(ffi::gst_static_pad_template_get_type()) } diff --git a/gstreamer/src/stream_collection.rs b/gstreamer/src/stream_collection.rs index 7ed579bb2..541a29417 100644 --- a/gstreamer/src/stream_collection.rs +++ b/gstreamer/src/stream_collection.rs @@ -12,6 +12,7 @@ use glib::translate::*; use Stream; use StreamCollection; +#[derive(Debug)] pub struct Iter<'a> { collection: &'a StreamCollection, idx: u32, diff --git a/gstreamer/src/structure.rs b/gstreamer/src/structure.rs index 2956811c3..032bfcda9 100644 --- a/gstreamer/src/structure.rs +++ b/gstreamer/src/structure.rs @@ -532,6 +532,7 @@ impl PartialEq for StructureRef { impl Eq for StructureRef {} +#[derive(Debug)] pub struct FieldIterator<'a> { structure: &'a StructureRef, idx: u32, @@ -595,6 +596,7 @@ impl<'a> DoubleEndedIterator for FieldIterator<'a> { impl<'a> ExactSizeIterator for FieldIterator<'a> {} +#[derive(Debug)] pub struct Iter<'a> { iter: FieldIterator<'a>, } @@ -638,6 +640,7 @@ impl<'a> DoubleEndedIterator for Iter<'a> { impl<'a> ExactSizeIterator for Iter<'a> {} +#[derive(Debug)] pub struct Builder { s: Structure, } diff --git a/gstreamer/src/tags.rs b/gstreamer/src/tags.rs index aef14792f..0c1cf8500 100644 --- a/gstreamer/src/tags.rs +++ b/gstreamer/src/tags.rs @@ -518,6 +518,7 @@ impl PartialEq for TagListRef { impl Eq for TagListRef {} +#[derive(Debug)] pub struct TagIter<'a, T: Tag<'a>> { taglist: &'a TagListRef, idx: u32, @@ -588,6 +589,7 @@ where { } +#[derive(Debug)] pub struct GenericTagIter<'a> { taglist: &'a TagListRef, name: &'a str, @@ -645,6 +647,7 @@ impl<'a> DoubleEndedIterator for GenericTagIter<'a> { impl<'a> ExactSizeIterator for GenericTagIter<'a> {} +#[derive(Debug)] pub struct GenericIter<'a> { taglist: &'a TagListRef, idx: u32, @@ -703,6 +706,7 @@ impl<'a> DoubleEndedIterator for GenericIter<'a> { impl<'a> ExactSizeIterator for GenericIter<'a> {} +#[derive(Debug)] pub struct Iter<'a> { taglist: &'a TagListRef, idx: u32, diff --git a/gstreamer/src/typefind.rs b/gstreamer/src/typefind.rs index f8bb4e586..e0414f794 100644 --- a/gstreamer/src/typefind.rs +++ b/gstreamer/src/typefind.rs @@ -21,6 +21,7 @@ use std::ptr; use std::slice; #[repr(C)] +#[derive(Debug)] pub struct TypeFind<'a>(ffi::GstTypeFind, PhantomData<&'a ()>); pub trait TypeFindImpl { @@ -152,6 +153,7 @@ unsafe extern "C" fn type_find_get_length(data: glib_ffi::gpointer) -> u64 { find.get_length().unwrap_or(u64::MAX) } +#[derive(Debug)] pub struct SliceTypeFind> { pub probability: Option, pub caps: Option,