Hi list, I'm working with the seek operations using StageFreight. Maybe this is something known but since I saw it on a Motorola Droid, I'm wondering how seek can be improved in general for any device.
My problem is a follows, 1. Start playing a clip 2. Pause the clip after some seconds (it is better if the clip is paused where audio is rendered) 3. While clip is paused, seek back to zero position 4. Resume playback. I can hear that audio is played from the paused position for 2 or more seconds, then it starts playing from zero position. These are my findings in the code. When a pause is issued to the AudioPlayer, if there's an AudioSink defined it will call pause method of AudioTrack eventually, or it will issue a stop command if only AudioTrack exists void AudioPlayer::pause() { CHECK(mStarted); if (mAudioSink.get() != NULL) { mAudioSink->pause(); } else { mAudioTrack->stop(); } } I have tried changing it to stop also for AudioSink without success. The pause position undesired playback is still there, although smaller. Also, I'm seeing that the onVideoEvent method in the AwesomePlayer class when mSeeking is set, video will seek first then audio, so the AudioPlayer has released to render a good number of buffers. I have moved upwards the audio seeking so that no other audio buffer will be released for rendering and in combination with the idea explained above I can see a better experience. Which could be the best approach to improve the seeking experience in StageFreight. Can the pause and resume methods of both AwesomePlayer and AudioPlayer be refined for this purpose? I can continue the investigation, although I need some guidance to improve the seeking in the correct way. Please advise, -- Daniel. -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting