summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2020-06-08 19:22:07 +0900
committerSeungha Yang <seungha@centricular.com>2020-06-08 23:42:22 +0900
commit309c679c43a1ea3df5ab34a8d0d9f1f369f3dcc5 (patch)
tree27f3d99cea860f18c03b606325e5f01205a5dcda /sys
parent9a335105f894a5c969a50e0d7f05e39c6df52bc4 (diff)
downloadgstreamer-plugins-bad-309c679c43a1ea3df5ab34a8d0d9f1f369f3dcc5.tar.gz
mftransform: Add some debug log
Add some trace level log for debugging Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1325>
Diffstat (limited to 'sys')
-rw-r--r--sys/mediafoundation/gstmftransform.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/mediafoundation/gstmftransform.cpp b/sys/mediafoundation/gstmftransform.cpp
index 08f5f307d..17c38b98e 100644
--- a/sys/mediafoundation/gstmftransform.cpp
+++ b/sys/mediafoundation/gstmftransform.cpp
@@ -398,6 +398,8 @@ gst_mf_transform_process_output (GstMFTransform * self)
MFT_OUTPUT_DATA_BUFFER out_data = { 0 };
GstFlowReturn ret = GST_FLOW_OK;
+ GST_TRACE_OBJECT (self, "Process output");
+
hr = transform->GetOutputStreamInfo (stream_id, &out_stream_info);
if (!gst_mf_result (hr)) {
GST_ERROR_OBJECT (self, "Couldn't get output stream info");
@@ -509,6 +511,8 @@ gst_mf_transform_process_input (GstMFTransform * object,
g_return_val_if_fail (GST_IS_MF_TRANSFORM (object), FALSE);
g_return_val_if_fail (sample != NULL, FALSE);
+ GST_TRACE_OBJECT (object, "Process input");
+
if (!object->transform)
return FALSE;
@@ -527,6 +531,8 @@ gst_mf_transform_process_input (GstMFTransform * object,
return FALSE;
}
+ GST_DEBUG_OBJECT (object, "MFT is running now");
+
object->running = TRUE;
}
@@ -534,12 +540,17 @@ gst_mf_transform_process_input (GstMFTransform * object,
if (object->hardware) {
while (object->pending_have_output > 0) {
+ GST_TRACE_OBJECT (object,
+ "Pending have output %d", object->pending_have_output);
ret = gst_mf_transform_process_output (object);
if (ret != GST_FLOW_OK) {
if (ret == GST_VIDEO_ENCODER_FLOW_NEED_DATA) {
+ GST_TRACE_OBJECT (object, "Need more data");
ret = GST_FLOW_OK;
break;
} else {
+ GST_WARNING_OBJECT (object,
+ "Couldn't process output, ret %s", gst_flow_get_name (ret));
return FALSE;
}
}
@@ -549,12 +560,16 @@ gst_mf_transform_process_input (GstMFTransform * object,
MediaEventType type;
HRESULT hr;
+ GST_TRACE_OBJECT (object, "No pending need input, waiting event");
+
hr = gst_mf_transform_pop_event (object, FALSE, &type);
if (hr != MF_E_NO_EVENTS_AVAILABLE && !gst_mf_result (hr)) {
GST_DEBUG_OBJECT (object, "failed to pop event, hr: 0x%x", (guint) hr);
return FALSE;
}
+ GST_TRACE_OBJECT (object, "Got event type %d", (gint) type);
+
switch (type) {
case METransformNeedInput:
object->pending_need_input++;