summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/AACWriter.cpp4
-rw-r--r--media/libstagefright/ACodec.cpp10
-rw-r--r--media/libstagefright/CameraSource.cpp6
-rw-r--r--media/libstagefright/MPEG4Extractor.cpp86
-rw-r--r--media/libstagefright/OMXClient.cpp2
-rw-r--r--media/libstagefright/OMXCodec.cpp12
-rw-r--r--media/libstagefright/OggExtractor.cpp1
-rw-r--r--media/libstagefright/TimedEventQueue.cpp2
-rw-r--r--media/libstagefright/Utils.cpp10
-rw-r--r--media/libstagefright/avc_utils.cpp8
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC2.cpp2
-rw-r--r--media/libstagefright/codecs/aacenc/AACEncoder.cpp2
-rw-r--r--media/libstagefright/codecs/aacenc/basic_op/oper_32b.c9
-rw-r--r--media/libstagefright/codecs/aacenc/src/aacenc.c8
-rw-r--r--media/libstagefright/codecs/aacenc/src/aacenc_core.c1
-rw-r--r--media/libstagefright/codecs/aacenc/src/adj_thr.c2
-rw-r--r--media/libstagefright/codecs/aacenc/src/bitbuffer.c23
-rw-r--r--media/libstagefright/codecs/aacenc/src/bitenc.c2
-rw-r--r--media/libstagefright/codecs/aacenc/src/block_switch.c27
-rw-r--r--media/libstagefright/codecs/aacenc/src/ms_stereo.c1
-rw-r--r--media/libstagefright/codecs/aacenc/src/sf_estim.c2
-rw-r--r--media/libstagefright/codecs/aacenc/src/tns.c34
-rw-r--r--media/libstagefright/codecs/aacenc/src/transform.c1
-rw-r--r--media/libstagefright/codecs/amrnb/common/Android.mk2
-rw-r--r--media/libstagefright/codecs/amrnb/dec/Android.mk23
-rw-r--r--media/libstagefright/codecs/amrnb/dec/test/amrnbdec_test.cpp149
-rw-r--r--media/libstagefright/codecs/amrnb/enc/Android.mk2
-rw-r--r--media/libstagefright/codecs/amrwb/Android.mk2
-rw-r--r--media/libstagefright/codecs/amrwbenc/Android.mk3
-rw-r--r--media/libstagefright/codecs/amrwbenc/src/q_pulse.c2
-rw-r--r--media/libstagefright/codecs/amrwbenc/src/wb_vad.c2
-rw-r--r--media/libstagefright/codecs/avc/common/src/deblock.cpp2
-rw-r--r--media/libstagefright/codecs/avc/enc/Android.mk4
-rw-r--r--media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp7
-rw-r--r--media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h2
-rw-r--r--media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp2
-rw-r--r--media/libstagefright/codecs/avc/enc/src/init.cpp4
-rw-r--r--media/libstagefright/codecs/avc/enc/src/rate_control.cpp2
-rw-r--r--media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp1
-rw-r--r--media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp4
-rw-r--r--media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h2
-rw-r--r--media/libstagefright/codecs/m4v_h263/enc/Android.mk4
-rw-r--r--media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp7
-rw-r--r--media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h2
-rw-r--r--media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp2
-rw-r--r--media/libstagefright/codecs/mp3dec/Android.mk2
-rw-r--r--media/libstagefright/codecs/on2/h264dec/Android.mk2
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/inc/H264SwDecApi.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/inc/basetype.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_BitDec_s.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Bitstream.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCTTable.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCT_s.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_MaskTable.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Version.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_s.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armOMX.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes_s.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_Bitstream.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_IDCTTable.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_MaskTable.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVC.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVCCOMM_s.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC_s.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/api/armVCM4P10_CAVLCTables.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/armVCM4P10_CAVLCTables.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockChroma_I.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockLuma_I.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_InterpolateChroma.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_Huff_Tables_VLC.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Huff_Tables_VLC.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Lookup_Tables.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Zigzag_Tables.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Inter.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Intra.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/src/armVC_Version.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/DecTestBench.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/EvaluationTestBench.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/TestBenchMultipleInstance.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_cfg.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_container.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_seq_param_set.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.h0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.c0
-rw-r--r--[-rwxr-xr-x]media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.h0
-rw-r--r--media/libstagefright/http/MediaHTTP.cpp2
-rw-r--r--media/libstagefright/httplive/LiveSession.cpp5
-rw-r--r--media/libstagefright/httplive/PlaylistFetcher.cpp5
-rw-r--r--media/libstagefright/httplive/PlaylistFetcher.h2
-rw-r--r--media/libstagefright/id3/ID3.cpp2
-rw-r--r--media/libstagefright/include/AACEncoder.h2
-rw-r--r--media/libstagefright/include/ID3.h4
-rw-r--r--media/libstagefright/include/MPEG2TSExtractor.h2
-rw-r--r--media/libstagefright/include/avc_utils.h4
-rw-r--r--media/libstagefright/matroska/MatroskaExtractor.cpp11
-rw-r--r--media/libstagefright/mpeg2ts/ATSParser.h2
-rw-r--r--media/libstagefright/mpeg2ts/ESQueue.cpp17
-rw-r--r--media/libstagefright/mpeg2ts/ESQueue.h2
-rw-r--r--media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp1
-rw-r--r--media/libstagefright/omx/OMX.cpp8
-rw-r--r--media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp12
-rw-r--r--media/libstagefright/omx/tests/OMXHarness.cpp23
-rw-r--r--media/libstagefright/rtsp/AAMRAssembler.cpp4
-rw-r--r--media/libstagefright/rtsp/AMPEG2TSAssembler.h2
-rw-r--r--media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp2
-rw-r--r--media/libstagefright/rtsp/APacketSource.cpp2
-rw-r--r--media/libstagefright/rtsp/ARTPConnection.cpp5
-rw-r--r--media/libstagefright/rtsp/ARawAudioAssembler.h2
-rw-r--r--media/libstagefright/rtsp/SDPLoader.cpp2
-rw-r--r--media/libstagefright/tests/Android.mk28
-rw-r--r--media/libstagefright/timedtext/TimedTextDriver.cpp4
-rw-r--r--media/libstagefright/timedtext/TimedTextPlayer.h2
-rw-r--r--media/libstagefright/timedtext/TimedTextSRTSource.h2
-rw-r--r--media/libstagefright/webm/WebmWriter.cpp1
-rw-r--r--media/libstagefright/wifi-display/source/WifiDisplaySource.cpp4
167 files changed, 325 insertions, 328 deletions
diff --git a/media/libstagefright/AACWriter.cpp b/media/libstagefright/AACWriter.cpp
index 353920e..74f22cf 100644
--- a/media/libstagefright/AACWriter.cpp
+++ b/media/libstagefright/AACWriter.cpp
@@ -79,10 +79,6 @@ status_t AACWriter::initCheck() const {
return mInitCheck;
}
-static int writeInt8(int fd, uint8_t x) {
- return ::write(fd, &x, 1);
-}
-
status_t AACWriter::addSource(const sp<MediaSource> &source) {
if (mInitCheck != OK) {
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 1413635..7dfd8d6 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -922,7 +922,6 @@ status_t ACodec::cancelBufferToNativeWindow(BufferInfo *info) {
ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() {
ANativeWindowBuffer *buf;
- int fenceFd = -1;
CHECK(mNativeWindow.get() != NULL);
if (mTunneled) {
@@ -3024,7 +3023,6 @@ bool ACodec::allYourBuffersAreBelongToUs() {
}
void ACodec::deferMessage(const sp<AMessage> &msg) {
- bool wasEmptyBefore = mDeferredQueue.empty();
mDeferredQueue.push_back(msg);
}
@@ -3659,7 +3657,6 @@ status_t ACodec::pushBlankBuffersToNativeWindow() {
// on the screen and then been replaced, so an previous video frames are
// guaranteed NOT to be currently displayed.
for (int i = 0; i < numBufs + 1; i++) {
- int fenceFd = -1;
err = native_window_dequeue_buffer_and_wait(mNativeWindow.get(), &anb);
if (err != NO_ERROR) {
ALOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)",
@@ -4437,7 +4434,7 @@ void ACodec::UninitializedState::stateEntered() {
ALOGV("Now uninitialized");
if (mDeathNotifier != NULL) {
- mCodec->mOMX->asBinder()->unlinkToDeath(mDeathNotifier);
+ IInterface::asBinder(mCodec->mOMX)->unlinkToDeath(mDeathNotifier);
mDeathNotifier.clear();
}
@@ -4530,7 +4527,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
sp<AMessage> notify = new AMessage(kWhatOMXDied, mCodec->id());
mDeathNotifier = new DeathNotifier(notify);
- if (omx->asBinder()->linkToDeath(mDeathNotifier) != OK) {
+ if (IInterface::asBinder(omx)->linkToDeath(mDeathNotifier) != OK) {
// This was a local binder, if it dies so do we, we won't care
// about any notifications in the afterlife.
mDeathNotifier.clear();
@@ -4575,7 +4572,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
componentName = matchingCodecs.itemAt(matchIndex).mName.string();
quirks = matchingCodecs.itemAt(matchIndex).mQuirks;
- pid_t tid = androidGetTid();
+ pid_t tid = gettid();
int prevPriority = androidGetThreadPriority(tid);
androidSetThreadPriority(tid, ANDROID_PRIORITY_FOREGROUND);
status_t err = omx->allocateNode(componentName.c_str(), observer, &node);
@@ -5374,6 +5371,7 @@ bool ACodec::OutputPortSettingsChangedState::onMessageReceived(
case kWhatFlush:
case kWhatShutdown:
case kWhatResume:
+ case kWhatSetParameters:
{
if (msg->what() == kWhatResume) {
ALOGV("[%s] Deferring resume", mCodec->mComponentName.c_str());
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index c3a940a..ad12bdd 100644
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -219,7 +219,7 @@ status_t CameraSource::isCameraAvailable(
mCameraFlags |= FLAGS_HOT_CAMERA;
mDeathNotifier = new DeathNotifier();
// isBinderAlive needs linkToDeath to work.
- mCameraRecordingProxy->asBinder()->linkToDeath(mDeathNotifier);
+ IInterface::asBinder(mCameraRecordingProxy)->linkToDeath(mDeathNotifier);
}
mCamera->lock();
@@ -702,7 +702,7 @@ void CameraSource::releaseCamera() {
{
Mutex::Autolock autoLock(mLock);
if (mCameraRecordingProxy != 0) {
- mCameraRecordingProxy->asBinder()->unlinkToDeath(mDeathNotifier);
+ IInterface::asBinder(mCameraRecordingProxy)->unlinkToDeath(mDeathNotifier);
mCameraRecordingProxy.clear();
}
mCameraFlags = 0;
@@ -825,7 +825,7 @@ status_t CameraSource::read(
mFrameAvailableCondition.waitRelative(mLock,
mTimeBetweenFrameCaptureUs * 1000LL + CAMERA_SOURCE_TIMEOUT_NS)) {
if (mCameraRecordingProxy != 0 &&
- !mCameraRecordingProxy->asBinder()->isBinderAlive()) {
+ !IInterface::asBinder(mCameraRecordingProxy)->isBinderAlive()) {
ALOGW("camera recording proxy is gone");
return ERROR_END_OF_STREAM;
}
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index d922dc0..94a2e37 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -265,6 +265,8 @@ status_t MPEG4DataSource::setCachedRange(off64_t offset, size_t size) {
////////////////////////////////////////////////////////////////////////////////
+static const bool kUseHexDump = false;
+
static void hexdump(const void *_data, size_t size) {
const uint8_t *data = (const uint8_t *)_data;
size_t offset = 0;
@@ -607,7 +609,6 @@ status_t MPEG4Extractor::parseDrmSINF(
if (size < 0) {
return ERROR_IO;
}
- int32_t classSize = size;
data_offset += numOfBytes;
while(size >= 11 ) {
@@ -668,7 +669,6 @@ status_t MPEG4Extractor::parseDrmSINF(
if (size < 0) {
return ERROR_IO;
}
- classSize = size;
data_offset += numOfBytes;
while (size > 0) {
@@ -806,23 +806,23 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
MakeFourCCString(chunk_type, chunk);
ALOGV("chunk: %s @ %lld, %d", chunk, *offset, depth);
-#if 0
- static const char kWhitespace[] = " ";
- const char *indent = &kWhitespace[sizeof(kWhitespace) - 1 - 2 * depth];
- printf("%sfound chunk '%s' of size %" PRIu64 "\n", indent, chunk, chunk_size);
+ if (kUseHexDump) {
+ static const char kWhitespace[] = " ";
+ const char *indent = &kWhitespace[sizeof(kWhitespace) - 1 - 2 * depth];
+ printf("%sfound chunk '%s' of size %" PRIu64 "\n", indent, chunk, chunk_size);
- char buffer[256];
- size_t n = chunk_size;
- if (n > sizeof(buffer)) {
- n = sizeof(buffer);
- }
- if (mDataSource->readAt(*offset, buffer, n)
- < (ssize_t)n) {
- return ERROR_IO;
- }
+ char buffer[256];
+ size_t n = chunk_size;
+ if (n > sizeof(buffer)) {
+ n = sizeof(buffer);
+ }
+ if (mDataSource->readAt(*offset, buffer, n)
+ < (ssize_t)n) {
+ return ERROR_IO;
+ }
- hexdump(buffer, n);
-#endif
+ hexdump(buffer, n);
+ }
PathAdder autoAdder(&mPath, chunk_type);
@@ -1298,7 +1298,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
return ERROR_IO;
}
- uint16_t data_ref_index = U16_AT(&buffer[6]);
+ uint16_t data_ref_index __unused = U16_AT(&buffer[6]);
uint32_t num_channels = U16_AT(&buffer[16]);
uint16_t sample_size = U16_AT(&buffer[18]);
@@ -1351,7 +1351,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
return ERROR_IO;
}
- uint16_t data_ref_index = U16_AT(&buffer[6]);
+ uint16_t data_ref_index __unused = U16_AT(&buffer[6]);
uint16_t width = U16_AT(&buffer[6 + 18]);
uint16_t height = U16_AT(&buffer[6 + 20]);
@@ -1867,7 +1867,6 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
if (chunk_data_size < 24) {
return ERROR_IO;
}
- uint32_t duration;
Trex trex;
if (!mDataSource->getUInt32(data_offset + 4, &trex.track_ID) ||
!mDataSource->getUInt32(data_offset + 8, &trex.default_sample_description_index) ||
@@ -2139,7 +2138,7 @@ status_t MPEG4Extractor::parseTrackHeader(
return ERROR_IO;
}
- uint64_t ctime, mtime, duration;
+ uint64_t ctime __unused, mtime __unused, duration __unused;
int32_t id;
if (version == 1) {
@@ -2161,12 +2160,13 @@ status_t MPEG4Extractor::parseTrackHeader(
size_t matrixOffset = dynSize + 16;
int32_t a00 = U32_AT(&buffer[matrixOffset]);
int32_t a01 = U32_AT(&buffer[matrixOffset + 4]);
- int32_t dx = U32_AT(&buffer[matrixOffset + 8]);
int32_t a10 = U32_AT(&buffer[matrixOffset + 12]);
int32_t a11 = U32_AT(&buffer[matrixOffset + 16]);
- int32_t dy = U32_AT(&buffer[matrixOffset + 20]);
#if 0
+ int32_t dx = U32_AT(&buffer[matrixOffset + 8]);
+ int32_t dy = U32_AT(&buffer[matrixOffset + 20]);
+
ALOGI("x' = %.2f * x + %.2f * y + %.2f",
a00 / 65536.0f, a01 / 65536.0f, dx / 65536.0f);
ALOGI("y' = %.2f * x + %.2f * y + %.2f",
@@ -2718,10 +2718,10 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
return ERROR_MALFORMED;
}
-#if 0
- printf("ESD of size %d\n", csd_size);
- hexdump(csd, csd_size);
-#endif
+ if (kUseHexDump) {
+ printf("ESD of size %d\n", csd_size);
+ hexdump(csd, csd_size);
+ }
if (csd_size == 0) {
// There's no further information, i.e. no codec specific data
@@ -2772,7 +2772,7 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
if (objectType == AOT_SBR || objectType == AOT_PS) {//SBR specific config per 14496-3 table 1.13
uint32_t extFreqIndex = br.getBits(4);
- int32_t extSampleRate;
+ int32_t extSampleRate __unused;
if (extFreqIndex == 15) {
if (csd_size < 8) {
return ERROR_MALFORMED;
@@ -2822,12 +2822,12 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
if (objectType == AOT_AAC_LC || objectType == AOT_ER_AAC_LC ||
objectType == AOT_ER_AAC_LD || objectType == AOT_ER_AAC_SCAL ||
objectType == AOT_ER_BSAC) {
- const int32_t frameLengthFlag = br.getBits(1);
+ const int32_t frameLengthFlag __unused = br.getBits(1);
const int32_t dependsOnCoreCoder = br.getBits(1);
if (dependsOnCoreCoder ) {
- const int32_t coreCoderDelay = br.getBits(14);
+ const int32_t coreCoderDelay __unused = br.getBits(14);
}
int32_t extensionFlag = -1;
@@ -2856,54 +2856,54 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
if (numChannels == 0) {
int32_t channelsEffectiveNum = 0;
int32_t channelsNum = 0;
- const int32_t ElementInstanceTag = br.getBits(4);
- const int32_t Profile = br.getBits(2);
- const int32_t SamplingFrequencyIndex = br.getBits(4);
+ const int32_t ElementInstanceTag __unused = br.getBits(4);
+ const int32_t Profile __unused = br.getBits(2);
+ const int32_t SamplingFrequencyIndex __unused = br.getBits(4);
const int32_t NumFrontChannelElements = br.getBits(4);
const int32_t NumSideChannelElements = br.getBits(4);
const int32_t NumBackChannelElements = br.getBits(4);
const int32_t NumLfeChannelElements = br.getBits(2);
- const int32_t NumAssocDataElements = br.getBits(3);
- const int32_t NumValidCcElements = br.getBits(4);
+ const int32_t NumAssocDataElements __unused = br.getBits(3);
+ const int32_t NumValidCcElements __unused = br.getBits(4);
const int32_t MonoMixdownPresent = br.getBits(1);
if (MonoMixdownPresent != 0) {
- const int32_t MonoMixdownElementNumber = br.getBits(4);
+ const int32_t MonoMixdownElementNumber __unused = br.getBits(4);
}
const int32_t StereoMixdownPresent = br.getBits(1);
if (StereoMixdownPresent != 0) {
- const int32_t StereoMixdownElementNumber = br.getBits(4);
+ const int32_t StereoMixdownElementNumber __unused = br.getBits(4);
}
const int32_t MatrixMixdownIndexPresent = br.getBits(1);
if (MatrixMixdownIndexPresent != 0) {
- const int32_t MatrixMixdownIndex = br.getBits(2);
- const int32_t PseudoSurroundEnable = br.getBits(1);
+ const int32_t MatrixMixdownIndex __unused = br.getBits(2);
+ const int32_t PseudoSurroundEnable __unused = br.getBits(1);
}
int i;
for (i=0; i < NumFrontChannelElements; i++) {
const int32_t FrontElementIsCpe = br.getBits(1);
- const int32_t FrontElementTagSelect = br.getBits(4);
+ const int32_t FrontElementTagSelect __unused = br.getBits(4);
channelsNum += FrontElementIsCpe ? 2 : 1;
}
for (i=0; i < NumSideChannelElements; i++) {
const int32_t SideElementIsCpe = br.getBits(1);
- const int32_t SideElementTagSelect = br.getBits(4);
+ const int32_t SideElementTagSelect __unused = br.getBits(4);
channelsNum += SideElementIsCpe ? 2 : 1;
}
for (i=0; i < NumBackChannelElements; i++) {
const int32_t BackElementIsCpe = br.getBits(1);
- const int32_t BackElementTagSelect = br.getBits(4);
+ const int32_t BackElementTagSelect __unused = br.getBits(4);
channelsNum += BackElementIsCpe ? 2 : 1;
}
channelsEffectiveNum = channelsNum;
for (i=0; i < NumLfeChannelElements; i++) {
- const int32_t LfeElementTagSelect = br.getBits(4);
+ const int32_t LfeElementTagSelect __unused = br.getBits(4);
channelsNum += 1;
}
ALOGV("mpeg4 audio channelsNum = %d", channelsNum);
diff --git a/media/libstagefright/OMXClient.cpp b/media/libstagefright/OMXClient.cpp
index ca031aa..230c1f7 100644
--- a/media/libstagefright/OMXClient.cpp
+++ b/media/libstagefright/OMXClient.cpp
@@ -37,7 +37,7 @@ struct MuxOMX : public IOMX {
MuxOMX(const sp<IOMX> &remoteOMX);
virtual ~MuxOMX();
- virtual IBinder *onAsBinder() { return mRemoteOMX->asBinder().get(); }
+ virtual IBinder *onAsBinder() { return IInterface::asBinder(mRemoteOMX).get(); }
virtual bool livesLocally(node_id node, pid_t pid);
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index f26563e..69f4989 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -101,10 +101,10 @@ static sp<MediaSource> InstantiateSoftwareEncoder(
#undef FACTORY_CREATE_ENCODER
#undef FACTORY_REF
-#define CODEC_LOGI(x, ...) ALOGI("[%s] "x, mComponentName, ##__VA_ARGS__)
-#define CODEC_LOGV(x, ...) ALOGV("[%s] "x, mComponentName, ##__VA_ARGS__)
-#define CODEC_LOGW(x, ...) ALOGW("[%s] "x, mComponentName, ##__VA_ARGS__)
-#define CODEC_LOGE(x, ...) ALOGE("[%s] "x, mComponentName, ##__VA_ARGS__)
+#define CODEC_LOGI(x, ...) ALOGI("[%s] " x, mComponentName, ##__VA_ARGS__)
+#define CODEC_LOGV(x, ...) ALOGV("[%s] " x, mComponentName, ##__VA_ARGS__)
+#define CODEC_LOGW(x, ...) ALOGW("[%s] " x, mComponentName, ##__VA_ARGS__)
+#define CODEC_LOGE(x, ...) ALOGE("[%s] " x, mComponentName, ##__VA_ARGS__)
struct OMXCodecObserver : public BnOMXObserver {
OMXCodecObserver() {
@@ -451,7 +451,7 @@ status_t OMXCodec::parseAVCCodecSpecificData(
// assertion, let's be lenient for now...
// CHECK((ptr[4] >> 2) == 0x3f); // reserved
- size_t lengthSize = 1 + (ptr[4] & 3);
+ size_t lengthSize __unused = 1 + (ptr[4] & 3);
// commented out check below as H264_QVGA_500_NO_AUDIO.3gp
// violates it...
@@ -2006,7 +2006,6 @@ status_t OMXCodec::cancelBufferToNativeWindow(BufferInfo *info) {
OMXCodec::BufferInfo* OMXCodec::dequeueBufferFromNativeWindow() {
// Dequeue the next buffer from the native window.
ANativeWindowBuffer* buf;
- int fenceFd = -1;
int err = native_window_dequeue_buffer_and_wait(mNativeWindow.get(), &buf);
if (err != 0) {
CODEC_LOGE("dequeueBuffer failed w/ error 0x%08x", err);
@@ -2111,7 +2110,6 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
// on the screen and then been replaced, so an previous video frames are
// guaranteed NOT to be currently displayed.
for (int i = 0; i < numBufs + 1; i++) {
- int fenceFd = -1;
err = native_window_dequeue_buffer_and_wait(mNativeWindow.get(), &anb);
if (err != NO_ERROR) {
ALOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)",
diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp
index 6219053..bd28583 100644
--- a/media/libstagefright/OggExtractor.cpp
+++ b/media/libstagefright/OggExtractor.cpp
@@ -851,6 +851,7 @@ void parseVorbisComment(
{ "TRACKNUMBER", kKeyCDTrackNumber },
{ "DISCNUMBER", kKeyDiscNumber },
{ "DATE", kKeyDate },
+ { "YEAR", kKeyYear },
{ "LYRICIST", kKeyWriter },
{ "METADATA_BLOCK_PICTURE", kKeyAlbumArt },
{ "ANDROID_LOOP", kKeyAutoLoop },
diff --git a/media/libstagefright/TimedEventQueue.cpp b/media/libstagefright/TimedEventQueue.cpp
index 1fdb244..7d15220 100644
--- a/media/libstagefright/TimedEventQueue.cpp
+++ b/media/libstagefright/TimedEventQueue.cpp
@@ -52,7 +52,7 @@ TimedEventQueue::TimedEventQueue()
TimedEventQueue::~TimedEventQueue() {
stop();
if (mPowerManager != 0) {
- sp<IBinder> binder = mPowerManager->asBinder();
+ sp<IBinder> binder = IInterface::asBinder(mPowerManager);
binder->unlinkToDeath(mDeathRecipient);
}
}
diff --git a/media/libstagefright/Utils.cpp b/media/libstagefright/Utils.cpp
index 25afc5b..b3a79a0 100644
--- a/media/libstagefright/Utils.cpp
+++ b/media/libstagefright/Utils.cpp
@@ -181,14 +181,14 @@ status_t convertMetaDataToMessage(
CHECK(size >= 7);
CHECK_EQ((unsigned)ptr[0], 1u); // configurationVersion == 1
- uint8_t profile = ptr[1];
- uint8_t level = ptr[3];
+ uint8_t profile __unused = ptr[1];
+ uint8_t level __unused = ptr[3];
// There is decodable content out there that fails the following
// assertion, let's be lenient for now...
// CHECK((ptr[4] >> 2) == 0x3f); // reserved
- size_t lengthSize = 1 + (ptr[4] & 3);
+ size_t lengthSize __unused = 1 + (ptr[4] & 3);
// commented out check below as H264_QVGA_500_NO_AUDIO.3gp
// violates it...
@@ -257,8 +257,8 @@ status_t convertMetaDataToMessage(
CHECK(size >= 7);
CHECK_EQ((unsigned)ptr[0], 1u); // configurationVersion == 1
- uint8_t profile = ptr[1] & 31;
- uint8_t level = ptr[12];
+ uint8_t profile __unused = ptr[1] & 31;
+ uint8_t level __unused = ptr[12];
ptr += 22;
size -= 22;
diff --git a/media/libstagefright/avc_utils.cpp b/media/libstagefright/avc_utils.cpp
index cbdb816..5ec3438 100644
--- a/media/libstagefright/avc_utils.cpp
+++ b/media/libstagefright/avc_utils.cpp
@@ -505,8 +505,8 @@ bool ExtractDimensionsFromVOLHeader(
CHECK_NE(video_object_type_indication,
0x21u /* Fine Granularity Scalable */);
- unsigned video_object_layer_verid;
- unsigned video_object_layer_priority;
+ unsigned video_object_layer_verid __unused;
+ unsigned video_object_layer_priority __unused;
if (br.getBits(1)) {
video_object_layer_verid = br.getBits(4);
video_object_layer_priority = br.getBits(3);
@@ -568,7 +568,7 @@ bool ExtractDimensionsFromVOLHeader(
unsigned video_object_layer_height = br.getBits(13);
CHECK(br.getBits(1)); // marker_bit
- unsigned interlaced = br.getBits(1);
+ unsigned interlaced __unused = br.getBits(1);
*width = video_object_layer_width;
*height = video_object_layer_height;
@@ -614,7 +614,7 @@ bool GetMPEGAudioFrameSize(
return false;
}
- unsigned protection = (header >> 16) & 1;
+ unsigned protection __unused = (header >> 16) & 1;
unsigned bitrate_index = (header >> 12) & 0x0f;
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
index 351ba1e..0546871 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
+++ b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
@@ -993,8 +993,6 @@ void SoftAAC2::onPortFlushCompleted(OMX_U32 portIndex) {
}
void SoftAAC2::drainDecoder() {
- int32_t outputDelay = mStreamInfo->outputDelay * mStreamInfo->numChannels;
-
// flush decoder until outputDelay is compensated
while (mOutputDelayCompensated > 0) {
// a buffer big enough for MAX_CHANNEL_COUNT channels of decoded HE-AAC
diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
index 8b5007e..bebb9dc 100644
--- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp
+++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
@@ -214,8 +214,6 @@ sp<MetaData> AACEncoder::getFormat() {
status_t AACEncoder::read(
MediaBuffer **out, const ReadOptions *options) {
- status_t err;
-
*out = NULL;
int64_t seekTimeUs;
diff --git a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c
index 1d029fc..d1fe833 100644
--- a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c
+++ b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c
@@ -351,12 +351,11 @@ Word32 pow2_xy(Word32 x, Word32 y)
UWord32 iPart;
UWord32 fPart;
Word32 res;
- Word32 tmp, tmp2;
- Word32 shift, shift2;
+ Word32 tmp;
- tmp2 = -x;
- iPart = tmp2 / y;
- fPart = tmp2 - iPart*y;
+ tmp = -x;
+ iPart = tmp / y;
+ fPart = tmp - iPart*y;
iPart = min(iPart,INT_BITS-1);
res = pow2Table[(POW2_TABLE_SIZE*fPart)/y] >> iPart;
diff --git a/media/libstagefright/codecs/aacenc/src/aacenc.c b/media/libstagefright/codecs/aacenc/src/aacenc.c
index 40db92c..df17787 100644
--- a/media/libstagefright/codecs/aacenc/src/aacenc.c
+++ b/media/libstagefright/codecs/aacenc/src/aacenc.c
@@ -39,18 +39,20 @@
VO_U32 VO_API voAACEncInit(VO_HANDLE * phCodec,VO_AUDIO_CODINGTYPE vType, VO_CODEC_INIT_USERDATA *pUserData)
{
AAC_ENCODER*hAacEnc;
- AACENC_CONFIG config;
int error;
#ifdef USE_DEAULT_MEM
VO_MEM_OPERATOR voMemoprator;
#endif
VO_MEM_OPERATOR *pMemOP;
+
+#ifdef USE_DEAULT_MEM
int interMem;
+ interMem = 0;
+#endif
UNUSED(vType);
- interMem = 0;
error = 0;
/* init the memory operator */
@@ -214,7 +216,7 @@ VO_U32 VO_API voAACEncGetOutputData(VO_HANDLE hCodec, VO_CODECBUFFER * pOutput,
AAC_ENCODER* hAacEnc = (AAC_ENCODER*)hCodec;
Word16 numAncDataBytes=0;
Word32 inbuflen;
- int ret, length;
+ int length;
if(NULL == hAacEnc)
return VO_ERR_INVALID_ARG;
diff --git a/media/libstagefright/codecs/aacenc/src/aacenc_core.c b/media/libstagefright/codecs/aacenc/src/aacenc_core.c
index cecbc8f..de452d4 100644
--- a/media/libstagefright/codecs/aacenc/src/aacenc_core.c
+++ b/media/libstagefright/codecs/aacenc/src/aacenc_core.c
@@ -58,7 +58,6 @@ Word16 AacEncOpen( AAC_ENCODER* hAacEnc, /* pointer to an encoder
const AACENC_CONFIG config /* pre-initialized config struct */
)
{
- Word32 i;
Word32 error = 0;
Word16 profile = 1;
diff --git a/media/libstagefright/codecs/aacenc/src/adj_thr.c b/media/libstagefright/codecs/aacenc/src/adj_thr.c
index 471631c..8b8be0e 100644
--- a/media/libstagefright/codecs/aacenc/src/adj_thr.c
+++ b/media/libstagefright/codecs/aacenc/src/adj_thr.c
@@ -96,7 +96,7 @@ static void adaptMinSnr(PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS],
MINSNR_ADAPT_PARAM *msaParam,
const Word16 nChannels)
{
- Word16 ch, sfb, sfbOffs, shift;
+ Word16 ch, sfb, sfbOffs;
Word32 nSfb, avgEn;
Word16 log_avgEn = 0;
Word32 startRatio_x_avgEn = 0;
diff --git a/media/libstagefright/codecs/aacenc/src/bitbuffer.c b/media/libstagefright/codecs/aacenc/src/bitbuffer.c
index 0ce93d3..15eebd0 100644
--- a/media/libstagefright/codecs/aacenc/src/bitbuffer.c
+++ b/media/libstagefright/codecs/aacenc/src/bitbuffer.c
@@ -24,29 +24,6 @@
/*****************************************************************************
*
-* function name: updateBitBufWordPtr
-* description: update Bit Buffer pointer
-*
-*****************************************************************************/
-static void updateBitBufWordPtr(HANDLE_BIT_BUF hBitBuf,
- UWord8 **pBitBufWord,
- Word16 cnt)
-{
- *pBitBufWord += cnt;
-
-
- if(*pBitBufWord > hBitBuf->pBitBufEnd) {
- *pBitBufWord -= (hBitBuf->pBitBufEnd - hBitBuf->pBitBufBase + 1);
- }
-
- if(*pBitBufWord < hBitBuf->pBitBufBase) {
- *pBitBufWord += (hBitBuf->pBitBufEnd - hBitBuf->pBitBufBase + 1);
- }
-}
-
-
-/*****************************************************************************
-*
* function name: CreateBitBuffer
* description: create and init Bit Buffer Management
*
diff --git a/media/libstagefright/codecs/aacenc/src/bitenc.c b/media/libstagefright/codecs/aacenc/src/bitenc.c
index d1fd647..9c81204 100644
--- a/media/libstagefright/codecs/aacenc/src/bitenc.c
+++ b/media/libstagefright/codecs/aacenc/src/bitenc.c
@@ -547,7 +547,7 @@ static void writeFillElement( const UWord8 *ancBytes,
totFillBits = totFillBits - (3+4);
- if ((cnt == (1<<4)-1)) {
+ if (cnt == (1<<4)-1) {
esc_count = min( ((totFillBits >> 3) - ((1<<4)-1)), (1<<8)-1);
WriteBits(hBitStream,esc_count,8);
diff --git a/media/libstagefright/codecs/aacenc/src/block_switch.c b/media/libstagefright/codecs/aacenc/src/block_switch.c
index c80538f..2878ad3 100644
--- a/media/libstagefright/codecs/aacenc/src/block_switch.c
+++ b/media/libstagefright/codecs/aacenc/src/block_switch.c
@@ -30,9 +30,6 @@
#define ENERGY_SHIFT (8 - 1)
/**************** internal function prototypes ***********/
-static Word16
-IIRFilter(const Word16 in, const Word32 coeff[], Word32 states[]);
-
static Word32
SrchMaxWithIndex(const Word32 *in, Word16 *index, Word16 n);
@@ -329,30 +326,6 @@ Word32 CalcWindowEnergy(BLOCK_SWITCHING_CONTROL *blockSwitchingControl,
}
#endif
-/*****************************************************************************
-*
-* function name: IIRFilter
-* description: calculate the iir-filter for an array
-* returns: the result after iir-filter
-*
-**********************************************************************************/
-static Word16 IIRFilter(const Word16 in, const Word32 coeff[], Word32 states[])
-{
- Word32 accu1, accu2, accu3;
- Word32 out;
-
- accu1 = L_mpy_ls(coeff[1], in);
- accu3 = accu1 - states[0];
- accu2 = fixmul( coeff[0], states[1] );
- out = accu3 - accu2;
-
- states[0] = accu1;
- states[1] = out;
-
- return round16(out);
-}
-
-
static Word16 synchronizedBlockTypeTable[4][4] = {
/* LONG_WINDOW START_WINDOW SHORT_WINDOW STOP_WINDOW */
/* LONG_WINDOW */{LONG_WINDOW, START_WINDOW, SHORT_WINDOW, STOP_WINDOW},
diff --git a/media/libstagefright/codecs/aacenc/src/ms_stereo.c b/media/libstagefright/codecs/aacenc/src/ms_stereo.c
index 2e34f14..1e4b227 100644
--- a/media/libstagefright/codecs/aacenc/src/ms_stereo.c
+++ b/media/libstagefright/codecs/aacenc/src/ms_stereo.c
@@ -50,7 +50,6 @@ void MsStereoProcessing(Word32 *sfbEnergyLeft,
const Word16 sfbPerGroup,
const Word16 maxSfbPerGroup,
const Word16 *sfbOffset) {
- Word32 temp;
Word32 sfb,sfboffs, j;
Word32 msMaskTrueSomewhere = 0;
Word32 msMaskFalseSomewhere = 0;
diff --git a/media/libstagefright/codecs/aacenc/src/sf_estim.c b/media/libstagefright/codecs/aacenc/src/sf_estim.c
index bc320ec..78947e1 100644
--- a/media/libstagefright/codecs/aacenc/src/sf_estim.c
+++ b/media/libstagefright/codecs/aacenc/src/sf_estim.c
@@ -99,7 +99,7 @@ CalcFormFactorChannel(Word16 *logSfbFormFactor,
{
Word32 sfbw, sfbw1;
Word32 i, j;
- Word32 sfbOffs, sfb, shift;
+ Word32 sfbOffs, sfb;
sfbw = sfbw1 = 0;
for (sfbOffs=0; sfbOffs<psyOutChan->sfbCnt; sfbOffs+=psyOutChan->sfbPerGroup){
diff --git a/media/libstagefright/codecs/aacenc/src/tns.c b/media/libstagefright/codecs/aacenc/src/tns.c
index 5172612..27c3971 100644
--- a/media/libstagefright/codecs/aacenc/src/tns.c
+++ b/media/libstagefright/codecs/aacenc/src/tns.c
@@ -140,7 +140,7 @@ Word16 InitTnsConfigurationLong(Word32 bitRate, /*!< bitrate */
Word16 active) /*!< tns active flag */
{
- Word32 bitratePerChannel;
+ Word32 bitratePerChannel __unused;
tC->maxOrder = TNS_MAX_ORDER;
tC->tnsStartFreq = 1275;
tC->coefRes = 4;
@@ -206,7 +206,7 @@ Word16 InitTnsConfigurationShort(Word32 bitRate, /*!< bitrate */
PSY_CONFIGURATION_SHORT *pC, /*!< psy config struct */
Word16 active) /*!< tns active flag */
{
- Word32 bitratePerChannel;
+ Word32 bitratePerChannel __unused;
tC->maxOrder = TNS_MAX_ORDER_SHORT;
tC->tnsStartFreq = 2750;
tC->coefRes = 3;
@@ -497,36 +497,6 @@ Word16 TnsEncode(TNS_INFO* tnsInfo, /*!< tns info structure (modified) */
/*****************************************************************************
*
-* function name: m_pow2_cordic
-* description: Iterative power function
-*
-* Calculates pow(2.0,x-1.0*(scale+1)) with INT_BITS bit precision
-* using modified cordic algorithm
-* returns: the result of pow2
-*
-*****************************************************************************/
-static Word32 m_pow2_cordic(Word32 x, Word16 scale)
-{
- Word32 k;
-
- Word32 accu_y = 0x40000000;
- accu_y = L_shr(accu_y,scale);
-
- for(k=1; k<INT_BITS; k++) {
- const Word32 z = m_log2_table[k];
-
- while(L_sub(x,z) >= 0) {
-
- x = L_sub(x, z);
- accu_y = L_add(accu_y, (accu_y >> k));
- }
- }
- return(accu_y);
-}
-
-
-/*****************************************************************************
-*
* function name: CalcWeightedSpectrum
* description: Calculate weighted spectrum for LPC calculation
*
diff --git a/media/libstagefright/codecs/aacenc/src/transform.c b/media/libstagefright/codecs/aacenc/src/transform.c
index a02336f..0080810 100644
--- a/media/libstagefright/codecs/aacenc/src/transform.c
+++ b/media/libstagefright/codecs/aacenc/src/transform.c
@@ -475,7 +475,6 @@ void Transform_Real(Word16 *mdctDelayBuffer,
Word32 *winPtr;
Word32 delayBufferSf,timeSignalSf,minSf;
- Word32 headRoom=0;
switch(blockType){
diff --git a/media/libstagefright/codecs/amrnb/common/Android.mk b/media/libstagefright/codecs/amrnb/common/Android.mk
index a2b3c8f..5e632a6 100644
--- a/media/libstagefright/codecs/amrnb/common/Android.mk
+++ b/media/libstagefright/codecs/amrnb/common/Android.mk
@@ -67,7 +67,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include
LOCAL_CFLAGS := \
- -DOSCL_UNUSED_ARG= -DOSCL_IMPORT_REF= -DOSCL_EXPORT_REF=
+ -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_IMPORT_REF= -DOSCL_EXPORT_REF=
LOCAL_CFLAGS += -Werror
diff --git a/media/libstagefright/codecs/amrnb/dec/Android.mk b/media/libstagefright/codecs/amrnb/dec/Android.mk
index b067456..3750e2e 100644
--- a/media/libstagefright/codecs/amrnb/dec/Android.mk
+++ b/media/libstagefright/codecs/amrnb/dec/Android.mk
@@ -45,7 +45,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../common/include
LOCAL_CFLAGS := \
- -DOSCL_UNUSED_ARG= -DOSCL_IMPORT_REF=
+ -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_IMPORT_REF=
LOCAL_CFLAGS += -Werror
@@ -83,3 +83,24 @@ LOCAL_MODULE := libstagefright_soft_amrdec
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
+
+################################################################################
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := \
+ test/amrnbdec_test.cpp
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/src \
+ $(LOCAL_PATH)/../common/include \
+ $(call include-path-for, audio-utils)
+
+LOCAL_STATIC_LIBRARIES := \
+ libstagefright_amrnbdec libsndfile
+
+LOCAL_SHARED_LIBRARIES := \
+ libstagefright_amrnb_common libaudioutils
+
+LOCAL_MODULE := libstagefright_amrnbdec_test
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_EXECUTABLE)
diff --git a/media/libstagefright/codecs/amrnb/dec/test/amrnbdec_test.cpp b/media/libstagefright/codecs/amrnb/dec/test/amrnbdec_test.cpp
new file mode 100644
index 0000000..521fe2b
--- /dev/null
+++ b/media/libstagefright/codecs/amrnb/dec/test/amrnbdec_test.cpp
@@ -0,0 +1,149 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <assert.h>
+
+#include "gsmamr_dec.h"
+#include <audio_utils/sndfile.h>
+
+// Constants for AMR-NB
+enum {
+ kInputBufferSize = 64,
+ kSamplesPerFrame = 160,
+ kBitsPerSample = 16,
+ kOutputBufferSize = kSamplesPerFrame * kBitsPerSample/8,
+ kSampleRate = 8000,
+ kChannels = 1,
+ kFileHeaderSize = 6
+};
+const uint32_t kFrameSizes[] = {12, 13, 15, 17, 19, 20, 26, 31};
+
+
+int main(int argc, char *argv[]) {
+
+ if(argc != 3) {
+ fprintf(stderr, "Usage %s <input file> <output file>\n", argv[0]);
+ return 1;
+ }
+
+ // Open the input file
+ FILE* fpInput = fopen(argv[1], "rb");
+ if (!fpInput) {
+ fprintf(stderr, "Could not open %s\n", argv[1]);
+ return 1;
+ }
+
+ // Validate the input AMR file
+ char header[kFileHeaderSize];
+ int bytesRead = fread(header, 1, kFileHeaderSize, fpInput);
+ if (bytesRead != kFileHeaderSize || memcmp(header, "#!AMR\n", kFileHeaderSize)) {
+ fprintf(stderr, "Invalid AMR-NB file\n");
+ return 1;
+ }
+
+ // Open the output file
+ SF_INFO sfInfo;
+ memset(&sfInfo, 0, sizeof(SF_INFO));
+ sfInfo.channels = kChannels;
+ sfInfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16;
+ sfInfo.samplerate = kSampleRate;
+ SNDFILE *handle = sf_open(argv[2], SFM_WRITE, &sfInfo);
+ if(!handle){
+ fprintf(stderr, "Could not create %s\n", argv[2]);
+ return 1;
+ }
+
+ // Create AMR-NB decoder instance
+ void* amrHandle;
+ int err = GSMInitDecode(&amrHandle, (Word8*)"AMRNBDecoder");
+ if(err != 0){
+ fprintf(stderr, "Error creating AMR-NB decoder instance\n");
+ return 1;
+ }
+
+ //Allocate input buffer
+ void *inputBuf = malloc(kInputBufferSize);
+ assert(inputBuf != NULL);
+
+ //Allocate output buffer
+ void *outputBuf = malloc(kOutputBufferSize);
+ assert(outputBuf != NULL);
+
+
+ // Decode loop
+ uint32_t retVal = 0;
+ while (1) {
+ // Read mode
+ uint8_t mode;
+ bytesRead = fread(&mode, 1, 1, fpInput);
+ if (bytesRead != 1) break;
+
+ // Find frame type
+ Frame_Type_3GPP frameType = (Frame_Type_3GPP)((mode >> 3) & 0x0f);
+ if (frameType >= AMR_SID){
+ fprintf(stderr, "Frame type %d not supported\n",frameType);
+ retVal = 1;
+ break;
+ }
+
+ // Find frame type
+ int32_t frameSize = kFrameSizes[frameType];
+ bytesRead = fread(inputBuf, 1, frameSize, fpInput);
+ if (bytesRead != frameSize) break;
+
+ //Decode frame
+ int32_t decodeStatus;
+ decodeStatus = AMRDecode(amrHandle, frameType, (uint8_t*)inputBuf,
+ (int16_t*)outputBuf, MIME_IETF);
+ if(decodeStatus == -1) {
+ fprintf(stderr, "Decoder encountered error\n");
+ retVal = 1;
+ break;
+ }
+
+ //Write output to wav
+ sf_writef_short(handle, (int16_t*)outputBuf, kSamplesPerFrame);
+
+ }
+
+ // Close input and output file
+ fclose(fpInput);
+ sf_close(handle);
+
+ //Free allocated memory
+ free(inputBuf);
+ free(outputBuf);
+
+ // Close decoder instance
+ GSMDecodeFrameExit(&amrHandle);
+
+ return retVal;
+}
diff --git a/media/libstagefright/codecs/amrnb/enc/Android.mk b/media/libstagefright/codecs/amrnb/enc/Android.mk
index afc0b89..bdba8a9 100644
--- a/media/libstagefright/codecs/amrnb/enc/Android.mk
+++ b/media/libstagefright/codecs/amrnb/enc/Android.mk
@@ -67,7 +67,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../common/include
LOCAL_CFLAGS := \
- -DOSCL_UNUSED_ARG=
+ -D"OSCL_UNUSED_ARG(x)=(void)(x)"
LOCAL_CFLAGS += -Werror
diff --git a/media/libstagefright/codecs/amrwb/Android.mk b/media/libstagefright/codecs/amrwb/Android.mk
index efdf988..686f7a3 100644
--- a/media/libstagefright/codecs/amrwb/Android.mk
+++ b/media/libstagefright/codecs/amrwb/Android.mk
@@ -48,7 +48,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include
LOCAL_CFLAGS := \
- -DOSCL_UNUSED_ARG= -DOSCL_IMPORT_REF=
+ -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_IMPORT_REF=
LOCAL_CFLAGS += -Werror
diff --git a/media/libstagefright/codecs/amrwbenc/Android.mk b/media/libstagefright/codecs/amrwbenc/Android.mk
index 64fe8d1..024a292 100644
--- a/media/libstagefright/codecs/amrwbenc/Android.mk
+++ b/media/libstagefright/codecs/amrwbenc/Android.mk
@@ -86,6 +86,9 @@ LOCAL_SRC_FILES += \
endif
+# ARMV5E/Filt_6k_7k_opt.s does not compile with Clang.
+LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
+
LOCAL_MODULE := libstagefright_amrwbenc
LOCAL_ARM_MODE := arm
diff --git a/media/libstagefright/codecs/amrwbenc/src/q_pulse.c b/media/libstagefright/codecs/amrwbenc/src/q_pulse.c
index 80a0b73..d658602 100644
--- a/media/libstagefright/codecs/amrwbenc/src/q_pulse.c
+++ b/media/libstagefright/codecs/amrwbenc/src/q_pulse.c
@@ -188,7 +188,7 @@ Word32 quant_4p_4N( /* (o) return 4*N bits */
Word16 pos[], /* (i) position of the pulse 1..4 */
Word16 N) /* (i) number of bits for position */
{
- Word16 nb_pos, mask, n_1, tmp;
+ Word16 nb_pos, mask __unused, n_1, tmp;
Word16 posA[4], posB[4];
Word32 i, j, k, index;
diff --git a/media/libstagefright/codecs/amrwbenc/src/wb_vad.c b/media/libstagefright/codecs/amrwbenc/src/wb_vad.c
index 13dd2aa..2beaefd 100644
--- a/media/libstagefright/codecs/amrwbenc/src/wb_vad.c
+++ b/media/libstagefright/codecs/amrwbenc/src/wb_vad.c
@@ -404,7 +404,7 @@ static void noise_estimate_update(
alpha_down = ALPHA_DOWN1;
} else
{
- if ((st->stat_count == 0))
+ if (st->stat_count == 0)
{
alpha_up = ALPHA_UP2;
alpha_down = ALPHA_DOWN2;
diff --git a/media/libstagefright/codecs/avc/common/src/deblock.cpp b/media/libstagefright/codecs/avc/common/src/deblock.cpp
index de2d2b6..5f8b693 100644
--- a/media/libstagefright/codecs/avc/common/src/deblock.cpp
+++ b/media/libstagefright/codecs/avc/common/src/deblock.cpp
@@ -1279,7 +1279,7 @@ void EdgeLoop_Luma_vertical(uint8* SrcPtr, uint8 *Strength, int Alpha, int Beta,
int C0, c0, dif, AbsDelta, Strng, tmp, tmp1;
int L2 = 0, L1, L0, R0, R1, R2 = 0;
uint8 *ptr, *ptr1;
- register uint R_in, L_in;
+ uint R_in, L_in;
uint R_out, L_out;
diff --git a/media/libstagefright/codecs/avc/enc/Android.mk b/media/libstagefright/codecs/avc/enc/Android.mk
index 537ba42..2ceebc8 100644
--- a/media/libstagefright/codecs/avc/enc/Android.mk
+++ b/media/libstagefright/codecs/avc/enc/Android.mk
@@ -28,7 +28,7 @@ LOCAL_C_INCLUDES := \
$(TOP)/frameworks/native/include/media/openmax
LOCAL_CFLAGS := \
- -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF=
+ -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF=
LOCAL_CFLAGS += -Werror
@@ -51,7 +51,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../common
LOCAL_CFLAGS := \
- -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF=
+ -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF=
LOCAL_STATIC_LIBRARIES := \
diff --git a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp
index bb55871..cfc37b7 100644
--- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp
+++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp
@@ -794,13 +794,6 @@ void SoftAVCEncoder::onQueueFilled(OMX_U32 /* portIndex */) {
videoInput.coding_timestamp = (inHeader->nTimeStamp + 500) / 1000; // in ms
const uint8_t *inputData = NULL;
if (mStoreMetaDataInBuffers) {
- if (inHeader->nFilledLen != 8) {
- ALOGE("MetaData buffer is wrong size! "
- "(got %u bytes, expected 8)", inHeader->nFilledLen);
- mSignalledError = true;
- notify(OMX_EventError, OMX_ErrorUndefined, 0, 0);
- return;
- }
inputData =
extractGraphicBuffer(
mInputFrameData, (mVideoWidth * mVideoHeight * 3) >> 1,
diff --git a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h
index 130593f..3e6cd0a 100644
--- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h
+++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h
@@ -26,8 +26,6 @@
namespace android {
-struct MediaBuffer;
-
struct SoftAVCEncoder : public MediaBufferObserver,
public SoftVideoEncoderOMXComponent {
SoftAVCEncoder(
diff --git a/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp b/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp
index 38a2a15..16a1b08 100644
--- a/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp
+++ b/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp
@@ -152,7 +152,6 @@ void GenerateHalfPelPred(uint8* subpel_pred, uint8 *ncand, int lx)
int32 tmp32;
int16 tmp_horz[18*22], *dst_16, *src_16;
register int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; // temp register
- int msk;
int i, j;
/* first copy full-pel to the first array */
@@ -379,7 +378,6 @@ void GenerateHalfPelPred(uint8* subpel_pred, uint8 *ncand, int lx)
// one can just use the above code and change the for(i=2 to for(i=18
for (i = 16; i > 0; i -= 4)
{
- msk = 0;
for (j = 17; j > 0; j--)
{
a = *((uint32*)ref); /* load 4 bytes */
diff --git a/media/libstagefright/codecs/avc/enc/src/init.cpp b/media/libstagefright/codecs/avc/enc/src/init.cpp
index c258b57..6e1413a 100644
--- a/media/libstagefright/codecs/avc/enc/src/init.cpp
+++ b/media/libstagefright/codecs/avc/enc/src/init.cpp
@@ -177,10 +177,6 @@ AVCEnc_Status SetEncodeParam(AVCHandle* avcHandle, AVCEncParams* encParam,
seqParam->offset_for_non_ref_pic = extS->offset_for_non_ref_pic;
seqParam->offset_for_top_to_bottom_field = extS->offset_for_top_to_bottom_field;
seqParam->num_ref_frames_in_pic_order_cnt_cycle = extS->num_ref_frames_in_pic_order_cnt_cycle;
- if (extS->offset_for_ref_frame == NULL)
- {
- return AVCENC_ENCPARAM_MEM_FAIL;
- }
for (ii = 0; ii < (int) extS->num_ref_frames; ii++)
{
seqParam->offset_for_ref_frame[ii] = extS->offset_for_ref_frame[ii];
diff --git a/media/libstagefright/codecs/avc/enc/src/rate_control.cpp b/media/libstagefright/codecs/avc/enc/src/rate_control.cpp
index aa13873..09dcc28 100644
--- a/media/libstagefright/codecs/avc/enc/src/rate_control.cpp
+++ b/media/libstagefright/codecs/avc/enc/src/rate_control.cpp
@@ -171,7 +171,7 @@ AVCEnc_Status InitRateControlModule(AVCHandle *avcHandle)
AVCRateControl *rateCtrl = encvid->rateCtrl;
double L1, L2, L3, bpp;
int qp;
- int i, j;
+ int i;
rateCtrl->basicUnit = video->PicSizeInMbs;
diff --git a/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp b/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp
index 1301060..9edffd2 100644
--- a/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp
+++ b/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp
@@ -421,7 +421,6 @@ OMX_ERRORTYPE SoftFlacEncoder::configureEncoder() {
}
FLAC__bool ok = true;
- FLAC__StreamEncoderInitStatus initStatus = FLAC__STREAM_ENCODER_INIT_STATUS_OK;
ok = ok && FLAC__stream_encoder_set_channels(mFlacStreamEncoder, mNumChannels);
ok = ok && FLAC__stream_encoder_set_sample_rate(mFlacStreamEncoder, mSampleRate);
ok = ok && FLAC__stream_encoder_set_bits_per_sample(mFlacStreamEncoder, 16);
diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
index e399984..246069b 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
+++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
@@ -353,8 +353,8 @@ void SoftMPEG4::onReset() {
}
}
-void SoftMPEG4::updatePortDefinitions() {
- SoftVideoDecoderOMXComponent::updatePortDefinitions();
+void SoftMPEG4::updatePortDefinitions(bool updateCrop) {
+ SoftVideoDecoderOMXComponent::updatePortDefinitions(updateCrop);
/* We have to align our width and height - this should affect stride! */
OMX_PARAM_PORTDEFINITIONTYPE *def = &editPortInfo(kOutputPortIndex)->mDef;
diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h
index 8a06a00..31577e2 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h
+++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h
@@ -66,7 +66,7 @@ private:
status_t initDecoder();
- virtual void updatePortDefinitions();
+ virtual void updatePortDefinitions(bool updateCrop = true);
bool handlePortSettingsChange();
DISALLOW_EVIL_CONSTRUCTORS(SoftMPEG4);
diff --git a/media/libstagefright/codecs/m4v_h263/enc/Android.mk b/media/libstagefright/codecs/m4v_h263/enc/Android.mk
index c9006d9..7117692 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/Android.mk
+++ b/media/libstagefright/codecs/m4v_h263/enc/Android.mk
@@ -25,7 +25,7 @@ LOCAL_MODULE := libstagefright_m4vh263enc
LOCAL_CFLAGS := \
-DBX_RC \
- -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF=
+ -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF=
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/src \
@@ -55,7 +55,7 @@ LOCAL_C_INCLUDES := \
LOCAL_CFLAGS := \
-DBX_RC \
- -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF=
+ -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF=
LOCAL_STATIC_LIBRARIES := \
diff --git a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp
index 400f320..1d0a2f0 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp
+++ b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp
@@ -664,13 +664,6 @@ void SoftMPEG4Encoder::onQueueFilled(OMX_U32 /* portIndex */) {
if (inHeader->nFilledLen > 0) {
const uint8_t *inputData = NULL;
if (mStoreMetaDataInBuffers) {
- if (inHeader->nFilledLen != 8) {
- ALOGE("MetaData buffer is wrong size! "
- "(got %u bytes, expected 8)", inHeader->nFilledLen);
- mSignalledError = true;
- notify(OMX_EventError, OMX_ErrorUndefined, 0, 0);
- return;
- }
inputData =
extractGraphicBuffer(
mInputFrameData, (mVideoWidth * mVideoHeight * 3) >> 1,
diff --git a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h
index b0605b4..d706bb4 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h
+++ b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h
@@ -25,8 +25,6 @@
namespace android {
-struct MediaBuffer;
-
struct SoftMPEG4Encoder : public SoftVideoEncoderOMXComponent {
SoftMPEG4Encoder(
const char *name,
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp
index 7ea5dc4..2aec815 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp
@@ -271,7 +271,7 @@ PutCBPY(Int cbpy, Char intra, BitstreamEncVideo *bitstream)
Int ind;
Int length;
- if ((intra == 0))
+ if (intra == 0)
cbpy = 15 - cbpy;
ind = cbpy;
diff --git a/media/libstagefright/codecs/mp3dec/Android.mk b/media/libstagefright/codecs/mp3dec/Android.mk
index 8284490..948ae29 100644
--- a/media/libstagefright/codecs/mp3dec/Android.mk
+++ b/media/libstagefright/codecs/mp3dec/Android.mk
@@ -48,7 +48,7 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include
LOCAL_CFLAGS := \
- -DOSCL_UNUSED_ARG=
+ -D"OSCL_UNUSED_ARG(x)=(void)(x)"
LOCAL_CFLAGS += -Werror
diff --git a/media/libstagefright/codecs/on2/h264dec/Android.mk b/media/libstagefright/codecs/on2/h264dec/Android.mk
index bf03ad9..e63b6b1 100644
--- a/media/libstagefright/codecs/on2/h264dec/Android.mk
+++ b/media/libstagefright/codecs/on2/h264dec/Android.mk
@@ -94,6 +94,8 @@ ifeq ($(TARGET_ARCH),arm)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/./omxdl/arm_neon/api \
$(LOCAL_PATH)/./omxdl/arm_neon/vc/api \
$(LOCAL_PATH)/./omxdl/arm_neon/vc/m4p10/api
+ # h264bsdWriteMacroblock.S does not compile with Clang.
+ LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
endif
endif
diff --git a/media/libstagefright/codecs/on2/h264dec/inc/H264SwDecApi.h b/media/libstagefright/codecs/on2/h264dec/inc/H264SwDecApi.h
index fe112bc..fe112bc 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/inc/H264SwDecApi.h
+++ b/media/libstagefright/codecs/on2/h264dec/inc/H264SwDecApi.h
diff --git a/media/libstagefright/codecs/on2/h264dec/inc/basetype.h b/media/libstagefright/codecs/on2/h264dec/inc/basetype.h
index 63d5653..63d5653 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/inc/basetype.h
+++ b/media/libstagefright/codecs/on2/h264dec/inc/basetype.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM.h
index 64c1958..64c1958 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_BitDec_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_BitDec_s.h
index c738f72..c738f72 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_BitDec_s.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_BitDec_s.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Bitstream.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Bitstream.h
index b699034..b699034 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Bitstream.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Bitstream.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCTTable.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCTTable.h
index e0cfdaa..e0cfdaa 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCTTable.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCTTable.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCT_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCT_s.h
index 0baa087..0baa087 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCT_s.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_IDCT_s.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_MaskTable.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_MaskTable.h
index 51118fd..51118fd 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_MaskTable.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_MaskTable.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Version.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Version.h
index 41b3e1e..41b3e1e 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Version.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_Version.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_s.h
index 0956bd1..0956bd1 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_s.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armCOMM_s.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armOMX.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armOMX.h
index 7a68d14..7a68d14 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armOMX.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/armOMX.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h
index 912cb0d..912cb0d 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes_s.h
index 48703d1..48703d1 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes_s.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes_s.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM.c
index e572a89..e572a89 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_Bitstream.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_Bitstream.c
index 9ef9319..9ef9319 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_Bitstream.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_Bitstream.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_IDCTTable.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_IDCTTable.c
index 3f5e279..3f5e279 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_IDCTTable.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_IDCTTable.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_MaskTable.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_MaskTable.c
index 09f88c3..09f88c3 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_MaskTable.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/src/armCOMM_MaskTable.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVC.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVC.h
index 35b510b..35b510b 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVC.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVC.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVCCOMM_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVCCOMM_s.h
index 32a0166..32a0166 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVCCOMM_s.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/armVCCOMM_s.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC.h
index 7b3cc72..7b3cc72 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC_s.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC_s.h
index 89f3040..89f3040 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC_s.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/api/omxVC_s.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/api/armVCM4P10_CAVLCTables.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/api/armVCM4P10_CAVLCTables.h
index 547a2d9..547a2d9 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/api/armVCM4P10_CAVLCTables.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/api/armVCM4P10_CAVLCTables.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/armVCM4P10_CAVLCTables.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/armVCM4P10_CAVLCTables.c
index 137495d..137495d 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/armVCM4P10_CAVLCTables.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/armVCM4P10_CAVLCTables.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockChroma_I.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockChroma_I.c
index 40d4d5e..40d4d5e 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockChroma_I.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockChroma_I.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockLuma_I.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockLuma_I.c
index 619365f..619365f 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockLuma_I.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DeblockLuma_I.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c
index 4e871bf..4e871bf 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c
index b29e576..b29e576 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_InterpolateChroma.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_InterpolateChroma.c
index 3ce41be..3ce41be 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_InterpolateChroma.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_InterpolateChroma.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_Huff_Tables_VLC.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_Huff_Tables_VLC.h
index 74b5505..74b5505 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_Huff_Tables_VLC.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_Huff_Tables_VLC.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h
index e95203a..e95203a 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Huff_Tables_VLC.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Huff_Tables_VLC.c
index 38af975..38af975 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Huff_Tables_VLC.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Huff_Tables_VLC.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Lookup_Tables.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Lookup_Tables.c
index 6948f80..6948f80 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Lookup_Tables.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Lookup_Tables.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Zigzag_Tables.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Zigzag_Tables.c
index 21fa715..21fa715 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Zigzag_Tables.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/armVCM4P2_Zigzag_Tables.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Inter.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Inter.c
index 796ad6e..796ad6e 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Inter.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Inter.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Intra.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Intra.c
index b28657c..b28657c 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Intra.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/m4p2/src/omxVCM4P2_DecodeBlockCoef_Intra.c
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/src/armVC_Version.c b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/src/armVC_Version.c
index 5d93681..5d93681 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/src/armVC_Version.c
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/vc/src/armVC_Version.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/DecTestBench.c b/media/libstagefright/codecs/on2/h264dec/source/DecTestBench.c
index dcf2ef6..dcf2ef6 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/DecTestBench.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/DecTestBench.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/EvaluationTestBench.c b/media/libstagefright/codecs/on2/h264dec/source/EvaluationTestBench.c
index aadc75f..aadc75f 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/EvaluationTestBench.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/EvaluationTestBench.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/TestBenchMultipleInstance.c b/media/libstagefright/codecs/on2/h264dec/source/TestBenchMultipleInstance.c
index 42170d3..42170d3 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/TestBenchMultipleInstance.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/TestBenchMultipleInstance.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.c
index db77f8c..db77f8c 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.h
index 36aec76..36aec76 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_byte_stream.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.c
index 91d78bd..91d78bd 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.h
index 80353d3..80353d3 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cavlc.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cfg.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cfg.h
index 2baba5a..2baba5a 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cfg.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_cfg.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.c
index 7a262ed..7a262ed 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.h
index 3134670..3134670 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_conceal.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_container.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_container.h
index 99b74a0..99b74a0 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_container.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_container.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.c
index f8c1f76..f8c1f76 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.h
index 2571dda..2571dda 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_deblocking.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.c
index 9517d0a..9517d0a 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.h
index 0e25084..0e25084 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_dpb.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.c
index 7b92870..7b92870 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.h
index ed7c18c..ed7c18c 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_image.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.c
index 2a81c4a..2a81c4a 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.h
index 94dee25..94dee25 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_inter_prediction.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.c
index 52c85e5..52c85e5 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.h
index 4652bd5..4652bd5 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_intra_prediction.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.c
index 2b3e7f0..2b3e7f0 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.h
index 32bc340..32bc340 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_macroblock_layer.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.c
index e44c43a..e44c43a 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.h
index 38957bf..38957bf 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_nal_unit.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.c
index ce5eeff..ce5eeff 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.h
index fce0ad1..fce0ad1 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_neighbour.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.c
index fb23352..fb23352 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.h
index 19741eb..19741eb 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_order_cnt.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.c
index e04dea4..e04dea4 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.h
index 6328638..6328638 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_pic_param_set.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.c
index b409a06..b409a06 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.h
index 5a1a140..5a1a140 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_reconstruct.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.c
index 0756c47..0756c47 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.h
index efe543a..efe543a 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_sei.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_seq_param_set.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_seq_param_set.h
index e18df94..e18df94 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_seq_param_set.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_seq_param_set.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.c
index c288d4b..c288d4b 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.h
index f23d49e..f23d49e 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_data.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.c
index 7cbb534..7cbb534 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.h
index 4bcb6f2..4bcb6f2 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_group_map.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.c
index 23401c6..23401c6 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.h
index 198898a..198898a 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_slice_header.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.c
index 3234754..3234754 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.h
index ba3b2da..ba3b2da 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_storage.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.c
index 20d1083..20d1083 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.h
index 4404b66..4404b66 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_stream.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.c
index 4eb6dd0..4eb6dd0 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.h
index 4f41a23..4f41a23 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_transform.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.c
index fb97a28..fb97a28 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.h
index 216ad04..216ad04 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_util.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.c
index 060f35e..060f35e 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.h
index 4c16773..4c16773 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vlc.h
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.c b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.c
index 4a9335a..4a9335a 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.c
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.c
diff --git a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.h b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.h
index 05d52a4..05d52a4 100755..100644
--- a/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.h
+++ b/media/libstagefright/codecs/on2/h264dec/source/h264bsd_vui.h
diff --git a/media/libstagefright/http/MediaHTTP.cpp b/media/libstagefright/http/MediaHTTP.cpp
index 2d29913..bb89567 100644
--- a/media/libstagefright/http/MediaHTTP.cpp
+++ b/media/libstagefright/http/MediaHTTP.cpp
@@ -129,7 +129,7 @@ status_t MediaHTTP::getSize(off64_t *size) {
*size = mCachedSize;
- return *size < 0 ? *size : OK;
+ return *size < 0 ? *size : static_cast<status_t>(OK);
}
uint32_t MediaHTTP::flags() {
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp
index 5eb4652..6522ad7 100644
--- a/media/libstagefright/httplive/LiveSession.cpp
+++ b/media/libstagefright/httplive/LiveSession.cpp
@@ -685,7 +685,6 @@ void LiveSession::onConnect(const sp<AMessage> &msg) {
AString uri;
mPlaylist->itemAt(i, &uri, &meta);
- unsigned long bandwidth;
CHECK(meta->findInt32("bandwidth", (int32_t *)&item.mBandwidth));
if (initialBandwidth == 0) {
@@ -962,9 +961,11 @@ sp<M3UParser> LiveSession::fetchPlaylist(
return playlist;
}
+#if 0
static double uniformRand() {
return (double)rand() / RAND_MAX;
}
+#endif
size_t LiveSession::getBandwidthIndex() {
if (mBandwidthItems.size() == 0) {
@@ -1441,7 +1442,6 @@ void LiveSession::onChangeConfiguration3(const sp<AMessage> &msg) {
sp<PlaylistFetcher> fetcher = addFetcher(uri.c_str());
CHECK(fetcher != NULL);
- int32_t latestSeq = -1;
int64_t startTimeUs = -1;
int64_t segmentStartTimeUs = -1ll;
int32_t discontinuitySeq = -1;
@@ -1469,7 +1469,6 @@ void LiveSession::onChangeConfiguration3(const sp<AMessage> &msg) {
ATSParser::DISCONTINUITY_TIME, extra, true);
} else {
int32_t type;
- int64_t srcSegmentStartTimeUs;
sp<AMessage> meta;
if (pickTrack) {
// selecting
diff --git a/media/libstagefright/httplive/PlaylistFetcher.cpp b/media/libstagefright/httplive/PlaylistFetcher.cpp
index d8eed5b..c0c7ed9 100644
--- a/media/libstagefright/httplive/PlaylistFetcher.cpp
+++ b/media/libstagefright/httplive/PlaylistFetcher.cpp
@@ -290,7 +290,6 @@ status_t PlaylistFetcher::decryptBuffer(
}
status_t PlaylistFetcher::checkDecryptPadding(const sp<ABuffer> &buffer) {
- status_t err;
AString method;
CHECK(buffer->meta()->findString("cipher-method", &method));
if (method == "NONE") {
@@ -1525,7 +1524,7 @@ status_t PlaylistFetcher::extractAndQueueAccessUnits(
CHECK_EQ(bits.getBits(12), 0xfffu);
bits.skipBits(3); // ID, layer
- bool protection_absent = bits.getBits(1) != 0;
+ bool protection_absent __unused = bits.getBits(1) != 0;
unsigned profile = bits.getBits(2);
CHECK_NE(profile, 3u);
@@ -1667,7 +1666,7 @@ void PlaylistFetcher::updateDuration() {
}
int64_t PlaylistFetcher::resumeThreshold(const sp<AMessage> &msg) {
- int64_t durationUs, threshold;
+ int64_t durationUs;
if (msg->findInt64("durationUs", &durationUs)) {
return kNumSkipFrames * durationUs;
}
diff --git a/media/libstagefright/httplive/PlaylistFetcher.h b/media/libstagefright/httplive/PlaylistFetcher.h
index 78c358f..76cc852 100644
--- a/media/libstagefright/httplive/PlaylistFetcher.h
+++ b/media/libstagefright/httplive/PlaylistFetcher.h
@@ -31,7 +31,7 @@ struct DataSource;
struct HTTPBase;
struct LiveDataSource;
struct M3UParser;
-struct String8;
+class String8;
struct PlaylistFetcher : public AHandler {
enum {
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
index 7f221a0..d8bfada 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -793,8 +793,8 @@ ID3::getAlbumArt(size_t *length, String8 *mime) const {
mime->setTo((const char *)&data[1]);
size_t mimeLen = strlen((const char *)&data[1]) + 1;
- uint8_t picType = data[1 + mimeLen];
#if 0
+ uint8_t picType = data[1 + mimeLen];
if (picType != 0x03) {
// Front Cover Art
it.next();
diff --git a/media/libstagefright/include/AACEncoder.h b/media/libstagefright/include/AACEncoder.h
index 3d5fc60..52beb0e 100644
--- a/media/libstagefright/include/AACEncoder.h
+++ b/media/libstagefright/include/AACEncoder.h
@@ -25,7 +25,7 @@ struct VO_MEM_OPERATOR;
namespace android {
-struct MediaBufferGroup;
+class MediaBufferGroup;
class AACEncoder: public MediaSource {
public:
diff --git a/media/libstagefright/include/ID3.h b/media/libstagefright/include/ID3.h
index e83f3ef..c2c4a6d 100644
--- a/media/libstagefright/include/ID3.h
+++ b/media/libstagefright/include/ID3.h
@@ -22,8 +22,8 @@
namespace android {
-struct DataSource;
-struct String8;
+class DataSource;
+class String8;
struct ID3 {
enum Version {
diff --git a/media/libstagefright/include/MPEG2TSExtractor.h b/media/libstagefright/include/MPEG2TSExtractor.h
index c5e86a6..db1187d 100644
--- a/media/libstagefright/include/MPEG2TSExtractor.h
+++ b/media/libstagefright/include/MPEG2TSExtractor.h
@@ -28,7 +28,7 @@ namespace android {
struct AMessage;
struct AnotherPacketSource;
struct ATSParser;
-struct DataSource;
+class DataSource;
struct MPEG2TSSource;
struct String8;
diff --git a/media/libstagefright/include/avc_utils.h b/media/libstagefright/include/avc_utils.h
index d517320..c270bc1 100644
--- a/media/libstagefright/include/avc_utils.h
+++ b/media/libstagefright/include/avc_utils.h
@@ -23,7 +23,7 @@
namespace android {
-struct ABitReader;
+class ABitReader;
enum {
kAVCProfileBaseline = 0x42,
@@ -49,7 +49,7 @@ status_t getNextNALUnit(
const uint8_t **nalStart, size_t *nalSize,
bool startCodeFollows = false);
-struct MetaData;
+class MetaData;
sp<MetaData> MakeAVCCodecSpecificData(const sp<ABuffer> &accessUnit);
bool IsIDR(const sp<ABuffer> &accessUnit);
diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp
index 4f0862c..0712bf0 100644
--- a/media/libstagefright/matroska/MatroskaExtractor.cpp
+++ b/media/libstagefright/matroska/MatroskaExtractor.cpp
@@ -500,17 +500,6 @@ static unsigned U24_AT(const uint8_t *ptr) {
return ptr[0] << 16 | ptr[1] << 8 | ptr[2];
}
-static size_t clz(uint8_t x) {
- size_t numLeadingZeroes = 0;
-
- while (!(x & 0x80)) {
- ++numLeadingZeroes;
- x = x << 1;
- }
-
- return numLeadingZeroes;
-}
-
void MatroskaSource::clearPendingFrames() {
while (!mPendingFrames.empty()) {
MediaBuffer *frame = *mPendingFrames.begin();
diff --git a/media/libstagefright/mpeg2ts/ATSParser.h b/media/libstagefright/mpeg2ts/ATSParser.h
index 5d76cbd..75d76dc 100644
--- a/media/libstagefright/mpeg2ts/ATSParser.h
+++ b/media/libstagefright/mpeg2ts/ATSParser.h
@@ -28,7 +28,7 @@
namespace android {
-struct ABitReader;
+class ABitReader;
struct ABuffer;
struct MediaSource;
diff --git a/media/libstagefright/mpeg2ts/ESQueue.cpp b/media/libstagefright/mpeg2ts/ESQueue.cpp
index 042f4e6..73fe109 100644
--- a/media/libstagefright/mpeg2ts/ESQueue.cpp
+++ b/media/libstagefright/mpeg2ts/ESQueue.cpp
@@ -63,8 +63,6 @@ static unsigned parseAC3SyncFrame(
const uint8_t *ptr, size_t size, sp<MetaData> *metaData) {
static const unsigned channelCountTable[] = {2, 1, 2, 3, 3, 4, 4, 5};
static const unsigned samplingRateTable[] = {48000, 44100, 32000};
- static const unsigned rates[] = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256,
- 320, 384, 448, 512, 576, 640};
static const unsigned frameSizeTable[19][3] = {
{ 64, 69, 96 },
@@ -89,7 +87,6 @@ static unsigned parseAC3SyncFrame(
};
ABitReader bits(ptr, size);
- unsigned syncStartPos = 0; // in bytes
if (bits.numBitsLeft() < 16) {
return 0;
}
@@ -121,11 +118,11 @@ static unsigned parseAC3SyncFrame(
return 0;
}
- unsigned bsmod = bits.getBits(3);
+ unsigned bsmod __unused = bits.getBits(3);
unsigned acmod = bits.getBits(3);
- unsigned cmixlev = 0;
- unsigned surmixlev = 0;
- unsigned dsurmod = 0;
+ unsigned cmixlev __unused = 0;
+ unsigned surmixlev __unused = 0;
+ unsigned dsurmod __unused = 0;
if ((acmod & 1) > 0 && acmod != 1) {
if (bits.numBitsLeft() < 2) {
@@ -556,7 +553,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitPCMAudio() {
CHECK_EQ(bits.getBits(8), 0xa0);
unsigned numAUs = bits.getBits(8);
bits.skipBits(8);
- unsigned quantization_word_length = bits.getBits(2);
+ unsigned quantization_word_length __unused = bits.getBits(2);
unsigned audio_sampling_frequency = bits.getBits(3);
unsigned num_channels = bits.getBits(3);
@@ -634,7 +631,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitAAC() {
CHECK_EQ(bits.getBits(12), 0xfffu);
bits.skipBits(3); // ID, layer
- bool protection_absent = bits.getBits(1) != 0;
+ bool protection_absent __unused = bits.getBits(1) != 0;
if (mFormat == NULL) {
unsigned profile = bits.getBits(2);
@@ -683,7 +680,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitAAC() {
return NULL;
}
- size_t headerSize = protection_absent ? 7 : 9;
+ size_t headerSize __unused = protection_absent ? 7 : 9;
offset += aac_frame_length;
// TODO: move back to concatenation when codec can support arbitrary input buffers.
diff --git a/media/libstagefright/mpeg2ts/ESQueue.h b/media/libstagefright/mpeg2ts/ESQueue.h
index 7c81ff0..eb4b1c9 100644
--- a/media/libstagefright/mpeg2ts/ESQueue.h
+++ b/media/libstagefright/mpeg2ts/ESQueue.h
@@ -26,7 +26,7 @@
namespace android {
struct ABuffer;
-struct MetaData;
+class MetaData;
struct ElementaryStreamQueue {
enum Mode {
diff --git a/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp
index 35ca118..1f43d6d 100644
--- a/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp
+++ b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp
@@ -159,7 +159,6 @@ void MPEG2TSExtractor::init() {
int numPacketsParsed = 0;
while (feedMore() == OK) {
- ATSParser::SourceType type;
if (haveAudio && haveVideo) {
break;
}
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp
index 6d46eee..f8d38ff 100644
--- a/media/libstagefright/omx/OMX.cpp
+++ b/media/libstagefright/omx/OMX.cpp
@@ -245,8 +245,8 @@ status_t OMX::allocateNode(
instance->setHandle(*node, handle);
- mLiveNodes.add(observer->asBinder(), instance);
- observer->asBinder()->linkToDeath(this);
+ mLiveNodes.add(IInterface::asBinder(observer), instance);
+ IInterface::asBinder(observer)->linkToDeath(this);
return OK;
}
@@ -256,7 +256,7 @@ status_t OMX::freeNode(node_id node) {
{
Mutex::Autolock autoLock(mLock);
- ssize_t index = mLiveNodes.indexOfKey(instance->observer()->asBinder());
+ ssize_t index = mLiveNodes.indexOfKey(IInterface::asBinder(instance->observer()));
if (index < 0) {
// This could conceivably happen if the observer dies at roughly the
// same time that a client attempts to free the node explicitly.
@@ -265,7 +265,7 @@ status_t OMX::freeNode(node_id node) {
mLiveNodes.removeItemsAt(index);
}
- instance->observer()->asBinder()->unlinkToDeath(this);
+ IInterface::asBinder(instance->observer())->unlinkToDeath(this);
status_t err = instance->freeNode(mMaster);
diff --git a/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp b/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp
index 8bff142..70ec6e4 100644
--- a/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp
+++ b/media/libstagefright/omx/SoftVideoEncoderOMXComponent.cpp
@@ -195,12 +195,12 @@ const uint8_t *SoftVideoEncoderOMXComponent::extractGraphicBuffer(
size_t srcStride;
size_t srcVStride;
if (usingGraphicBuffer) {
- if (srcSize < 4 + sizeof(GraphicBuffer *)) {
- ALOGE("Metadata is too small (%zu vs %zu)", srcSize, 4 + sizeof(GraphicBuffer *));
+ if (srcSize < sizeof(OMX_U32) + sizeof(GraphicBuffer *)) {
+ ALOGE("Metadata is too small (%zu vs %zu)", srcSize, sizeof(OMX_U32) + sizeof(GraphicBuffer *));
return NULL;
}
- GraphicBuffer *buffer = *(GraphicBuffer **)(src + 4);
+ GraphicBuffer *buffer = *(GraphicBuffer **)(src + sizeof(OMX_U32));
handle = buffer->handle;
format = buffer->format;
srcStride = buffer->stride;
@@ -214,12 +214,12 @@ const uint8_t *SoftVideoEncoderOMXComponent::extractGraphicBuffer(
} else {
// TODO: remove this part. Check if anyone uses this.
- if (srcSize < 4 + sizeof(buffer_handle_t)) {
- ALOGE("Metadata is too small (%zu vs %zu)", srcSize, 4 + sizeof(buffer_handle_t));
+ if (srcSize < sizeof(OMX_U32) + sizeof(buffer_handle_t)) {
+ ALOGE("Metadata is too small (%zu vs %zu)", srcSize, sizeof(OMX_U32) + sizeof(buffer_handle_t));
return NULL;
}
- handle = *(buffer_handle_t *)(src + 4);
+ handle = *(buffer_handle_t *)(src + sizeof(OMX_U32));
// assume HAL_PIXEL_FORMAT_RGBA_8888
// there is no way to get the src stride without the graphic buffer
format = HAL_PIXEL_FORMAT_RGBA_8888;
diff --git a/media/libstagefright/omx/tests/OMXHarness.cpp b/media/libstagefright/omx/tests/OMXHarness.cpp
index f4dfd6b..67ff145 100644
--- a/media/libstagefright/omx/tests/OMXHarness.cpp
+++ b/media/libstagefright/omx/tests/OMXHarness.cpp
@@ -253,29 +253,6 @@ static sp<MediaExtractor> CreateExtractorFromURI(const char *uri) {
return MediaExtractor::Create(source);
}
-static sp<MediaSource> MakeSource(
- const char *uri,
- const char *mimeType) {
- sp<MediaExtractor> extractor = CreateExtractorFromURI(uri);
-
- if (extractor == NULL) {
- return NULL;
- }
-
- for (size_t i = 0; i < extractor->countTracks(); ++i) {
- sp<MetaData> meta = extractor->getTrackMetaData(i);
-
- const char *trackMIME;
- CHECK(meta->findCString(kKeyMIMEType, &trackMIME));
-
- if (!strcasecmp(trackMIME, mimeType)) {
- return extractor->getTrack(i);
- }
- }
-
- return NULL;
-}
-
status_t Harness::testStateTransitions(
const char *componentName, const char *componentRole) {
if (strncmp(componentName, "OMX.", 4)) {
diff --git a/media/libstagefright/rtsp/AAMRAssembler.cpp b/media/libstagefright/rtsp/AAMRAssembler.cpp
index 9e8725a..bb2a238 100644
--- a/media/libstagefright/rtsp/AAMRAssembler.cpp
+++ b/media/libstagefright/rtsp/AAMRAssembler.cpp
@@ -143,8 +143,8 @@ ARTPAssembler::AssemblyStatus AAMRAssembler::addPacket(
return MALFORMED_PACKET;
}
- unsigned payloadHeader = buffer->data()[0];
- unsigned CMR = payloadHeader >> 4;
+ unsigned payloadHeader __unused = buffer->data()[0];
+ unsigned CMR __unused = payloadHeader >> 4;
Vector<uint8_t> tableOfContents;
diff --git a/media/libstagefright/rtsp/AMPEG2TSAssembler.h b/media/libstagefright/rtsp/AMPEG2TSAssembler.h
index 712e18e..f39c2b5 100644
--- a/media/libstagefright/rtsp/AMPEG2TSAssembler.h
+++ b/media/libstagefright/rtsp/AMPEG2TSAssembler.h
@@ -24,7 +24,7 @@ namespace android {
struct AMessage;
struct AString;
-struct MetaData;
+class MetaData;
struct AMPEG2TSAssembler : public ARTPAssembler {
AMPEG2TSAssembler(
diff --git a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp
index aa8ffc6..a3274ea 100644
--- a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp
+++ b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp
@@ -108,7 +108,7 @@ static status_t parseAudioObjectType(
static status_t parseGASpecificConfig(
ABitReader *bits,
unsigned audioObjectType, unsigned channelConfiguration) {
- unsigned frameLengthFlag = bits->getBits(1);
+ unsigned frameLengthFlag __unused = bits->getBits(1);
unsigned dependsOnCoreCoder = bits->getBits(1);
if (dependsOnCoreCoder) {
/* unsigned coreCoderDelay = */bits->getBits(1);
diff --git a/media/libstagefright/rtsp/APacketSource.cpp b/media/libstagefright/rtsp/APacketSource.cpp
index 09f52bc..cfafaa7 100644
--- a/media/libstagefright/rtsp/APacketSource.cpp
+++ b/media/libstagefright/rtsp/APacketSource.cpp
@@ -279,8 +279,6 @@ sp<ABuffer> MakeAACCodecSpecificData2(const char *params) {
// be encoded.
CHECK_LT(20 + config->size(), 128u);
- const uint8_t *data = config->data();
-
static const uint8_t kStaticESDS[] = {
0x03, 22,
0x00, 0x00, // ES_ID
diff --git a/media/libstagefright/rtsp/ARTPConnection.cpp b/media/libstagefright/rtsp/ARTPConnection.cpp
index 372fbe9..a6bd824 100644
--- a/media/libstagefright/rtsp/ARTPConnection.cpp
+++ b/media/libstagefright/rtsp/ARTPConnection.cpp
@@ -664,11 +664,10 @@ void ARTPConnection::onInjectPacket(const sp<AMessage> &msg) {
StreamInfo *s = &*it;
- status_t err;
if (it->mRTPSocket == index) {
- err = parseRTP(s, buffer);
+ parseRTP(s, buffer);
} else {
- err = parseRTCP(s, buffer);
+ parseRTCP(s, buffer);
}
}
diff --git a/media/libstagefright/rtsp/ARawAudioAssembler.h b/media/libstagefright/rtsp/ARawAudioAssembler.h
index ed7af08..bc1dea6 100644
--- a/media/libstagefright/rtsp/ARawAudioAssembler.h
+++ b/media/libstagefright/rtsp/ARawAudioAssembler.h
@@ -24,7 +24,7 @@ namespace android {
struct AMessage;
struct AString;
-struct MetaData;
+class MetaData;
struct ARawAudioAssembler : public ARTPAssembler {
ARawAudioAssembler(
diff --git a/media/libstagefright/rtsp/SDPLoader.cpp b/media/libstagefright/rtsp/SDPLoader.cpp
index 424badf..a24eb69 100644
--- a/media/libstagefright/rtsp/SDPLoader.cpp
+++ b/media/libstagefright/rtsp/SDPLoader.cpp
@@ -105,7 +105,7 @@ void SDPLoader::onLoad(const sp<AMessage> &msg) {
headers = NULL;
}
- off64_t sdpSize;
+ off64_t sdpSize = 0;
if (err == OK && !mCancelled) {
err = mHTTPDataSource->getSize(&sdpSize);
diff --git a/media/libstagefright/tests/Android.mk b/media/libstagefright/tests/Android.mk
index 99b480ad..8d6ff5b 100644
--- a/media/libstagefright/tests/Android.mk
+++ b/media/libstagefright/tests/Android.mk
@@ -1,8 +1,7 @@
# Build the unit tests.
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-
-ifneq ($(TARGET_SIMULATOR),true)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := SurfaceMediaSource_test
@@ -22,33 +21,23 @@ LOCAL_SHARED_LIBRARIES := \
libstagefright \
libstagefright_foundation \
libstagefright_omx \
- libstlport \
libsync \
libui \
libutils \
liblog
-LOCAL_STATIC_LIBRARIES := \
- libgtest \
- libgtest_main \
-
LOCAL_C_INCLUDES := \
- bionic \
- bionic/libstdc++/include \
- external/gtest/include \
- external/stlport/stlport \
frameworks/av/media/libstagefright \
frameworks/av/media/libstagefright/include \
$(TOP)/frameworks/native/include/media/openmax \
LOCAL_32_BIT_ONLY := true
-include $(BUILD_EXECUTABLE)
-
-endif
+include $(BUILD_NATIVE_TEST)
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := Utils_test
@@ -64,23 +53,14 @@ LOCAL_SHARED_LIBRARIES := \
libstagefright \
libstagefright_foundation \
libstagefright_omx \
- libstlport \
-
-LOCAL_STATIC_LIBRARIES := \
- libgtest \
- libgtest_main \
LOCAL_C_INCLUDES := \
- bionic \
- bionic/libstdc++/include \
- external/gtest/include \
- external/stlport/stlport \
frameworks/av/include \
frameworks/av/media/libstagefright \
frameworks/av/media/libstagefright/include \
$(TOP)/frameworks/native/include/media/openmax \
-include $(BUILD_EXECUTABLE)
+include $(BUILD_NATIVE_TEST)
# Include subdirectory makefiles
# ============================================================
diff --git a/media/libstagefright/timedtext/TimedTextDriver.cpp b/media/libstagefright/timedtext/TimedTextDriver.cpp
index 71aa21e..55a9803 100644
--- a/media/libstagefright/timedtext/TimedTextDriver.cpp
+++ b/media/libstagefright/timedtext/TimedTextDriver.cpp
@@ -133,7 +133,7 @@ status_t TimedTextDriver::selectTrack(size_t index) {
}
mPlayer->start();
break;
- defaut:
+ default:
TRESPASS();
}
return ret;
@@ -181,7 +181,7 @@ status_t TimedTextDriver::seekToAsync(int64_t timeUs) {
case PLAYING:
mPlayer->seekToAsync(timeUs);
return OK;
- defaut:
+ default:
TRESPASS();
}
return UNKNOWN_ERROR;
diff --git a/media/libstagefright/timedtext/TimedTextPlayer.h b/media/libstagefright/timedtext/TimedTextPlayer.h
index ec8ed25..9cb49ec 100644
--- a/media/libstagefright/timedtext/TimedTextPlayer.h
+++ b/media/libstagefright/timedtext/TimedTextPlayer.h
@@ -27,7 +27,7 @@
namespace android {
-class AMessage;
+struct AMessage;
class MediaPlayerBase;
class TimedTextDriver;
class TimedTextSource;
diff --git a/media/libstagefright/timedtext/TimedTextSRTSource.h b/media/libstagefright/timedtext/TimedTextSRTSource.h
index 598c200..232675e 100644
--- a/media/libstagefright/timedtext/TimedTextSRTSource.h
+++ b/media/libstagefright/timedtext/TimedTextSRTSource.h
@@ -25,7 +25,7 @@
namespace android {
-class AString;
+struct AString;
class DataSource;
class MediaBuffer;
class Parcel;
diff --git a/media/libstagefright/webm/WebmWriter.cpp b/media/libstagefright/webm/WebmWriter.cpp
index 03cf92a..069961b 100644
--- a/media/libstagefright/webm/WebmWriter.cpp
+++ b/media/libstagefright/webm/WebmWriter.cpp
@@ -333,7 +333,6 @@ status_t WebmWriter::reset() {
serializeCodedUnsigned(segmentSizeCoded, bary);
::write(mFd, bary, sizeOf(kMkvUnknownLength));
- uint64_t size;
uint64_t durationOffset = mInfoOffset + sizeOf(kMkvInfo) + sizeOf(mInfoSize)
+ sizeOf(kMkvSegmentDuration) + sizeOf(sizeof(double));
sp<WebmElement> duration = new WebmFloat(
diff --git a/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp b/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp
index da405e2..0c39ccf 100644
--- a/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp
+++ b/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp
@@ -43,6 +43,10 @@
namespace android {
// static
+const int64_t WifiDisplaySource::kReaperIntervalUs;
+const int64_t WifiDisplaySource::kTeardownTriggerTimeouSecs;
+const int64_t WifiDisplaySource::kPlaybackSessionTimeoutSecs;
+const int64_t WifiDisplaySource::kPlaybackSessionTimeoutUs;
const AString WifiDisplaySource::sUserAgent = MakeUserAgent();
WifiDisplaySource::WifiDisplaySource(