Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I access the MediaMetadataRetriever.setDataSource(...) status codes?

I'm getting the following error java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA and I'd like to know what this status is. I'm using the function MediaMetaDataRetriever.setDataSource(String filePath)

like image 540
Andrew Orobator Avatar asked Jan 09 '14 00:01

Andrew Orobator


2 Answers

I got this error java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA when tried to call void setDataSource(String path) on an empty file. (0 bytes)

You need to be 100% sure that path for the file is not null, not empty, the file itself exists and valid.

like image 122
Kirill Karmazin Avatar answered Sep 20 '22 11:09

Kirill Karmazin


I didn't have an empty file or any other of the here mentioned bugs in my code. The files I tried to use were fine. I don't exactly know why, but it worked for me when I simply used another overload of setDataSource.

The ones I used that threw this exception were MediaMetadataRetriever.setDataSource(String) and MediaMetadataRetriever.setDataSource(String, HashMap)

The one that simply worked was MediaMetadataRetriever.setDataSource(Context, URI).

like image 43
Benjamin Basmaci Avatar answered Sep 16 '22 11:09

Benjamin Basmaci