[rygel] core: Don't offer audio transcoding for videos



commit e7a1b7c25302abda15b3b2b1f77af860e8325ca7
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Apr 12 18:35:46 2011 +0300

    core: Don't offer audio transcoding for videos
    
    This fix now satisfies DLNA test case 7.3.25.1.

 src/rygel/rygel-l16-transcoder.vala |    2 +-
 src/rygel/rygel-mp3-transcoder.vala |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/rygel/rygel-l16-transcoder.vala b/src/rygel/rygel-l16-transcoder.vala
index f85120a..9dcf8d5 100644
--- a/src/rygel/rygel-l16-transcoder.vala
+++ b/src/rygel/rygel-l16-transcoder.vala
@@ -63,7 +63,7 @@ internal class Rygel.L16Transcoder : Rygel.Transcoder {
     }
 
     public override uint get_distance (MediaItem item) {
-        if (!(item is AudioItem)) {
+        if (!(item is AudioItem) || item is VideoItem) {
             return uint.MAX;
         }
 
diff --git a/src/rygel/rygel-mp3-transcoder.vala b/src/rygel/rygel-mp3-transcoder.vala
index 5eee0cf..d72daf9 100644
--- a/src/rygel/rygel-mp3-transcoder.vala
+++ b/src/rygel/rygel-mp3-transcoder.vala
@@ -49,7 +49,7 @@ internal class Rygel.MP3Transcoder : Rygel.Transcoder {
     }
 
     public override uint get_distance (MediaItem item) {
-        if (!(item is AudioItem)) {
+        if (!(item is AudioItem) || item is VideoItem) {
             return uint.MAX;
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]