AW: video play fast with gst new buffer allocation

Thornton, Keith keith.thornton at zeiss.com
Mon Mar 1 13:18:17 UTC 2021


Hi,
your new buffer is missing PTS, DURATION and OFFSET stuff. You should set these with the values from the original buffer
Gruesse

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org> Im Auftrag von anil0407
Gesendet: Montag, 1. März 2021 06:40
An: gstreamer-devel at lists.freedesktop.org
Betreff: video play fast with gst new buffer allocation

Hi,

In a _chain function(custom plugin), when i move to the existing gst buffer to new gst buffer, i observed that the video is playing very fast.
what changes required to make it play normal speed.
Here the snippet code:
        buf = gst_buffer_make_writable (buf);
	
	buf_size = gst_buffer_get_size (buf);
	n_buf = gst_buffer_new_allocate (NULL, buf_size, NULL);
	gst_buffer_map (n_buf, &n_map, GST_MAP_WRITE);

	if (gst_buffer_map (buf, &map, GST_MAP_WRITE)) {
		ptr = (guint16 *) map.data;
		memcpy((guint16 *)n_map.data, (guint16 *)ptr, buf_size);
		gst_buffer_unmap (buf, &map);
		gst_buffer_unmap (n_buf, &n_map);
		return gst_pad_push (filter->srcpad, n_buf);
	}

Thanks,
Anil



--
Sent from: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgstreamer-devel.966125.n4.nabble.com%2F&data=04%7C01%7C%7C0c5803fad2f8452e1bac08d8dcb410c7%7C28042244bb514cd680347776fa3703e8%7C1%7C1%7C637502013219035498%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=pAYmTjj3TBQ0z1c6W%2BleCuncT5%2Fo5s%2FHBAUrugcSvLI%3D&reserved=0
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&data=04%7C01%7C%7C0c5803fad2f8452e1bac08d8dcb410c7%7C28042244bb514cd680347776fa3703e8%7C1%7C1%7C637502013219035498%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Sza7VQyQ7BL85T7MKMd2u%2Br8q1uTE9WjPUsufu7JQ9M%3D&reserved=0


More information about the gstreamer-devel mailing list