[rygel/wip/cablelabs-integration: 17/18] WIP



commit a09ae25439ca05cc2ca4cb226a64b3c224e796e0
Author: Jens Georg <mail jensge org>
Date:   Thu Nov 20 18:09:17 2014 +0100

    WIP

 src/librygel-server/rygel-thumbnail.vala |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-server/rygel-thumbnail.vala b/src/librygel-server/rygel-thumbnail.vala
index 42ed920..253d498 100644
--- a/src/librygel-server/rygel-thumbnail.vala
+++ b/src/librygel-server/rygel-thumbnail.vala
@@ -77,4 +77,25 @@ public class Rygel.Thumbnail : Rygel.IconInfo {
 
         return protocol_info;
     }
+
+    internal virtual MediaResource get_resource (string protocol) {
+        MediaResource res = new MediaResource (protocol + "_thumbnail");
+
+        res.size = this.size;
+        res.width = this.width;
+        res.height = this.height;
+        res.color_depth = this.depth;
+        res.mime_type = this.mime_type;
+        res.dlna_profile = this.dlna_profile;
+        res.protocol = protocol;
+        // Note: These represent best-case. The MediaServer/HTTPServer can dial these back
+        res.dlna_flags |= DLNAFlags.INTERACTIVE_TRANSFER_MODE |
+                          DLNAFlags.BACKGROUND_TRANSFER_MODE |
+                          DLNAFlags.CONNECTION_STALL |
+                          DLNAFlags.DLNA_V15;
+        res.dlna_operation = DLNAOperation.RANGE;
+        res.dlna_conversion = DLNAConversion.TRANSCODED;
+
+        return res;
+    }
 }


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