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

Commit e2d617f5 authored by The Android Open Source Project's avatar The Android Open Source Project
Browse files

Merge commit '2381f06f' into HEAD

parents 92630351 2381f06f
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -133,11 +133,19 @@ void CameraMetadata::acquire(CameraMetadata &other) {
}

status_t CameraMetadata::append(const CameraMetadata &other) {
    return append(other.mBuffer);
}

status_t CameraMetadata::append(const camera_metadata_t* other) {
    if (mLocked) {
        ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
        return INVALID_OPERATION;
    }
    return append_camera_metadata(mBuffer, other.mBuffer);
    size_t extraEntries = get_camera_metadata_entry_count(other);
    size_t extraData = get_camera_metadata_data_count(other);
    resizeIfNeeded(extraEntries, extraData);

    return append_camera_metadata(mBuffer, other);
}

size_t CameraMetadata::entryCount() const {
+5 −0
Original line number Diff line number Diff line
@@ -98,6 +98,11 @@ class CameraMetadata {
     */
    status_t append(const CameraMetadata &other);

    /**
     * Append metadata from a raw camera_metadata buffer
     */
    status_t append(const camera_metadata* other);

    /**
     * Number of metadata entries.
     */
+7 −3
Original line number Diff line number Diff line
@@ -187,7 +187,8 @@ public:
                                    int notificationFrames = 0,
                                    int sessionId        = 0,
                                    transfer_type transferType = TRANSFER_DEFAULT,
                                    const audio_offload_info_t *offloadInfo = NULL);
                                    const audio_offload_info_t *offloadInfo = NULL,
                                    int uid = -1);

    /* Creates an audio track and registers it with AudioFlinger.
     * With this constructor, the track is configured for static buffer mode.
@@ -211,7 +212,8 @@ public:
                                    int notificationFrames = 0,
                                    int sessionId       = 0,
                                    transfer_type transferType = TRANSFER_DEFAULT,
                                    const audio_offload_info_t *offloadInfo = NULL);
                                    const audio_offload_info_t *offloadInfo = NULL,
                                    int uid = -1);

    /* Terminates the AudioTrack and unregisters it from AudioFlinger.
     * Also destroys all resources associated with the AudioTrack.
@@ -248,7 +250,8 @@ public:
                            bool threadCanCallJava = false,
                            int sessionId       = 0,
                            transfer_type transferType = TRANSFER_DEFAULT,
                            const audio_offload_info_t *offloadInfo = NULL);
                            const audio_offload_info_t *offloadInfo = NULL,
                            int uid = -1);

    /* Result of constructing the AudioTrack. This must be checked for successful initialization
     * before using any AudioTrack API (except for set()), because using
@@ -751,6 +754,7 @@ private:
    sp<DeathNotifier>       mDeathNotifier;
    uint32_t                mSequence;              // incremented for each new IAudioTrack attempt
    audio_io_handle_t       mOutput;                // cached output io handle
    int                     mClientUid;
};

class TimedAudioTrack : public AudioTrack
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ public:
                                // output: server's description of IAudioTrack for display in logs.
                                // Don't attempt to parse, as the format could change.
                                String8& name,
                                int clientUid,
                                status_t *status) = 0;

    virtual sp<IAudioRecord> openRecord(
+1 −0
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ public:
        virtual status_t    getPosition(uint32_t *position) const = 0;
        virtual status_t    getFramesWritten(uint32_t *frameswritten) const = 0;
        virtual int         getSessionId() const = 0;
        virtual audio_stream_type_t getAudioStreamType() const = 0;

        // If no callback is specified, use the "write" API below to submit
        // audio data.
Loading