[PATCH spice-html5] Review the webm video track header and remove the fixmes.

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

 



This involved a review of the Firefox parsing code along
with the official specifcation, and setting these fields
to the specified default values.

Signed-off-by: Jeremy White <jwhite@xxxxxxxxxxxxxxx>
---
 webm.js | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/webm.js b/webm.js
index 789da14..b6dc2fa 100644
--- a/webm.js
+++ b/webm.js
@@ -469,20 +469,26 @@ webm_AudioTrackEntry.prototype =
 
 function webm_VideoTrackEntry(width, height)
 {
+    /*
+    ** In general, we follow this specification:
+    **   https://www.matroska.org/technical/specs/index.html
+    ** we supply the mandatory values, and a comment notes
+    ** where we differ from the default
+    */
     this.id = WEBM_TRACK_ENTRY;
     this.number = 1;
     this.uid = 1;
     this.type = 1; // Video
     this.flag_enabled = 1;
     this.flag_default = 1;
-    this.flag_forced = 1;
-    this.flag_lacing = 0;
-    this.min_cache = 0; // fixme - check
+    this.flag_forced = 1;  // Different than default; we wish to force
+    this.flag_lacing = 1;
+    this.min_cache = 0;
     this.max_block_addition_id = 0;
-    this.codec_decode_all = 0; // fixme - check
-    this.seek_pre_roll = 0; // 80000000; // fixme - check
-    this.codec_delay =   80000000; // Must match codec_private.preskip
     this.codec_id = "V_VP8";
+    this.codec_decode_all = 1;
+    this.seek_pre_roll = 0;
+
     this.video = new webm_Video(width, height);
 }
 
@@ -504,7 +510,6 @@ webm_VideoTrackEntry.prototype =
         at = EBML_write_u8_value(WEBM_MIN_CACHE, this.min_cache, dv, at);
         at = EBML_write_u8_value(WEBM_MAX_BLOCK_ADDITION_ID, this.max_block_addition_id, dv, at);
         at = EBML_write_u8_value(WEBM_CODEC_DECODE_ALL, this.codec_decode_all, dv, at);
-        at = EBML_write_u32_value(WEBM_CODEC_DELAY, this.codec_delay, dv, at);
         at = EBML_write_u32_value(WEBM_SEEK_PRE_ROLL, this.seek_pre_roll, dv, at);
         at = EBML_write_u8_value(WEBM_TRACK_TYPE, this.type, dv, at);
         at = this.video.to_buffer(a, at);
@@ -523,7 +528,6 @@ webm_VideoTrackEntry.prototype =
             WEBM_MIN_CACHE.length + 1 + 1 +
             WEBM_MAX_BLOCK_ADDITION_ID.length + 1 + 1 +
             WEBM_CODEC_DECODE_ALL.length + 1 + 1 +
-            WEBM_CODEC_DELAY.length + 1 + 4 +
             WEBM_SEEK_PRE_ROLL.length + 1 + 4 +
             WEBM_TRACK_TYPE.length + 1 + 1 +
             this.video.buffer_size();
-- 
2.1.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]