Here are the examples of the csharp api System.Action.Invoke(YUVFrame) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : FFmpegVideo.cs
with GNU General Public License v3.0
from OpenXbox
with GNU General Public License v3.0
from OpenXbox
public override Thread DecodingThread()
{
// Dequeue decoded frames
return new Thread(() =>
{
while (true)
{
// Dequeue decoded Frames
int ret = DequeueDecodedFrame(out byte[][] yuvData,
out int[] lineSizes);
if (ret == 0)
{
FrameDecoded?.Invoke(new YUVFrame(yuvData, lineSizes));
}
// Enqueue encoded packet
H264Frame frame = null;
try
{
if (encodedDataQueue.Count > 0)
{
frame = encodedDataQueue.Dequeue();
if (frame != null)
EnqueuePacketForDecoding(frame.RawData);
}
}
catch (InvalidOperationException e)
{
Debug.WriteLine($"FFmpegVideo Loop: {e}");
}
}
});
}