mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
decklink: Fix debug logging warnings on Windows
HRESULT is unsigned long int, not unsigned int
This commit is contained in:
parent
e8e639081a
commit
845832263b
5 changed files with 31 additions and 31 deletions
|
@ -814,7 +814,7 @@ public:
|
||||||
video_frame->GetStreamTime (&stream_time, &stream_duration,
|
video_frame->GetStreamTime (&stream_time, &stream_duration,
|
||||||
GST_SECOND);
|
GST_SECOND);
|
||||||
if (res != S_OK) {
|
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_time = GST_CLOCK_TIME_NONE;
|
||||||
stream_duration = GST_CLOCK_TIME_NONE;
|
stream_duration = GST_CLOCK_TIME_NONE;
|
||||||
}
|
}
|
||||||
|
@ -828,7 +828,7 @@ public:
|
||||||
&dtc);
|
&dtc);
|
||||||
|
|
||||||
if (res != S_OK) {
|
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;
|
dtc = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -843,7 +843,7 @@ public:
|
||||||
|
|
||||||
res = audio_packet->GetPacketTime (&packet_time, GST_SECOND);
|
res = audio_packet->GetPacketTime (&packet_time, GST_SECOND);
|
||||||
if (res != S_OK) {
|
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;
|
packet_time = GST_CLOCK_TIME_NONE;
|
||||||
}
|
}
|
||||||
m_input->got_audio_packet (audiosrc, audio_packet, capture_time,
|
m_input->got_audio_packet (audiosrc, audio_packet, capture_time,
|
||||||
|
@ -950,7 +950,7 @@ init_devices (gpointer data)
|
||||||
ret = decklink->QueryInterface (IID_IDeckLinkInput,
|
ret = decklink->QueryInterface (IID_IDeckLinkInput,
|
||||||
(void **) &devices[i].input.input);
|
(void **) &devices[i].input.input);
|
||||||
if (ret != S_OK) {
|
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);
|
ret);
|
||||||
} else {
|
} else {
|
||||||
IDeckLinkDisplayModeIterator *mode_iter;
|
IDeckLinkDisplayModeIterator *mode_iter;
|
||||||
|
@ -987,7 +987,7 @@ init_devices (gpointer data)
|
||||||
ret = decklink->QueryInterface (IID_IDeckLinkOutput,
|
ret = decklink->QueryInterface (IID_IDeckLinkOutput,
|
||||||
(void **) &devices[i].output.output);
|
(void **) &devices[i].output.output);
|
||||||
if (ret != S_OK) {
|
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);
|
ret);
|
||||||
} else {
|
} else {
|
||||||
IDeckLinkDisplayModeIterator *mode_iter;
|
IDeckLinkDisplayModeIterator *mode_iter;
|
||||||
|
@ -1025,7 +1025,7 @@ init_devices (gpointer data)
|
||||||
ret = decklink->QueryInterface (IID_IDeckLinkConfiguration,
|
ret = decklink->QueryInterface (IID_IDeckLinkConfiguration,
|
||||||
(void **) &devices[i].input.config);
|
(void **) &devices[i].input.config);
|
||||||
if (ret != S_OK) {
|
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);
|
ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1033,8 +1033,8 @@ init_devices (gpointer data)
|
||||||
(void **) &devices[i].input.attributes);
|
(void **) &devices[i].input.attributes);
|
||||||
devices[i].output.attributes = devices[i].input.attributes;
|
devices[i].output.attributes = devices[i].input.attributes;
|
||||||
if (ret != S_OK) {
|
if (ret != S_OK) {
|
||||||
GST_WARNING ("selected device does not have attributes interface: 0x%08x",
|
GST_WARNING ("selected device does not have attributes interface:"
|
||||||
ret);
|
" 0x%08lx", ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = iterator->Next (&decklink);
|
ret = iterator->Next (&decklink);
|
||||||
|
@ -1272,7 +1272,7 @@ gst_decklink_clock_get_internal_time (GstClock * clock)
|
||||||
GST_LOG_OBJECT (clock,
|
GST_LOG_OBJECT (clock,
|
||||||
"result %" GST_TIME_FORMAT " time %" GST_TIME_FORMAT " last time %"
|
"result %" GST_TIME_FORMAT " time %" GST_TIME_FORMAT " last time %"
|
||||||
GST_TIME_FORMAT " offset %" GST_TIME_FORMAT " start 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 (time), GST_TIME_ARGS (last_time), GST_TIME_ARGS (offset),
|
||||||
GST_TIME_ARGS (start_time), ret);
|
GST_TIME_ARGS (start_time), ret);
|
||||||
|
|
||||||
|
|
|
@ -275,8 +275,8 @@ public:
|
||||||
written_sum += written;
|
written_sum += written;
|
||||||
} while (len > 0 && res == S_OK);
|
} while (len > 0 && res == S_OK);
|
||||||
|
|
||||||
GST_LOG_OBJECT (m_ringbuffer->sink, "Wrote %u samples: 0x%08x", written_sum,
|
GST_LOG_OBJECT (m_ringbuffer->sink, "Wrote %u samples: 0x%08lx",
|
||||||
res);
|
written_sum, res);
|
||||||
|
|
||||||
gst_audio_ring_buffer_clear (GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer),
|
gst_audio_ring_buffer_clear (GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer),
|
||||||
seg);
|
seg);
|
||||||
|
@ -319,7 +319,7 @@ gst_decklink_audio_sink_ringbuffer_delay (GstAudioRingBuffer * rb)
|
||||||
ret = 0;
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -414,7 +414,7 @@ gst_decklink_audio_sink_ringbuffer_acquire (GstAudioRingBuffer * rb,
|
||||||
ret = self->output->output->EnableAudioOutput (bmdAudioSampleRate48kHz,
|
ret = self->output->output->EnableAudioOutput (bmdAudioSampleRate48kHz,
|
||||||
sample_depth, spec->info.channels, bmdAudioOutputStreamContinuous);
|
sample_depth, spec->info.channels, bmdAudioOutputStreamContinuous);
|
||||||
if (ret != S_OK) {
|
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);
|
ret);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -424,7 +424,7 @@ gst_decklink_audio_sink_ringbuffer_acquire (GstAudioRingBuffer * rb,
|
||||||
output->SetAudioCallback (new GStreamerAudioOutputCallback (self));
|
output->SetAudioCallback (new GStreamerAudioOutputCallback (self));
|
||||||
if (ret != S_OK) {
|
if (ret != S_OK) {
|
||||||
GST_WARNING_OBJECT (self->sink,
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -404,7 +404,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
|
||||||
self->input->config->SetInt (bmdDeckLinkConfigAudioInputConnection,
|
self->input->config->SetInt (bmdDeckLinkConfigAudioInputConnection,
|
||||||
conn);
|
conn);
|
||||||
if (ret != S_OK) {
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -412,7 +412,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
|
||||||
ret = self->input->input->EnableAudioInput (bmdAudioSampleRate48kHz,
|
ret = self->input->input->EnableAudioInput (bmdAudioSampleRate48kHz,
|
||||||
sample_depth, self->info.channels);
|
sample_depth, self->info.channels);
|
||||||
if (ret != S_OK) {
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -403,7 +403,7 @@ gst_decklink_video_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
|
||||||
|
|
||||||
ret = self->output->output->EnableVideoOutput (mode->mode, flags);
|
ret = self->output->output->EnableVideoOutput (mode->mode, flags);
|
||||||
if (ret != S_OK) {
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -611,7 +611,7 @@ gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer)
|
||||||
&frame);
|
&frame);
|
||||||
if (ret != S_OK) {
|
if (ret != S_OK) {
|
||||||
GST_ELEMENT_ERROR (self, STREAM, FAILED,
|
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;
|
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);
|
(uint8_t) tc_meta->tc.seconds, (uint8_t) tc_meta->tc.frames, bflags);
|
||||||
if (ret != S_OK) {
|
if (ret != S_OK) {
|
||||||
GST_ERROR_OBJECT (self,
|
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;
|
flow_ret = GST_FLOW_ERROR;
|
||||||
g_free (tc_str);
|
g_free (tc_str);
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -666,7 +666,7 @@ gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer)
|
||||||
ret = self->output->output->DisplayVideoFrameSync (frame);
|
ret = self->output->output->DisplayVideoFrameSync (frame);
|
||||||
if (ret != S_OK) {
|
if (ret != S_OK) {
|
||||||
GST_ELEMENT_WARNING (self, STREAM, FAILED,
|
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;
|
ret = S_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -679,7 +679,7 @@ gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer)
|
||||||
running_time, running_time_duration, GST_SECOND);
|
running_time, running_time_duration, GST_SECOND);
|
||||||
if (ret != S_OK) {
|
if (ret != S_OK) {
|
||||||
GST_ELEMENT_ERROR (self, STREAM, FAILED,
|
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;
|
flow_ret = GST_FLOW_ERROR;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -828,7 +828,7 @@ gst_decklink_video_sink_start_scheduled_playback (GstElement * element)
|
||||||
res = self->output->output->StopScheduledPlayback (0, 0, 0);
|
res = self->output->output->StopScheduledPlayback (0, 0, 0);
|
||||||
if (res != S_OK) {
|
if (res != S_OK) {
|
||||||
GST_ELEMENT_ERROR (self, STREAM, FAILED,
|
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);
|
gst_object_unref (clock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -843,7 +843,7 @@ gst_decklink_video_sink_start_scheduled_playback (GstElement * element)
|
||||||
GST_SECOND, 1.0);
|
GST_SECOND, 1.0);
|
||||||
if (res != S_OK) {
|
if (res != S_OK) {
|
||||||
GST_ELEMENT_ERROR (self, STREAM, FAILED,
|
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);
|
gst_object_unref (clock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -911,7 +911,7 @@ gst_decklink_video_sink_stop_scheduled_playback (GstDecklinkVideoSink * self)
|
||||||
res = self->output->output->StopScheduledPlayback (start_time, 0, GST_SECOND);
|
res = self->output->output->StopScheduledPlayback (start_time, 0, GST_SECOND);
|
||||||
if (res != S_OK) {
|
if (res != S_OK) {
|
||||||
GST_ELEMENT_ERROR (self, STREAM, FAILED,
|
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;
|
ret = GST_STATE_CHANGE_FAILURE;
|
||||||
}
|
}
|
||||||
self->internal_base_time = GST_CLOCK_TIME_NONE;
|
self->internal_base_time = GST_CLOCK_TIME_NONE;
|
||||||
|
|
|
@ -421,7 +421,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
|
||||||
gst_decklink_get_connection (self->connection));
|
gst_decklink_get_connection (self->connection));
|
||||||
if (ret != S_OK) {
|
if (ret != S_OK) {
|
||||||
GST_ERROR_OBJECT (self,
|
GST_ERROR_OBJECT (self,
|
||||||
"Failed to set configuration (input source): 0x%08x", ret);
|
"Failed to set configuration (input source): 0x%08lx", ret);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
|
||||||
bmdAnalogVideoFlagCompositeSetup75);
|
bmdAnalogVideoFlagCompositeSetup75);
|
||||||
if (ret != S_OK) {
|
if (ret != S_OK) {
|
||||||
GST_ERROR_OBJECT (self,
|
GST_ERROR_OBJECT (self,
|
||||||
"Failed to set configuration (composite setup): 0x%08x", ret);
|
"Failed to set configuration (composite setup): 0x%08lx", ret);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -447,7 +447,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
|
||||||
&autoDetection);
|
&autoDetection);
|
||||||
if (ret != S_OK) {
|
if (ret != S_OK) {
|
||||||
GST_ERROR_OBJECT (self,
|
GST_ERROR_OBJECT (self,
|
||||||
"Failed to get attribute (autodetection): 0x%08x", ret);
|
"Failed to get attribute (autodetection): 0x%08lx", ret);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (autoDetection)
|
if (autoDetection)
|
||||||
|
@ -465,7 +465,7 @@ gst_decklink_video_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
|
||||||
format = self->caps_format;
|
format = self->caps_format;
|
||||||
ret = self->input->input->EnableVideoInput (mode->mode, format, flags);
|
ret = self->input->input->EnableVideoInput (mode->mode, format, flags);
|
||||||
if (ret != S_OK) {
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,7 +694,7 @@ gst_decklink_video_src_got_frame (GstElement * element,
|
||||||
|
|
||||||
res = dtc->GetComponents (&hours, &minutes, &seconds, &frames);
|
res = dtc->GetComponents (&hours, &minutes, &seconds, &frames);
|
||||||
if (res != S_OK) {
|
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);
|
res);
|
||||||
f.tc = NULL;
|
f.tc = NULL;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1022,7 +1022,7 @@ gst_decklink_video_src_start_streams (GstElement * element)
|
||||||
res = self->input->input->StartStreams ();
|
res = self->input->input->StartStreams ();
|
||||||
if (res != S_OK) {
|
if (res != S_OK) {
|
||||||
GST_ELEMENT_ERROR (self, STREAM, FAILED,
|
GST_ELEMENT_ERROR (self, STREAM, FAILED,
|
||||||
(NULL), ("Failed to start streams: 0x%08x", res));
|
(NULL), ("Failed to start streams: 0x%08lx", res));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1076,7 +1076,7 @@ gst_decklink_video_src_change_state (GstElement * element,
|
||||||
res = self->input->input->StopStreams ();
|
res = self->input->input->StopStreams ();
|
||||||
if (res != S_OK) {
|
if (res != S_OK) {
|
||||||
GST_ELEMENT_ERROR (self, STREAM, FAILED,
|
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;
|
ret = GST_STATE_CHANGE_FAILURE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue