mirror of https://github.com/TakeV-Lambda/dino.git
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) {
|
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;
|
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);
|
unowned Gst.Video.Info info = gst_video_frame_get_video_info(frame);
|
||||||
Bytes bytes = new Bytes.take(gst_video_frame_get_data(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]);
|
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
Loading…
Reference in New Issue