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

Commit 26f70db9 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Remove surface legacy APIs and code." into ics-mr1

parents 99015a24 95be2458
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -360,7 +360,7 @@ int main(int argc, char **argv) {
        service->create(getpid(), client, 0);
        service->create(getpid(), client, 0);


    if (player != NULL && player->setDataSource(source) == NO_ERROR) {
    if (player != NULL && player->setDataSource(source) == NO_ERROR) {
        player->setVideoSurface(surface);
        player->setVideoSurfaceTexture(surface->getSurfaceTexture());
        player->start();
        player->start();


        client->waitForEOS();
        client->waitForEOS();
+0 −1
Original line number Original line Diff line number Diff line
@@ -40,7 +40,6 @@ public:
                                    const KeyedVector<String8, String8>* headers) = 0;
                                    const KeyedVector<String8, String8>* headers) = 0;
    virtual status_t        setDataSource(int fd, int64_t offset, int64_t length) = 0;
    virtual status_t        setDataSource(int fd, int64_t offset, int64_t length) = 0;
    virtual status_t        setDataSource(const sp<IStreamSource>& source) = 0;
    virtual status_t        setDataSource(const sp<IStreamSource>& source) = 0;
    virtual status_t        setVideoSurface(const sp<Surface>& surface) = 0;
    virtual status_t        setVideoSurfaceTexture(
    virtual status_t        setVideoSurfaceTexture(
                                    const sp<ISurfaceTexture>& surfaceTexture) = 0;
                                    const sp<ISurfaceTexture>& surfaceTexture) = 0;
    virtual status_t        prepareAsync() = 0;
    virtual status_t        prepareAsync() = 0;
+0 −3
Original line number Original line Diff line number Diff line
@@ -117,9 +117,6 @@ public:
        return INVALID_OPERATION;
        return INVALID_OPERATION;
    }
    }


    // pass the buffered Surface to the media player service
    virtual status_t    setVideoSurface(const sp<Surface>& surface) = 0;

    // pass the buffered ISurfaceTexture to the media player service
    // pass the buffered ISurfaceTexture to the media player service
    virtual status_t    setVideoSurfaceTexture(
    virtual status_t    setVideoSurfaceTexture(
                                const sp<ISurfaceTexture>& surfaceTexture) = 0;
                                const sp<ISurfaceTexture>& surfaceTexture) = 0;
+0 −1
Original line number Original line Diff line number Diff line
@@ -170,7 +170,6 @@ public:


            status_t        setDataSource(int fd, int64_t offset, int64_t length);
            status_t        setDataSource(int fd, int64_t offset, int64_t length);
            status_t        setDataSource(const sp<IStreamSource> &source);
            status_t        setDataSource(const sp<IStreamSource> &source);
            status_t        setVideoSurface(const sp<Surface>& surface);
            status_t        setVideoSurfaceTexture(
            status_t        setVideoSurfaceTexture(
                                    const sp<ISurfaceTexture>& surfaceTexture);
                                    const sp<ISurfaceTexture>& surfaceTexture);
            status_t        setListener(const sp<MediaPlayerListener>& listener);
            status_t        setListener(const sp<MediaPlayerListener>& listener);
+0 −17
Original line number Original line Diff line number Diff line
@@ -35,7 +35,6 @@ enum {
    SET_DATA_SOURCE_URL,
    SET_DATA_SOURCE_URL,
    SET_DATA_SOURCE_FD,
    SET_DATA_SOURCE_FD,
    SET_DATA_SOURCE_STREAM,
    SET_DATA_SOURCE_STREAM,
    SET_VIDEO_SURFACE,
    PREPARE_ASYNC,
    PREPARE_ASYNC,
    START,
    START,
    STOP,
    STOP,
@@ -112,16 +111,6 @@ public:
        return reply.readInt32();
        return reply.readInt32();
    }
    }


    // pass the buffered Surface to the media player service
    status_t setVideoSurface(const sp<Surface>& surface)
    {
        Parcel data, reply;
        data.writeInterfaceToken(IMediaPlayer::getInterfaceDescriptor());
        Surface::writeToParcel(surface, &data);
        remote()->transact(SET_VIDEO_SURFACE, data, &reply);
        return reply.readInt32();
    }

    // pass the buffered ISurfaceTexture to the media player service
    // pass the buffered ISurfaceTexture to the media player service
    status_t setVideoSurfaceTexture(const sp<ISurfaceTexture>& surfaceTexture)
    status_t setVideoSurfaceTexture(const sp<ISurfaceTexture>& surfaceTexture)
    {
    {
@@ -345,12 +334,6 @@ status_t BnMediaPlayer::onTransact(
            reply->writeInt32(setDataSource(source));
            reply->writeInt32(setDataSource(source));
            return NO_ERROR;
            return NO_ERROR;
        }
        }
        case SET_VIDEO_SURFACE: {
            CHECK_INTERFACE(IMediaPlayer, data, reply);
            sp<Surface> surface = Surface::readFromParcel(data);
            reply->writeInt32(setVideoSurface(surface));
            return NO_ERROR;
        } break;
        case SET_VIDEO_SURFACETEXTURE: {
        case SET_VIDEO_SURFACETEXTURE: {
            CHECK_INTERFACE(IMediaPlayer, data, reply);
            CHECK_INTERFACE(IMediaPlayer, data, reply);
            sp<ISurfaceTexture> surfaceTexture =
            sp<ISurfaceTexture> surfaceTexture =
Loading