[vorbis] xml stream formats

Ralph Giles giles at snow.ashlu.bc.ca
Thu Jul 6 11:53:12 PDT 2000



On Thu, 6 Jul 2000, Bob Miller wrote:

> I'm not sure I understand how this streaming XML stuff is going
> to be used.  I'm envisioning something like this.
> 
>     <?xml version="1.0"?>
>     <!DOCTYPE vorbis-metadata SYSTEM "http://www.xiph.org/vorbis-lyrics.dtd">
>     <vorbis::metadata>
>      <title>Lucy in the Sky</title>
>      <composer>John Lennon</composer>

Consider a live streaming context, when you have people connecting "in the
middle" of a song. The server has to be smart enough to splice in
everything up to this point, so the player gets valid xml. The tricky part
is you have to make sure you cut the existing string at the right level of
nesting so you don't end up with an unbalanced tag at the end.

>      <timestamp t="00:01.38"/>
>      <chord symbol="Am" fingering="http://www.xiph.org/guitarcharts/Am.png"/>
>      <lyric>Pic</lyric>
>      <timestamp t="00:01.53"/>
>      <lyric>ture </lyric>

For example, you could cut it here, since we're only enclosed by the
<vorbis::metadata> tag.

>      <timestamp t="00:02.04"/>
>      <lyric><b>your</lyric>       <!-- Note gratuitous typographic markup -->
>      <timestamp t="00:02.31"/>
>      <chord symbol="G" fingering="http://www.xiph.org/guitarcharts/G.png"/>

But you *can't* cut here, because of the spanning <b> tag.

>      <lyric>self</b> </lyric>
>      <timestamp t="00:02.55"/>
>      <lyric>on </lyric>
> 
>      <!-- and so forth... -->
> 
>     </vorbis::metadata>
> 
> Is this sort of the idea?  If not, what?

But yes, that is sort of the idea. There's another issue with your example
in that the timestamps aren't really tied to particular <lyric> or <chord>
tags, so we can't just tell the server to splice (or just put a packet
boundary) at any point on the first level of the tree. We don't want to
encoder to have to know that kind of detail about the DTD. This is easily
remedied by making the timestamp another attribute.

 -r

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list