android-mediaplayer

How to work with onWaveFormDataCapture result of Visualizer object?

こ雲淡風輕ζ 提交于 2020-01-12 10:13:14
问题 I'm new to android programming and audio visualization. I want to create a simple audio visualizer using MediaPlayer and Visualizer classes. My problem is, I don't know what wave form data really is. Must I use it to visualize audio? I'm using the code below. It's problem is, it will only visualize audio for the first 10-12 seconds of the file; after that, I'm unable to capture more data! Where did I go wrong? public void attachVisualizer() { Visualizer vis = new Visualizer(mPlayer

Android get current song playing and song changed events, like Musixmatch

烈酒焚心 提交于 2020-01-12 09:52:16
问题 What i want to achieve is very similar to what Musixmatch is doing. I need to be informed when the music starts playing and when the song is changed. All this in the service because my app may be closed (even musicmatch does this). In the above case even if Musixmatch app is not running i get a notification when ever i change the song on spotify or any player. Can anyone pls tell me how to achieve this. I don't need the code help, just what to know how to achieve it. I'm really confused how

Receiving video stream from an IP camera on android

我是研究僧i 提交于 2020-01-12 05:21:20
问题 I have an IP camera which is streaming video in MJPEG format. Now my aim is to receive it and display it in my own custom android app. For this I have three programming alternatives on android platform : Using inbuilt Anrdroid MediaPlayer class Using FFMPEG library in native C and accessing it through JNI Using GStreamer port on android to receive the stream So please suggest a better solution? I have no experience with FFMPEG or GStreamer. So what is the feasibility of doing this? 回答1: Use

media player play pause in android

六眼飞鱼酱① 提交于 2020-01-11 09:45:42
问题 How can I make the Play and Pause image buttons look as a single image button. I am hereby attaching my code below. These are the images used. i Renamed play as start. import android.app.Activity; import android.media.MediaPlayer; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.ProgressBar; public class AudioView extends Activity{ MediaPlayer mp; Button p,pu,s,b,f,h,v,c,bu; ProgressBar

Parse and Play a .pls file in Android

自作多情 提交于 2020-01-11 01:47:27
问题 can anybody help me how to parse and play this .pls file in android [playlist] NumberOfEntries=1 File1=http://stream.radiosai.net:8002/ 回答1: A quick search resulted in this very basic PlsParser from the NPR app that, by the looks of it, will simply parse the .pls file and return all embedded URLs in a list of strings. You'll probably want to take a look at that as a starting point. After that, you should be able to feed the URL to a MediaPlayer object, although I'm not completely sure about

Android: How to integrate a decoder to multimedia framework

☆樱花仙子☆ 提交于 2020-01-08 19:41:14
问题 Recently i have ported a video decoder to android successfully. Also dumped the output on a surfaceview and checked the output using native API's. Now the next task is to implement play, pause, streaming etc. i.e. the other features of the media player. Doing this will be a rework as all these functionalities are already defined in the android multimedia framework. I heard that we can make our decoder as a plug-in and integrate it into Android's multimedia framework. Although i googled

How to use the Audio with seekbar on Recyclview android?

不想你离开。 提交于 2020-01-07 03:39:09
问题 I am using the lists of audio on my Recyclview and it is working correct means I am able to play the audio file on my Recyclview . As i am using the Seekbar with my audio file on my Recyclview , the problem is generating that when i am scrolling the Recyclview the other items's of Recyclview Seekbar is changing (Seekbar i am using for the progress of the audio file play.) What i want that other Seekbar item of Recyclview sholud not be change when i scroll the Recyclview Please check my code

Android Studio : Compress Video and Audio [closed]

独自空忆成欢 提交于 2020-01-07 02:57:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Working to compress Video and Audio files in Android Studio. I need Useful suggestion and links. I went through some of these links but didn't found much helpful . How to compress video in android` , Is there possibility to compress audio and video file in android programmatically?, FFmpegFrameGrabber crashes 100%

Media Player in android Using MediaStore

跟風遠走 提交于 2020-01-06 18:09:27
问题 public class PlayerScreen extends AppCompatActivity implements SeekBar.OnSeekBarChangeListener { private MediaPlayer mp; private Button buttonplaypause; private int count; private SeekBar seekbar; private int curpos, prevpos; private Bundle b; private String title; private final Handler handler = new Handler(); private Runnable updatePositionRunnable = new Runnable() { public void run() { seekbar.setProgress(mp.getCurrentPosition()); handler.postDelayed(this, 6000); } }; @Override protected

play sound file with a delay and adjust time in android

久未见 提交于 2020-01-06 11:25:59
问题 I am trying to program a sound app where on button click I would like to play 3-4 sound files one after the other. How can this be done? Also I would like to increase the time of play of the files. Is this where the loop variable in play function used?? Here is part of code I have done with SoundPool. However the files all play simultaneously :( public void onClick(View v){ //check for scan button if(v.getId()==R.id.playbutton){ queueSound(1000); sound.changePitchfile3(R.raw.a0); queueSound