Re: validity?

Moritz Bunkus <[email protected]>
Newsgroups gmane.comp.multimedia.matroska.devel
Message-ID <[email protected]>
Hey,

> - Are undefined/unknown/unregistered elements allowed in the EBML
>   Header? For a MKV file are Elements that are not in either the EBML
>   or MKV spec allowed?

I would say that unknown elements should have to be treated the same way
no matter where they occur. Otherwise the EBML Head structure could
never be extended further.

However, I would say that an EBML Head itself can only contain other
EBML elements and not one of the semantic ones. E.g. a doc type spec
MUST NOT define elements which would be valid as a child element of an
EBML Head. I cannot think of a use case for allowing this, and it would
make parsing difficult (a parser would have to parse the head, get the
doc type, switch to that mode and re-parse the head in order to find
valid elements according to the doc type).

> - Is it correct that mandatory elements are optional unless they have
>   no registered default value? If a mandatory element does not appear
>   then the default value is used. Thus "WritingApp" which is mandatory
>   but has no default MUST appear but TimecodeScale which is mandatory
>   but with a default may or may not appear.

That's how I've always understood it, yes. I would describe it the other
way around, though, as the majority of elements does not have a default
value, something like »Mandatory elements MUST be present unless they
have a default value.«

I also tend to dislike double negation (…unless… no…) as it makes texts
harder to understand.

> - When is Element ordering important? Can EBML Elements be in any
>   order? I imagine having a bunch of Clusters in random order may make
>   playback difficult.

For Matroska there are two aspects regarding order:

1. The level 1 elements: certain elements (track headers, segment info)
   should be found before the first cluster is found in order to enable
   playback. This is somewhat murky (e.g. linking via meta seek
   elements).

2. The clusters should be ordered according to their timestamp in order
   to avoid excessive seeking (and streaming would also
   suffer). However, tiny clusters may actually violate that rule: the
   most extreme case would be a video track with B frames with a single
   frame per cluster. In that case the frame timecodes would be
   something like 0, 120, 40, 80… and so would the cluster
   timecodes. Those clusters would occur in the same order in the file
   violating this rule – but that would actually be OK.

Otherwise the order is flexible.

Kind regards,
mosu

_______________________________________________
Matroska-devel mailing list
[email protected]
http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
Read Matroska-Devel on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.devel
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAABCAAGBQJVv4+5AAoJEHSvAK3y4yyFIEkQAMx01tXfrV9vZy7xlMkT3FK0
UQqy4C3tkper+ukL0Sjdp5yq8YwlB3xvHZHIJQbsu7XNCAnKnjux7uhIORFFI+Ni
lVaHrx+sOg7EXts+FE1Y+PGW1FERYz6iW3YT9rIKVUVGwiA9kg3G4+bKBerlVqTq
Vh5fcyh5+VYvPU2A68Shk3zC9NsYCaAIOxfX8aWap7bjOS2J1ddSQXE+K9Rs1he0
FYlYjK05NtnN/fs9+L5Blt8zaWx1N3pRKWGXmpqO1UyGbVR8t1owgAsVprsj4t6c
OFVSJ1Ijiu70oygQB9xg4/P4CQVnKIXacvi6iJ+MffDxIbMqPYFJK7H94yvKYZVk
/c/2zZuK4vuK1vBmzLt43IJjbPJgu5yeiA9P2ZHAbdXyEbgUUrS+uPfyF+RG1Qa0
vKKUcXo0YzbUQwk7F/DTLmnWXiWo4kJm55EHo3Dh6naiGeP3gtRuUfw60YXTu34S
gBVxT3oxiSfJnvtj/dPngAnEjS31wPesKnXUIc2rrwE73G/fkQ0H5V7DunhsBiDV
9VfFwTwtLrc9wA+0dtg9bFzwmT7AD3MvsPwmgqV9HgAHPUrMyB0zfCLwQm3iH6Mu
JqZT2ses6/b6kArZhDWu9IWkVZ0ndkZB8Rh8PDxSlc2a25Rzy7v3rtIirc1bzKil
ZvpaB25ZmluDW88C7lRl
=gOuL
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.