Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Streaming problems on OS X



Hello!
I'm trying to set up a QT for Java app that reads audio-only streams from a
QT Streaming Server. The following code works perfectly on Windows, but on
Mac OS X, two bugs occur:

1. The first time the method runs, the stream stalls in prePreRoll stage (no
mcActionMovieEdited events are received). This happens ONLY the first time
the method runs.

2. More mysteriously, about 1 in 20 or so times the method is called,
buffering finishes succefully, everything seems to be working fine, but
there is no sound output (even though QT seems to think everything is
working normally).

The same code, on Windows, never runs into these problems. I have just begun
to dip into the QT API, so it may be something very basic that I'm missing.
Any suggestions would be greatly appreciated!

----
Movie m;
MovieController mc;
DataRef w;
QTPlayer qtx;
QTCanvas QTcanvas1;
Boolean playing;

...

private void startplaying(String s) {
try {
if (mc != null) {
mc.play(0);
playing = false;
}
w = new DataRef(s);
m = Movie.fromDataRef(w, StdQTConstants.newMovieActive);
mc = new MovieController(m);
qtx = new QTPlayer(mc);
QTcanvas1.setClient(qtx, true);
mc.setActionFilter (new PMFilter(), true);
qtx.startTasking();
playing = true;
mc.prerollAndPlay(1);
//qtx.setRate(1); //same problems if this is called instead
}
----
Jim Halliday
Sofware Programmer/Analyst
Digital Music Library Project
Indiana University
email@hidden




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.