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

Commit cb950e2c authored by Steve Kondik's avatar Steve Kondik
Browse files

stagefright: Fix FFMPEG catchall decoders

 * Get this metadata properly flowing
 * Allows us to play tracks such as Apple Lossless :)

Change-Id: I2990b30eef5b672da339d24444424c61a43b85c2
parent 382b0f63
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -105,6 +105,8 @@ static const MetaKeyEntry MetaKeyTable[] {
   {kKeyChannelCount         , "channel-count"          , INT32},

   {kKeySampleBits           , "bits-per-sample"        , INT32},
   {kKeyCodecId              , "codec-id"               , INT32},
   {kKeySampleFormat         , "sample-format"          , INT32},
};

const char* ExtendedCodec::getMsgKey(int key) {
+9 −1
Original line number Diff line number Diff line
@@ -446,6 +446,10 @@ status_t FFMPEGSoftCodec::setSupportedRole(
          "video_decoder.flv1", NULL },
        { MEDIA_MIMETYPE_VIDEO_HEVC,
          "video_decoder.hevc", NULL },
        { MEDIA_MIMETYPE_AUDIO_FFMPEG,
          "audio_decoder.trial", NULL },
        { MEDIA_MIMETYPE_VIDEO_FFMPEG,
          "video_decoder.trial", NULL },
        };
    static const size_t kNumMimeToRole =
                     sizeof(kFFMPEGMimeToRole) / sizeof(kFFMPEGMimeToRole[0]);
@@ -954,10 +958,14 @@ status_t FFMPEGSoftCodec::setFFmpegAudioFormat(
    CHECK(msg->findInt32(getMsgKey(kKeyBlockAlign), &blockAlign));
    CHECK(msg->findInt32(getMsgKey(kKeySampleFormat), &sampleFormat));

    status_t err = setRawAudioFormat(msg, OMXhandle, nodeID);
    if (err != OK)
        return err;

    InitOMXParams(&param);
    param.nPortIndex = kPortIndexInput;

    status_t err = OMXhandle->getParameter(
    err = OMXhandle->getParameter(
            nodeID, OMX_IndexParamAudioFFmpeg, &param, sizeof(param));
    if (err != OK)
        return err;