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 690533 - SAMi(smi) subtitles support
SAMi(smi) subtitles support
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: rygel-maint
rygel-maint
Depends on:
Blocks:
 
 
Reported: 2012-12-20 01:49 UTC by Choe Hwanjin
Modified: 2013-01-23 15:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch for smi subtitle support (4.16 KB, patch)
2012-12-20 01:49 UTC, Choe Hwanjin
needs-work Details | Review
a patch for smi subtitle support (4.36 KB, patch)
2013-01-10 16:07 UTC, Choe Hwanjin
committed Details | Review

Description Choe Hwanjin 2012-12-20 01:49:01 UTC
Created attachment 231943 [details] [review]
a patch for smi subtitle support

In Korea, SAMI(smi) type subtitles are widely used.
It will be very useful if rygel detect smi subtitles.
Comment 1 Jens Georg 2012-12-20 09:51:40 UTC
Thanks, I will have a look.

The subtitle implementation we carry currently is very specific for Samsung TVs, does it help you at all?
Comment 2 Choe Hwanjin 2012-12-20 10:27:10 UTC
With this patch, I can see smi subtitles on my Samsung TV.
I really need this feature :)
Comment 3 Jens Georg 2013-01-10 10:04:12 UTC
Review of attachment 231943 [details] [review]:

Overall looking fine.

::: src/librygel-server/rygel-subtitle-manager.vala
@@ +71,2 @@
+                if (info.get_attribute_boolean (FileAttribute.ACCESS_CAN_READ)) {
+                    var subtitle = new Subtitle ("text/plain", ext);

We should probably query the CONTENT_TYPE in query_info above to use the correct content type (application/smil or application/x-srt or whatever)

::: src/librygel-server/rygel-video-item.vala
@@ +88,3 @@
             try {
+                var subtitles = subtitle_manager.get_subtitles (uri);
+                this.subtitles.add_all (subtitles);

Did you test this with multiple subtitles? having a .srt and a .smi (not sure how likely that is, though) and check if it generates two resources?
Comment 4 Choe Hwanjin 2013-01-10 16:07:33 UTC
Created attachment 233153 [details] [review]
a patch for smi subtitle support
Comment 5 Choe Hwanjin 2013-01-10 16:11:38 UTC
(In reply to comment #3)
> Review of attachment 231943 [details] [review]:
> 
> Overall looking fine.
> 
> ::: src/librygel-server/rygel-subtitle-manager.vala
> @@ +71,2 @@
> +                if (info.get_attribute_boolean
> (FileAttribute.ACCESS_CAN_READ)) {
> +                    var subtitle = new Subtitle ("text/plain", ext);
> 
> We should probably query the CONTENT_TYPE in query_info above to use the
> correct content type (application/smil or application/x-srt or whatever)

Ok, I uploaded a new patch.

>
> ::: src/librygel-server/rygel-video-item.vala
> @@ +88,3 @@
>              try {
> +                var subtitles = subtitle_manager.get_subtitles (uri);
> +                this.subtitles.add_all (subtitles);
> 
> Did you test this with multiple subtitles? having a .srt and a .smi (not sure
> how likely that is, though) and check if it generates two resources?

I already tried to detect 2 subtitles, .srt and .smi.
But my TV listed only one subtitle.
Anyway, I think it is worth gathering all subtitles.
Comment 6 Jens Georg 2013-01-23 14:37:07 UTC
gathering all subtitles works, but for some reason only the first subtitle has the correct namespace.
Comment 7 Jens Georg 2013-01-23 14:49:20 UTC
Pushed slightly modified to fix the missing namespace issue
Comment 8 Choe Hwanjin 2013-01-23 15:49:29 UTC
Thank you.