Re: Track "id" format?

On Tue, Nov 12, 2013 at 7:16 AM, Brendan Long <B.Long@cablelabs.com> wrote:
>> No, it's not "just a string" - it's a DOMString, which is defined as a
>> sequence of code units, commonly interpreted as UTF-16 encoded
>> strings:
>
>> I'd recommend to follow the Javascript/ECMAScript toString() method:
>> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString
>
> I think encoding is only an issue for Ogg Skeleton. My question was mainly about how we handle integers (Matroska) or unspecified binary (MPEG-TS).
>
> To give you an idea of what I mean, I'm looking for something like:

Right, sorry, you're looking for the mapping, not the format of the
resulting string. That wasn't clear to me. That is indeed what this CG
is about. This should be added to the wiki once we've decided.


>   * Matroska / WebM: "id" should contain the TrackUID formatted as a decimal number (example: id="81").

Right, that's what toString() does for input of a number.

>   * MPEG-TS: "id" should contain the PID, formatted as "0x"-prefixed hexadecimal (example: id="0x51").

Is that how you'd prefer to see it? Then, indeed, that requires
special treatment.

>   * Ogg: "id" should contain the Name header, decoded from UTF-8, if it exists, otherwise it should be the stream serial number, formatted as a decimal number.

"name" is compulsory in Ogg Skeleton and it's a more reliable
identifier, because the serial number can change when transcoding or
re-multiplexing.


> Note that decimal formatting might be better for MPEG-TS too. This is just an example.

Depends on what you're trying to achieve.

Silvia.

Received on Monday, 11 November 2013 23:37:22 UTC