Tanoda
IMediaRecorder.cs
Go to the documentation of this file.
1/*
2* NatCorder
3* Copyright (c) 2020 Yusuf Olokoba.
4*/
5
6using System;
7using System.Threading.Tasks;
8
9namespace NatSuite.Recorders
10{
15 public interface IMediaRecorder
16 {
20 (int width, int height) frameSize { get; }
21
28 void CommitFrame<T>(T[] pixelBuffer, long timestamp) where T : struct;
29
36 void CommitFrame(IntPtr nativeBuffer, long timestamp);
37
43 void CommitSamples(float[] sampleBuffer, long timestamp);
44
48 Task<string> FinishWriting();
49 }
50}
A recorder capable of recording video frames, and optionally audio frames, to a media output....
int width
Recording frame size.
Task< string > FinishWriting()
Finish writing and return the path to the recorded media file.
void CommitFrame(IntPtr nativeBuffer, long timestamp)
Commit a video pixel buffer for encoding. The pixel buffer MUST have an RGBA8888 pixel layout.
void CommitSamples(float[] sampleBuffer, long timestamp)
Commit an audio sample buffer for encoding.
void CommitFrame< T >(T[] pixelBuffer, long timestamp)
Commit a video pixel buffer for encoding. The pixel buffer MUST have an RGBA8888 pixel layout.