android-mediaplayer

android-ndk crash in android::MediaCodec?

旧巷老猫 提交于 2019-12-13 05:23:39
问题 Can someone help me figure out what is the following crash about? Thanks. I/DEBUG ( 3007): Build fingerprint: 'samsung/zerofltetmo/zerofltetmo:5.1.1/LMY47X/G920TUVU2COF8:user/release-keys' I/DEBUG ( 3007): Revision: '11' I/DEBUG ( 3007): ABI: 'arm' I/DEBUG ( 3007): pid: 19656, tid: 21303, name: MediaCodec_loop >>> com.******.**** <<< I/DEBUG ( 3007): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14 I/DEBUG ( 3007): r0 f4a23e40 r1 00000003 r2 ca10ab30 r3 00000000 I/DEBUG ( 3007): r4

How to instantiate a MediaDrm object

£可爱£侵袭症+ 提交于 2019-12-13 05:22:58
问题 I am using Nexus4 with Android 4.3, and I am try to use the new API public MediaDrm (UUID uuid) , but I only can got the following exception: UnsupportedSchemeException . The exception looks which arise from UUID is incorrect. I've tried to use the UUID which is converted from deviceId, from network MAC address or from token which is sent from DRM server. all of I mentioned is incorrect. Then is there anyone knows what is the correct way to get this UUID? More info are in below: Parameters:

How do I release my media player after it is done playing?

99封情书 提交于 2019-12-13 04:37:34
问题 I am creating a sound board and after clicking about 30 different sounds it stops working; I believe android is running out of memory. Below is my code. How can I implement .release() so that when the sound is done playing it is released? I don't really care if two things play at the same time; the clips are t0o short for this to be possible. I would just like to get my code set. public class soundPageOne extends Activity { public void onCreate(Bundle savedState) { super.onCreate(savedState);

Adding delay while Mediaplayer loops

谁说我不能喝 提交于 2019-12-13 04:36:33
问题 Playing .wav file using MediaPlayer class. As I need to loop the Audio I've set .setLooping(true); . So obviously, the doubt is how do I add a delay each time the audio plays, say I want a delay of 5000 . The answers to similar questions here doesn't work in my case. Any help would be appreciated. Here is my code: Button Sample = (Button)findViewById(R.id.samplex); Sample.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String filePath = Environment

Android playback quality

孤街醉人 提交于 2019-12-13 04:21:23
问题 A portion of an application that I am writing requires me to play a heart sound. When I play it using the source below, several problems arise. 1) It's not very loud, even when I set it to max volume 2) It doesn't sound right. It sounds like many of the frequencies have been cut off I got the heart sounds from this website: http://depts.washington.edu/physdx/heart/demo.html It is mp3 type of sound. When I play it on my computer, it's sounder perfect, even when I set it to a low volume. Can

MediaPlayer setOnPreparedListener doesn't get called for second time

China☆狼群 提交于 2019-12-13 04:08:10
问题 I am using listview adapter to displays list of tracks.Each list item has play and stop icons to play and stop track.The issue I am having is that track gets played only once when i first click on play button.After that if i stop it by clicking on stop button and the try to play any track it doesn't get played.Through toast message i found out that holder.img1.setOnClickListener() method does get called but onPrepared() method doesn't get called on clicking on play button for second time or

Not able to remove image view from from last item clicked in ArrayAdapter TextView

点点圈 提交于 2019-12-13 03:46:08
问题 So I have a Song List which plays a song when clicked on text view and displays a gif (audio spectrum) next to the song name. What I want is when I click on another song from Song List the previous clicked song should stop (which it was able to do). But along with this I also want the gif of the previous song to disappear which I am not able to do. Here is my code - package com.shaikhsakib.sounddemo; import android.app.Activity; import android.content.Context; import android.media.MediaPlayer

java.lang.IllegalStateException: android.media.MediaPlayer.stop

强颜欢笑 提交于 2019-12-13 03:43:35
问题 I notice that quite a number of my app users are affected by this exception via Crashlytics: Non-fatal Exception: java.lang.IllegalStateException at android.media.MediaPlayer._stop(MediaPlayer.java) at android.media.MediaPlayer.stop + 1437(MediaPlayer.java:1437) at com.allattentionhere.autoplayvideos.AAH_CustomVideoView.onSurfaceTextureDestroyed + 256(AAH_CustomVideoView.java:256) at android.view.TextureView.releaseSurfaceTexture + 249(TextureView.java:249) at android.view.TextureView

Android Mediaplayer.Trackinfo getFormat() is not defined

半城伤御伤魂 提交于 2019-12-13 02:55:34
问题 I have a media player in my android app. I have to find the codecs used in the file that is played by this media player. I have the following code. TrackInfo[] ti = mediaplayer.getTrackInfo(); MediaFormat mf; for (int i = 0; i<ti.length;i++){ if(ti[i].getTrackType() == TrackInfo.MEDIA_TRACK_TYPE_AUDIO) { mf = ti[i].getFormat(); } } But, I get an error saying "The method getFormat() is undefined for the type MediaPlayer.TrackInfo". But it can be seen here that there is indeed a function. I am

OnBufferingUpdate not being called in MediaPlayer

北战南征 提交于 2019-12-13 02:32:53
问题 My OnBufferingUpdate never gets called when I try to use it with my MediaPlayer. I'm using videos saved on my SDcard as the media source. I think this is the source of the problem and I'm wondering if OnBufferingUpdate only works for internet streams. The code I am using is below. public class FullImageActivity extends Activity implements SurfaceHolder.Callback, OnPreparedListener, OnInfoListener, OnErrorListener, OnBufferingUpdateListener{ private static final String TAG = "MediaPlayer shit"