07-27-2009 10:33 AM
On Bold OS4.6.0 simulator, I tried to use buffered video demo that comes with simulator to play a 3gp file. After I changed seek type to Random, it worked for small video files. However, on a large video file, it is not working. Looking at the debug, it seems that at the very early few seconds, the player calls seek(int where) of the data source (or source stream) with a value that close to size of the video file. Since the file has not been completely downloaded to that point yet, the whole thing stops.
My understanding is that the seek(int where) function is a way for player to tell where to position the next read. Then is there any reason that the player needs to read toward the end of the file pretty earlier? Because that kill the whole purpose of progressive downloading and playing.
Any suggestions on how to get around this are aprreciated.
Solved! Go to Solution.
07-27-2009 10:41 AM
I believe (but am not sure) that it's looking for headers. If it does not find them at the beginning, it will then check at the end of the file. I'm not sure how to fix this, though - My suggestion would be trying a different video format, or a different encoding process/program for 3gp.
07-27-2009 10:57 AM
The Datasource is used to feed data to the player, for both cases ( local and remote).
So if you have the file, the seek_type should be set to Random. In this mode the player seeks to begin and then to the end. By specifying Random, it means that you can play anywhere in the file, and this cannot be done unless you have the whole thing.
The other case when you are downloading, you need to specify the seekType to SEEKABLE_TO_START. In this mode the player starts playing as soon as it gets enough bytes to play. It does not wait for the whole file.
So in your code you got to select the seekType based on the file being downloaded and complete or not.
This is the current behavior even with other files such as mp4, mp3....
07-27-2009 11:08 AM
I had this problem with a streaming AAC player, and received from RIM:
"Do the (aac files) contain ID3 tags, and if so, are they at the start of the file or at the end?Our media player implementation will look for them at the beginning and if not found, they will look for them 128 bytes from the end of the file."
During testing, we did try attaching id3 tags to the beginning of the file, and it prevented the first seek to the end of the file.
From rab's response, though, changing the seek type may work for your needs as well or better.
09-29-2009 06:07 AM
You did successfully on GSM Device. I am trying on BB Bold to play live audio using Datasource/Sourcestream . It works fine for some time , but aftter
that player gets stopped . No callback event is received to notify that playback is stopped. And no other functions of sourcestream are called . At last read was called
Then player was stopped.
So Does anyone have any idea.. what may be the problem ???
If anyone knows , then please reply.