|
|
|
|
42
|
filePath = filePath.replace("file://","");
|
42
|
filePath = filePath.replace("file://","");
|
43
|
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
|
43
|
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
|
44
|
retriever.setDataSource(filePath);
|
44
|
retriever.setDataSource(filePath);
|
45
|
- int videoWidth = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH);
|
|
|
46
|
- int videoHeight = mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT);
|
|
|
|
|
45
|
+ int videoWidth = Integer.parseInt(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH));
|
|
|
46
|
+ int videoHeight = Integer.parseInt(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT));
|
47
|
|
47
|
|
48
|
Bitmap image = retriever.getFrameAtTime(1000000, MediaMetadataRetriever.OPTION_CLOSEST_SYNC);
|
48
|
Bitmap image = retriever.getFrameAtTime(1000000, MediaMetadataRetriever.OPTION_CLOSEST_SYNC);
|
49
|
|
49
|
|