T doWait() {
            T returnValue;

            synchronized (monitor) {
                while (!signalled) {
                    try {
                        monitor.wait();
                    } catch (InterruptedException e) {
                        Log.e(TAG, "sync error, e");
                    }
                }
                signalled = false;
                returnValue = this.returnValue;
            }

            return returnValue;
        }
Handles a segment by merging it with the init segment into a temporary file.
MediaPlayer-DASH/src/main/java/net/protyposis/android/mediaplayer/dash/DashMediaExtractor.java