kakone / ssdp Goto Github PK
View Code? Open in Web Editor NEW.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
.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
When using library with .net 4.5.1 I sometimes get same device multiple times,
var devices = await new Ssdp().SearchUPnPDevices("SsdpSearch:all");
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</res></item></DIDL-Lite></u:SetAVTransportURI></s:Body></s:Envelope>
Instead of/in addition to .NET Portable.
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?
Unable to get MD5 checksum for the key file "key.pfx"Could not find file....
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!
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).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.