PDA

View Full Version : Error GetDuration is XA_TIME_UNKNOWN!!!!



hidden1611
01-09-2013, 04:24 AM
I used the code native-media in sample of andorid NDK, and i add function to get the current and duration time. Current time is OK, but duration time is always XA_TIME_UNKNOW, i tested many file video, and result is same.

hidden1611
01-09-2013, 06:29 PM
What should I do for this error ?
Thanks so much for any reply soon

Erik
03-15-2013, 09:20 AM
This may be an implementation specific error. Are you reading the file from a local file system or from a streaming source. If the source is streaming, then there may be no way for the implementation to know the duration and therefore it returns XA_TIME_UNKNOWN. If you are reading from a local file system, GetDuration() should return the actual duration of the content.