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

Commit 884989c6 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

screenrecord: 64-bit compile warnings

Change-Id: I708e48e24719b2c4bb023069164aafd4c2ad639b
parent ab5cdbaf
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -14,6 +14,10 @@
 * limitations under the License.
 */

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

#define LOG_TAG "ScreenRecord"
//#define LOG_NDEBUG 0
#include <utils/Log.h>
@@ -27,9 +31,6 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>

#include <stdlib.h>
#include <assert.h>

#include "screenrecord.h"
#include "Overlay.h"
#include "TextRenderer.h"
@@ -235,7 +236,7 @@ void Overlay::processFrame_l() {

    char textBuf[64];
    getTimeString_l(monotonicNsec, textBuf, sizeof(textBuf));
    String8 timeStr(String8::format("%s f=%lld (%zd)",
    String8 timeStr(String8::format("%s f=%" PRId64 " (%zd)",
            textBuf, frameNumber, mTotalDroppedFrames));
    mTextRenderer.drawString(mTexProgram, Program::kIdentity, 0, 0, timeStr);

+1 −1
Original line number Diff line number Diff line
@@ -353,6 +353,6 @@ char* TextRenderer::breakString(const char* str, float maxWidth) const {
        }
    }

    ALOGV("goodPos=%d for str='%s'", goodPos, str);
    ALOGV("goodPos=%zu for str='%s'", goodPos, str);
    return const_cast<char*>(str + goodPos);
}
+16 −15
Original line number Diff line number Diff line
@@ -14,6 +14,19 @@
 * limitations under the License.
 */

#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
#include <inttypes.h>
#include <getopt.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <termios.h>
#include <unistd.h>

#define LOG_TAG "ScreenRecord"
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
//#define LOG_NDEBUG 0
@@ -36,18 +49,6 @@
#include <media/stagefright/MediaMuxer.h>
#include <media/ICrypto.h>

#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <fcntl.h>
#include <signal.h>
#include <getopt.h>
#include <sys/wait.h>
#include <termios.h>
#include <assert.h>

#include "screenrecord.h"
#include "Overlay.h"
#include "FrameOutput.h"
@@ -354,7 +355,7 @@ static status_t runEncoder(const sp<MediaCodec>& encoder,
        case NO_ERROR:
            // got a buffer
            if ((flags & MediaCodec::BUFFER_FLAG_CODECCONFIG) != 0) {
                ALOGV("Got codec config buffer (%u bytes)", size);
                ALOGV("Got codec config buffer (%zu bytes)", size);
                if (muxer != NULL) {
                    // ignore this -- we passed the CSD into MediaMuxer when
                    // we got the format change notification
@@ -362,7 +363,7 @@ static status_t runEncoder(const sp<MediaCodec>& encoder,
                }
            }
            if (size != 0) {
                ALOGV("Got data in buffer %d, size=%d, pts=%lld",
                ALOGV("Got data in buffer %zu, size=%zu, pts=%" PRId64,
                        bufIndex, size, ptsUsec);

                { // scope
@@ -473,7 +474,7 @@ static status_t runEncoder(const sp<MediaCodec>& encoder,

    ALOGV("Encoder stopping (req=%d)", gStopRequested);
    if (gVerbose) {
        printf("Encoder stopping; recorded %u frames in %lld seconds\n",
        printf("Encoder stopping; recorded %u frames in %" PRId64 " seconds\n",
                debugNumFrames, nanoseconds_to_seconds(
                        systemTime(CLOCK_MONOTONIC) - startWhenNsec));
    }