gstreamer: Add fmt::Debug impls for owned Event/Query/Message too

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1269>
This commit is contained in:
Sebastian Dröge 2023-05-24 10:36:08 +03:00
parent fadca54d51
commit 2290262c2e
3 changed files with 546 additions and 0 deletions

View file

@ -454,6 +454,12 @@ impl std::fmt::Debug for FlushStart {
}
}
impl std::fmt::Debug for FlushStart<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
FlushStart::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(FlushStop, T);
impl FlushStop<Event> {
#[doc(alias = "gst_event_new_flush_stop")]
@ -494,6 +500,12 @@ impl std::fmt::Debug for FlushStop {
}
}
impl std::fmt::Debug for FlushStop<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
FlushStop::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky StreamStart, T);
impl StreamStart<Event> {
#[doc(alias = "gst_event_new_stream_start")]
@ -575,6 +587,12 @@ impl std::fmt::Debug for StreamStart {
}
}
impl std::fmt::Debug for StreamStart<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StreamStart::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky Caps, T);
impl Caps<Event> {
#[doc(alias = "gst_event_new_caps")]
@ -620,6 +638,12 @@ impl std::fmt::Debug for Caps {
}
}
impl std::fmt::Debug for Caps<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Caps::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky Segment, T);
impl Segment<Event> {
#[doc(alias = "gst_event_new_segment")]
@ -661,6 +685,12 @@ impl std::fmt::Debug for Segment {
}
}
impl std::fmt::Debug for Segment<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Segment::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky StreamCollection, T);
impl StreamCollection<Event> {
#[doc(alias = "gst_event_new_stream_collection")]
@ -700,6 +730,12 @@ impl std::fmt::Debug for StreamCollection {
}
}
impl std::fmt::Debug for StreamCollection<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StreamCollection::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky Tag, T);
impl Tag<Event> {
#[doc(alias = "gst_event_new_tag")]
@ -745,6 +781,12 @@ impl std::fmt::Debug for Tag {
}
}
impl std::fmt::Debug for Tag<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Tag::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky Buffersize, T);
impl Buffersize<Event> {
#[doc(alias = "gst_event_new_buffer_size")]
@ -809,6 +851,12 @@ impl std::fmt::Debug for Buffersize {
}
}
impl std::fmt::Debug for Buffersize<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Buffersize::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky SinkMessage, T);
impl SinkMessage<Event> {
#[doc(alias = "gst_event_new_sink_message")]
@ -848,6 +896,12 @@ impl std::fmt::Debug for SinkMessage {
}
}
impl std::fmt::Debug for SinkMessage<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
SinkMessage::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky StreamGroupDone, T);
impl StreamGroupDone<Event> {
#[doc(alias = "gst_event_new_stream_group_done")]
@ -890,6 +944,12 @@ impl std::fmt::Debug for StreamGroupDone {
}
}
impl std::fmt::Debug for StreamGroupDone<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StreamGroupDone::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky Eos, T);
impl Eos<Event> {
#[doc(alias = "gst_event_new_eos")]
@ -915,6 +975,12 @@ impl std::fmt::Debug for Eos {
}
}
impl std::fmt::Debug for Eos<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Eos::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky Toc, T);
impl Toc<Event> {
// FIXME could use false for updated as default
@ -969,6 +1035,12 @@ impl std::fmt::Debug for Toc {
}
}
impl std::fmt::Debug for Toc<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Toc::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky Protection, T);
impl Protection<Event> {
#[doc(alias = "gst_event_new_protection")]
@ -1034,6 +1106,12 @@ impl std::fmt::Debug for Protection {
}
}
impl std::fmt::Debug for Protection<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Protection::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(SegmentDone, T);
impl SegmentDone<Event> {
#[doc(alias = "gst_event_new_segment_done")]
@ -1078,6 +1156,12 @@ impl std::fmt::Debug for SegmentDone {
}
}
impl std::fmt::Debug for SegmentDone<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
SegmentDone::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(Gap, T);
impl Gap<Event> {
#[doc(alias = "gst_event_new_gap")]
@ -1140,6 +1224,12 @@ impl std::fmt::Debug for Gap {
}
}
impl std::fmt::Debug for Gap<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Gap::<EventRef>::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<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
InstantRateChange::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(Qos, T);
impl Qos<Event> {
#[doc(alias = "gst_event_new_qos")]
@ -1260,6 +1357,12 @@ impl std::fmt::Debug for Qos {
}
}
impl std::fmt::Debug for Qos<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Qos::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(Seek, T);
impl Seek<Event> {
#[doc(alias = "gst_event_new_seek")]
@ -1376,6 +1479,12 @@ impl std::fmt::Debug for Seek {
}
}
impl std::fmt::Debug for Seek<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Seek::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(Navigation, T);
impl Navigation<Event> {
#[doc(alias = "gst_event_new_navigation")]
@ -1401,6 +1510,12 @@ impl std::fmt::Debug for Navigation {
}
}
impl std::fmt::Debug for Navigation<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Navigation::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(Latency, T);
impl Latency<Event> {
#[doc(alias = "gst_event_new_latency")]
@ -1441,6 +1556,12 @@ impl std::fmt::Debug for Latency {
}
}
impl std::fmt::Debug for Latency<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Latency::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(Step, T);
impl Step<Event> {
#[doc(alias = "gst_event_new_step")]
@ -1508,6 +1629,12 @@ impl std::fmt::Debug for Step {
}
}
impl std::fmt::Debug for Step<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Step::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(Reconfigure, T);
impl Reconfigure<Event> {
#[doc(alias = "gst_event_new_reconfigure")]
@ -1533,6 +1660,12 @@ impl std::fmt::Debug for Reconfigure {
}
}
impl std::fmt::Debug for Reconfigure<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Reconfigure::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(TocSelect, T);
impl TocSelect<Event> {
#[doc(alias = "gst_event_new_toc_select")]
@ -1572,6 +1705,12 @@ impl std::fmt::Debug for TocSelect {
}
}
impl std::fmt::Debug for TocSelect<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
TocSelect::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(SelectStreams, T);
impl SelectStreams<Event> {
#[doc(alias = "gst_event_new_select_streams")]
@ -1612,6 +1751,12 @@ impl std::fmt::Debug for SelectStreams {
}
}
impl std::fmt::Debug for SelectStreams<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
SelectStreams::<EventRef>::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<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
InstantRateSyncTime::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(CustomUpstream, T);
impl CustomUpstream<Event> {
#[doc(alias = "gst_event_new_custom")]
@ -1706,6 +1858,12 @@ impl std::fmt::Debug for CustomUpstream {
}
}
impl std::fmt::Debug for CustomUpstream<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
CustomUpstream::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(CustomDownstream, T);
impl CustomDownstream<Event> {
#[doc(alias = "gst_event_new_custom")]
@ -1731,6 +1889,12 @@ impl std::fmt::Debug for CustomDownstream {
}
}
impl std::fmt::Debug for CustomDownstream<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
CustomDownstream::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(CustomDownstreamOob, T);
impl CustomDownstreamOob<Event> {
#[doc(alias = "gst_event_new_custom")]
@ -1756,6 +1920,12 @@ impl std::fmt::Debug for CustomDownstreamOob {
}
}
impl std::fmt::Debug for CustomDownstreamOob<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
CustomDownstreamOob::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(@sticky CustomDownstreamSticky, T);
impl CustomDownstreamSticky<Event> {
#[doc(alias = "gst_event_new_custom")]
@ -1781,6 +1951,12 @@ impl std::fmt::Debug for CustomDownstreamSticky {
}
}
impl std::fmt::Debug for CustomDownstreamSticky<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
CustomDownstreamSticky::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(CustomBoth, T);
impl CustomBoth<Event> {
#[doc(alias = "gst_event_new_custom")]
@ -1806,6 +1982,12 @@ impl std::fmt::Debug for CustomBoth {
}
}
impl std::fmt::Debug for CustomBoth<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
CustomBoth::<EventRef>::fmt(self, f)
}
}
declare_concrete_event!(CustomBothOob, T);
impl CustomBothOob<Event> {
#[doc(alias = "gst_event_new_custom")]
@ -1831,6 +2013,12 @@ impl std::fmt::Debug for CustomBothOob {
}
}
impl std::fmt::Debug for CustomBothOob<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
CustomBothOob::<EventRef>::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<Event> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Other::<EventRef>::fmt(self, f)
}
}
struct EventBuilder<'a> {
seqnum: Option<Seqnum>,
running_time_offset: Option<i64>,

View file

@ -327,6 +327,12 @@ impl std::fmt::Debug for Eos {
}
}
impl std::fmt::Debug for Eos<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Eos::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Error::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Warning::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Info::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Tag::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Buffering::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StateChanged::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StateDirty::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StepDone::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
ClockProvide::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
ClockLost::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
NewClock::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StructureChange::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StreamStatus::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Application::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Element::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
SegmentStart::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
SegmentDone::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
DurationChanged::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Latency::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
AsyncStart::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
AsyncDone::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
RequestState::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StepStart::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Qos::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Progress::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Toc::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
ResetTime::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StreamStart::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
NeedContext::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
HaveContext::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
DeviceAdded::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
DeviceRemoved::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
PropertyNotify::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StreamCollection::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
StreamsSelected::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Redirect::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
DeviceChanged::<MessageRef>::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<Message> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
InstantRateRequest::<MessageRef>::fmt(self, f)
}
}
struct MessageBuilder<'a> {
src: Option<Object>,
seqnum: Option<Seqnum>,

View file

@ -360,6 +360,12 @@ impl std::fmt::Debug for Position {
}
}
impl std::fmt::Debug for Position<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Position::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Duration, T);
impl Duration<Query> {
#[doc(alias = "gst_query_new_duration")]
@ -418,6 +424,12 @@ impl std::fmt::Debug for Duration {
}
}
impl std::fmt::Debug for Duration<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Duration::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Latency, T);
impl Latency<Query> {
#[doc(alias = "gst_query_new_latency")]
@ -484,6 +496,12 @@ impl std::fmt::Debug for Latency {
}
}
impl std::fmt::Debug for Latency<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Latency::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Seeking, T);
impl Seeking<Query> {
#[doc(alias = "gst_query_new_seeking")]
@ -567,6 +585,12 @@ impl std::fmt::Debug for Seeking {
}
}
impl std::fmt::Debug for Seeking<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Seeking::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Segment, T);
impl Segment<Query> {
#[doc(alias = "gst_query_new_segment")]
@ -649,6 +673,12 @@ impl std::fmt::Debug for Segment {
}
}
impl std::fmt::Debug for Segment<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Segment::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Convert, T);
impl Convert<Query> {
#[doc(alias = "gst_query_new_convert")]
@ -735,6 +765,12 @@ impl std::fmt::Debug for Convert {
}
}
impl std::fmt::Debug for Convert<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Convert::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Formats, T);
impl Formats<Query> {
#[doc(alias = "gst_query_new_formats")]
@ -790,6 +826,12 @@ impl std::fmt::Debug for Formats {
}
}
impl std::fmt::Debug for Formats<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Formats::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Buffering, T);
impl Buffering<Query> {
#[doc(alias = "gst_query_new_buffering")]
@ -1007,6 +1049,12 @@ impl std::fmt::Debug for Buffering {
}
}
impl std::fmt::Debug for Buffering<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Buffering::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Custom, T);
impl Custom<Query> {
#[doc(alias = "gst_query_new_custom")]
@ -1029,6 +1077,12 @@ impl std::fmt::Debug for Custom {
}
}
impl std::fmt::Debug for Custom<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Custom::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Uri, T);
impl Uri<Query> {
#[doc(alias = "gst_query_new_uri")]
@ -1116,6 +1170,12 @@ impl std::fmt::Debug for Uri {
}
}
impl std::fmt::Debug for Uri<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Uri::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Allocation, T);
impl Allocation<Query> {
#[doc(alias = "gst_query_new_allocation")]
@ -1393,6 +1453,12 @@ impl std::fmt::Debug for Allocation {
}
}
impl std::fmt::Debug for Allocation<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Allocation::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Scheduling, T);
impl Scheduling<Query> {
#[doc(alias = "gst_query_new_scheduling")]
@ -1511,6 +1577,12 @@ impl std::fmt::Debug for Scheduling {
}
}
impl std::fmt::Debug for Scheduling<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Scheduling::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(AcceptCaps, T);
impl AcceptCaps<Query> {
#[doc(alias = "gst_query_new_accept_caps")]
@ -1569,6 +1641,12 @@ impl std::fmt::Debug for AcceptCaps {
}
}
impl std::fmt::Debug for AcceptCaps<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
AcceptCaps::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Caps, T);
impl Caps<Query> {
#[doc(alias = "gst_query_new_caps")]
@ -1646,6 +1724,12 @@ impl std::fmt::Debug for Caps {
}
}
impl std::fmt::Debug for Caps<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Caps::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Drain, T);
impl Drain<Query> {
#[doc(alias = "gst_query_new_drain")]
@ -1669,6 +1753,12 @@ impl std::fmt::Debug for Drain {
}
}
impl std::fmt::Debug for Drain<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Drain::<QueryRef>::fmt(self, f)
}
}
declare_concrete_query!(Context, T);
impl Context<Query> {
#[doc(alias = "gst_query_new_context")]
@ -1740,6 +1830,12 @@ impl std::fmt::Debug for Context {
}
}
impl std::fmt::Debug for Context<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Context::<QueryRef>::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<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Bitrate::<QueryRef>::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<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Selectable::<QueryRef>::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<Query> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
Other::<QueryRef>::fmt(self, f)
}
}
#[cfg(test)]
mod tests {
use super::*;