RTP: Use gstreamers new VideoFrame.map

This commit is contained in:
Marvin W 2022-08-21 20:02:48 +02:00
parent e85477bb19
commit 0aa73c4569
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
2 changed files with 2341 additions and 2 deletions

View File

@ -122,10 +122,10 @@ public class Dino.Plugins.Rtp.Sink : Gst.Video.Sink {
}
private Gdk.Texture texture_from_buffer(Gst.Buffer buffer, out double pixel_aspect_ratio) {
Gst.Video.Frame frame;
Gst.Video.Frame frame = Gst.Video.Frame();
Gdk.Texture texture;
if (Gst.Video.frame_map(out frame, info, buffer, Gst.MapFlags.READ)) {
if (frame.map(info, buffer, Gst.MapFlags.READ)) {
unowned Gst.Video.Info info = gst_video_frame_get_video_info(frame);
Bytes bytes = new Bytes.take(gst_video_frame_get_data(frame));
texture = new Gdk.MemoryTexture(info.width, info.height, memory_format_from_video(info.finfo.format), bytes, info.stride[0]);

File diff suppressed because it is too large Load Diff