In my wpf application (.net 8.0) I need to implement DLNA (media casting) functionality: cast video/audio/picture from my PC to smart TV.
What I can find is this sample below, but it is an UWP application.
https://learn.microsoft.com/en-us/samples/microsoft/windows-universal-samples/basicmediacasting/
I tried to wrapp those media casting functions to be an UWP library and invoke them in my wpf application, but it seems not possible. The reason may be this:
https://learn.microsoft.com/en-us/dotnet/core/compatibility/interop/5.0/built-in-support-for-winrt-removed
I then find this “Windows Media Streaming API” below, it seems to be suitable for me. But I cann’t find sample code, any advise?
https://learn.microsoft.com/en-us/windows/win32/mediastreaming/media-streaming-api-portal