Playing streaming video in WPF

前端 未结 2 497
暗喜
暗喜 2021-02-07 20:33

I\'ve written a WCF service that streams media files. I\'m now writing a WPF application that consumes this service and have only just found out that the MediaElement does not a

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-07 20:58

    You could host a HttpListener inside your WPF app and supply the stream which you receive from your WCF service through an URL which is served by HttpListener to MediaElement.Source .

    Other options (though you seem to have ruled them out):

    • http://directshownet.sourceforge.net/
    • http://wpfmediakit.codeplex.com/

    Not sure if this is an option for you, but there are commercial libraries for multimedia including video playback from streams in WPF:

    • http://www.leadtools.com/sdk/multimedia-suite.htm#-
    • http://www.visioforge.com/video-capture-sdk-net2.html or http://www.visioforge.com/media-player-sdk-net.html

提交回复
热议问题