GithubHelp home page GithubHelp logo

kakone / ssdp Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 6.0 113 KB

.NET implementation (.NET Standard 1.4) of Simple Service Discovery Protocol (with AV transport service control point sample)

License: GNU General Public License v2.0

C# 100.00%

ssdp's People

Contributors

kakone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ssdp's Issues

Same device multiple times

When using library with .net 4.5.1 I sometimes get same device multiple times,

var devices = await new Ssdp().SearchUPnPDevices("SsdpSearch:all");

Showstopper issue with native tool chain

Bad_and_good_packets.pcapng.zip
I've found an extremely weird issue; it's reproducible when you compile UWP app with .NET Native tool chain only and (probably) with Hisense TV sets (without native tool chain everything works fine!). Also, it's happened for videos (mp4 etc.) only, image/jpeg content is working fine. It's a really strange!

Here are packets captures from WireShark (in readable text form, binary attachment below):

"bad" packet (getting "Internal Server Error"):
H4sZ~E{c@!869(P<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">0http://192.168.1.140:8000/WP_20170810_19_35_03_Pro.mp4dc:titleMedia from Cast to</dc:title>upnp:classobject.item.videoItem</upnp:class>http://192.168.1.140:8000/WP_20170810_19_35_03_Pro.mp4</u:SetAVTransportURI></s:Body></s:Envelope>

"good" packet (correct response, playback is good - this one was made without compiling with native tool chain)
H4sZ~E|E@!86jv!P<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">0http://192.168.1.140:8000/WP_20170810_19_35_03_Pro.mp4<DIDL-Lite xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sec="http://www.sec.co.kr/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="f-0" parentID="0" restricted="true"><dc:title>Media from Cast to</dc:title><upnp:class>object.item.videoItem</upnp:class><res protocolInfo="http-get::video/mp4:">http://192.168.1.140:8000/WP_20170810_19_35_03_Pro.mp4&lt;/res&gt;&lt;/item&gt;&lt;/DIDL-Lite></u:SetAVTransportURI></s:Body></s:Envelope>

the method or operation is not implemented

a great job, but I have trouble testing it.

I created a solution (UWP 10) with reference to your project (Figure 1)
when I start and try to test it (I added a try catch) the app goes wrong (Figure 2)

the method or operation is not implemented

error1

error2

Slideshow experience

Hi Stéphane, sorry for disturbing you again but maybe you can provide some suggestions.

My current TV set, Hisense Smart TV, has one weird "feature" (previous TV set, Panasonic Viera, accidentally broken, worked fine): between two PlayAsync I need to call StopAsync (otherwise I'm getting exception) but TV switches quickly from DLNA renderer screen to the current input. This behavior is kinda annoying, especially for the pics slideshow.

I tried to add additional commands to AVTransportControlPoint: SetNextUriAsync, NextAsync and PreviousAsync but looks like SetNextUriAsync is not working (see attached sources), I'm getting an exception.

Stéphane, what you can recommend for the seamless slideshow experience?

AVTransport.zip

Windows 10 UWP: project is not working

even with your suggestion :( I recreated UWP class library with your sources but Ssdp.cs does not compile, UWP has different socket.SendToAsync and socket.ReceiveAsync implementations.

Could you please help with UWP code?

Thanks a lot!

A few more questions

I'm really sorry, Stéphane, but I don't have your email to ask a few more questions so I'm using github "Issues" :) BTW, you may treat this as a feature request... Or you may simple junk it or close this issue (I do understand).

So, my first question is: is it possible to add custom "banner" for AVTransportControlPoint class, to be displayed on the DLNA renderer (i.e. TV)? Theoretically, AFAIK, it's possible; casting by using Windows.Media.Casting API do have a custom banner - instead of the raw file name TV got custom string (like "Media from <your_app_name>"). Will be good to add this feature to the project!

My second question isn't related to your project: could you please recommend me some UWP HTTP server implementation, good enough to work as DLNA media source server (i.e. HTTP 1.1 server which supports sending large files with additional processing of HTTP headers - in case of seeking/scrubbing in mp4 video)? I tried a few github hosted projects but all of 'em are ... can't blame open sources devs but these servers are too simple and have minimal set of functionality (yes, they are good to send short strings with JSON or XML but definitely not ready for sending large mp4's).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.