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

Commit fde0931f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Stagefright: remove binder dependency on IMediaHTTP*"

parents a44e24ea 73feb8cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ struct BpMediaHTTPService : public BpInterface<IMediaHTTPService> {
        : BpInterface<IMediaHTTPService>(impl) {
    }

    virtual sp<IMediaHTTPConnection> makeHTTPConnection() {
    virtual sp<MediaHTTPConnection> makeHTTPConnection() {
        Parcel data, reply;
        data.writeInterfaceToken(
                IMediaHTTPService::getInterfaceDescriptor());
+2 −3
Original line number Diff line number Diff line
@@ -19,16 +19,15 @@
#define I_MEDIA_HTTP_CONNECTION_H_

#include <binder/IInterface.h>
#include <media/MediaHTTPConnection.h>
#include <media/stagefright/foundation/ABase.h>
#include <utils/KeyedVector.h>

namespace android {

struct IMediaHTTPConnection;

/** MUST stay in sync with IMediaHTTPConnection.aidl */

struct IMediaHTTPConnection : public IInterface {
struct IMediaHTTPConnection : public MediaHTTPConnection, public IInterface {
    DECLARE_META_INTERFACE(MediaHTTPConnection);

    virtual bool connect(
+4 −3
Original line number Diff line number Diff line
@@ -19,18 +19,19 @@
#define I_MEDIA_HTTP_SERVICE_H_

#include <binder/IInterface.h>
#include <media/MediaHTTPService.h>
#include <media/stagefright/foundation/ABase.h>

namespace android {

struct IMediaHTTPConnection;
struct MediaHTTPConnection;

/** MUST stay in sync with IMediaHTTPService.aidl */

struct IMediaHTTPService : public IInterface {
struct IMediaHTTPService : public MediaHTTPService, public IInterface {
    DECLARE_META_INTERFACE(MediaHTTPService);

    virtual sp<IMediaHTTPConnection> makeHTTPConnection() = 0;
    virtual sp<MediaHTTPConnection> makeHTTPConnection() = 0;

private:
    DISALLOW_EVIL_CONSTRUCTORS(IMediaHTTPService);
+44 −0
Original line number Diff line number Diff line
/*
 * Copyright 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef MEDIA_HTTP_CONNECTION_H_

#define MEDIA_HTTP_CONNECTION_H_

#include <media/stagefright/foundation/ABase.h>
#include <utils/KeyedVector.h>

namespace android {

struct MediaHTTPConnection : public virtual RefBase {
    MediaHTTPConnection() {}

    virtual bool connect(
            const char *uri, const KeyedVector<String8, String8> *headers) = 0;

    virtual void disconnect() = 0;
    virtual ssize_t readAt(off64_t offset, void *data, size_t size) = 0;
    virtual off64_t getSize() = 0;
    virtual status_t getMIMEType(String8 *mimeType) = 0;
    virtual status_t getUri(String8 *uri) = 0;

private:
    DISALLOW_EVIL_CONSTRUCTORS(MediaHTTPConnection);
};

}  // namespace android

#endif  // MEDIA_HTTP_CONNECTION_H_
+38 −0
Original line number Diff line number Diff line
/*
 * Copyright 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef MEDIA_HTTP_SERVICE_H_

#define MEDIA_HTTP_SERVICE_H_

#include <media/stagefright/foundation/ABase.h>

namespace android {

struct MediaHTTPConnection;

struct MediaHTTPService : public virtual RefBase {
    MediaHTTPService() {}

    virtual sp<MediaHTTPConnection> makeHTTPConnection() = 0;

private:
    DISALLOW_EVIL_CONSTRUCTORS(MediaHTTPService);
};

}  // namespace android

#endif  // MEDIA_HTTP_SERVICE_H_
Loading