Need a standard way to get format-specific stream ID (for HTML5 track "id")
Submitted by Brendan Long
Link to original bug (#711522)
Description
I'm trying to implement the "id" attribute on HTML5 TextTrack, AudioTrack and VideoTrack objects:
http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttrack-id
http://www.w3.org/TR/html5/embedded-content-0.html#dom-audiotrack-id
Currently, what the "id" is isn't standardized, but the WG is starting soon and presumably it will be the standard ID for each format (PID for MPEG-TS, stream serial number for Ogg, track UUID for Matroska).
Some options I considered:
-
Stream ID: This is nice because every stream has one, and it contains the value we want at least in Matroska. One problem is that the stream ID isn't currently defined to have any meaning besides being a unique identifier (although it could be if we wanted it to). The other problem is that all streams need a stream ID, but not all formats actually have an internal ID (the output of audiotestsrc, or WAV files for example).
-
GST_TAG_SERIAL: This is defined as an unsigned integer, and not all formats use an unsigned integer for their ID's (Matroska comes to mind). Even if all formats did now, it wouldn't be future-proof.
My suggestion is to add a GST_TAG_ID, which is defined as "the ID for this stream/track in the original format", which could then contain the PID, stream serial, etc.