Lines Matching refs:v_frame
499 _unmap_planar_frame (GstVideoFrame * v_frame, const void * data, gsize dataSize,
502 GST_TRACE ("freeing video frame %p", v_frame);
504 gst_video_frame_unmap (v_frame);
505 g_free (v_frame);
509 _unmap_frame (GstVideoFrame * v_frame, const void * data)
511 GST_TRACE ("freeing video frame %p", v_frame);
513 gst_video_frame_unmap (v_frame);
514 g_free (v_frame);
523 GstVideoFrame *v_frame;
536 v_frame = g_new0 (GstVideoFrame, 1);
538 if (!gst_video_frame_map (v_frame, &av_sink->info, buf, GST_MAP_READ)) {
540 g_free (v_frame);
544 if (GST_VIDEO_INFO_N_PLANES (&v_frame->info) == 1) {
547 GST_VIDEO_INFO_WIDTH (&v_frame->info),
548 GST_VIDEO_INFO_HEIGHT (&v_frame->info),
549 _cv_pixel_format_type_from_video_format (GST_VIDEO_INFO_FORMAT (&v_frame->info)),
550 v_frame->data[0], v_frame->info.stride[0],
551 (CVPixelBufferReleaseBytesCallback) _unmap_frame, v_frame, NULL,
554 gst_video_frame_unmap (v_frame);
555 g_free (v_frame);
565 for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&v_frame->info); i++) {
566 widths[i] = GST_VIDEO_INFO_COMP_WIDTH (&v_frame->info, i);
567 heights[i] = GST_VIDEO_INFO_COMP_HEIGHT (&v_frame->info, i);
568 strides[i] = GST_VIDEO_INFO_COMP_STRIDE (&v_frame->info, i);
572 GST_VIDEO_INFO_WIDTH (&v_frame->info),
573 GST_VIDEO_INFO_HEIGHT (&v_frame->info),
574 _cv_pixel_format_type_from_video_format (GST_VIDEO_INFO_FORMAT (&v_frame->info)),
577 v_frame, v_frame->info.size,
578 GST_VIDEO_INFO_N_PLANES (&v_frame->info), v_frame->data,
581 v_frame, NULL, &pbuf)) {
583 gst_video_frame_unmap (v_frame);
584 g_free (v_frame);
603 GST_VIDEO_INFO_N_PLANES (&v_frame->info),
604 GST_VIDEO_INFO_WIDTH (&v_frame->info),
605 GST_VIDEO_INFO_HEIGHT (&v_frame->info),
606 v_frame->info.size, 0, 0, 0, 0);
608 if (GST_VIDEO_INFO_N_PLANES (&v_frame->info) > 1) {
609 for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&v_frame->info); i++) {
618 GST_VIDEO_INFO_COMP_WIDTH (&v_frame->info, i),
619 GST_VIDEO_INFO_COMP_HEIGHT (&v_frame->info, i),
620 GST_VIDEO_INFO_COMP_STRIDE (&v_frame->info, i),
628 v_frame->info.stride[0], v_frame->data[0]);