[rygel/wip/dvd-byteseek: 393/395] WIP



commit 8ea1b87696a2c12fac6c18e83302151823a6d73f
Author: Jens Georg <mail jensge org>
Date:   Sat Feb 13 19:20:32 2016 +0100

    WIP

 src/plugins/media-export/rygel-media-export-dvd-parser.vala |  3 ++-
 src/plugins/media-export/rygel-media-export-dvd-track.vala  | 10 ++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-dvd-parser.vala 
b/src/plugins/media-export/rygel-media-export-dvd-parser.vala
index f5812db7..25aaa89b 100644
--- a/src/plugins/media-export/rygel-media-export-dvd-parser.vala
+++ b/src/plugins/media-export/rygel-media-export-dvd-parser.vala
@@ -179,6 +179,7 @@ internal class Rygel.MediaExport.DVDParser : Extractor {
                                               buffer.length,
                                               null,
                                               "UTF-8",
+                                              Xml.ParserOption.NOBLANKS |
                                               Xml.ParserOption.NOERROR |
                                      Xml.ParserOption.NOWARNING |
                                      Xml.ParserOption.NONET);
@@ -204,7 +205,7 @@ internal class Rygel.MediaExport.DVDParser : Extractor {
                 delete result;
             }
 
-            doc->dump_memory_enc_format (out buffer, null, "UTF-8", true);
+            doc->dump_memory_enc_format (out buffer, null, "UTF-8", false);
             delete doc;
 
             yield this.cache_file.replace_contents_async (buffer.data,
diff --git a/src/plugins/media-export/rygel-media-export-dvd-track.vala 
b/src/plugins/media-export/rygel-media-export-dvd-track.vala
index a23267ee..b589f689 100644
--- a/src/plugins/media-export/rygel-media-export-dvd-track.vala
+++ b/src/plugins/media-export/rygel-media-export-dvd-track.vala
@@ -57,14 +57,17 @@ internal class Rygel.MediaExport.DVDTrack : VideoItem {
 
             var it = node->children;
             while (it != null) {
+            warning ("name: %s", it->name);
                 if (it->name == "length") {
                     this.duration = (int) double.parse (it->children->content);
                 } else if (it->name == "width") {
                     this.width = int.parse (it->children->content);
                 } else if (it->name == "height") {
                     this.height = int.parse (it->children->content);
-                } else if (it->name == "format") {
-                    this.dlna_profile += "_" + it->children->content;
+            } else if (it->name == "format") {
+                this.dlna_profile += "_" + it->children->content;
+ /*           } else if (it->name == "rygel:bytelength") {
+                this.size = int64.parse (it->children->content); */
                 }
                 // TODO: Japanese formats...
                 it = it->next;
@@ -88,6 +91,9 @@ internal class Rygel.MediaExport.DVDTrack : VideoItem {
 
         // We don't have proper access to tbe bytes, but time seek should week
         res.dlna_operation = DLNAOperation.TIMESEEK;
+        if (this.size > 0) {
+            res.dlna_operation |= DLNAOperation.RANGE;
+        }
         res.extension = "mpg";
 
         return res;


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