home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!comp.vuw.ac.nz!waikato.ac.nz!ldo
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: QuickTime questions
- Message-ID: <1992Dec16.173320.12836@waikato.ac.nz>
- Date: 16 Dec 92 17:33:20 +1300
- References: <1992Dec14.163630.3885@dartvax.dartmouth.edu>
- Organization: University of Waikato, Hamilton, New Zealand
- Lines: 46
-
- In article <1992Dec14.163630.3885@dartvax.dartmouth.edu>, Jim.Matthews@dartmouth.edu (Jim Matthews) writes:
- > I'm having a couple of problems writing some QuickTime software. These
- > problems occur under both QT 1.0 and QT 1.5.
- >
- > 1) I can't find a reasonable way to extract the samples of an audio track,
- > taking track edits into account. GetMediaSample() doesn't respect track
- > edits, so I want to ask it only for as many samples as I know are used
- > contiguously by the track. I hoped to get that information from the
- > duration parameter of GetMediaNextInterestingTime(); but in my experience
- > GMNIT always puts "1" in the duration parameter, and I don't want to call
- > GetMediaSample() for every 8 bits of sound data.
-
- If you want to take account of track edits, you should be using
- GetTrackNextInterestingTime. Use the nextTimeTrackEdit flag, and you will
- get back intervals corresponding to entire track edits. Just watch out for
- the zero-length "phantom edit" at the end (or beginning, if you're going
- backwards) of each track. Then you use TrackTimeToMediaTime to map the
- times you get to media times.
-
- There is a small design oversight in QuickTime 1.0. TrackTimeToMediaTime will
- map any track time value to the corresponding media time value, but there's
- no way to specify which of the two media time values you may want at the
- boundary between two track edits. I think you always get the one corresponding
- to the edit that starts at that point--never the one that ends there.
-
- QuickTime 1.5 introduces a new call, GetTrackEditRate, which you should be
- able to use to calculate the exact ending media time for the edit.
-
- > 2) The dataFormat field of the SoundDescription record is supposed to be
- > set to 'raw ' for unsigned sound samples, but in my experience it always
- > comes back as 0x00000000. So now I check for 0x00000000, but is this a
- > problem with the movies I'm looking at or with the documentation?
-
- I've seen a lot of this, too. The QuickTime 1.5 documentation makes it clear
- that you should watch out for this; 0 and 'raw ' values are interchangeable.
-
- By the way, I recommend you get hold of the QuickTime 1.5 documentation--
- I think it's available on its own from APDA, if you don't want to shell out
- for the full toolkit update with the new 1.5 developer CD and PhotoCD sampler.
- It's *much* improved over the 1.0 documentation (apart from being twice as
- thick :-)).
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Computer Services Dept fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
-