コード例 #1
0
                        public static MLWebRTCFrame Create()
                        {
                            MLWebRTCFrame frameNative = new MLWebRTCFrame();

                            frameNative.Version    = 1;
                            frameNative.PlaneCount = ImagePlane.MaxImagePlanes;
                            frameNative.Format     = OutputFormat.YUV_420_888;
                            return(frameNative);
                        }
コード例 #2
0
                        /// <summary>
                        /// Creates and returns an initialized version of this struct from a MLWebRTC.VideoSink.Frame object.
                        /// </summary>
                        /// <param name="frame">The frame object to use for initializing.</param>
                        /// <returns>An initialized version of this struct.</returns>
                        public static MLWebRTCFrame Create(MLWebRTC.VideoSink.Frame frame)
                        {
                            MLWebRTCFrame frameNative = new MLWebRTCFrame();

                            frameNative.Version     = 1;
                            frameNative.PlaneCount  = (ushort)frame.ImagePlanes.Length;
                            frameNative.ImagePlanes = nativeImagePlanesBuffer.Get();

                            for (int i = 0; i < frame.ImagePlanes.Length; ++i)
                            {
                                frameNative.ImagePlanes[i].Data = frame.ImagePlanes[i];
                            }

                            frameNative.TimeStamp = frame.TimeStampUs;
                            frameNative.Format    = frame.Format;
                            return(frameNative);
                        }
コード例 #3
0
 public static extern MLResult.Code MLWebRTCFrameGetData(ulong frameHandle, ref MLWebRTCFrame frame);