/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ |
MediaPlayerMethodUnderTest.java | 19 import android.media.MediaPlayer; 22 * All MediaPlayer method unit test subclass must implement this interface. 26 public void invokeMethodUnderTest(MediaPlayer player);
|
MediaPlayerGetCurrentPositionStateUnitTest.java | 19 import android.media.MediaPlayer; 25 * MediaPlayer.getCurrentPosition() method can be called. 55 public void invokeMethodUnderTest(MediaPlayer player) {
|
MediaPlayerGetDurationStateUnitTest.java | 19 import android.media.MediaPlayer; 25 * MediaPlayer.getDuration() method can be called. 55 public void invokeMethodUnderTest(MediaPlayer player) {
|
/packages/apps/Messaging/tests/src/com/android/messaging/util/ |
FakeMediaUtil.java | 19 import android.media.MediaPlayer; 22 private final MediaPlayer mMediaPlayer; 23 public FakeMediaUtil(final MediaPlayer mediaPlayer) { 24 mMediaPlayer = mediaPlayer;
|
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowMediaPlayer.java | 4 import android.media.MediaPlayer; 14 * Shadows the Android {@code MediaPlayer} class. 16 @Implements(MediaPlayer.class) 19 @RealObject private MediaPlayer player; 26 private MediaPlayer.OnCompletionListener completionListener; 27 private MediaPlayer.OnPreparedListener preparedListener; 30 public static MediaPlayer create(Context context, int resId) { 31 MediaPlayer mp = new MediaPlayer(); 41 public static MediaPlayer create(Context context, Uri uri) [all...] |
ShadowVideoView.java | 4 import android.media.MediaPlayer; 15 private MediaPlayer.OnCompletionListener completionListner; 16 private MediaPlayer.OnErrorListener errorListener; 17 private MediaPlayer.OnPreparedListener preparedListener; 32 public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) { 37 public void setOnErrorListener(MediaPlayer.OnErrorListener l) { 42 public void setOnCompletionListener(MediaPlayer.OnCompletionListener l) { 101 public MediaPlayer.OnPreparedListener getOnPreparedListener() { 109 public MediaPlayer.OnErrorListener getOnErrorListener() { 117 public MediaPlayer.OnCompletionListener getOnCompletionListener() [all...] |
/platform_testing/tests/androidbvt/src/com/android/androidbvt/ |
MediaPlaybackTests.java | 19 import android.media.MediaPlayer; 40 private MediaPlayer mPlayer; 54 // start the MediaPlayer on a Looper thread, so it does not deadlock itself 60 mPlayer = MediaPlayer.create(getInstrumentation().getContext(), R.raw.bbb); 76 mPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { 78 public boolean onError(MediaPlayer mp, int what, int extra) { 84 mPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { 86 public void onCompletion(MediaPlayer mp) {
|
/platform_testing/tests/smokefast/src/com/android/smokefast/ |
MediaPlaybackTest.java | 19 import android.media.MediaPlayer; 40 private MediaPlayer mPlayer; 54 // start the MediaPlayer on a Looper thread, so it does not deadlock itself 60 mPlayer = MediaPlayer.create(getInstrumentation().getContext(), R.raw.bbb); 76 mPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { 78 public boolean onError(MediaPlayer mp, int what, int extra) { 84 mPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { 86 public void onCompletion(MediaPlayer mp) {
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
MediaUtilImpl.java | 21 import android.media.MediaPlayer; 38 final MediaPlayer mediaPlayer = new MediaPlayer(); 39 mediaPlayer.setAudioStreamType(AudioManager.STREAM_NOTIFICATION); 41 mediaPlayer.setDataSource( 44 mediaPlayer.prepare(); 45 mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { 47 public void onCompletion(final MediaPlayer mp) [all...] |
/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/ |
MediaPlayerTest.java | 3 import android.media.MediaPlayer; 16 private MediaPlayer mediaPlayer; 21 mediaPlayer = Robolectric.newInstanceOf(MediaPlayer.class); 22 shadowMediaPlayer = Robolectric.shadowOf(mediaPlayer); 31 assertThat(mediaPlayer.getCurrentPosition(), equalTo(position));
|
/developers/build/prebuilts/androidtv/sample-inputs/app/src/main/java/com/example/android/sampletvinput/simple/ |
SimpleTvInputService.java | 22 import android.media.MediaPlayer; 57 private MediaPlayer mPlayer; 121 mPlayer = new MediaPlayer(); 122 mPlayer.setOnInfoListener(new MediaPlayer.OnInfoListener() { 124 public boolean onInfo(MediaPlayer player, int what, int arg) { 128 if (what == MediaPlayer.MEDIA_INFO_BUFFERING_START) { 132 } else if (what == MediaPlayer.MEDIA_INFO_BUFFERING_END 133 || what == MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START) {
|
/frameworks/base/core/java/android/speech/tts/ |
AudioPlaybackQueueItem.java | 20 import android.media.MediaPlayer; 35 private MediaPlayer mPlayer; 58 mPlayer = MediaPlayer.create( 67 mPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { 69 public boolean onError(MediaPlayer mp, int what, int extra) { 75 mPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { 77 public void onCompletion(MediaPlayer mp) { 88 Log.w(TAG, "MediaPlayer failed", ex); 99 private static void setupVolume(MediaPlayer player, float volume, float pan) {
|
/packages/apps/Settings/src/com/android/settings/fingerprint/ |
FingerprintLocationAnimationVideoView.java | 23 import android.media.MediaPlayer; 24 import android.media.MediaPlayer.OnInfoListener; 25 import android.media.MediaPlayer.OnPreparedListener; 40 protected MediaPlayer mMediaPlayer; 64 mMediaPlayer = MediaPlayer.create(mContext, videoUri); 68 public void onPrepared(MediaPlayer mediaPlayer) { 69 mediaPlayer.setLooping(true); 74 public boolean onInfo(MediaPlayer mediaPlayer, int what, int extra) [all...] |
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/media/ |
MediaPlayerFacade.java | 20 import android.media.MediaPlayer; 37 * This facade exposes basic mediaPlayer functionality. <br> 51 * <li>"tag" - user supplied tag identifying this mediaPlayer. 73 public class MediaPlayerFacade extends RpcReceiver implements MediaPlayer.OnCompletionListener { 76 static private final Map<String, MediaPlayer> mPlayers = new Hashtable<String, MediaPlayer>(); 91 private MediaPlayer getPlayer(String tag) { 101 private void putMp(String tag, MediaPlayer player, String url) { 109 MediaPlayer player = mPlayers.get(tag); 127 MediaPlayer player = getPlayer(tag) [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/media/ |
MediaPlayerDemo_Video.java | 23 import android.media.MediaPlayer; 24 import android.media.MediaPlayer.OnBufferingUpdateListener; 25 import android.media.MediaPlayer.OnCompletionListener; 26 import android.media.MediaPlayer.OnPreparedListener; 27 import android.media.MediaPlayer.OnVideoSizeChangedListener; 42 private MediaPlayer mMediaPlayer; 98 * Mediaplayer can only play "progressive streamable 122 mMediaPlayer = new MediaPlayer(); 138 public void onBufferingUpdate(MediaPlayer arg0, int percent) { 143 public void onCompletion(MediaPlayer arg0) [all...] |
MediaPlayerDemo_Audio.java | 20 import android.media.MediaPlayer; 31 private MediaPlayer mMediaPlayer; 70 mMediaPlayer = new MediaPlayer(); 78 * its resid in MediaPlayer.create() method. 80 mMediaPlayer = MediaPlayer.create(this, R.raw.test_cbr);
|
/cts/tests/tests/media/src/android/media/cts/ |
MediaPlayerTestBase.java | 23 import android.media.MediaPlayer; 30 * Base class for tests which use MediaPlayer to play audio or video. 105 protected MediaPlayer mMediaPlayer = null; 106 protected MediaPlayer mMediaPlayer2 = null; 121 mMediaPlayer = new MediaPlayer(); 122 mMediaPlayer2 = new MediaPlayer(); 161 MediaPlayer.VIDEO_SCALING_MODE_SCALE_TO_FIT 162 : MediaPlayer.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING; 180 afd.getLength(), MediaPlayer.MEDIA_MIMETYPE_TEXT_SUBRIP); 237 mMediaPlayer.setOnVideoSizeChangedListener(new MediaPlayer.OnVideoSizeChangedListener() [all...] |
StreamingMediaPlayerTest.java | 20 import android.media.MediaPlayer; 21 import android.media.MediaPlayer.TrackInfo; 33 * Tests of MediaPlayer streaming capabilities. 216 mMediaPlayer.setOnBufferingUpdateListener(new MediaPlayer.OnBufferingUpdateListener() { 218 public void onBufferingUpdate(MediaPlayer mp, int percent) { 222 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { 224 public boolean onError(MediaPlayer mp, int what, int extra) { 270 mMediaPlayer.setOnBufferingUpdateListener(new MediaPlayer.OnBufferingUpdateListener() { 272 public void onBufferingUpdate(MediaPlayer mp, int percent) { 276 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() [all...] |
VideoSurfaceView.java | 28 import android.media.MediaPlayer; 39 private MediaPlayer mMediaPlayer = null; 41 public VideoSurfaceView(Context context, MediaPlayer mp) { 84 private MediaPlayer mMediaPlayer; 90 public void setMediaPlayer(MediaPlayer player) { 113 * and pass it to the MediaPlayer
|
MediaPlayerFlakyNetworkTest.java | 19 import android.media.MediaPlayer; 43 * Executes a range of tests on MediaPlayer while streaming a video 208 MediaPlayer old = mMediaPlayer; 215 private MediaPlayer createMediaPlayerOnMainThread() throws Throwable { 216 Callable<MediaPlayer> callable = new Callable<MediaPlayer>() { 218 public MediaPlayer call() throws Exception { 219 return new MediaPlayer(); 222 FutureTask<MediaPlayer> future = new FutureTask<MediaPlayer>(callable) [all...] |
MediaPlayerTest.java | 32 import android.media.MediaPlayer; 33 import android.media.MediaPlayer.OnErrorListener; 63 * Tests for the MediaPlayer API and local video/audio playback. 116 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { 118 public boolean onError(MediaPlayer mp, int what, int extra) { 120 assertTrue("mediaserver process died", what != MediaPlayer.MEDIA_ERROR_SERVER_DIED); 126 mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { 128 public void onCompletion(MediaPlayer mp) { 152 MediaPlayer mp = mMediaPlayer; 153 MediaPlayer mp2 = mMediaPlayer2 [all...] |
/cts/tests/tests/mediastress/src/android/mediastress/cts/ |
CodecTest.java | 23 import android.media.MediaPlayer; 37 private static MediaPlayer mMediaPlayer; 38 private MediaPlayer.OnPreparedListener mOnPreparedListener; 82 MediaPlayer mp = new MediaPlayer(); 101 MediaPlayer mp = new MediaPlayer(); 129 MediaPlayer mp = new MediaPlayer(); 156 MediaPlayer mp = new MediaPlayer() [all...] |
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/ |
CodecTest.java | 29 import android.media.MediaPlayer; 49 private static MediaPlayer mMediaPlayer; 50 private MediaPlayer.OnPreparedListener mOnPreparedListener; 91 MediaPlayer mp = new MediaPlayer(); 110 MediaPlayer mp = new MediaPlayer(); 143 MediaPlayer mp = new MediaPlayer(); 170 MediaPlayer mp = new MediaPlayer() [all...] |
/frameworks/base/core/java/android/widget/ |
VideoView.java | 28 import android.media.MediaPlayer; 29 import android.media.MediaPlayer.OnCompletionListener; 30 import android.media.MediaPlayer.OnErrorListener; 31 import android.media.MediaPlayer.OnInfoListener; 97 private MediaPlayer mMediaPlayer = null; 105 private MediaPlayer.OnPreparedListener mOnPreparedListener; 267 * it, one will receive an {@link MediaPlayer#MEDIA_INFO_METADATA_UPDATE} 269 * one will receive a {@link MediaPlayer#MEDIA_INFO_SUBTITLE_TIMED_OUT} 272 * MediaPlayer#MEDIA_INFO_UNSUPPORTED_SUBTITLE} message. One can find the 273 * total number of available tracks using {@link MediaPlayer#getTrackInfo() [all...] |
/frameworks/av/media/libmedia/ |
mediaplayer.cpp | 19 #define LOG_TAG "MediaPlayer" 34 #include <media/mediaplayer.h> 50 MediaPlayer::MediaPlayer() 72 MediaPlayer::~MediaPlayer() 84 void MediaPlayer::disconnect() 100 void MediaPlayer::clear_l() 108 status_t MediaPlayer::setListener(const sp<MediaPlayerListener>& listener) 117 status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player [all...] |