* Parse the min/max frame and block sizes from the streaminfo and
report it in the metadata
* This is needed for FLAC offload support on new Qualcomm DSPs.
Change-Id: Ib37891a5766066306adf18a6c23af9c9ac7dcdb1
#endif
#include <utils/Errors.h>
#endif
#include <utils/Errors.h>
+#include <media/stagefright/foundation/ABitReader.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaErrors.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaErrors.h>
meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_FLAC);
meta->setData(kKeyRawCodecSpecificData, 0, avctx->extradata, avctx->extradata_size);
meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_FLAC);
meta->setData(kKeyRawCodecSpecificData, 0, avctx->extradata, avctx->extradata_size);
+ ABitReader br(avctx->extradata, avctx->extradata_size);
+ int32_t minBlockSize = br.getBits(16);
+ int32_t maxBlockSize = br.getBits(16);
+ int32_t minFrameSize = br.getBits(24);
+ int32_t maxFrameSize = br.getBits(24);
+
+ meta->setInt32('mibs', minBlockSize);
+ meta->setInt32('mabs', maxBlockSize);
+ meta->setInt32('mifs', minFrameSize);
+ meta->setInt32('mafs', maxFrameSize);
+