/// <summary> /// The appsink has received a buffer /// </summary> static void NewSample(object o, NewSampleArgs args) { AppSink sink = o as AppSink; // Retrieve the buffer using (var sample = sink.PullSample()) { if (sample == null) { return; } // The only thing we do in this example is print a * to indicate a received buffer Console.Write("* "); sample.Dispose(); } }
private void Videosink_NewSample(object o, NewSampleArgs args) { using (var sample = videosink.PullSample()) PushImage(sample); }