profile->nSamplingRate = mAudioTgtFreq;
//mCtx has been updated(adjustAudioParams)!
- ALOGV("get pcm params, nChannels:%lu, nSamplingRate:%lu, nBitsPerSample:%lu",
+ ALOGV("get pcm params, nChannels:%u, nSamplingRate:%u, nBitsPerSample:%u",
profile->nChannels, profile->nSamplingRate, profile->nBitPerSample);
return OMX_ErrorNone;
void SoftFFmpegAudio::adjustAudioParams() {
- uint32_t max_rate = 192000;
-
mReconfiguring = isConfigured();
// let android audio mixer to downmix if there is no multichannel output
// and use number of channels from the source file, useful for HDMI/offload output
mAudioTgtChannels = mCtx->channels;
- mAudioTgtFreq = FFMIN(max_rate, FFMAX(8000, mCtx->sample_rate));
+ mAudioTgtFreq = FFMIN(192000, FFMAX(8000, mCtx->sample_rate));
mAudioTgtChannels = mCtx->channels;
mAudioTgtFreq = mCtx->sample_rate;
mAudioTgtFreq = profile->nSamplingRate;
mAudioTgtChannels = profile->nChannels;
- ALOGV("set OMX_IndexParamAudioPcm, nChannels:%lu, "
- "nSampleRate:%lu, nBitsPerSample:%lu",
+ ALOGV("set OMX_IndexParamAudioPcm, nChannels:%u, "
+ "nSampleRate:%u, nBitsPerSample:%u",
profile->nChannels, profile->nSamplingRate,
profile->nBitPerSample);
adjustAudioParams();
- ALOGV("set OMX_IndexParamAudioAac, nChannels:%lu, nSampleRate:%lu",
+ ALOGV("set OMX_IndexParamAudioAac, nChannels:%u, nSampleRate:%u",
profile->nChannels, profile->nSampleRate);
return OMX_ErrorNone;
adjustAudioParams();
- ALOGV("set OMX_IndexParamAudioMp3, nChannels:%lu, nSampleRate:%lu",
+ ALOGV("set OMX_IndexParamAudioMp3, nChannels:%u, nSampleRate:%u",
profile->nChannels, profile->nSampleRate);
return OMX_ErrorNone;
adjustAudioParams();
ALOGD("set OMX_IndexParamAudioVorbis, "
- "nChannels=%lu, nSampleRate=%lu, nBitRate=%lu, "
- "nMinBitRate=%lu, nMaxBitRate=%lu",
+ "nChannels=%u, nSampleRate=%u, nBitRate=%u, "
+ "nMinBitRate=%u, nMaxBitRate=%u",
profile->nChannels, profile->nSampleRate,
profile->nBitRate, profile->nMinBitRate,
profile->nMaxBitRate);
adjustAudioParams();
ALOGV("set OMX_IndexParamAudioWma, nChannels:%u, "
- "nSampleRate:%lu, nBitRate:%lu, nBlockAlign:%u",
+ "nSampleRate:%u, nBitRate:%u, nBlockAlign:%u",
profile->nChannels, profile->nSamplingRate,
profile->nBitRate, profile->nBlockAlign);
adjustAudioParams();
- ALOGV("set OMX_IndexParamAudioRa, nChannels:%lu, "
- "nSampleRate:%lu, nBlockAlign:%d",
+ ALOGV("set OMX_IndexParamAudioRa, nChannels:%u, "
+ "nSampleRate:%u, nBlockAlign:%d",
profile->nChannels, profile->nSamplingRate, mCtx->block_align);
return OMX_ErrorNone;
adjustAudioParams();
- ALOGV("set OMX_IndexParamAudioFlac, nChannels:%lu, nSampleRate:%lu ",
+ ALOGV("set OMX_IndexParamAudioFlac, nChannels:%u, nSampleRate:%u ",
profile->nChannels, profile->nSampleRate);
return OMX_ErrorNone;
adjustAudioParams();
- ALOGV("set OMX_IndexParamAudioMp2, nChannels:%lu, nSampleRate:%lu",
+ ALOGV("set OMX_IndexParamAudioMp2, nChannels:%u, nSampleRate:%u",
profile->nChannels, profile->nSampleRate);
return OMX_ErrorNone;
adjustAudioParams();
- ALOGV("set OMX_IndexParamAudioAc3, nChannels:%lu, nSampleRate:%lu",
+ ALOGV("set OMX_IndexParamAudioAc3, nChannels:%u, nSampleRate:%u",
profile->nChannels, profile->nSamplingRate);
return OMX_ErrorNone;
adjustAudioParams();
- ALOGV("set OMX_IndexParamAudioAndroidAc3, nChannels:%lu, nSampleRate:%lu",
+ ALOGV("set OMX_IndexParamAudioAndroidAc3, nChannels:%u, nSampleRate:%u",
profile->nChannels, profile->nSampleRate);
return OMX_ErrorNone;
adjustAudioParams();
- ALOGV("set OMX_IndexParamAudioApe, nChannels:%lu, "
- "nSampleRate:%lu, nBitsPerSample:%lu",
+ ALOGV("set OMX_IndexParamAudioApe, nChannels:%u, "
+ "nSampleRate:%u, nBitsPerSample:%u",
profile->nChannels, profile->nSamplingRate,
profile->nBitsPerSample);
adjustAudioParams();
- ALOGV("set OMX_IndexParamAudioDts, nChannels:%lu, nSampleRate:%lu",
+ ALOGV("set OMX_IndexParamAudioDts, nChannels:%u, nSampleRate:%u",
profile->nChannels, profile->nSamplingRate);
return OMX_ErrorNone;
adjustAudioParams();
ALOGD("set OMX_IndexParamAudioFFmpeg, "
- "eCodecId:%ld(%s), nChannels:%lu, nBitRate:%lu, "
- "nBitsPerSample:%lu, nSampleRate:%lu, "
- "nBlockAlign:%lu, eSampleFormat:%lu(%s)",
+ "eCodecId:%d(%s), nChannels:%u, nBitRate:%u, "
+ "nBitsPerSample:%u, nSampleRate:%u, "
+ "nBlockAlign:%u, eSampleFormat:%u(%s)",
profile->eCodecId, avcodec_get_name(mCtx->codec_id),
profile->nChannels, profile->nBitRate,
profile->nBitsPerSample, profile->nSampleRate,
BufferInfo *inInfo = *inQueue.begin();
OMX_BUFFERHEADERTYPE *inHeader = inInfo->mHeader;
- ALOGI("got extradata, ignore: %d, size: %lu",
+ ALOGI("got extradata, ignore: %d, size: %u",
mIgnoreExtradata, inHeader->nFilledLen);
hexdump(inHeader->pBuffer + inHeader->nOffset, inHeader->nFilledLen);
if (mIgnoreExtradata) {
- ALOGI("got extradata, size: %lu, but ignore it", inHeader->nFilledLen);
+ ALOGI("got extradata, size: %u, but ignore it", inHeader->nFilledLen);
} else {
if (!mExtradataReady) {
uint32_t ret = ERR_OK;
}
void SoftFFmpegAudio::onPortFlushCompleted(OMX_U32 portIndex) {
- ALOGV("ffmpeg audio decoder flush port(%lu)", portIndex);
+ ALOGV("ffmpeg audio decoder flush port(%u)", portIndex);
if (portIndex == kInputPortIndex) {
if (mCtx && mCtx->codec) {
//Make sure that the next buffer output does not still
mCtx->height = profile->nHeight;
ALOGD("got OMX_IndexParamVideoFFmpeg, "
- "eCodecId:%ld(%s), width:%lu, height:%lu",
+ "eCodecId:%d(%s), width:%u, height:%u",
profile->eCodecId,
avcodec_get_name(mCtx->codec_id),
profile->nWidth,
BufferInfo *inInfo = *inQueue.begin();
OMX_BUFFERHEADERTYPE *inHeader = inInfo->mHeader;
- ALOGI("got extradata, ignore: %d, size: %lu",
+ ALOGI("got extradata, ignore: %d, size: %u",
mIgnoreExtradata, inHeader->nFilledLen);
hexdump(inHeader->pBuffer + inHeader->nOffset, inHeader->nFilledLen);
if (mIgnoreExtradata) {
- ALOGI("got extradata, size: %lu, but ignore it", inHeader->nFilledLen);
+ ALOGI("got extradata, size: %u, but ignore it", inHeader->nFilledLen);
} else {
if (!mExtradataReady) {
//if (mMode == MODE_H264)
0, height, pict.data, pict.linesize);
outHeader->nOffset = 0;
- outHeader->nFilledLen = (width * height * 3) / 2;
+ outHeader->nFilledLen = (outputBufferWidth() * outputBufferHeight() * 3) / 2;
outHeader->nFlags = 0;
if (mFrame->key_frame) {
outHeader->nFlags |= OMX_BUFFERFLAG_SYNCFRAME;
}
void SoftFFmpegVideo::onPortFlushCompleted(OMX_U32 portIndex) {
- ALOGV("ffmpeg video decoder flush port(%lu)", portIndex);
+ ALOGV("ffmpeg video decoder flush port(%u)", portIndex);
if (portIndex == kInputPortIndex) {
if (mCtx) {
//Make sure that the next buffer output does not still