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

Commit 31ed4c1a authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add component-tag and audio-description support" am: 9c727ebf am:...

Merge "Add component-tag and audio-description support" am: 9c727ebf am: d5675dba am: ff612546 am: 9fdc051f

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2200623



Change-Id: Ie0bd290d4fc868c044be620c69585cee837dfa8d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f6217371 9fdc051f
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -794,6 +794,8 @@ static std::vector<std::pair<const char *, uint32_t>> int32Mappings {
        { "thumbnail-height", kKeyThumbnailHeight },
        { "track-id", kKeyTrackID },
        { "valid-samples", kKeyValidSamples },
        { "dvb-component-tag", kKeyDvbComponentTag},
        { "dvb-audio-description", kKeyDvbAudioDescription},
    }
};

@@ -1002,6 +1004,16 @@ status_t convertMetaDataToMessage(
        msg->setInt32("is-sync-frame", 1);
    }

    int32_t dvbComponentTag = 0;
    if (meta->findInt32(kKeyDvbComponentTag, &dvbComponentTag)) {
        msg->setInt32("dvb-component-tag", dvbComponentTag);
    }

    int32_t dvbAudioDescription = 0;
    if (meta->findInt32(kKeyDvbAudioDescription, &dvbAudioDescription)) {
        msg->setInt32("dvb-audio-description", dvbAudioDescription);
    }

    const char *lang;
    if (meta->findCString(kKeyMediaLanguage, &lang)) {
        msg->setString("language", lang);
@@ -1788,6 +1800,16 @@ status_t convertMessageToMetaData(const sp<AMessage> &msg, sp<MetaData> &meta) {
        meta->setInt32(kKeyMaxBitRate, maxBitrate);
    }

    int32_t dvbComponentTag = 0;
    if (msg->findInt32("dvb-component-tag", &dvbComponentTag) && dvbComponentTag > 0) {
        meta->setInt32(kKeyDvbComponentTag, dvbComponentTag);
    }

    int32_t dvbAudioDescription = 0;
    if (msg->findInt32("dvb-audio-description", &dvbAudioDescription)) {
        meta->setInt32(kKeyDvbAudioDescription, dvbAudioDescription);
    }

    AString lang;
    if (msg->findString("language", &lang)) {
        meta->setCString(kKeyMediaLanguage, lang.c_str());
+6 −0
Original line number Diff line number Diff line
@@ -277,6 +277,12 @@ enum {
    kKeyLastSampleIndexInChunk = 'lsic',  //int64_t, index of last sample in a chunk.
    kKeySampleTimeBeforeAppend = 'lsba', // int64_t, timestamp of last sample of a track.

    // DVB component tag
    kKeyDvbComponentTag = 'copt', // int32_t, component tag for DVB video/audio/subtitle

    // DVB audio description
    kKeyDvbAudioDescription = 'addt', // bool (int32_t), DVB audio description only defined for
                                      // audio component
};

enum {