I obtain the same error, although the code works sometimes. I use the following code: ----------------- MediaMetadataRetriever mmr = new MediaMetadataRetriever(); Bitmap b = null; try { mmr.setDataSource(mSongFilePath); b = mmr.captureFrame(); } catch (RuntimeException e) { Log.e(TAG, "Error retrieving thumbnail in MediaPlayerEngine.", e); } -----------------
and receive the error ----------------- 08-31 12:32:31.227: DEBUG/dalvikvm(235): Trying to load lib /system/ lib/libmedia_jni.so 0x0 08-31 12:32:31.227: DEBUG/dalvikvm(235): Shared lib '/system/lib/ libmedia_jni.so' already loaded in same CL 0x0 08-31 12:32:31.507: INFO/dalvikvm(235): Method not found: '<init>' '(ILjava/nio/Buffer;Z[B)V' in Landroid/graphics/Bitmap; 08-31 12:32:31.507: ERROR/(235): captureFrame: Bitmap constructor is not found 08-31 12:32:31.517: DEBUG/AndroidRuntime(235): Shutting down VM 08-31 12:32:31.517: WARN/dalvikvm(235): threadid=3: thread exiting with uncaught exception (group=0x40010e28) 08-31 12:32:31.517: ERROR/AndroidRuntime(235): Uncaught handler: thread main exiting due to uncaught exception 08-31 12:32:31.527: ERROR/AndroidRuntime(235): java.lang.NoSuchMethodError: <init> 08-31 12:32:31.527: ERROR/AndroidRuntime(235): at android.media.MediaMetadataRetriever.captureFrame(Native Method) ---------- Can there be some synchronization issue if several threads try to retrieve a thumbnail at the same time? Are we required to synchronize access to the thumbnail retriever among all threads? Peli On 21 Aug., 14:51, SungSuh Park <[EMAIL PROTECTED]> wrote: > MediaMetadataRetriever is not complicated to use. > I created object, setDataSource andcaptureFrame. > I played the same video file with MediaPlayer well. > > <code> > MediaMetadataRetriever metaRetriever = new MediaMetadataRetriever(); > > metaRetriever.setMode(MediaMetadataRetriever.MODE_CAPTURE_FRAME_ONLY); > metaRetriever.setDataSource(VIDEO_FILEPATH); > Bitmap bitmap = metaRetriever.captureFrame(); > metaRetriever.release(); > > <error> > ERROR/AndroidRuntime(754): Uncaught handler: thread main exiting due > to uncaught exception > ERROR/AndroidRuntime(754): java.lang.NoSuchMethodError: <init> > ERROR/AndroidRuntime(754): at > android.media.MediaMetadataRetriever.captureFrame(Native Method) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---