From 845832263ba6b9e135b23e9a29c9d109cb2ee9c4 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 5 May 2017 03:59:45 +0530 Subject: [PATCH] decklink: Fix debug logging warnings on Windows HRESULT is unsigned long int, not unsigned int --- sys/decklink/gstdecklink.cpp | 18 +++++++++--------- sys/decklink/gstdecklinkaudiosink.cpp | 10 +++++----- sys/decklink/gstdecklinkaudiosrc.cpp | 4 ++-- sys/decklink/gstdecklinkvideosink.cpp | 16 ++++++++-------- sys/decklink/gstdecklinkvideosrc.cpp | 14 +++++++------- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp index 810b1141d8..1c79e3febe 100644 --- a/sys/decklink/gstdecklink.cpp +++ b/sys/decklink/gstdecklink.cpp @@ -814,7 +814,7 @@ public: video_frame->GetStreamTime (&stream_time, &stream_duration, GST_SECOND); if (res != S_OK) { - GST_ERROR ("Failed to get stream time: 0x%08x", res); + GST_ERROR ("Failed to get stream time: 0x%08lx", res); stream_time = GST_CLOCK_TIME_NONE; stream_duration = GST_CLOCK_TIME_NONE; } @@ -828,7 +828,7 @@ public: &dtc); if (res != S_OK) { - GST_DEBUG_OBJECT (videosrc, "Failed to get timecode: 0x%08x", res); + GST_DEBUG_OBJECT (videosrc, "Failed to get timecode: 0x%08lx", res); dtc = NULL; } } @@ -843,7 +843,7 @@ public: res = audio_packet->GetPacketTime (&packet_time, GST_SECOND); if (res != S_OK) { - GST_ERROR ("Failed to get stream time: 0x%08x", res); + GST_ERROR ("Failed to get stream time: 0x%08lx", res); packet_time = GST_CLOCK_TIME_NONE; } m_input->got_audio_packet (audiosrc, audio_packet, capture_time, @@ -950,7 +950,7 @@ init_devices (gpointer data) ret = decklink->QueryInterface (IID_IDeckLinkInput, (void **) &devices[i].input.input); if (ret != S_OK) { - GST_WARNING ("selected device does not have input interface: 0x%08x", + GST_WARNING ("selected device does not have input interface: 0x%08lx", ret); } else { IDeckLinkDisplayModeIterator *mode_iter; @@ -987,7 +987,7 @@ init_devices (gpointer data) ret = decklink->QueryInterface (IID_IDeckLinkOutput, (void **) &devices[i].output.output); if (ret != S_OK) { - GST_WARNING ("selected device does not have output interface: 0x%08x", + GST_WARNING ("selected device does not have output interface: 0x%08lx", ret); } else { IDeckLinkDisplayModeIterator *mode_iter; @@ -1025,7 +1025,7 @@ init_devices (gpointer data) ret = decklink->QueryInterface (IID_IDeckLinkConfiguration, (void **) &devices[i].input.config); if (ret != S_OK) { - GST_WARNING ("selected device does not have config interface: 0x%08x", + GST_WARNING ("selected device does not have config interface: 0x%08lx", ret); } @@ -1033,8 +1033,8 @@ init_devices (gpointer data) (void **) &devices[i].input.attributes); devices[i].output.attributes = devices[i].input.attributes; if (ret != S_OK) { - GST_WARNING ("selected device does not have attributes interface: 0x%08x", - ret); + GST_WARNING ("selected device does not have attributes interface:" + " 0x%08lx", ret); } ret = iterator->Next (&decklink); @@ -1272,7 +1272,7 @@ gst_decklink_clock_get_internal_time (GstClock * clock) GST_LOG_OBJECT (clock, "result %" GST_TIME_FORMAT " time %" GST_TIME_FORMAT " last time %" GST_TIME_FORMAT " offset %" GST_TIME_FORMAT " start time %" - GST_TIME_FORMAT " (ret: 0x%08x)", GST_TIME_ARGS (result), + GST_TIME_FORMAT " (ret: 0x%08lx)", GST_TIME_ARGS (result), GST_TIME_ARGS (time), GST_TIME_ARGS (last_time), GST_TIME_ARGS (offset), GST_TIME_ARGS (start_time), ret); diff --git a/sys/decklink/gstdecklinkaudiosink.cpp b/sys/decklink/gstdecklinkaudiosink.cpp index 1d631548f3..5d1e324d10 100644 --- a/sys/decklink/gstdecklinkaudiosink.cpp +++ b/sys/decklink/gstdecklinkaudiosink.cpp @@ -275,8 +275,8 @@ public: written_sum += written; } while (len > 0 && res == S_OK); - GST_LOG_OBJECT (m_ringbuffer->sink, "Wrote %u samples: 0x%08x", written_sum, - res); + GST_LOG_OBJECT (m_ringbuffer->sink, "Wrote %u samples: 0x%08lx", + written_sum, res); gst_audio_ring_buffer_clear (GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer), seg); @@ -319,7 +319,7 @@ gst_decklink_audio_sink_ringbuffer_delay (GstAudioRingBuffer * rb) ret = 0; } - GST_DEBUG_OBJECT (self->sink, "Delay: %u (0x%08x)", ret, res); + GST_DEBUG_OBJECT (self->sink, "Delay: %u (0x%08lx)", ret, res); return ret; } @@ -414,7 +414,7 @@ gst_decklink_audio_sink_ringbuffer_acquire (GstAudioRingBuffer * rb, ret = self->output->output->EnableAudioOutput (bmdAudioSampleRate48kHz, sample_depth, spec->info.channels, bmdAudioOutputStreamContinuous); if (ret != S_OK) { - GST_WARNING_OBJECT (self->sink, "Failed to enable audio output 0x%08x", + GST_WARNING_OBJECT (self->sink, "Failed to enable audio output 0x%08lx", ret); return FALSE; } @@ -424,7 +424,7 @@ gst_decklink_audio_sink_ringbuffer_acquire (GstAudioRingBuffer * rb, output->SetAudioCallback (new GStreamerAudioOutputCallback (self)); if (ret != S_OK) { GST_WARNING_OBJECT (self->sink, - "Failed to set audio output callback 0x%08x", ret); + "Failed to set audio output callback 0x%08lx", ret); return FALSE; } diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp index 43c2d42365..57f5ecdb53 100644 --- a/sys/decklink/gstdecklinkaudiosrc.cpp +++ b/sys/decklink/gstdecklinkaudiosrc.cpp @@ -404,7 +404,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) self->input->config->SetInt (bmdDeckLinkConfigAudioInputConnection, conn); if (ret != S_OK) { - GST_ERROR ("set configuration (audio input connection): 0x%08x", ret); + GST_ERROR ("set configuration (audio input connection): 0x%08lx", ret); return FALSE; } } @@ -412,7 +412,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) ret = self->input->input->EnableAudioInput (bmdAudioSampleRate48kHz, sample_depth, self->info.channels); if (ret != S_OK) { - GST_WARNING_OBJECT (self, "Failed to enable audio input: 0x%08x", ret); + GST_WARNING_OBJECT (self, "Failed to enable audio input: 0x%08lx", ret); return FALSE; } diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp index 7586bc3569..96c8706428 100644 --- a/sys/decklink/gstdecklinkvideosink.cpp +++ b/sys/decklink/gstdecklinkvideosink.cpp @@ -403,7 +403,7 @@ gst_decklink_video_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) ret = self->output->output->EnableVideoOutput (mode->mode, flags); if (ret != S_OK) { - GST_WARNING_OBJECT (self, "Failed to enable video output: 0x%08x", ret); + GST_WARNING_OBJECT (self, "Failed to enable video output: 0x%08lx", ret); return FALSE; } @@ -611,7 +611,7 @@ gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer) &frame); if (ret != S_OK) { GST_ELEMENT_ERROR (self, STREAM, FAILED, - (NULL), ("Failed to create video frame: 0x%08x", ret)); + (NULL), ("Failed to create video frame: 0x%08lx", ret)); return GST_FLOW_ERROR; } @@ -650,7 +650,7 @@ gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer) (uint8_t) tc_meta->tc.seconds, (uint8_t) tc_meta->tc.frames, bflags); if (ret != S_OK) { GST_ERROR_OBJECT (self, - "Failed to set timecode %s to video frame: 0x%08x", tc_str, ret); + "Failed to set timecode %s to video frame: 0x%08lx", tc_str, ret); flow_ret = GST_FLOW_ERROR; g_free (tc_str); goto out; @@ -666,7 +666,7 @@ gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer) ret = self->output->output->DisplayVideoFrameSync (frame); if (ret != S_OK) { GST_ELEMENT_WARNING (self, STREAM, FAILED, - (NULL), ("Failed to show video frame synchronously: 0x%08x", ret)); + (NULL), ("Failed to show video frame synchronously: 0x%08lx", ret)); ret = S_OK; } } @@ -679,7 +679,7 @@ gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer) running_time, running_time_duration, GST_SECOND); if (ret != S_OK) { GST_ELEMENT_ERROR (self, STREAM, FAILED, - (NULL), ("Failed to schedule frame: 0x%08x", ret)); + (NULL), ("Failed to schedule frame: 0x%08lx", ret)); flow_ret = GST_FLOW_ERROR; goto out; } @@ -828,7 +828,7 @@ gst_decklink_video_sink_start_scheduled_playback (GstElement * element) res = self->output->output->StopScheduledPlayback (0, 0, 0); if (res != S_OK) { GST_ELEMENT_ERROR (self, STREAM, FAILED, - (NULL), ("Failed to stop scheduled playback: 0x%08x", res)); + (NULL), ("Failed to stop scheduled playback: 0x%08lx", res)); gst_object_unref (clock); return; } @@ -843,7 +843,7 @@ gst_decklink_video_sink_start_scheduled_playback (GstElement * element) GST_SECOND, 1.0); if (res != S_OK) { GST_ELEMENT_ERROR (self, STREAM, FAILED, - (NULL), ("Failed to start scheduled playback: 0x%08x", res)); + (NULL), ("Failed to start scheduled playback: 0x%08lx", res)); gst_object_unref (clock); return; } @@ -911,7 +911,7 @@ gst_decklink_video_sink_stop_scheduled_playback (GstDecklinkVideoSink * self) res = self->output->output->StopScheduledPlayback (start_time, 0, GST_SECOND); if (res != S_OK) { GST_ELEMENT_ERROR (self, STREAM, FAILED, - (NULL), ("Failed to stop scheduled playback: 0x%08x", res)); + (NULL), ("Failed to stop scheduled playback: 0x%08lx", res)); ret = GST_STATE_CHANGE_FAILURE; } self->internal_base_time = GST_CLOCK_TIME_NONE; diff --git a/sys/decklink/gstdecklinkvideosrc.cpp b/sys/decklink/gstdecklinkvideosrc.cpp index 5f3ff75a88..19fbb64030 100644 --- a/sys/decklink/gstdecklinkvideosrc.cpp +++ b/sys/decklink/gstdecklinkvideosrc.cpp @@ -421,7 +421,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) gst_decklink_get_connection (self->connection)); if (ret != S_OK) { GST_ERROR_OBJECT (self, - "Failed to set configuration (input source): 0x%08x", ret); + "Failed to set configuration (input source): 0x%08lx", ret); return FALSE; } @@ -430,7 +430,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) bmdAnalogVideoFlagCompositeSetup75); if (ret != S_OK) { GST_ERROR_OBJECT (self, - "Failed to set configuration (composite setup): 0x%08x", ret); + "Failed to set configuration (composite setup): 0x%08lx", ret); return FALSE; } } @@ -447,7 +447,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) &autoDetection); if (ret != S_OK) { GST_ERROR_OBJECT (self, - "Failed to get attribute (autodetection): 0x%08x", ret); + "Failed to get attribute (autodetection): 0x%08lx", ret); return FALSE; } if (autoDetection) @@ -465,7 +465,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps) format = self->caps_format; ret = self->input->input->EnableVideoInput (mode->mode, format, flags); if (ret != S_OK) { - GST_WARNING_OBJECT (self, "Failed to enable video input: 0x%08x", ret); + GST_WARNING_OBJECT (self, "Failed to enable video input: 0x%08lx", ret); return FALSE; } @@ -694,7 +694,7 @@ gst_decklink_video_src_got_frame (GstElement * element, res = dtc->GetComponents (&hours, &minutes, &seconds, &frames); if (res != S_OK) { - GST_ERROR ("Could not get components for timecode %p: 0x%08x", dtc, + GST_ERROR ("Could not get components for timecode %p: 0x%08lx", dtc, res); f.tc = NULL; } else { @@ -1022,7 +1022,7 @@ gst_decklink_video_src_start_streams (GstElement * element) res = self->input->input->StartStreams (); if (res != S_OK) { GST_ELEMENT_ERROR (self, STREAM, FAILED, - (NULL), ("Failed to start streams: 0x%08x", res)); + (NULL), ("Failed to start streams: 0x%08lx", res)); return; } } else { @@ -1076,7 +1076,7 @@ gst_decklink_video_src_change_state (GstElement * element, res = self->input->input->StopStreams (); if (res != S_OK) { GST_ELEMENT_ERROR (self, STREAM, FAILED, - (NULL), ("Failed to stop streams: 0x%08x", res)); + (NULL), ("Failed to stop streams: 0x%08lx", res)); ret = GST_STATE_CHANGE_FAILURE; } break;