GNOME Bugzilla – Bug 691654
Support mkv format for Samsung TV by using Rygel.ClientHacks
Last modified: 2013-03-09 15:29:03 UTC
Samsung TV can't play mkv file from Rygel. This is because samsung TV wants mime type "video/x-mkv" for mkv files, but rygel sends "video/x-matroska". This problem can be fixed by adding Rygel.ClientHacks for Samsung TV. I made a patch for this problem.
Created attachment 233381 [details] [review] a patch using Rygel.ClientHacks for samsung TV
This hack has 2 advantages over changing gupnp-dlna xml profiles. First, this hack does not affect other clients which may need "video/x-matroska". Second, users are not required to regenerate cache.
Agree. Tiny problem: This only works for new samsung tvs, older ones don't provide a user agent
Do you mean samsung TV doesn't send user agent information on play Request? For that problem, I already added a feature for it in the previous patch. My samsung TV sends the user agent information on list request, but not on play request. Therefore, I added user agent cache in my patch. If "User-Agent" field doesn't exist, rygel will look up user agent cache table based on an IP addresses. I think that an IP address of a client won't be changed between listing and playing. So on that case, this patch will work. I can play mkv files on my samsung TV with my patch.
oh, indeed you did, sorry. it's slightly worse though, some samsungs don't even send user-agent headers in upnp requests. There's a patch for gssdp and gupnp that adds an user-agent cache at the discovery level in bug 653894
I've checked gssdp and gupnp source code. But I don't find the code about user agent cache. It seems that the patches weren't applied to the git repository. Anyway, I think user agent cache does not solve all problems, but it will be useful for part of samsung TV users.