/** * Will call callbacks on current thread */ public FrameFetchingTask(string frameName, LocalVideoStream stream, OnFrameFetched onFrameFetched, OnFrameFetchFailure onFrameFetchedFailure) { frameName_ = frameName; stream_ = stream; onFrameFetched_ = onFrameFetched; onFrameFetchFailure_ = onFrameFetchedFailure; }
public static void fetch(string frameName, LocalVideoStream stream, OnFrameFetched onFrameFetched, OnFrameFetchFailure onFrameFetchFailure) { frameFetchingTaskQueue_.Enqueue(new FrameFetchingTask(frameName, stream, onFrameFetched, onFrameFetchFailure)); Debug.Log("[ff-task]: enqueued task for " + frameName + ". queue size " + frameFetchingTaskQueue_.Count); queueSem_.Release(); }
public void fetch(string frameName, LocalVideoStream stream, OnFrameFetched onFrameFetched, OnFrameFetchFailure onFrameFetchFailure) { onFrameFetched_ = onFrameFetched; onFrameFetchFailure_ = onFrameFetchFailure; bufferAllocDelegate = new FrameFetcherBufferAlloc(bufferAllocate); frameFetchedDelegate = new FrameFetcherFrameFetched(frameFetched); NdnRtcWrapper.ndnrtc_FrameFetcher_fetch(stream.getHandle(), frameName, bufferAllocDelegate, frameFetchedDelegate); }