Вы можете использовать System.Windows.Media.Imaging.WriteableBitmap
и передать его дескриптор IntPtr для вызова SDK камеры.
Вот пример:
private void VideoSampleReady(byte[] sample, uint width, uint height, int stride, WriteableBitmap wBmp, System.Windows.Controls.Image dst)
{
if (sample != null && sample.Length > 0)
{
this.Dispatcher.BeginInvoke(new Action(() =>
{
if (wBmp == null || wBmp.Width != width || wBmp.Height != height)
{
wBmp = new WriteableBitmap(
(int)width,
(int)height,
96,
96,
PixelFormats.Bgr24,
null);
dst.Source = wBmp;
}
// Reserve the back buffer for updates.
wBmp.Lock();
Marshal.Copy(sample, 0, wBmp.BackBuffer, sample.Length);
// Specify the area of the bitmap that changed.
wBmp.AddDirtyRect(new Int32Rect(0, 0, (int)width, (int)height));
// Release the back buffer and make it available for display.
wBmp.Unlock();
}), System.Windows.Threading.DispatcherPriority.Normal);
}
}