RTP: Use gstreamers new VideoFrame.map
This commit is contained in:
parent
e85477bb19
commit
0aa73c4569
|
@ -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]);
|
||||
|
|
2339
plugins/rtp/vapi/gstreamer-video-1.0.vapi
Normal file
2339
plugins/rtp/vapi/gstreamer-video-1.0.vapi
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue