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

Commit dee1b302 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru
Browse files

merge from donut

parents 9261bae1 02f54246
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -28,4 +28,4 @@ LOCAL_MODULE:= android.awt

LOCAL_DX_FLAGS := --core-library

include $(BUILD_JAVA_LIBRARY)
#include $(BUILD_JAVA_LIBRARY)
+5 −6
Original line number Diff line number Diff line
@@ -504,8 +504,7 @@ status_t CameraService::Client::startRecordingMode()
    }

    // start recording mode
    ret = mHardware->startRecording(recordingCallback,
                                    mCameraService.get());
    ret = mHardware->startRecording(recordingCallback, mCameraService.get());
    if (ret != NO_ERROR) {
        LOGE("mHardware->startRecording() failed with status %d", ret);
    }
@@ -798,7 +797,7 @@ void CameraService::Client::previewCallback(const sp<IMemory>& mem, void* user)
}

// recording callback
void CameraService::Client::recordingCallback(const sp<IMemory>& mem, void* user)
void CameraService::Client::recordingCallback(nsecs_t timestamp, const sp<IMemory>& mem, void* user)
{
    LOGV("recordingCallback");
    sp<Client> client = getClientFromCookie(user);
@@ -806,7 +805,7 @@ void CameraService::Client::recordingCallback(const sp<IMemory>& mem, void* user
        return;
    }
    // The strong pointer guarantees the client will exist, but no lock is held.
    client->postRecordingFrame(mem);
    client->postRecordingFrame(timestamp, mem);
}

// take a picture - image is returned in callback
@@ -1072,14 +1071,14 @@ void CameraService::Client::copyFrameAndPostCopiedFrame(sp<IMemoryHeap> heap, si
    mCameraClient->dataCallback(CAMERA_MSG_PREVIEW_FRAME, frame);
}

void CameraService::Client::postRecordingFrame(const sp<IMemory>& frame)
void CameraService::Client::postRecordingFrame(nsecs_t timestamp, const sp<IMemory>& frame)
{
    LOGV("postRecordingFrame");
    if (frame == 0) {
        LOGW("frame is a null pointer");
        return;
    }
    mCameraClient->dataCallback(CAMERA_MSG_VIDEO_FRAME, frame);
    mCameraClient->dataCallbackTimestamp(timestamp, CAMERA_MSG_VIDEO_FRAME, frame);
}

void CameraService::Client::postPreviewFrame(const sp<IMemory>& mem)
+2 −2
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ private:

                    status_t    checkPid();

        static      void        recordingCallback(const sp<IMemory>& mem, void* user);
        static      void        recordingCallback(nsecs_t timestamp, const sp<IMemory>& mem, void* user);
        static      void        previewCallback(const sp<IMemory>& mem, void* user);
        static      void        shutterCallback(void *user);
        static      void        yuvPictureCallback(const sp<IMemory>& mem, void* user);
@@ -144,7 +144,7 @@ private:
                    void        postRaw(const sp<IMemory>& mem);
                    void        postJpeg(const sp<IMemory>& mem);
                    void        postPreviewFrame(const sp<IMemory>& mem);
                    void        postRecordingFrame(const sp<IMemory>& frame);
                    void        postRecordingFrame(nsecs_t timestamp, const sp<IMemory>& frame);
                    void        copyFrameAndPostCopiedFrame(sp<IMemoryHeap> heap, size_t offset, size_t size);
                    void        postError(status_t error);
                    void        postAutoFocus(bool focused);
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
 * is returned. Otherwise it returns the value in dynamically allocated memory
 * and sets the size if the pointer is not NULL. One can release the memory by
 * calling free(). */
static char *keystore_get(char *key, int *size)
static char *keystore_get(const char *key, int *size)
{
    char buffer[MAX_KEY_VALUE_LENGTH];
    char *value;
+3 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#ifndef ANDROID_HARDWARE_CAMERA_H
#define ANDROID_HARDWARE_CAMERA_H

#include <utils/Timers.h>
#include <ui/ICameraClient.h>

namespace android {
@@ -94,6 +95,7 @@ class CameraListener: virtual public RefBase
public:
    virtual void notify(int32_t msgType, int32_t ext1, int32_t ext2) = 0;
    virtual void postData(int32_t msgType, const sp<IMemory>& dataPtr) = 0;
    virtual void postDataTimestamp(nsecs_t timestamp, int32_t msgType, const sp<IMemory>& dataPtr) = 0;
};

class Camera : public BnCameraClient, public IBinder::DeathRecipient
@@ -155,6 +157,7 @@ public:
    // ICameraClient interface
    virtual void        notifyCallback(int32_t msgType, int32_t ext, int32_t ext2);
    virtual void        dataCallback(int32_t msgType, const sp<IMemory>& dataPtr);
    virtual void        dataCallbackTimestamp(nsecs_t timestamp, int32_t msgType, const sp<IMemory>& dataPtr);

    sp<ICamera>         remote();

Loading