summaryrefslogtreecommitdiff
path: root/va/va_trace.c
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2013-05-16 16:41:03 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2013-06-19 14:47:44 +0800
commitd9f693c6cfd0fed0ef3ecd6ae268ed01d4e250d3 (patch)
treef66c0c70e39f737770bba576455037b0175ad93d /va/va_trace.c
parent416d64f4c1b0d760ea3c426446a84d329e15c6e5 (diff)
downloadlibva-d9f693c6cfd0fed0ef3ecd6ae268ed01d4e250d3.tar.gz
vatrace: trace coded buffer create/destroy
Change-Id: If0388cd5e2e141184d88ff5de5612d15e51e3d20 Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> (cherry picked from commit 880c916092c6d68096c95e49405714d8a21f9322)
Diffstat (limited to 'va/va_trace.c')
-rw-r--r--va/va_trace.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/va/va_trace.c b/va/va_trace.c
index 887e24d..b546fe6 100644
--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -619,6 +619,61 @@ static char * buffer_type_to_string(int type)
}
}
+void va_TraceCreateBuffer (
+ VADisplay dpy,
+ VAContextID context, /* in */
+ VABufferType type, /* in */
+ unsigned int size, /* in */
+ unsigned int num_elements, /* in */
+ void *data, /* in */
+ VABufferID *buf_id /* out */
+)
+{
+ DPY2INDEX(dpy);
+
+ /* only trace CodedBuffer */
+ if (type != VAEncCodedBufferType)
+ return;
+
+ TRACE_FUNCNAME(idx);
+ va_TraceMsg(idx, "\tbuf_type=%s\n", buffer_type_to_string(type));
+ va_TraceMsg(idx, "\tbuf_id=0x%x\n", *buf_id);
+ va_TraceMsg(idx, "\tsize=%d\n", size);
+ va_TraceMsg(idx, "\tnum_elements=%d\n", num_elements);
+
+ va_TraceMsg(idx, NULL);
+}
+
+void va_TraceDestroyBuffer (
+ VADisplay dpy,
+ VABufferID buf_id /* in */
+)
+{
+ VABufferType type;
+ unsigned int size;
+ unsigned int num_elements;
+
+ VACodedBufferSegment *buf_list;
+ int i = 0;
+
+ DPY2INDEX(dpy);
+
+ vaBufferInfo(dpy, trace_context[idx].trace_context, buf_id, &type, &size, &num_elements);
+
+ /* only trace CodedBuffer */
+ if (type != VAEncCodedBufferType)
+ return;
+
+ TRACE_FUNCNAME(idx);
+ va_TraceMsg(idx, "\tbuf_type=%s\n", buffer_type_to_string(type));
+ va_TraceMsg(idx, "\tbuf_id=0x%x\n", buf_id);
+ va_TraceMsg(idx, "\tsize=%d\n", size);
+ va_TraceMsg(idx, "\tnum_elements=%d\n", num_elements);
+
+ va_TraceMsg(idx, NULL);
+}
+
+
void va_TraceMapBuffer (
VADisplay dpy,
VABufferID buf_id, /* in */