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

Commit a17760af authored by Sachu George's avatar Sachu George Committed by Lubin Yin
Browse files

libmediaplayerservice: Trace point addition

Adding new tracepoints for recording use case

Bug: b/208475702
Change-Id: I42889a051ea676f6c7ccafeb21b7c83a5bffbccf
parent 6100fd64
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@


//#define LOG_NDEBUG 0
//#define LOG_NDEBUG 0
#define LOG_TAG "StagefrightRecorder"
#define LOG_TAG "StagefrightRecorder"
#define ATRACE_TAG ATRACE_TAG_VIDEO
#include <utils/Trace.h>
#include <inttypes.h>
#include <inttypes.h>
// TODO/workaround: including base logging now as it conflicts with ADebug.h
// TODO/workaround: including base logging now as it conflicts with ADebug.h
// and it must be included first.
// and it must be included first.
@@ -1856,6 +1858,7 @@ void StagefrightRecorder::clipVideoFrameHeight() {
// Set up the appropriate MediaSource depending on the chosen option
// Set up the appropriate MediaSource depending on the chosen option
status_t StagefrightRecorder::setupMediaSource(
status_t StagefrightRecorder::setupMediaSource(
                      sp<MediaSource> *mediaSource) {
                      sp<MediaSource> *mediaSource) {
    ATRACE_CALL();
    if (mVideoSource == VIDEO_SOURCE_DEFAULT
    if (mVideoSource == VIDEO_SOURCE_DEFAULT
            || mVideoSource == VIDEO_SOURCE_CAMERA) {
            || mVideoSource == VIDEO_SOURCE_CAMERA) {
        sp<CameraSource> cameraSource;
        sp<CameraSource> cameraSource;
@@ -1936,6 +1939,7 @@ status_t StagefrightRecorder::setupCameraSource(
status_t StagefrightRecorder::setupVideoEncoder(
status_t StagefrightRecorder::setupVideoEncoder(
        const sp<MediaSource> &cameraSource,
        const sp<MediaSource> &cameraSource,
        sp<MediaCodecSource> *source) {
        sp<MediaCodecSource> *source) {
    ATRACE_CALL();
    source->clear();
    source->clear();


    sp<AMessage> format = new AMessage();
    sp<AMessage> format = new AMessage();
@@ -2114,6 +2118,7 @@ status_t StagefrightRecorder::setupVideoEncoder(
}
}


status_t StagefrightRecorder::setupAudioEncoder(const sp<MediaWriter>& writer) {
status_t StagefrightRecorder::setupAudioEncoder(const sp<MediaWriter>& writer) {
    ATRACE_CALL();
    status_t status = BAD_VALUE;
    status_t status = BAD_VALUE;
    if (OK != (status = checkAudioEncoderCapabilities())) {
    if (OK != (status = checkAudioEncoderCapabilities())) {
        return status;
        return status;