7using System.Threading.Tasks;
17 #region --Client API--
34 public MP4Recorder(
int width,
int height,
float frameRate,
int sampleRate = 0,
int channelCount = 0,
35 int bitrate = (
int) (960 * 540 * 11.4f),
int keyframeInterval = 3)
37 recorder =
new NativeRecorder((callback, context) => Bridge.CreateMP4Recorder(
width, height, frameRate,
38 bitrate, keyframeInterval, sampleRate, channelCount,
Internal.Utility.GetPath(
@".mp4"), callback,
42 public MP4Recorder(
int width,
int height,
float frameRate,
string filename,
int sampleRate = 0,
43 int channelCount = 0,
int bitrate = (
int) (960 * 540 * 11.4f),
int keyframeInterval = 3)
45 recorder =
new NativeRecorder((callback, context) => Bridge.CreateMP4Recorder(
width, height, frameRate,
46 bitrate, keyframeInterval, sampleRate, channelCount, filename +
".mp4", callback, context));
using Leap.Unity.Interaction. Internal
void CommitFrame< T >(T[] pixelBuffer, long timestamp)
Commit a video pixel buffer for encoding. The pixel buffer MUST have an RGBA8888 pixel layout.
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.
MP4Recorder(int width, int height, float frameRate, string filename, int sampleRate=0, int channelCount=0, int bitrate=(int)(960 *540 *11.4f), int keyframeInterval=3)