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

Commit 4dfef65c authored by Dorin Drimus's avatar Dorin Drimus
Browse files

Add profile and level keys to MetaDatabase

Add audio keys for profile and level to be used by audio codecs and
extractors, e.g. DTS. Reuses the values for the video profile and level
since the codec framework doesn't distinguish between video and audio
profiles so there is no need to define a separate key.

Also bringing back MEDIA_MIMETYPE_AUDIO_DTS_UHD with no profile in the
mime type to be set in MetaDatabase for the mime key (and the profile in
a separate fild). This allows for a clean mapping with the MediaFormat
SDK values (MIMETYPE_AUDIO_DTS_UHD).

Bug: 260223911
Test: atest CtsMediaExtractorTestCases
Change-Id: I986815a3e2e85414e76873c737296c1f4d053ac3
parent fd060073
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -798,6 +798,8 @@ static std::vector<std::pair<const char *, uint32_t>> int32Mappings {
        { "dvb-audio-description", kKeyDvbAudioDescription},
        { "dvb-teletext-magazine-number", kKeyDvbTeletextMagazineNumber},
        { "dvb-teletext-page-number", kKeyDvbTeletextPageNumber},
        { "profile", kKeyAudioProfile },
        { "level", kKeyAudioLevel },
    }
};

+6 −0
Original line number Diff line number Diff line
@@ -117,6 +117,12 @@ enum {
    kKeyVideoProfile      = 'vprf',  // int32_t
    kKeyVideoLevel        = 'vlev',  // int32_t

    // audio profile and level
    // The codec framework doesn't distinguish between video and audio profiles,
    // so there is no need to define a separate key
    kKeyAudioProfile      = 'vprf',  // int32_t
    kKeyAudioLevel        = 'vlev',  // int32_t

    kKey2ByteNalLength    = '2NAL',  // int32_t (bool)

    // Identify the file output format for authoring
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ const char *MEDIA_MIMETYPE_AUDIO_DVI_IMA_ADPCM = "audio/x-adpcm-dvi-ima";
const char *MEDIA_MIMETYPE_AUDIO_DTS = "audio/vnd.dts";
const char *MEDIA_MIMETYPE_AUDIO_DTS_HD = "audio/vnd.dts.hd";
const char *MEDIA_MIMETYPE_AUDIO_DTS_HD_MA = "audio/vnd.dts.hd;profile=dtsma";
const char *MEDIA_MIMETYPE_AUDIO_DTS_UHD = "audio/vnd.dts.uhd";
const char *MEDIA_MIMETYPE_AUDIO_DTS_UHD_P1 = "audio/vnd.dts.uhd;profile=p1";
const char *MEDIA_MIMETYPE_AUDIO_DTS_UHD_P2 = "audio/vnd.dts.uhd;profile=p2";
const char *MEDIA_MIMETYPE_AUDIO_EVRC = "audio/evrc";
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ extern const char *MEDIA_MIMETYPE_AUDIO_DVI_IMA_ADPCM;
extern const char *MEDIA_MIMETYPE_AUDIO_DTS;
extern const char *MEDIA_MIMETYPE_AUDIO_DTS_HD;
extern const char *MEDIA_MIMETYPE_AUDIO_DTS_HD_MA;
extern const char *MEDIA_MIMETYPE_AUDIO_DTS_UHD;
extern const char *MEDIA_MIMETYPE_AUDIO_DTS_UHD_P1;
extern const char *MEDIA_MIMETYPE_AUDIO_DTS_UHD_P2;
extern const char *MEDIA_MIMETYPE_AUDIO_EVRC;