HomeSort by relevance Sort by last modified time
    Searched full:mediaplayer (Results 1 - 25 of 360) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /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));
  /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...]
  /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;
  /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...]
  /development/ndk/platforms/android-14/samples/native-media/res/values/
strings.xml 6 <string name="start_java">Start/Pause\nJava MediaPlayer</string>
7 <string name="start_native">Start/Pause\nnative MediaPlayer</string>
10 <string name="rewind_java">Rewind\nJava MediaPlayer</string>
11 <string name="rewind_native">Rewind\nnative MediaPlayer</string>
  /cts/tests/tests/permission/src/android/permission/cts/
NoWakeLockPermissionTest.java 21 import android.media.MediaPlayer;
62 * Verify that MediaPlayer.start() requires permissions.
68 final MediaPlayer mediaPlayer = new MediaPlayer();
69 mediaPlayer.setWakeMode(mContext, PowerManager.FULL_WAKE_LOCK);
71 mediaPlayer.start();
72 fail("MediaPlayer.setWakeMode() did not throw SecurityException as expected");
77 mediaPlayer.stop();
  /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);
  /frameworks/base/docs/html/guide/topics/media/
mediaplayer.jd 2 page.tags=mediaplayer,soundpool,audiomanager
12 <li><a href="#mediaplayer">Using MediaPlayer</a>
16 <li><a href='#releaseplayer'>Releasing the MediaPlayer</a></li>
19 <li><a href="#mpandservices">Using a Service with MediaPlayer</a>
35 <li>{@link android.media.MediaPlayer}</li>
55 android.media.MediaPlayer} APIs.</p>
68 <dt>{@link android.media.MediaPlayer}</dt>
75 <p>Before starting development on your application using MediaPlayer, make sure your manifest has
79 <li><strong>Internet Permission</strong> - If you are using MediaPlayer to stream network-base
    [all...]
  /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;
76 mMediaPlayer = MediaPlayer.create(mContext, videoUri);
80 public void onPrepared(MediaPlayer mediaPlayer) {
81 mediaPlayer.setLooping(true);
86 public boolean onInfo(MediaPlayer mediaPlayer, int what, int extra)
    [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...]
  /external/sl4a/ScriptingLayerForAndroid/src/org/connectbot/service/
TerminalManager.java 28 import android.media.MediaPlayer;
29 import android.media.MediaPlayer.OnCompletionListener;
79 private MediaPlayer mediaPlayer;
215 mediaPlayer = new MediaPlayer();
221 mediaPlayer.setAudioStreamType(AudioManager.STREAM_NOTIFICATION);
222 mediaPlayer.setOnCompletionListener(new BeepListener());
226 mediaPlayer.setDataSource(file.getFileDescriptor(), file.getStartOffset(), file.getLength());
228 mediaPlayer.setVolume(volume, volume)
    [all...]
  /external/libgdx/backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/
AndroidAudio.java 28 import android.media.MediaPlayer;
106 MediaPlayer mediaPlayer = new MediaPlayer();
111 mediaPlayer.setDataSource(descriptor.getFileDescriptor(), descriptor.getStartOffset(), descriptor.getLength());
113 mediaPlayer.prepare();
114 AndroidMusic music = new AndroidMusic(this, mediaPlayer);
125 mediaPlayer.setDataSource(aHandle.file().getPath());
126 mediaPlayer.prepare();
127 AndroidMusic music = new AndroidMusic(this, mediaPlayer);
    [all...]
  /frameworks/wilhelm/tests/native-media/res/values/
strings.xml 6 <string name="start_java">Start/Pause Java MediaPlayer</string>
7 <string name="start_native">Start/Pause native MediaPlayer</string>
9 <string name="rewind_java">Rewind Java MediaPlayer</string>
10 <string name="rewind_native">Rewind native MediaPlayer</string>
  /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/media/java/android/media/
SubtitleData.java 35 * <li> Select a track of type MEDIA_TRACK_TYPE_SUBTITLE with {@link MediaPlayer.selectTrack(int)</li>
36 * <li> Implement the {@link MediaPlayer.OnSubtitleDataListener} interface</li>
37 * <li> Register the {@link MediaPlayer.OnSubtitleDataListener} callback on a MediaPlayer object</li>
40 * @see android.media.MediaPlayer
  /development/ndk/platforms/android-14/samples/native-media/src/com/example/nativemedia/
NativeMedia.java 21 import android.media.MediaPlayer;
41 MediaPlayer mMediaPlayer;
115 mMediaPlayer = new MediaPlayer();
118 mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
120 public void onPrepared(MediaPlayer mediaPlayer) {
121 int width = mediaPlayer.getVideoWidth();
122 int height = mediaPlayer.getVideoHeight();
128 mediaPlayer.start();
133 mMediaPlayer.setOnVideoSizeChangedListener(new MediaPlayer.OnVideoSizeChangedListener()
    [all...]
  /frameworks/wilhelm/tests/native-media/src/com/example/nativemedia/
NativeMedia.java 21 import android.media.MediaPlayer;
38 import android.media.MediaPlayer.OnPreparedListener;
39 import android.media.MediaPlayer;
48 MediaPlayer mMediaPlayer;
125 mMediaPlayer = new MediaPlayer();
128 mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
130 public void onPrepared(MediaPlayer mediaPlayer) {
131 int width = mediaPlayer.getVideoWidth();
132 int height = mediaPlayer.getVideoHeight()
    [all...]
  /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) {
  /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.
72 public class MediaPlayerFacade extends RpcReceiver implements MediaPlayer.OnCompletionListener {
75 static private final Map<String, MediaPlayer> mPlayers = new Hashtable<String, MediaPlayer>();
90 private MediaPlayer getPlayer(String tag) {
100 private void putMp(String tag, MediaPlayer player, String url) {
108 MediaPlayer player = mPlayers.get(tag);
126 MediaPlayer player = getPlayer(tag)
    [all...]
  /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...]
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
  /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...]
  /frameworks/base/media/jni/
android_media_MediaPlayer.cpp 19 #define LOG_TAG "MediaPlayer-JNI"
22 #include <media/mediaplayer.h>
87 jclass mClass; // Reference to MediaPlayer class
88 jobject mObject; // Weak ref to MediaPlayer Java object to call on
94 // Hold onto the MediaPlayer class for use in calling the static method
98 ALOGE("Can't find android/media/MediaPlayer");
104 // We use a weak reference so the MediaPlayer object can be garbage collected.
142 static sp<MediaPlayer> getMediaPlayer(JNIEnv* env, jobject thiz)
145 MediaPlayer* const p = (MediaPlayer*)env->GetLongField(thiz, fields.context)
    [all...]

Completed in 713 milliseconds

1 2 3 4 5 6 7 8 91011>>