/******************************************************************************* Copyright © 2015-2022 PICO Technology Co., Ltd.All rights reserved. NOTICE:All information contained herein is, and remains the property of PICO Technology Co., Ltd. The intellectual and technical concepts contained herein are proprietary to PICO Technology Co., Ltd. and may be covered by patents, patents in process, and are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is strictly forbidden unless prior written permission is obtained from PICO Technology Co., Ltd. *******************************************************************************/ using System; namespace Pico.Platform.Models { /// /// Information about screen capturing. /// public class CaptureInfo { /// /// The path where the image is located. /// public readonly string ImagePath; /// /// The ID of the screen-capturing task. /// public readonly string JobId; public CaptureInfo(IntPtr o) { ImagePath = CLIB.ppf_CaptureInfo_GetImagePath(o); JobId = CLIB.ppf_CaptureInfo_GetJobId(o); } } /// /// Information about screen recording. /// public class RecordInfo { /// /// The path where the video is located. /// public readonly string VideoPath; /// /// The duration of the video. Unit: milliseconds. /// public readonly int DurationInMilliSeconds; /// /// The width of the video. /// public readonly int Width; /// /// The height of the video. /// public readonly int Height; /// /// The ID of the screen-recording task. /// public readonly string JobId; public RecordInfo(IntPtr o) { VideoPath = CLIB.ppf_RecordInfo_GetVideoPath(o); DurationInMilliSeconds = CLIB.ppf_RecordInfo_GetDurationInMilliSeconds(o); Width = CLIB.ppf_RecordInfo_GetWidth(o); Height = CLIB.ppf_RecordInfo_GetHeight(o); JobId = CLIB.ppf_RecordInfo_GetJobId(o); } } /// /// Information about the images captured and videos recorded in a session. /// public class SessionMedia { /// /// Image information, including image paths and job IDs. /// public readonly CaptureInfo[] Images; /// /// Video information, including video paths, video durations, video sizes, and job IDs. /// public readonly RecordInfo[] Videos; public SessionMedia(IntPtr o) { { int sz = (int) CLIB.ppf_SessionMedia_GetImagesSize(o); Images = new CaptureInfo[sz]; for (int i = 0; i < sz; i++) { Images[i] = new CaptureInfo(CLIB.ppf_SessionMedia_GetImages(o, (UIntPtr) i)); } } { int sz = (int) CLIB.ppf_SessionMedia_GetVideosSize(o); Videos = new RecordInfo[sz]; for (int i = 0; i < sz; i++) { Videos[i] = new RecordInfo(CLIB.ppf_SessionMedia_GetVideos(o, (UIntPtr) i)); } } } } }