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

Commit db43b34c authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

media: 64 bit compile issues

- change internal sized types to use stdint.h
- printf & scanf formats
- size_t or unsigned int for iterators

Change-Id: Id993a70d8bf54c667c5d652b34179a2c727ed446
parent 1df2557a
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -14,16 +14,16 @@
 * limitations under the License.
 */

#include <inttypes.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>

//#define LOG_NDEBUG 0
#define LOG_TAG "stagefright"
#include <media/stagefright/foundation/ADebug.h>

#include <sys/time.h>

#include <stdlib.h>
#include <string.h>
#include <inttypes.h>

#include "jpeg.h"
#include "SineSource.h"

@@ -50,8 +50,6 @@

#include <private/media/VideoFrame.h>

#include <fcntl.h>

#include <gui/GLConsumer.h>
#include <gui/Surface.h>
#include <gui/SurfaceComposerClient.h>
@@ -647,7 +645,7 @@ static void dumpCodecProfiles(const sp<IOMX>& omx, bool queryDecoders) {
                const CodecProfileLevel &profileLevel =
                     results[i].mProfileLevels[j];

                printf("%s%ld/%ld", j > 0 ? ", " : "",
                printf("%s%" PRIu32 "/%" PRIu32, j > 0 ? ", " : "",
                    profileLevel.mProfile, profileLevel.mLevel);
            }

+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ private:
    sp<DecryptHandle> mDecryptHandle;
    DrmManagerClient *mDrmManagerClient;
    int64_t mDrmBufOffset;
    int64_t mDrmBufSize;
    size_t mDrmBufSize;
    unsigned char *mDrmBuf;

    ssize_t readAtDRM(off64_t offset, void *data, size_t size);
+2 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

//#define LOG_NDEBUG 0
#define LOG_TAG "DummyVideoSource"
#include <inttypes.h>
#include <stdlib.h>
#include <utils/Log.h>
#include <media/stagefright/foundation/ADebug.h>
@@ -146,7 +147,7 @@ status_t DummyVideoSource::read(
    if (mIsFirstImageFrame) {
        M4OSA_clockGetTime(&mImagePlayStartTime, kTimeScale);
        mFrameTimeUs =  (mImageSeekTime + 1);
        ALOGV("read: jpg 1st frame timeUs = %lld, begin cut time = %ld",
        ALOGV("read: jpg 1st frame timeUs = %lld, begin cut time = %" PRIu32,
            mFrameTimeUs, mImageSeekTime);

        mIsFirstImageFrame = false;
+4 −2
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@
 * limitations under the License.
 */

#include <inttypes.h>

#define LOG_NDEBUG 1
#define LOG_TAG "VideoEditorAudioPlayer"
#include <utils/Log.h>
@@ -372,7 +374,7 @@ status_t VideoEditorAudioPlayer::start(bool sourceAlreadyStarted) {

        // Get the duration in time of the audio BT
        if ( result == M4NO_ERROR ) {
         ALOGV("VEAP: channels = %d freq = %d",
         ALOGV("VEAP: channels = %" PRIu32 " freq = %" PRIu32,
         mAudioMixSettings->uiNbChannels,  mAudioMixSettings->uiSamplingFrequency);

            // No trim
@@ -440,7 +442,7 @@ status_t VideoEditorAudioPlayer::start(bool sourceAlreadyStarted) {
                // do nothing
            }

            ALOGV("VideoEditorAudioPlayer::startTime %d", startTime);
            ALOGV("VideoEditorAudioPlayer::startTime %" PRIu32, startTime);
            seekTimeStamp = 0;
            if (startTime) {
                if (startTime >= mBGAudioPCMFileDuration) {
+5 −3
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@
 * limitations under the License.
 */

#include <inttypes.h>

//#define LOG_NDEBUG 0
#define LOG_TAG "VideoEditorBGAudioProcessing"
#include <utils/Log.h>
@@ -50,8 +52,8 @@ M4OSA_Int32 VideoEditorBGAudioProcessing::mixAndDuck(
        void *backgroundTrackBuffer,
        void *outBuffer) {

    ALOGV("mixAndDuck: track buffers (primary: 0x%x and background: 0x%x) "
            "and out buffer 0x%x",
    ALOGV("mixAndDuck: track buffers (primary: %p and background: %p) "
            "and out buffer %p",
            primaryTrackBuffer, backgroundTrackBuffer, outBuffer);

    M4AM_Buffer16* pPrimaryTrack   = (M4AM_Buffer16*)primaryTrackBuffer;
@@ -217,7 +219,7 @@ void VideoEditorBGAudioProcessing::setMixParams(
    mDoDucking            = 0;
    mDuckingFactor        = 1.0;

    ALOGV("ducking enable 0x%x lowVolume %f threshold %d "
    ALOGV("ducking enable 0x%x lowVolume %f threshold %" PRIu32 " "
            "fPTVolLevel %f BTVolLevel %f",
            mDucking_enable, mDucking_lowVolume, mDucking_threshold,
            mPTVolLevel, mPTVolLevel);
Loading