After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661336 - No thumbnails for Panasonic
No thumbnails for Panasonic
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: IOP
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: Zeeshan Ali
Zeeshan Ali
Depends on: 661360
Blocks:
 
 
Reported: 2011-10-09 20:16 UTC by Age Bosma (IRC: Forage)
Modified: 2011-10-19 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
core: Add base class for client hacks (16.12 KB, patch)
2011-10-16 22:51 UTC, Zeeshan Ali
needs-work Details | Review
core: Add hacks for Panasonic TV (4.17 KB, patch)
2011-10-16 22:52 UTC, Zeeshan Ali
needs-work Details | Review
core: Add hacks for Panasonic TV (4.10 KB, patch)
2011-10-17 13:11 UTC, Zeeshan Ali
none Details | Review
core: Add base class for client hacks (16.06 KB, patch)
2011-10-17 13:11 UTC, Zeeshan Ali
committed Details | Review
core: Use 'const' rather than 'static' for constants (2.96 KB, patch)
2011-10-18 18:21 UTC, Zeeshan Ali
none Details | Review
core: Add hacks for Panasonic TV (4.68 KB, patch)
2011-10-18 18:49 UTC, Zeeshan Ali
committed Details | Review
core: Use 'const' rather than 'static' for constants (2.94 KB, patch)
2011-10-18 19:15 UTC, Zeeshan Ali
committed Details | Review

Description Age Bosma (IRC: Forage) 2011-10-09 20:16:21 UTC
Hi,

No thumbnails are shown any more since 0.10.4 on a Panasonic TX-P42G30.
This is due to Rygel serving PNG thumbnails no longer as image/jpeg but as image/png since commit http://git.gnome.org/browse/rygel/commit/?id=01d614bff17d7b9471fc442704eda672611b7a53

I.e. Panasonic can display PNG but not according to the TV's specs and only when being tricked by telling it's a JPG.
Comment 1 Zeeshan Ali 2011-10-16 14:23:56 UTC
would it be possible for you to get us the 'USER-AGENT' this TV uses? We need the one it uses in 'Browse' requests so in tcpdump, look for TCP stream with 'Browse' in the headers. Once we have that, we can have a custom hack for your TV.
Comment 2 Age Bosma (IRC: Forage) 2011-10-16 17:57:38 UTC
Here you go!
User-Agent: Panasonic MIL DLNA CP UPnP/1.0 DLNADOC/1.50

I'll be in the channel again after the weekend in case you need any testing.
Comment 3 Zeeshan Ali 2011-10-16 21:19:33 UTC
(In reply to comment #2)
> Here you go!
> User-Agent: Panasonic MIL DLNA CP UPnP/1.0 DLNADOC/1.50
> 
> I'll be in the channel again after the weekend in case you need any testing.

Thanks! I'll post patch(es) soon for your testing. Will first refactor the hacks code.
Comment 4 Zeeshan Ali 2011-10-16 22:51:22 UTC
Created attachment 199157 [details] [review]
core: Add base class for client hacks

A new abstract base class for client-side hacks from which XBoxHacks
derives.
Comment 5 Zeeshan Ali 2011-10-16 22:52:17 UTC
Created attachment 199158 [details] [review]
core: Add hacks for Panasonic TV

Currently its just about lieing to the device that png's thumbnails are
jpegs.
Comment 6 Jens Georg 2011-10-17 07:05:52 UTC
Review of attachment 199157 [details] [review]:

I would have split out the V1 downgrade as well. The Allegro and Galaxy hacks only need that, not the other stuff we need to do for XBox.

::: src/rygel/rygel-client-hacks.vala
@@ +4,3 @@
+ *
+ * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
+ *                               <zeeshan.ali@nokia.com>

You sure about that? ;)

@@ +65,3 @@
+    }
+
+    public bool is_album_art_request (Soup.Message message) {

This is really XBox-specific... Wonder if it makes sense to put it in ClientHacks.
Comment 7 Jens Georg 2011-10-17 07:07:30 UTC
Review of attachment 199158 [details] [review]:

::: src/rygel/rygel-panasonic-hacks.vala
@@ +1,2 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation.

Nokia? 2010?

@@ +4,3 @@
+ * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
+ *                               <zeeshan.ali@nokia.com>
+ *

You sure? ;)
Comment 8 Zeeshan Ali 2011-10-17 11:45:44 UTC
(In reply to comment #6)
> Review of attachment 199157 [details] [review]:
> 
> I would have split out the V1 downgrade as well. The Allegro and Galaxy hacks
> only need that, not the other stuff we need to do for XBox.

I had the same thought but it doesn't have to happen in these changes.

> ::: src/rygel/rygel-client-hacks.vala
> @@ +4,3 @@
> + *
> + * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
> + *                               <zeeshan.ali@nokia.com>
> 
> You sure about that?

Heh, forgot to update the headers.

> @@ +65,3 @@
> +    }
> +
> +    public bool is_album_art_request (Soup.Message message) {
> 
> This is really XBox-specific... Wonder if it makes sense to put it in
> ClientHacks.

Actually this check is very generic and the actual hack based on this exists in the calling code. Once these patches are in place, the next thing to do would be to put the whole hack in *Hacks, with the virtual implementation in ClientHacks doing nothing.
Comment 9 Zeeshan Ali 2011-10-17 13:11:36 UTC
Created attachment 199206 [details] [review]
core: Add hacks for Panasonic TV

Currently its just about lieing to the device that png's thumbnails are
jpegs.
Comment 10 Zeeshan Ali 2011-10-17 13:11:59 UTC
Created attachment 199207 [details] [review]
core: Add base class for client hacks

A new abstract base class for client-side hacks from which XBoxHacks
derives.
Comment 11 Zeeshan Ali 2011-10-17 13:15:10 UTC
Age, Please test against your TV.

Jens, You might want to test if I accidently broke xbox.
Comment 12 Age Bosma (IRC: Forage) 2011-10-18 15:10:58 UTC
No thumbnails are being displayed on the TV when the patches are applied.

I've applied both patches against a clean 0.12.4.
When starting Rygel I et the following errors:

(rygel:30841): Rygel-CRITICAL **: rygel_client_hacks_construct: assertion `agent_pattern != NULL' failed
(rygel:30841): Rygel-CRITICAL **: rygel_xbox_hacks_apply_on_device: assertion `self != NULL' failed

The first one occurs again multiple times later on when browsing on the TV.
Comment 13 Zeeshan Ali 2011-10-18 18:21:30 UTC
Created attachment 199355 [details] [review]
core: Use 'const' rather than 'static' for constants
Comment 14 Zeeshan Ali 2011-10-18 18:49:32 UTC
Created attachment 199358 [details] [review]
core: Add hacks for Panasonic TV

Currently its just about lieing to the device that png's thumbnails are
jpegs.
Comment 15 Zeeshan Ali 2011-10-18 19:15:37 UTC
Created attachment 199360 [details] [review]
core: Use 'const' rather than 'static' for constants
Comment 16 Jens Georg 2011-10-19 06:53:31 UTC
(In reply to comment #11)
> Age, Please test against your TV.
> 
> Jens, You might want to test if I accidently broke xbox.

Still works. Thumbnails and all. Since Age confirmed it's working, I'll commit it.