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

Commit bd019775 authored by Surajit Podder's avatar Surajit Podder Committed by Satish Kamuju
Browse files

video: Port AOSP fixes

Includes following fixes:
f510d0c4 libstagefright: Disable multi slice mode for video encode
ca46843e audio: Fix for failure in CTS MediaRecorderTest cases
b4d0490 libstagefright: check the audio source when adding to MPEG4Writer
89c6c3f libstagefright: Allocate cached camera buffers for sw encoders
f2c387b libstagefright: Choose target specific media_codecs.xml
f3e7122 libstagefright: Implement fallback mechanism to SW decoder

Change-Id: I90398b2fead1f4e163935bf1db342e24275f7933
parent 61f6cfa9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -376,7 +376,7 @@ protected:
    status_t configureBitrate(
            int32_t bitrate, OMX_VIDEO_CONTROLRATETYPE bitrateMode);

    status_t setupErrorCorrectionParameters();
    virtual status_t setupErrorCorrectionParameters();

    status_t initNativeWindow();

@@ -437,6 +437,8 @@ protected:
        return OK;
    }

    sp<IOMXObserver> createObserver();

    DISALLOW_EVIL_CONSTRUCTORS(ACodec);
};

+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ class AMessage;
struct AReplyToken;
class IGraphicBufferProducer;
class IGraphicBufferConsumer;
class MediaCodec;
struct MediaCodec;
class MetaData;

struct MediaCodecSource : public MediaSource,
+6 −1
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@
#include <media/stagefright/DataSource.h>
#include <common/AVExtensionsCommon.h>
#include <system/audio.h>
#include <camera/ICamera.h>
#include <media/mediarecorder.h>

namespace android {

@@ -141,9 +143,12 @@ struct AVUtils {
         return mHEVCMuxer;
    }

    virtual bool isAudioMuxFormatSupported(const char *mime);
    virtual void cacheCaptureBuffers(sp<ICamera> camera, video_encoder encoder);
    virtual const char *getCustomCodecsLocation();

private:
    HEVCMuxer mHEVCMuxer;

    // ----- NO TRESSPASSING BEYOND THIS LINE ------
    DECLARE_LOADABLE_SINGLETON(AVUtils);
};
+12 −0
Original line number Diff line number Diff line
@@ -143,6 +143,18 @@ void AVUtils::HEVCMuxer::getHEVCCodecSpecificDataFromInputFormatIfPossible(
    return;
}

bool AVUtils::isAudioMuxFormatSupported(const char *) {
    return true;
}

void AVUtils::cacheCaptureBuffers(sp<ICamera>, video_encoder) {
    return;
}

const char *AVUtils::getCustomCodecsLocation() {
    return "/etc/media_codecs.xml";
}

// ----- NO TRESSPASSING BEYOND THIS LINE ------
AVUtils::AVUtils() {}

+2 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@
#include <system/audio.h>

#include "ARTPWriter.h"
#include <stagefright/AVExtensions.h>

namespace android {

@@ -1476,6 +1477,7 @@ status_t StagefrightRecorder::setupCameraSource(
                videoSize, mFrameRate,
                mPreviewSurface);
    }
    AVUtils::get()->cacheCaptureBuffers(mCamera, mVideoEncoder);
    mCamera.clear();
    mCameraProxy.clear();
    if (*cameraSource == NULL) {
Loading