HomeSort by relevance Sort by last modified time
    Searched refs:mMediaPlayer (Results 1 - 25 of 29) sorted by null

1 2

  /development/samples/ApiDemos/src/com/example/android/apis/media/
MediaPlayerDemo_Audio.java 31 private MediaPlayer mMediaPlayer;
70 mMediaPlayer = new MediaPlayer();
71 mMediaPlayer.setDataSource(path);
72 mMediaPlayer.prepare();
73 mMediaPlayer.start();
80 mMediaPlayer = MediaPlayer.create(this, R.raw.test_cbr);
81 mMediaPlayer.start();
96 if (mMediaPlayer != null) {
97 mMediaPlayer.release();
98 mMediaPlayer = null
    [all...]
MediaPlayerDemo_Video.java 42 private MediaPlayer mMediaPlayer;
122 mMediaPlayer = new MediaPlayer();
123 mMediaPlayer.setDataSource(path);
124 mMediaPlayer.setDisplay(holder);
125 mMediaPlayer.prepare();
126 mMediaPlayer.setOnBufferingUpdateListener(this);
127 mMediaPlayer.setOnCompletionListener(this);
128 mMediaPlayer.setOnPreparedListener(this);
129 mMediaPlayer.setOnVideoSizeChangedListener(this);
130 mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC)
    [all...]
AudioFxDemo.java 49 private MediaPlayer mMediaPlayer;
72 mMediaPlayer = MediaPlayer.create(this, R.raw.test_cbr);
73 Log.d(TAG, "MediaPlayer audio session ID: " + mMediaPlayer.getAudioSessionId());
85 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
91 mMediaPlayer.start();
98 mEqualizer = new Equalizer(0, mMediaPlayer.getAudioSessionId());
173 mVisualizer = new Visualizer(mMediaPlayer.getAudioSessionId());
189 if (isFinishing() && mMediaPlayer != null) {
192 mMediaPlayer.release();
193 mMediaPlayer = null
    [all...]
  /frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
MediaPlayerStateUnitTestTemplate.java 47 private MediaPlayer mMediaPlayer = null;
90 assertTrue(mInitialized); // mMediaPlayer has been initialized?
107 // Set up a looper to be used by mMediaPlayer.
114 mMediaPlayer = new MediaPlayer();
115 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() {
129 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
158 mMethodUnderTest.invokeMethodUnderTest(mMediaPlayer);
176 mMediaPlayer.reset();
177 mMediaPlayer.setDataSource(TEST_PATH);
178 mMediaPlayer.prepare()
    [all...]
  /frameworks/base/media/tests/EffectsTest/src/com/android/effectstest/
SimplePlayer.java 57 MediaPlayer mMediaPlayer;
107 if (mMediaPlayer == null || !mMediaPlayer.isPlaying()){
108 if (mMediaPlayer == null) {
110 mMediaPlayer = new MediaPlayer();
112 mMediaPlayer.setAudioSessionId(mSession);
113 Log.d(TAG, "mMediaPlayer.setAudioSessionId(): "+ mSession);
119 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
123 mMediaPlayer.setDataSource(mFileName);
125 mMediaPlayer.setAudioStreamType(mStreamType)
    [all...]
  /cts/tests/tests/media/src/android/media/cts/
VideoSurfaceView.java 39 private MediaPlayer mMediaPlayer = null;
45 mMediaPlayer = mp;
54 mRenderer.setMediaPlayer(mMediaPlayer);
62 mMediaPlayer.start();
65 mMediaPlayer.setSurface(null);
67 while (mMediaPlayer.isPlaying()) {
84 private MediaPlayer mMediaPlayer;
91 mMediaPlayer = player;
119 mMediaPlayer.setSurface(surface);
123 mMediaPlayer.prepare()
    [all...]
StreamingMediaPlayerTest.java 164 mMediaPlayer.setDataSource(stream_url);
166 mMediaPlayer.setDisplay(getActivity().getSurfaceHolder());
167 mMediaPlayer.setScreenOnWhilePlaying(true);
170 mMediaPlayer.setOnBufferingUpdateListener(new MediaPlayer.OnBufferingUpdateListener() {
176 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() {
185 mMediaPlayer.prepare();
188 mMediaPlayer.start();
190 assertFalse(mMediaPlayer.isPlaying());
193 mMediaPlayer.start();
196 mMediaPlayer.stop()
    [all...]
AudioManagerStub.java 32 private MediaPlayer mMediaPlayer;
44 mMediaPlayer = MediaPlayer.create(this, MP3_TO_PLAY);
45 mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
46 mMediaPlayer.setLooping(false);
47 mMediaPlayer.start();
87 mMediaPlayer.stop();
88 mMediaPlayer.release();
MediaPlayerTestBase.java 103 protected MediaPlayer mMediaPlayer = null;
119 mMediaPlayer = new MediaPlayer();
133 if (mMediaPlayer != null) {
134 mMediaPlayer.release();
135 mMediaPlayer = null;
148 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(),
157 mMediaPlayer.setVideoScalingMode(videoScalingMode);
167 mMediaPlayer.addTimedTextSource(afd.getFileDescriptor(), afd.getStartOffset(),
187 mMediaPlayer.setDataSource(path);
220 mMediaPlayer.setDisplay(mActivity.getSurfaceHolder())
    [all...]
MediaPlayerTest.java 81 mMediaPlayer.setDataSource((String) null);
160 initMediaPlayer(mMediaPlayer);
165 mMediaPlayer.setNextMediaPlayer(mMediaPlayer2);
170 mMediaPlayer.reset();
176 initMediaPlayer(mMediaPlayer);
181 mMediaPlayer.setNextMediaPlayer(mMediaPlayer2);
186 mMediaPlayer.reset();
191 initMediaPlayer(mMediaPlayer);
228 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
231 assertEquals(mMediaPlayer, mp)
    [all...]
MediaPlayerFlakyNetworkTest.java 119 mMediaPlayer.start();
144 mMediaPlayer.start();
149 mMediaPlayer.start();
150 assertTrue(mMediaPlayer.isPlaying());
153 mMediaPlayer.pause();
154 assertFalse(mMediaPlayer.isPlaying());
157 mMediaPlayer.seekTo(random.nextInt(10000));
183 if (mMediaPlayer == null) {
184 mMediaPlayer = createMediaPlayerOnMainThread();
189 MediaPlayer old = mMediaPlayer;
    [all...]
MediaPlayerSurfaceStubActivity.java 34 private MediaPlayer mMediaPlayer = null;
41 mMediaPlayer = new MediaPlayer();
45 mMediaPlayer.setDataSource(
52 mVideoView = new VideoSurfaceView(this, mMediaPlayer);
  /packages/apps/DeskClock/src/com/android/deskclock/
TimerRingService.java 39 private MediaPlayer mMediaPlayer;
110 // TODO: Reuse mMediaPlayer instead of creating a new one and/or use
112 mMediaPlayer = new MediaPlayer();
113 mMediaPlayer.setOnErrorListener(new OnErrorListener() {
119 mMediaPlayer = null;
130 mMediaPlayer.setVolume(IN_CALL_VOLUME, IN_CALL_VOLUME);
131 setDataSourceFromResource(getResources(), mMediaPlayer,
135 mMediaPlayer.setDataSource(
138 startAlarm(mMediaPlayer);
145 mMediaPlayer.reset()
    [all...]
  /frameworks/base/core/java/android/widget/
VideoView.java 97 private MediaPlayer mMediaPlayer = null;
271 if (mMediaPlayer == null) {
275 mMediaPlayer.addSubtitleSource(is, format);
278 mMediaPlayer, MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE, 0);
286 if (mMediaPlayer != null) {
287 mMediaPlayer.stop();
288 mMediaPlayer.release();
289 mMediaPlayer = null;
310 mMediaPlayer = new MediaPlayer();
315 context, mMediaPlayer.getMediaTimeProvider(), mMediaPlayer)
    [all...]
  /packages/apps/Mms/src/com/android/mms/ui/
AudioAttachmentView.java 50 private MediaPlayer mMediaPlayer;
78 if (mMediaPlayer != null) {
80 mMediaPlayer.stop();
81 mMediaPlayer.release();
83 mMediaPlayer = null;
90 mMediaPlayer = MediaPlayer.create(mContext, mAudioUri);
91 if (mMediaPlayer != null) {
92 mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
93 mMediaPlayer.setOnCompletionListener(new OnCompletionListener() {
98 mMediaPlayer.setOnErrorListener(new OnErrorListener()
    [all...]
  /frameworks/base/media/mca/filterpacks/java/android/filterpacks/videosrc/
MediaSource.java 105 private MediaPlayer mMediaPlayer;
231 if (mMediaPlayer == null) {
258 mMediaPlayer.release();
263 mMediaPlayer.start();
355 if (mMediaPlayer.isPlaying()) {
356 mMediaPlayer.stop();
365 mMediaPlayer.release();
366 mMediaPlayer = null;
404 mMediaPlayer.setLooping(mLooping);
417 mMediaPlayer.setVolume(mVolume, mVolume)
    [all...]
  /development/samples/Support7Demos/src/com/example/android/supportv7/media/
LocalPlayer.java 67 private MediaPlayer mMediaPlayer;
105 if (mMediaPlayer != null) {
106 mMediaPlayer.stop();
107 mMediaPlayer.release();
108 mMediaPlayer = null;
121 mMediaPlayer.setDataSource(mContext, item.getUri());
122 mMediaPlayer.prepareAsync();
146 mMediaPlayer.seekTo(pos);
160 item.setDuration(mMediaPlayer.getDuration());
162 mSeekToPos : mMediaPlayer.getCurrentPosition())
    [all...]
  /packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
CellBroadcastAlertAudio.java 99 private MediaPlayer mMediaPlayer;
318 mMediaPlayer = new MediaPlayer();
319 mMediaPlayer.setOnErrorListener(new OnErrorListener() {
324 mMediaPlayer = null;
335 mMediaPlayer.setVolume(IN_CALL_VOLUME, IN_CALL_VOLUME);
339 setDataSourceFromResource(getResources(), mMediaPlayer,
343 startAlarm(mMediaPlayer);
405 if (mMediaPlayer != null) {
407 mMediaPlayer.stop();
408 mMediaPlayer.release()
    [all...]
  /frameworks/base/media/tests/ScoAudioTest/src/com/android/scoaudiotest/
ScoAudioTest.java 323 private MediaPlayer mMediaPlayer;
346 Log.e(TAG, "playOrPause playing: "+((mMediaPlayer == null)?false:!mMediaPlayer.isPlaying())+
347 " mMediaPlayer: "+mMediaPlayer+
350 if (mMediaPlayer == null || !mMediaPlayer.isPlaying()){
351 if (mMediaPlayer == null) {
357 mMediaPlayer = new MediaPlayer();
361 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength())
    [all...]
  /frameworks/base/media/tests/MediaDump/src/com/android/mediadump/
VideoDumpView.java 71 private MediaPlayer mMediaPlayer = null;
130 mMediaPlayer = new MediaPlayer();
132 mMediaPlayer.setDataSource(VideoDumpConfig.VIDEO_URI);
155 mRenderer.setMediaPlayer(mMediaPlayer);
163 mMediaPlayer.start();
167 mMediaPlayer.pause();
178 if (mMediaPlayer != null) {
179 mMediaPlayer.stop();
180 mMediaPlayer.release();
181 mMediaPlayer = null
    [all...]
  /development/ndk/platforms/android-14/samples/native-media/src/com/example/nativemedia/
NativeMedia.java 41 MediaPlayer mMediaPlayer;
115 mMediaPlayer = new MediaPlayer();
118 mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
133 mMediaPlayer.setOnVideoSizeChangedListener(new MediaPlayer.OnVideoSizeChangedListener() {
217 mSelectedVideoSink.useAsSinkForJava(mMediaPlayer);
223 mMediaPlayer.setDataSource(mSourceString);
227 mMediaPlayer.prepareAsync();
229 } else if (mMediaPlayer.isPlaying()) {
230 mMediaPlayer.pause();
232 mMediaPlayer.start()
    [all...]
  /frameworks/wilhelm/tests/native-media/src/com/example/nativemedia/
NativeMedia.java 48 MediaPlayer mMediaPlayer;
125 mMediaPlayer = new MediaPlayer();
128 mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
143 mMediaPlayer.setOnVideoSizeChangedListener(new MediaPlayer.OnVideoSizeChangedListener() {
227 mSelectedVideoSink.useAsSinkForJava(mMediaPlayer);
233 mMediaPlayer.setDataSource(mSourceString);
237 mMediaPlayer.prepareAsync();
239 } else if (mMediaPlayer.isPlaying()) {
240 mMediaPlayer.pause();
242 mMediaPlayer.start()
    [all...]
  /cts/tests/tests/mediastress/src/android/mediastress/cts/
CodecTest.java 37 private static MediaPlayer mMediaPlayer;
259 mMediaPlayer.setDataSource(filePath);
260 mMediaPlayer.setDisplay(MediaFrameworkTest.getSurfaceView().getHolder());
261 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener);
264 mMediaPlayer.prepare();
265 mMediaPlayer.start();
271 videoHeight = mMediaPlayer.getVideoHeight();
295 mMediaPlayer.setDataSource(filePath);
296 mMediaPlayer.setDisplay(MediaFrameworkTest.getSurfaceView().getHolder());
297 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener)
    [all...]
  /frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/
CodecTest.java 49 private static MediaPlayer mMediaPlayer;
272 mMediaPlayer.setDataSource(filePath);
273 mMediaPlayer.setDisplay(MediaFrameworkTest.mSurfaceView.getHolder());
274 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener);
277 mMediaPlayer.prepare();
278 mMediaPlayer.start();
284 videoHeight = mMediaPlayer.getVideoHeight();
308 mMediaPlayer.setDataSource(filePath);
309 mMediaPlayer.setDisplay(MediaFrameworkTest.mSurfaceView.getHolder());
310 mMediaPlayer.setOnVideoSizeChangedListener(mOnVideoSizeChangedListener)
    [all...]
  /packages/apps/Music/src/com/android/music/
MusicPicker.java 153 MediaPlayer mMediaPlayer;
639 if (newId != mPlayingId || mMediaPlayer == null) {
641 mMediaPlayer = new MediaPlayer();
643 mMediaPlayer.setDataSource(this, mSelectedUri);
644 mMediaPlayer.setOnCompletionListener(this);
645 mMediaPlayer.setAudioStreamType(AudioManager.STREAM_RING);
646 mMediaPlayer.prepare();
647 mMediaPlayer.start();
653 } else if (mMediaPlayer != null) {
660 if (mMediaPlayer == mp)
    [all...]

Completed in 982 milliseconds

1 2