mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
VDPAU: Add some debug statements
This commit is contained in:
parent
8c89eb9a5b
commit
deb03ee2ca
2 changed files with 18 additions and 0 deletions
|
@ -194,6 +194,9 @@ gst_vdp_mpeg_dec_set_caps (GstPad * pad, GstCaps * caps)
|
||||||
"pixel-aspect-ratio", GST_TYPE_FRACTION, par_n, par_d,
|
"pixel-aspect-ratio", GST_TYPE_FRACTION, par_n, par_d,
|
||||||
"interlaced", G_TYPE_BOOLEAN, interlaced, NULL);
|
"interlaced", G_TYPE_BOOLEAN, interlaced, NULL);
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (mpeg_dec, "Setting source caps to %" GST_PTR_FORMAT,
|
||||||
|
src_caps);
|
||||||
|
|
||||||
res = gst_pad_set_caps (mpeg_dec->src, src_caps);
|
res = gst_pad_set_caps (mpeg_dec->src, src_caps);
|
||||||
gst_caps_unref (src_caps);
|
gst_caps_unref (src_caps);
|
||||||
if (!res)
|
if (!res)
|
||||||
|
@ -968,6 +971,11 @@ gst_vdp_mpeg_dec_sink_event (GstPad * pad, GstEvent * event)
|
||||||
}
|
}
|
||||||
g_mutex_unlock (mpeg_dec->mutex);
|
g_mutex_unlock (mpeg_dec->mutex);
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (mpeg_dec,
|
||||||
|
"Pushing new segment update %d format %d start %"
|
||||||
|
GST_TIME_FORMAT " stop %" GST_TIME_FORMAT " position %"
|
||||||
|
GST_TIME_FORMAT, update, format, GST_TIME_ARGS (start),
|
||||||
|
GST_TIME_ARGS (stop), GST_TIME_ARGS (position));
|
||||||
convert_error:
|
convert_error:
|
||||||
res = gst_pad_push_event (mpeg_dec->src, event);
|
res = gst_pad_push_event (mpeg_dec->src, event);
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,8 @@ gst_vdp_video_yuv_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
status =
|
status =
|
||||||
device->vdp_video_surface_get_bits_ycbcr (surface,
|
device->vdp_video_surface_get_bits_ycbcr (surface,
|
||||||
VDP_YCBCR_FORMAT_YV12, (void *) data, stride);
|
VDP_YCBCR_FORMAT_YV12, (void *) data, stride);
|
||||||
|
GST_LOG_OBJECT (video_yuv,
|
||||||
|
"Got status %d from vdp_video_surface_get_bits_ycbcr", status);
|
||||||
if (G_UNLIKELY (status != VDP_STATUS_OK)) {
|
if (G_UNLIKELY (status != VDP_STATUS_OK)) {
|
||||||
GST_ELEMENT_ERROR (video_yuv, RESOURCE, READ,
|
GST_ELEMENT_ERROR (video_yuv, RESOURCE, READ,
|
||||||
("Couldn't get data from vdpau"),
|
("Couldn't get data from vdpau"),
|
||||||
|
@ -169,6 +171,8 @@ gst_vdp_video_yuv_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
status =
|
status =
|
||||||
device->vdp_video_surface_get_bits_ycbcr (surface,
|
device->vdp_video_surface_get_bits_ycbcr (surface,
|
||||||
VDP_YCBCR_FORMAT_YV12, (void *) data, stride);
|
VDP_YCBCR_FORMAT_YV12, (void *) data, stride);
|
||||||
|
GST_LOG_OBJECT (video_yuv,
|
||||||
|
"Got status %d from vdp_video_surface_get_bits_ycbcr", status);
|
||||||
if (G_UNLIKELY (status != VDP_STATUS_OK)) {
|
if (G_UNLIKELY (status != VDP_STATUS_OK)) {
|
||||||
GST_ELEMENT_ERROR (video_yuv, RESOURCE, READ,
|
GST_ELEMENT_ERROR (video_yuv, RESOURCE, READ,
|
||||||
("Couldn't get data from vdpau"),
|
("Couldn't get data from vdpau"),
|
||||||
|
@ -188,6 +192,7 @@ gst_vdp_video_yuv_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
size =
|
size =
|
||||||
video_yuv->width * video_yuv->height +
|
video_yuv->width * video_yuv->height +
|
||||||
video_yuv->width * video_yuv->height / 2;
|
video_yuv->width * video_yuv->height / 2;
|
||||||
|
GST_LOG_OBJECT (video_yuv, "Entering buffer_alloc");
|
||||||
result =
|
result =
|
||||||
gst_pad_alloc_buffer_and_set_caps (video_yuv->src,
|
gst_pad_alloc_buffer_and_set_caps (video_yuv->src,
|
||||||
GST_BUFFER_OFFSET_NONE, size, GST_PAD_CAPS (video_yuv->src), &outbuf);
|
GST_BUFFER_OFFSET_NONE, size, GST_PAD_CAPS (video_yuv->src), &outbuf);
|
||||||
|
@ -202,9 +207,12 @@ gst_vdp_video_yuv_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
stride[0] = video_yuv->width;
|
stride[0] = video_yuv->width;
|
||||||
stride[1] = video_yuv->width;
|
stride[1] = video_yuv->width;
|
||||||
|
|
||||||
|
GST_LOG_OBJECT (video_yuv, "Entering vdp_video_surface_get_bits_ycbcr");
|
||||||
status =
|
status =
|
||||||
device->vdp_video_surface_get_bits_ycbcr (surface,
|
device->vdp_video_surface_get_bits_ycbcr (surface,
|
||||||
VDP_YCBCR_FORMAT_NV12, (void *) data, stride);
|
VDP_YCBCR_FORMAT_NV12, (void *) data, stride);
|
||||||
|
GST_LOG_OBJECT (video_yuv,
|
||||||
|
"Got status %d from vdp_video_surface_get_bits_ycbcr", status);
|
||||||
if (G_UNLIKELY (status != VDP_STATUS_OK)) {
|
if (G_UNLIKELY (status != VDP_STATUS_OK)) {
|
||||||
GST_ELEMENT_ERROR (video_yuv, RESOURCE, READ,
|
GST_ELEMENT_ERROR (video_yuv, RESOURCE, READ,
|
||||||
("Couldn't get data from vdpau"),
|
("Couldn't get data from vdpau"),
|
||||||
|
@ -221,6 +229,8 @@ gst_vdp_video_yuv_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
gst_buffer_unref (buffer);
|
gst_buffer_unref (buffer);
|
||||||
|
|
||||||
gst_buffer_copy_metadata (outbuf, buffer, GST_BUFFER_COPY_TIMESTAMPS);
|
gst_buffer_copy_metadata (outbuf, buffer, GST_BUFFER_COPY_TIMESTAMPS);
|
||||||
|
GST_LOG_OBJECT (video_yuv, "Pushing buffer with ts %" GST_TIME_FORMAT,
|
||||||
|
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)));
|
||||||
return gst_pad_push (video_yuv->src, outbuf);
|
return gst_pad_push (video_yuv->src, outbuf);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
Loading…
Reference in a new issue