From 2290262c2e3b147f4ef8c6a90c62869484db12b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 24 May 2023 10:36:08 +0300 Subject: [PATCH] gstreamer: Add `fmt::Debug` impls for owned `Event`/`Query`/`Message` too Part-of: --- gstreamer/src/event.rs | 194 ++++++++++++++++++++++++++++++++ gstreamer/src/message.rs | 236 +++++++++++++++++++++++++++++++++++++++ gstreamer/src/query.rs | 116 +++++++++++++++++++ 3 files changed, 546 insertions(+) diff --git a/gstreamer/src/event.rs b/gstreamer/src/event.rs index 25060f256..69ac80054 100644 --- a/gstreamer/src/event.rs +++ b/gstreamer/src/event.rs @@ -454,6 +454,12 @@ impl std::fmt::Debug for FlushStart { } } +impl std::fmt::Debug for FlushStart { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + FlushStart::::fmt(self, f) + } +} + declare_concrete_event!(FlushStop, T); impl FlushStop { #[doc(alias = "gst_event_new_flush_stop")] @@ -494,6 +500,12 @@ impl std::fmt::Debug for FlushStop { } } +impl std::fmt::Debug for FlushStop { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + FlushStop::::fmt(self, f) + } +} + declare_concrete_event!(@sticky StreamStart, T); impl StreamStart { #[doc(alias = "gst_event_new_stream_start")] @@ -575,6 +587,12 @@ impl std::fmt::Debug for StreamStart { } } +impl std::fmt::Debug for StreamStart { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StreamStart::::fmt(self, f) + } +} + declare_concrete_event!(@sticky Caps, T); impl Caps { #[doc(alias = "gst_event_new_caps")] @@ -620,6 +638,12 @@ impl std::fmt::Debug for Caps { } } +impl std::fmt::Debug for Caps { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Caps::::fmt(self, f) + } +} + declare_concrete_event!(@sticky Segment, T); impl Segment { #[doc(alias = "gst_event_new_segment")] @@ -661,6 +685,12 @@ impl std::fmt::Debug for Segment { } } +impl std::fmt::Debug for Segment { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Segment::::fmt(self, f) + } +} + declare_concrete_event!(@sticky StreamCollection, T); impl StreamCollection { #[doc(alias = "gst_event_new_stream_collection")] @@ -700,6 +730,12 @@ impl std::fmt::Debug for StreamCollection { } } +impl std::fmt::Debug for StreamCollection { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StreamCollection::::fmt(self, f) + } +} + declare_concrete_event!(@sticky Tag, T); impl Tag { #[doc(alias = "gst_event_new_tag")] @@ -745,6 +781,12 @@ impl std::fmt::Debug for Tag { } } +impl std::fmt::Debug for Tag { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Tag::::fmt(self, f) + } +} + declare_concrete_event!(@sticky Buffersize, T); impl Buffersize { #[doc(alias = "gst_event_new_buffer_size")] @@ -809,6 +851,12 @@ impl std::fmt::Debug for Buffersize { } } +impl std::fmt::Debug for Buffersize { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Buffersize::::fmt(self, f) + } +} + declare_concrete_event!(@sticky SinkMessage, T); impl SinkMessage { #[doc(alias = "gst_event_new_sink_message")] @@ -848,6 +896,12 @@ impl std::fmt::Debug for SinkMessage { } } +impl std::fmt::Debug for SinkMessage { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + SinkMessage::::fmt(self, f) + } +} + declare_concrete_event!(@sticky StreamGroupDone, T); impl StreamGroupDone { #[doc(alias = "gst_event_new_stream_group_done")] @@ -890,6 +944,12 @@ impl std::fmt::Debug for StreamGroupDone { } } +impl std::fmt::Debug for StreamGroupDone { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StreamGroupDone::::fmt(self, f) + } +} + declare_concrete_event!(@sticky Eos, T); impl Eos { #[doc(alias = "gst_event_new_eos")] @@ -915,6 +975,12 @@ impl std::fmt::Debug for Eos { } } +impl std::fmt::Debug for Eos { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Eos::::fmt(self, f) + } +} + declare_concrete_event!(@sticky Toc, T); impl Toc { // FIXME could use false for updated as default @@ -969,6 +1035,12 @@ impl std::fmt::Debug for Toc { } } +impl std::fmt::Debug for Toc { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Toc::::fmt(self, f) + } +} + declare_concrete_event!(@sticky Protection, T); impl Protection { #[doc(alias = "gst_event_new_protection")] @@ -1034,6 +1106,12 @@ impl std::fmt::Debug for Protection { } } +impl std::fmt::Debug for Protection { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Protection::::fmt(self, f) + } +} + declare_concrete_event!(SegmentDone, T); impl SegmentDone { #[doc(alias = "gst_event_new_segment_done")] @@ -1078,6 +1156,12 @@ impl std::fmt::Debug for SegmentDone { } } +impl std::fmt::Debug for SegmentDone { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + SegmentDone::::fmt(self, f) + } +} + declare_concrete_event!(Gap, T); impl Gap { #[doc(alias = "gst_event_new_gap")] @@ -1140,6 +1224,12 @@ impl std::fmt::Debug for Gap { } } +impl std::fmt::Debug for Gap { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Gap::::fmt(self, f) + } +} + #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] declare_concrete_event!(@sticky InstantRateChange, T); @@ -1196,6 +1286,13 @@ impl std::fmt::Debug for InstantRateChange { } } +#[cfg(feature = "v1_18")] +impl std::fmt::Debug for InstantRateChange { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + InstantRateChange::::fmt(self, f) + } +} + declare_concrete_event!(Qos, T); impl Qos { #[doc(alias = "gst_event_new_qos")] @@ -1260,6 +1357,12 @@ impl std::fmt::Debug for Qos { } } +impl std::fmt::Debug for Qos { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Qos::::fmt(self, f) + } +} + declare_concrete_event!(Seek, T); impl Seek { #[doc(alias = "gst_event_new_seek")] @@ -1376,6 +1479,12 @@ impl std::fmt::Debug for Seek { } } +impl std::fmt::Debug for Seek { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Seek::::fmt(self, f) + } +} + declare_concrete_event!(Navigation, T); impl Navigation { #[doc(alias = "gst_event_new_navigation")] @@ -1401,6 +1510,12 @@ impl std::fmt::Debug for Navigation { } } +impl std::fmt::Debug for Navigation { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Navigation::::fmt(self, f) + } +} + declare_concrete_event!(Latency, T); impl Latency { #[doc(alias = "gst_event_new_latency")] @@ -1441,6 +1556,12 @@ impl std::fmt::Debug for Latency { } } +impl std::fmt::Debug for Latency { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Latency::::fmt(self, f) + } +} + declare_concrete_event!(Step, T); impl Step { #[doc(alias = "gst_event_new_step")] @@ -1508,6 +1629,12 @@ impl std::fmt::Debug for Step { } } +impl std::fmt::Debug for Step { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Step::::fmt(self, f) + } +} + declare_concrete_event!(Reconfigure, T); impl Reconfigure { #[doc(alias = "gst_event_new_reconfigure")] @@ -1533,6 +1660,12 @@ impl std::fmt::Debug for Reconfigure { } } +impl std::fmt::Debug for Reconfigure { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Reconfigure::::fmt(self, f) + } +} + declare_concrete_event!(TocSelect, T); impl TocSelect { #[doc(alias = "gst_event_new_toc_select")] @@ -1572,6 +1705,12 @@ impl std::fmt::Debug for TocSelect { } } +impl std::fmt::Debug for TocSelect { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + TocSelect::::fmt(self, f) + } +} + declare_concrete_event!(SelectStreams, T); impl SelectStreams { #[doc(alias = "gst_event_new_select_streams")] @@ -1612,6 +1751,12 @@ impl std::fmt::Debug for SelectStreams { } } +impl std::fmt::Debug for SelectStreams { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + SelectStreams::::fmt(self, f) + } +} + #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] declare_concrete_event!(InstantRateSyncTime, T); @@ -1681,6 +1826,13 @@ impl std::fmt::Debug for InstantRateSyncTime { } } +#[cfg(feature = "v1_18")] +impl std::fmt::Debug for InstantRateSyncTime { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + InstantRateSyncTime::::fmt(self, f) + } +} + declare_concrete_event!(CustomUpstream, T); impl CustomUpstream { #[doc(alias = "gst_event_new_custom")] @@ -1706,6 +1858,12 @@ impl std::fmt::Debug for CustomUpstream { } } +impl std::fmt::Debug for CustomUpstream { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + CustomUpstream::::fmt(self, f) + } +} + declare_concrete_event!(CustomDownstream, T); impl CustomDownstream { #[doc(alias = "gst_event_new_custom")] @@ -1731,6 +1889,12 @@ impl std::fmt::Debug for CustomDownstream { } } +impl std::fmt::Debug for CustomDownstream { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + CustomDownstream::::fmt(self, f) + } +} + declare_concrete_event!(CustomDownstreamOob, T); impl CustomDownstreamOob { #[doc(alias = "gst_event_new_custom")] @@ -1756,6 +1920,12 @@ impl std::fmt::Debug for CustomDownstreamOob { } } +impl std::fmt::Debug for CustomDownstreamOob { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + CustomDownstreamOob::::fmt(self, f) + } +} + declare_concrete_event!(@sticky CustomDownstreamSticky, T); impl CustomDownstreamSticky { #[doc(alias = "gst_event_new_custom")] @@ -1781,6 +1951,12 @@ impl std::fmt::Debug for CustomDownstreamSticky { } } +impl std::fmt::Debug for CustomDownstreamSticky { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + CustomDownstreamSticky::::fmt(self, f) + } +} + declare_concrete_event!(CustomBoth, T); impl CustomBoth { #[doc(alias = "gst_event_new_custom")] @@ -1806,6 +1982,12 @@ impl std::fmt::Debug for CustomBoth { } } +impl std::fmt::Debug for CustomBoth { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + CustomBoth::::fmt(self, f) + } +} + declare_concrete_event!(CustomBothOob, T); impl CustomBothOob { #[doc(alias = "gst_event_new_custom")] @@ -1831,6 +2013,12 @@ impl std::fmt::Debug for CustomBothOob { } } +impl std::fmt::Debug for CustomBothOob { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + CustomBothOob::::fmt(self, f) + } +} + declare_concrete_event!(Other, T); impl std::fmt::Debug for Other { @@ -1843,6 +2031,12 @@ impl std::fmt::Debug for Other { } } +impl std::fmt::Debug for Other { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Other::::fmt(self, f) + } +} + struct EventBuilder<'a> { seqnum: Option, running_time_offset: Option, diff --git a/gstreamer/src/message.rs b/gstreamer/src/message.rs index 1acd5ad45..16c2949af 100644 --- a/gstreamer/src/message.rs +++ b/gstreamer/src/message.rs @@ -327,6 +327,12 @@ impl std::fmt::Debug for Eos { } } +impl std::fmt::Debug for Eos { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Eos::::fmt(self, f) + } +} + declare_concrete_message!(Error, T); impl Error { #[doc(alias = "gst_message_new_error")] @@ -414,6 +420,12 @@ impl std::fmt::Debug for Error { } } +impl std::fmt::Debug for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Error::::fmt(self, f) + } +} + declare_concrete_message!(Warning, T); impl Warning { #[doc(alias = "gst_message_new_warning")] @@ -502,6 +514,12 @@ impl std::fmt::Debug for Warning { } } +impl std::fmt::Debug for Warning { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Warning::::fmt(self, f) + } +} + declare_concrete_message!(Info, T); impl Info { #[doc(alias = "gst_message_new_info")] @@ -590,6 +608,12 @@ impl std::fmt::Debug for Info { } } +impl std::fmt::Debug for Info { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Info::::fmt(self, f) + } +} + declare_concrete_message!(Tag, T); impl Tag { #[doc(alias = "gst_message_new_tag")] @@ -625,6 +649,12 @@ impl std::fmt::Debug for Tag { } } +impl std::fmt::Debug for Tag { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Tag::::fmt(self, f) + } +} + declare_concrete_message!(Buffering, T); impl Buffering { #[doc(alias = "gst_message_new_buffering")] @@ -687,6 +717,12 @@ impl std::fmt::Debug for Buffering { } } +impl std::fmt::Debug for Buffering { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Buffering::::fmt(self, f) + } +} + declare_concrete_message!(StateChanged, T); impl StateChanged { #[doc(alias = "gst_message_new_state_changed")] @@ -769,6 +805,12 @@ impl std::fmt::Debug for StateChanged { } } +impl std::fmt::Debug for StateChanged { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StateChanged::::fmt(self, f) + } +} + declare_concrete_message!(StateDirty, T); impl StateDirty { #[doc(alias = "gst_message_new_state_dirty")] @@ -793,6 +835,12 @@ impl std::fmt::Debug for StateDirty { } } +impl std::fmt::Debug for StateDirty { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StateDirty::::fmt(self, f) + } +} + declare_concrete_message!(StepDone, T); impl StepDone { #[doc(alias = "gst_message_new_step_done")] @@ -890,6 +938,12 @@ impl std::fmt::Debug for StepDone { } } +impl std::fmt::Debug for StepDone { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StepDone::::fmt(self, f) + } +} + declare_concrete_message!(ClockProvide, T); impl ClockProvide { #[doc(alias = "gst_message_new_clock_provide")] @@ -944,6 +998,12 @@ impl std::fmt::Debug for ClockProvide { } } +impl std::fmt::Debug for ClockProvide { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + ClockProvide::::fmt(self, f) + } +} + declare_concrete_message!(ClockLost, T); impl ClockLost { #[doc(alias = "gst_message_new_clock_lost")] @@ -981,6 +1041,12 @@ impl std::fmt::Debug for ClockLost { } } +impl std::fmt::Debug for ClockLost { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + ClockLost::::fmt(self, f) + } +} + declare_concrete_message!(NewClock, T); impl NewClock { #[doc(alias = "gst_message_new_new_clock")] @@ -1018,6 +1084,12 @@ impl std::fmt::Debug for NewClock { } } +impl std::fmt::Debug for NewClock { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + NewClock::::fmt(self, f) + } +} + declare_concrete_message!(StructureChange, T); impl StructureChange { #[doc(alias = "gst_message_new_structure_change")] @@ -1073,6 +1145,12 @@ impl std::fmt::Debug for StructureChange { } } +impl std::fmt::Debug for StructureChange { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StructureChange::::fmt(self, f) + } +} + declare_concrete_message!(StreamStatus, T); impl StreamStatus { #[doc(alias = "gst_message_new_stream_status")] @@ -1120,6 +1198,12 @@ impl std::fmt::Debug for StreamStatus { } } +impl std::fmt::Debug for StreamStatus { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StreamStatus::::fmt(self, f) + } +} + declare_concrete_message!(Application, T); impl Application { #[doc(alias = "gst_message_new_application")] @@ -1144,6 +1228,12 @@ impl std::fmt::Debug for Application { } } +impl std::fmt::Debug for Application { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Application::::fmt(self, f) + } +} + declare_concrete_message!(Element, T); impl Element { #[doc(alias = "gst_message_new_element")] @@ -1168,6 +1258,12 @@ impl std::fmt::Debug for Element { } } +impl std::fmt::Debug for Element { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Element::::fmt(self, f) + } +} + declare_concrete_message!(SegmentStart, T); impl SegmentStart { #[doc(alias = "gst_message_new_segment_start")] @@ -1209,6 +1305,12 @@ impl std::fmt::Debug for SegmentStart { } } +impl std::fmt::Debug for SegmentStart { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + SegmentStart::::fmt(self, f) + } +} + declare_concrete_message!(SegmentDone, T); impl SegmentDone { #[doc(alias = "gst_message_new_segment_done")] @@ -1250,6 +1352,12 @@ impl std::fmt::Debug for SegmentDone { } } +impl std::fmt::Debug for SegmentDone { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + SegmentDone::::fmt(self, f) + } +} + declare_concrete_message!(DurationChanged, T); impl DurationChanged { #[doc(alias = "gst_message_new_duration_changed")] @@ -1274,6 +1382,12 @@ impl std::fmt::Debug for DurationChanged { } } +impl std::fmt::Debug for DurationChanged { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + DurationChanged::::fmt(self, f) + } +} + declare_concrete_message!(Latency, T); impl Latency { #[doc(alias = "gst_message_new_latency")] @@ -1298,6 +1412,12 @@ impl std::fmt::Debug for Latency { } } +impl std::fmt::Debug for Latency { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Latency::::fmt(self, f) + } +} + declare_concrete_message!(AsyncStart, T); impl AsyncStart { #[doc(alias = "gst_message_new_async_start")] @@ -1322,6 +1442,12 @@ impl std::fmt::Debug for AsyncStart { } } +impl std::fmt::Debug for AsyncStart { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + AsyncStart::::fmt(self, f) + } +} + declare_concrete_message!(AsyncDone, T); impl AsyncDone { #[doc(alias = "gst_message_new_async_done")] @@ -1359,6 +1485,12 @@ impl std::fmt::Debug for AsyncDone { } } +impl std::fmt::Debug for AsyncDone { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + AsyncDone::::fmt(self, f) + } +} + declare_concrete_message!(RequestState, T); impl RequestState { #[doc(alias = "gst_message_new_request_state")] @@ -1396,6 +1528,12 @@ impl std::fmt::Debug for RequestState { } } +impl std::fmt::Debug for RequestState { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + RequestState::::fmt(self, f) + } +} + declare_concrete_message!(StepStart, T); impl StepStart { #[doc(alias = "gst_message_new_step_start")] @@ -1471,6 +1609,12 @@ impl std::fmt::Debug for StepStart { } } +impl std::fmt::Debug for StepStart { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StepStart::::fmt(self, f) + } +} + declare_concrete_message!(Qos, T); impl Qos { #[doc(alias = "gst_message_new_qos")] @@ -1607,6 +1751,12 @@ impl std::fmt::Debug for Qos { } } +impl std::fmt::Debug for Qos { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Qos::::fmt(self, f) + } +} + declare_concrete_message!(Progress, T); impl Progress { #[doc(alias = "gst_message_new_progress")] @@ -1660,6 +1810,12 @@ impl std::fmt::Debug for Progress { } } +impl std::fmt::Debug for Progress { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Progress::::fmt(self, f) + } +} + declare_concrete_message!(Toc, T); impl Toc { // FIXME could use false for updated as default @@ -1698,6 +1854,12 @@ impl std::fmt::Debug for Toc { } } +impl std::fmt::Debug for Toc { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Toc::::fmt(self, f) + } +} + declare_concrete_message!(ResetTime, T); impl ResetTime { #[doc(alias = "gst_message_new_reset_time")] @@ -1735,6 +1897,12 @@ impl std::fmt::Debug for ResetTime { } } +impl std::fmt::Debug for ResetTime { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + ResetTime::::fmt(self, f) + } +} + declare_concrete_message!(StreamStart, T); impl StreamStart { #[doc(alias = "gst_message_new_stream_start")] @@ -1782,6 +1950,12 @@ impl std::fmt::Debug for StreamStart { } } +impl std::fmt::Debug for StreamStart { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StreamStart::::fmt(self, f) + } +} + declare_concrete_message!(NeedContext, T); impl NeedContext { #[doc(alias = "gst_message_new_need_context")] @@ -1819,6 +1993,12 @@ impl std::fmt::Debug for NeedContext { } } +impl std::fmt::Debug for NeedContext { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + NeedContext::::fmt(self, f) + } +} + declare_concrete_message!(HaveContext, T); impl HaveContext { #[doc(alias = "gst_message_new_have_context")] @@ -1854,6 +2034,12 @@ impl std::fmt::Debug for HaveContext { } } +impl std::fmt::Debug for HaveContext { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + HaveContext::::fmt(self, f) + } +} + declare_concrete_message!(DeviceAdded, T); impl DeviceAdded { #[doc(alias = "gst_message_new_device_added")] @@ -1891,6 +2077,12 @@ impl std::fmt::Debug for DeviceAdded { } } +impl std::fmt::Debug for DeviceAdded { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + DeviceAdded::::fmt(self, f) + } +} + declare_concrete_message!(DeviceRemoved, T); impl DeviceRemoved { #[doc(alias = "gst_message_new_device_removed")] @@ -1928,6 +2120,12 @@ impl std::fmt::Debug for DeviceRemoved { } } +impl std::fmt::Debug for DeviceRemoved { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + DeviceRemoved::::fmt(self, f) + } +} + declare_concrete_message!(PropertyNotify, T); impl PropertyNotify { #[doc(alias = "gst_message_new_property_notify")] @@ -1985,6 +2183,12 @@ impl std::fmt::Debug for PropertyNotify { } } +impl std::fmt::Debug for PropertyNotify { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + PropertyNotify::::fmt(self, f) + } +} + declare_concrete_message!(StreamCollection, T); impl StreamCollection { #[doc(alias = "gst_message_new_stream_collection")] @@ -2022,6 +2226,12 @@ impl std::fmt::Debug for StreamCollection { } } +impl std::fmt::Debug for StreamCollection { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StreamCollection::::fmt(self, f) + } +} + declare_concrete_message!(StreamsSelected, T); impl StreamsSelected { #[doc(alias = "gst_message_new_streams_selected")] @@ -2078,6 +2288,12 @@ impl std::fmt::Debug for StreamsSelected { } } +impl std::fmt::Debug for StreamsSelected { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + StreamsSelected::::fmt(self, f) + } +} + declare_concrete_message!(Redirect, T); impl Redirect { #[doc(alias = "gst_message_new_redirect")] @@ -2140,6 +2356,12 @@ impl std::fmt::Debug for Redirect { } } +impl std::fmt::Debug for Redirect { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Redirect::::fmt(self, f) + } +} + #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] declare_concrete_message!(DeviceChanged, T); @@ -2190,6 +2412,13 @@ impl std::fmt::Debug for DeviceChanged { } } +#[cfg(feature = "v1_16")] +impl std::fmt::Debug for DeviceChanged { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + DeviceChanged::::fmt(self, f) + } +} + #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] declare_concrete_message!(InstantRateRequest, T); @@ -2235,6 +2464,13 @@ impl std::fmt::Debug for InstantRateRequest { } } +#[cfg(feature = "v1_18")] +impl std::fmt::Debug for InstantRateRequest { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + InstantRateRequest::::fmt(self, f) + } +} + struct MessageBuilder<'a> { src: Option, seqnum: Option, diff --git a/gstreamer/src/query.rs b/gstreamer/src/query.rs index 0f531de39..7e467ef73 100644 --- a/gstreamer/src/query.rs +++ b/gstreamer/src/query.rs @@ -360,6 +360,12 @@ impl std::fmt::Debug for Position { } } +impl std::fmt::Debug for Position { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Position::::fmt(self, f) + } +} + declare_concrete_query!(Duration, T); impl Duration { #[doc(alias = "gst_query_new_duration")] @@ -418,6 +424,12 @@ impl std::fmt::Debug for Duration { } } +impl std::fmt::Debug for Duration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Duration::::fmt(self, f) + } +} + declare_concrete_query!(Latency, T); impl Latency { #[doc(alias = "gst_query_new_latency")] @@ -484,6 +496,12 @@ impl std::fmt::Debug for Latency { } } +impl std::fmt::Debug for Latency { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Latency::::fmt(self, f) + } +} + declare_concrete_query!(Seeking, T); impl Seeking { #[doc(alias = "gst_query_new_seeking")] @@ -567,6 +585,12 @@ impl std::fmt::Debug for Seeking { } } +impl std::fmt::Debug for Seeking { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Seeking::::fmt(self, f) + } +} + declare_concrete_query!(Segment, T); impl Segment { #[doc(alias = "gst_query_new_segment")] @@ -649,6 +673,12 @@ impl std::fmt::Debug for Segment { } } +impl std::fmt::Debug for Segment { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Segment::::fmt(self, f) + } +} + declare_concrete_query!(Convert, T); impl Convert { #[doc(alias = "gst_query_new_convert")] @@ -735,6 +765,12 @@ impl std::fmt::Debug for Convert { } } +impl std::fmt::Debug for Convert { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Convert::::fmt(self, f) + } +} + declare_concrete_query!(Formats, T); impl Formats { #[doc(alias = "gst_query_new_formats")] @@ -790,6 +826,12 @@ impl std::fmt::Debug for Formats { } } +impl std::fmt::Debug for Formats { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Formats::::fmt(self, f) + } +} + declare_concrete_query!(Buffering, T); impl Buffering { #[doc(alias = "gst_query_new_buffering")] @@ -1007,6 +1049,12 @@ impl std::fmt::Debug for Buffering { } } +impl std::fmt::Debug for Buffering { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Buffering::::fmt(self, f) + } +} + declare_concrete_query!(Custom, T); impl Custom { #[doc(alias = "gst_query_new_custom")] @@ -1029,6 +1077,12 @@ impl std::fmt::Debug for Custom { } } +impl std::fmt::Debug for Custom { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Custom::::fmt(self, f) + } +} + declare_concrete_query!(Uri, T); impl Uri { #[doc(alias = "gst_query_new_uri")] @@ -1116,6 +1170,12 @@ impl std::fmt::Debug for Uri { } } +impl std::fmt::Debug for Uri { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Uri::::fmt(self, f) + } +} + declare_concrete_query!(Allocation, T); impl Allocation { #[doc(alias = "gst_query_new_allocation")] @@ -1393,6 +1453,12 @@ impl std::fmt::Debug for Allocation { } } +impl std::fmt::Debug for Allocation { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Allocation::::fmt(self, f) + } +} + declare_concrete_query!(Scheduling, T); impl Scheduling { #[doc(alias = "gst_query_new_scheduling")] @@ -1511,6 +1577,12 @@ impl std::fmt::Debug for Scheduling { } } +impl std::fmt::Debug for Scheduling { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Scheduling::::fmt(self, f) + } +} + declare_concrete_query!(AcceptCaps, T); impl AcceptCaps { #[doc(alias = "gst_query_new_accept_caps")] @@ -1569,6 +1641,12 @@ impl std::fmt::Debug for AcceptCaps { } } +impl std::fmt::Debug for AcceptCaps { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + AcceptCaps::::fmt(self, f) + } +} + declare_concrete_query!(Caps, T); impl Caps { #[doc(alias = "gst_query_new_caps")] @@ -1646,6 +1724,12 @@ impl std::fmt::Debug for Caps { } } +impl std::fmt::Debug for Caps { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Caps::::fmt(self, f) + } +} + declare_concrete_query!(Drain, T); impl Drain { #[doc(alias = "gst_query_new_drain")] @@ -1669,6 +1753,12 @@ impl std::fmt::Debug for Drain { } } +impl std::fmt::Debug for Drain { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Drain::::fmt(self, f) + } +} + declare_concrete_query!(Context, T); impl Context { #[doc(alias = "gst_query_new_context")] @@ -1740,6 +1830,12 @@ impl std::fmt::Debug for Context { } } +impl std::fmt::Debug for Context { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Context::::fmt(self, f) + } +} + #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] declare_concrete_query!(Bitrate, T); @@ -1793,6 +1889,13 @@ impl std::fmt::Debug for Bitrate { } } +#[cfg(feature = "v1_16")] +impl std::fmt::Debug for Bitrate { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Bitrate::::fmt(self, f) + } +} + #[cfg(feature = "v1_22")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))] declare_concrete_query!(Selectable, T); @@ -1846,6 +1949,13 @@ impl std::fmt::Debug for Selectable { } } +#[cfg(feature = "v1_22")] +impl std::fmt::Debug for Selectable { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Selectable::::fmt(self, f) + } +} + declare_concrete_query!(Other, T); impl std::fmt::Debug for Other { @@ -1856,6 +1966,12 @@ impl std::fmt::Debug for Other { } } +impl std::fmt::Debug for Other { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + Other::::fmt(self, f) + } +} + #[cfg(test)] mod tests { use super::*;