zero duration for some media

by Peter Jeffe » Thu, 09 Apr 2009 04:13:44 GMT


Sponsored Links
 Some audio files return 0 from MediaPlayer.getDuration(), even though
they're perfectly valid files that play ok and that players on Windows
can find the duration of.

There seem to be two different cases here: certain file types such
as .wma and .wav always return 0 duration, and others only do so
sometimes.  I haven't been able to find any pattern in the latter
case, but it does seem consistent per file.

The music player displays 0:00 duration for these, so it's not just my
code.  Any ideas on what's causing this and whether there's a
workaround?  Thanks.

-- Peter

--~--~---------~--~----~------------~-------~--~----~



zero duration for some media

by l hx » Thu, 09 Apr 2009 20:00:45 GMT


 today, i found this matter. and i see some code and found that the duration
of the file such as wma and wmv in the datebase is also 0. i will go on it.
who know why and how to solve, please give some advise.





--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


zero duration for some media

by Peter Jeffe » Mon, 13 Apr 2009 07:34:46 GMT


 Hey Dave Sparks, any comment on this?  I understand that wma decoding
isn't handled by opencore, but that doesn't really answer why the
scanner shouldn't get durations from the codec through a standard
interface.  But my main concern is why do I get 0 duration from mp3s,
m4as, oggs, etc.?  To repeat, these are perfectly valid files that
play OK, and from which other media players can grok the duration.
It's a pretty big problem, so any ideas?  Thanks!

-- Peter

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. about webview

in current email, phone number can be clickable
now, I want to customerize the phone number format,
So, May I ask how webview recognize a phone number?
Anybody knows where the code is in current android code?
Thanks very much

--~--~---------~--~----~------------~-------~--~----~

2. How to get the InputMethodService to focus on Dialog after dispatch a KeyEvent on Spinner???

I have a Spinner and related Adapter. I use InputMethodService to
click on the Spinner. A Dialog appears after click on Spinner. but
after the dialog appeared, InputMethodService object can not get focus
on the item list on Dialog for doing another event? Is anyone know how
to send event to the Adapter's item list using InputMethodService in
this case??? Thanks for our help!!!!
--~--~---------~--~----~------------~-------~--~----~

3. Putting Gadgetfs support in Android

4. The screen was black case, service sleep?

5. long-running loadUrl() JavaScript with a callback

6. Question about the license of the non-free applications

7. clear issue on Mapview