[Matroska-devel] Re: Matroska-devel Digest, Vol 17, Issue 22
Vegard Pettersen
vegard_p at broadpark.no
Thu Sep 23 18:42:14 CEST 2004
On Thursday 23 September 2004 12:00, matroska-devel-request at lists.matroska.org
wrote:
>
> > 2. Pregaps
> > 2.1. Pregap1 of track 01 may contain a truly hidden2 track
> >
> > 2.2. Pregap of tracks 02-99 may contain false hidden3 tracks
>
> Supported with chapters. The index is a sub-chapter of the main chapter.
> So we get the hidden track, which is not hidden anymore... (unless the
> player is configured to start at the sub-chapter with INDEX01 name/ID.
>
> > 3. Number of entries in TOC
> > 3.1. The number of tracks for a CD is in the inclusive range of TRACK
> > [01-99]
> >
> > 3.2. The number of indices for a TRACK is in the inclusive range of
> > INDEX [00-99]
> > -Incomplete implementation, only INDEX [00 â€" 01] currently
>
> Yes, we should support everything.
>
Sure, I've had a look at the code in
mkvtoolnix/src/common/chapter_parser_cue.cpp, and I just added a vector for
the INDEX [02-99] entries.
With this cue-file:
---
PERFORMER "Faithless"
TITLE "We Come 1 (CD Single)"
FILE "CDImage.wav" WAVE
TRACK 01 AUDIO
TITLE "We Come 1"
PERFORMER "Faithless"
INDEX 00 00:00:00
INDEX 01 00:01:01
TRACK 02 AUDIO
TITLE "We Come 1 (Rollo & Sister Bliss Remix)"
PERFORMER "Faithless"
INDEX 00 05:44:27
INDEX 01 05:47:37
INDEX 02 05:47:38
INDEX 03 05:49:37
INDEX 04 05:53:37
INDEX 05 05:57:37
---
I got the output:
---
...
| + ChapterString: Faithless_We Come 1 (Rollo & Sister Bliss Remix)_02
...
| + ChapterAtom
...
| + ChapterTimeStart: 00:05:44.360000000
...
| + ChapterString: INDEX 00
...
| + ChapterTimeStart: 00:05:47.493333333
...
| + ChapterTimeStart: 00:05:47.506666666
...
| + ChapterString: INDEX 02
...
| + ChapterTimeStart: 00:05:49.493333333
...
| + ChapterString: INDEX 03
...
| + ChapterTimeStart: 00:05:53.493333333
...
| + ChapterString: INDEX 04
...
| + ChapterTimeStart: 00:05:57.493333333
...
| + ChapterString: INDEX 05
...
---
Is this ok? I haven't tested it much yet, but it's rather simple.
Also, regarding coding standards, specifically indentation in the code,
replacing tabs with two spaces, adding spaces for nested parantheses to show
grouping, lining code up for legibility etc.
Are there any formal standards I should use before submitting the code?
In addition, how strict should preconditions be considered:
should the calling function carry the responsibility for testing
preconditions, or should the called?
Cheers,
Vegard
More information about the Matroska-devel
mailing list