Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa4a191d authored by John Grossman's avatar John Grossman
Browse files

Revert "Add a way to play file descriptor data sources using the A@H transmitter media player."

This reverts commit 64006cb1.

Back out this change in order to get ready to implement a longer term,
more media-team approved way of selecting a retransmit player.

Change-Id: I97b68b9859a174eab858598cb00d4445a14fbc17
parent af88907d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ public:
    virtual status_t        attachAuxEffect(int effectId) = 0;
    virtual status_t        setParameter(int key, const Parcel& request) = 0;
    virtual status_t        getParameter(int key, Parcel* reply) = 0;
    virtual status_t        setMediaPlayerType(int playerType) = 0;

    // Invoke a generic method on the player by using opaque parcels
    // for the request and reply.
+0 −3
Original line number Diff line number Diff line
@@ -201,7 +201,6 @@ public:
            status_t        attachAuxEffect(int effectId);
            status_t        setParameter(int key, const Parcel& request);
            status_t        getParameter(int key, Parcel* reply);
            status_t        setMediaPlayerType(int playerType);

private:
            void            clear_l();
@@ -232,8 +231,6 @@ private:
    int                         mVideoHeight;
    int                         mAudioSessionId;
    float                       mSendLevel;
    bool                        mOverridePlayerType;
    int                         mOverridePlayerTypeValue;
};

}; // namespace android
+0 −12
Original line number Diff line number Diff line
@@ -1486,18 +1486,6 @@ public class MediaPlayer
     */
    public native static int native_pullBatteryData(Parcel reply);

    /**
     * Override the choice of media player implementation the next time
     * setDataSource is called.
     *
     * Only valid when the player is in the Idle state.
     *
     * @param playerType media player type (defined in MediaPlayerInterface.h)
     * {@hide}
     */
    public native void setMediaPlayerType(int playerType)
        throws IOException, IllegalStateException;

    @Override
    protected void finalize() { native_finalize(); }

+0 −15
Original line number Diff line number Diff line
@@ -755,20 +755,6 @@ android_media_MediaPlayer_getParameter(JNIEnv *env, jobject thiz, jint key, jobj
    process_media_player_call(env, thiz, mp->getParameter(key, reply), NULL, NULL );
}

static void
android_media_MediaPlayer_setMediaPlayerType(JNIEnv *env, jobject thiz, jint playerType)
{
    sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
    if (mp == NULL) {
        jniThrowException(env, "java/lang/IllegalStateException", NULL);
        return;
    }

    process_media_player_call(env, thiz, mp->setMediaPlayerType(playerType),
                              "java/io/IOException",
                              "setMediaPlayerType failed");
}

// ----------------------------------------------------------------------------

static JNINativeMethod gMethods[] = {
@@ -813,7 +799,6 @@ static JNINativeMethod gMethods[] = {
    {"native_pullBatteryData", "(Landroid/os/Parcel;)I",        (void *)android_media_MediaPlayer_pullBatteryData},
    {"setParameter",        "(ILandroid/os/Parcel;)Z",          (void *)android_media_MediaPlayer_setParameter},
    {"getParameter",        "(ILandroid/os/Parcel;)V",          (void *)android_media_MediaPlayer_getParameter},
    {"setMediaPlayerType", "(I)V",                              (void *)android_media_MediaPlayer_setMediaPlayerType},
};

static const char* const kClassPathName = "android/media/MediaPlayer";
+0 −13
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ enum {
    SET_VIDEO_SURFACETEXTURE,
    SET_PARAMETER,
    GET_PARAMETER,
    SET_MEDIA_PLAYER_TYPE,
};

class BpMediaPlayer: public BpInterface<IMediaPlayer>
@@ -292,13 +291,6 @@ public:
        return remote()->transact(GET_PARAMETER, data, reply);
    }

    status_t setMediaPlayerType(int playerType) {
        Parcel data, reply;
        data.writeInterfaceToken(IMediaPlayer::getInterfaceDescriptor());
        data.writeInt32(playerType);
        remote()->transact(SET_MEDIA_PLAYER_TYPE, data, &reply);
        return reply.readInt32();
    }
};

IMPLEMENT_META_INTERFACE(MediaPlayer, "android.media.IMediaPlayer");
@@ -467,11 +459,6 @@ status_t BnMediaPlayer::onTransact(
            CHECK_INTERFACE(IMediaPlayer, data, reply);
            return getParameter(data.readInt32(), reply);
        } break;
        case SET_MEDIA_PLAYER_TYPE: {
            CHECK_INTERFACE(IMediaPlayer, data, reply);
            reply->writeInt32(setMediaPlayerType(data.readInt32()));
            return NO_ERROR;
        } break;
        default:
            return BBinder::onTransact(code, data, reply, flags);
    }
Loading