[UWP] how to set video source of media player as frame of Platform::Array<uint8> captured by UDP communication
Hi.
I'm modifying a 360VideoPlayback projects of UWP samples to play video frames captured by custom UDP communication.
Video frames of UYVY format are stored in variable of Platform::Array<uint8> every 33 ms (about 1/30fps). Then, how can I feed these frames into Media Player?
I found this tutorial, but it seems that only real device can be used as media source.
Now, I'm trying as follows
static Windows::Media::Playback::MediaPlayer^ m_mediaPlayer;
// How to assignvariable of Platform::Array<uint8> into mediaFrameSource ??
Frames::MediaFrameSource^ mediaFrameSource;
MediaSource^ source = MediaSource::CreateFromMediaFrameSource(mediaFrameSource);
m_mediaPlayer->MediaOpened += ref new TypedEventHandler<MediaPlayer^, Object^>(this, &AppView::OnMediaOpened);
m_mediaPlayer->Source = source;
Thanks in advance