summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/libmedia/Android.mk6
-rw-r--r--media/libmedia/AudioSystem.cpp1
-rw-r--r--media/libmedia/AudioTrack.cpp3
-rw-r--r--media/libmedia/AudioTrackShared.cpp5
-rw-r--r--media/libmedia/CharacterEncodingDetector.cpp2
-rw-r--r--media/libmedia/IMediaLogService.cpp4
-rw-r--r--media/libmedia/IResourceManagerService.cpp3
-rw-r--r--media/libmedia/MediaProfiles.cpp1
-rw-r--r--media/libmedia/MediaResource.cpp2
-rw-r--r--media/libmedia/MediaResourcePolicy.cpp2
-rw-r--r--media/libmedia/MemoryLeakTrackUtil.cpp2
-rw-r--r--media/libmedia/ToneGenerator.cpp1
-rw-r--r--media/libstagefright/Android.mk2
-rw-r--r--media/libstagefright/MPEG4Writer.cpp4
-rw-r--r--media/libstagefright/MediaCodecListOverrides.cpp16
-rw-r--r--media/libstagefright/MediaCodecSource.cpp1
-rw-r--r--media/libstagefright/filters/Android.mk2
-rw-r--r--media/libstagefright/foundation/Android.mk2
-rw-r--r--media/libstagefright/http/Android.mk2
-rw-r--r--media/libstagefright/httplive/Android.mk2
-rw-r--r--media/libstagefright/httplive/PlaylistFetcher.cpp2
-rw-r--r--media/libstagefright/id3/Android.mk4
-rw-r--r--media/libstagefright/matroska/Android.mk2
-rw-r--r--media/libstagefright/mpeg2ts/Android.mk2
-rw-r--r--media/libstagefright/omx/Android.mk2
-rw-r--r--media/libstagefright/omx/tests/Android.mk4
-rw-r--r--media/libstagefright/rtsp/Android.mk4
-rw-r--r--media/libstagefright/tests/Android.mk6
-rw-r--r--media/libstagefright/timedtext/Android.mk2
-rw-r--r--media/libstagefright/timedtext/test/Android.mk2
-rw-r--r--media/libstagefright/webm/Android.mk2
-rw-r--r--media/libstagefright/wifi-display/Android.mk2
-rw-r--r--media/libstagefright/wifi-display/VideoFormats.cpp1
-rw-r--r--media/libstagefright/wifi-display/rtp/RTPSender.cpp2
-rw-r--r--media/libstagefright/wifi-display/source/PlaybackSession.cpp20
-rw-r--r--media/libstagefright/yuv/Android.mk2
36 files changed, 62 insertions, 60 deletions
diff --git a/media/libmedia/Android.mk b/media/libmedia/Android.mk
index 78baa43..0c18828 100644
--- a/media/libmedia/Android.mk
+++ b/media/libmedia/Android.mk
@@ -7,6 +7,9 @@ LOCAL_SRC_FILES:= \
LOCAL_MODULE:= libmedia_helper
LOCAL_MODULE_TAGS := optional
+LOCAL_C_FLAGS += -Werror -Wall
+LOCAL_CLANG := true
+
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -84,5 +87,8 @@ LOCAL_C_INCLUDES := \
$(call include-path-for, audio-effects) \
$(call include-path-for, audio-utils)
+LOCAL_CFLAGS += -Werror -Wall
+LOCAL_CLANG := true
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index e9ee169..2ed50e8 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -477,7 +477,6 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, audio_io_handle
const void *param2) {
ALOGV("ioConfigChanged() event %d", event);
const OutputDescriptor *desc;
- audio_stream_type_t stream;
if (ioHandle == AUDIO_IO_HANDLE_NONE) return;
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 30d4355..055556f 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -1663,7 +1663,8 @@ nsecs_t AudioTrack::processAudioBuffer()
// AudioSystem cache. We should not exit here but after calling the callback so
// that the upper layers can recreate the track
if (!isOffloadedOrDirect_l() || (mSequence == mObservedSequence)) {
- status_t status = restoreTrack_l("processAudioBuffer");
+ status_t status __unused = restoreTrack_l("processAudioBuffer");
+ // FIXME unused status
// after restoration, continue below to make sure that the loop and buffer events
// are notified because they have been cleared from mCblk->mFlags above.
}
diff --git a/media/libmedia/AudioTrackShared.cpp b/media/libmedia/AudioTrackShared.cpp
index ba67b40..aee9fc2 100644
--- a/media/libmedia/AudioTrackShared.cpp
+++ b/media/libmedia/AudioTrackShared.cpp
@@ -619,8 +619,9 @@ status_t ServerProxy::obtainBuffer(Buffer* buffer, bool ackFlush)
// Rather than shutting down on a corrupt flush, just treat it as a full flush
if (!(0 <= filled && (size_t) filled <= mFrameCount)) {
ALOGE("mFlush %#x -> %#x, front %#x, rear %#x, mask %#x, newFront %#x, "
- "filled %d=%#x",
- mFlush, flush, front, rear, mask, newFront, filled, filled);
+ "filled %zd=%#x",
+ mFlush, flush, front, rear,
+ (unsigned)mask, newFront, filled, (unsigned)filled);
newFront = rear;
}
mFlush = flush;
diff --git a/media/libmedia/CharacterEncodingDetector.cpp b/media/libmedia/CharacterEncodingDetector.cpp
index 41994dc..3020136 100644
--- a/media/libmedia/CharacterEncodingDetector.cpp
+++ b/media/libmedia/CharacterEncodingDetector.cpp
@@ -89,7 +89,6 @@ void CharacterEncodingDetector::detectAndConvert() {
// try combined detection of artist/album/title etc.
char buf[1024];
buf[0] = 0;
- int idx;
bool allprintable = true;
for (int i = 0; i < size; i++) {
const char *name = mNames.getEntry(i);
@@ -169,7 +168,6 @@ void CharacterEncodingDetector::detectAndConvert() {
const char *name = mNames.getEntry(i);
uint8_t* src = (uint8_t *)mValues.getEntry(i);
int len = strlen((char *)src);
- uint8_t* dest = src;
ALOGV("@@@ checking %s", name);
const char *s = mValues.getEntry(i);
diff --git a/media/libmedia/IMediaLogService.cpp b/media/libmedia/IMediaLogService.cpp
index 230749e..1536337 100644
--- a/media/libmedia/IMediaLogService.cpp
+++ b/media/libmedia/IMediaLogService.cpp
@@ -45,7 +45,7 @@ public:
data.writeStrongBinder(IInterface::asBinder(shared));
data.writeInt64((int64_t) size);
data.writeCString(name);
- status_t status = remote()->transact(REGISTER_WRITER, data, &reply);
+ status_t status __unused = remote()->transact(REGISTER_WRITER, data, &reply);
// FIXME ignores status
}
@@ -53,7 +53,7 @@ public:
Parcel data, reply;
data.writeInterfaceToken(IMediaLogService::getInterfaceDescriptor());
data.writeStrongBinder(IInterface::asBinder(shared));
- status_t status = remote()->transact(UNREGISTER_WRITER, data, &reply);
+ status_t status __unused = remote()->transact(UNREGISTER_WRITER, data, &reply);
// FIXME ignores status
}
diff --git a/media/libmedia/IResourceManagerService.cpp b/media/libmedia/IResourceManagerService.cpp
index 95a2d1c..7ae946d 100644
--- a/media/libmedia/IResourceManagerService.cpp
+++ b/media/libmedia/IResourceManagerService.cpp
@@ -38,11 +38,9 @@ enum {
template <typename T>
static void writeToParcel(Parcel *data, const Vector<T> &items) {
size_t size = items.size();
- size_t sizePosition = data->dataPosition();
// truncates size, but should be okay for this usecase
data->writeUint32(static_cast<uint32_t>(size));
for (size_t i = 0; i < size; i++) {
- size_t position = data->dataPosition();
items[i].writeToParcel(data);
}
}
@@ -121,7 +119,6 @@ status_t BnResourceManagerService::onTransact(
switch (code) {
case CONFIG: {
CHECK_INTERFACE(IResourceManagerService, data, reply);
- int pid = data.readInt32();
sp<IResourceManagerClient> client(
interface_cast<IResourceManagerClient>(data.readStrongBinder()));
Vector<MediaResourcePolicy> policies;
diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp
index 47f9258..ae0061f 100644
--- a/media/libmedia/MediaProfiles.cpp
+++ b/media/libmedia/MediaProfiles.cpp
@@ -532,7 +532,6 @@ void MediaProfiles::checkAndAddRequiredProfilesIfNecessary() {
CHECK(refIndex != -1);
RequiredProfileRefInfo *info;
camcorder_quality refQuality;
- VideoCodec *codec = NULL;
// Check high and low from either camcorder profile, timelapse profile
// or high speed profile, but not all of them. Default, check camcorder profile
diff --git a/media/libmedia/MediaResource.cpp b/media/libmedia/MediaResource.cpp
index 8be01bc..eea2c43 100644
--- a/media/libmedia/MediaResource.cpp
+++ b/media/libmedia/MediaResource.cpp
@@ -50,7 +50,7 @@ void MediaResource::writeToParcel(Parcel *parcel) const {
String8 MediaResource::toString() const {
String8 str;
- str.appendFormat("%s/%s:%llu", mType.string(), mSubType.string(), mValue);
+ str.appendFormat("%s/%s:%llu", mType.string(), mSubType.string(), (unsigned long long)mValue);
return str;
}
diff --git a/media/libmedia/MediaResourcePolicy.cpp b/media/libmedia/MediaResourcePolicy.cpp
index 2bb996a..139a38c 100644
--- a/media/libmedia/MediaResourcePolicy.cpp
+++ b/media/libmedia/MediaResourcePolicy.cpp
@@ -42,7 +42,7 @@ void MediaResourcePolicy::writeToParcel(Parcel *parcel) const {
String8 MediaResourcePolicy::toString() const {
String8 str;
- str.appendFormat("%s:%llu", mType.string(), mValue);
+ str.appendFormat("%s:%llu", mType.string(), (unsigned long long)mValue);
return str;
}
diff --git a/media/libmedia/MemoryLeakTrackUtil.cpp b/media/libmedia/MemoryLeakTrackUtil.cpp
index d31f721..554dbae 100644
--- a/media/libmedia/MemoryLeakTrackUtil.cpp
+++ b/media/libmedia/MemoryLeakTrackUtil.cpp
@@ -173,7 +173,7 @@ void dumpMemoryAddresses(int fd)
#else
// Does nothing
-void dumpMemoryAddresses(int fd) {}
+void dumpMemoryAddresses(int fd __unused) {}
#endif
} // namespace android
diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp
index 2cc4685..6da5348 100644
--- a/media/libmedia/ToneGenerator.cpp
+++ b/media/libmedia/ToneGenerator.cpp
@@ -984,7 +984,6 @@ void ToneGenerator::stopTone() {
if ((mStartTime.tv_sec != 0) && (clock_gettime(CLOCK_MONOTONIC, &stopTime) == 0)) {
time_t sec = stopTime.tv_sec - mStartTime.tv_sec;
long nsec = stopTime.tv_nsec - mStartTime.tv_nsec;
- long durationMs;
if (nsec < 0) {
--sec;
nsec += 1000000000;
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index 85ef401..45581f3 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -123,7 +123,7 @@ LOCAL_SHARED_LIBRARIES += \
libdl \
libRScpp \
-LOCAL_CFLAGS += -Wno-multichar -Werror
+LOCAL_CFLAGS += -Wno-multichar -Werror -Wall
LOCAL_CLANG := true
LOCAL_MODULE:= libstagefright
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index 003b09a..beb12ec 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -63,9 +63,11 @@ static const uint8_t kNalUnitTypeSeqParamSet = 0x07;
static const uint8_t kNalUnitTypePicParamSet = 0x08;
static const int64_t kInitialDelayTimeUs = 700000LL;
-static const char kMetaKey_Model[] = "com.android.model";
static const char kMetaKey_Version[] = "com.android.version";
+#ifdef SHOW_MODEL_BUILD
+static const char kMetaKey_Model[] = "com.android.model";
static const char kMetaKey_Build[] = "com.android.build";
+#endif
static const char kMetaKey_CaptureFps[] = "com.android.capture.fps";
/* uncomment to include model and build in meta */
diff --git a/media/libstagefright/MediaCodecListOverrides.cpp b/media/libstagefright/MediaCodecListOverrides.cpp
index 867a223..265b1ea 100644
--- a/media/libstagefright/MediaCodecListOverrides.cpp
+++ b/media/libstagefright/MediaCodecListOverrides.cpp
@@ -302,10 +302,10 @@ void exportResultsToXML(const char *fileName, const KeyedVector<AString, CodecSe
char *buf = (char *)malloc(size);
if (fread(buf, size, 1, f) == 1) {
overrides.setTo(buf, size);
-#if LOG_NDEBUG == 0
- ALOGV("Existing overrides:");
- printLongString(buf, size);
-#endif
+ if (!LOG_NDEBUG) {
+ ALOGV("Existing overrides:");
+ printLongString(buf, size);
+ }
} else {
ALOGE("Failed to read %s", fileName);
}
@@ -385,10 +385,10 @@ void exportResultsToXML(const char *fileName, const KeyedVector<AString, CodecSe
}
}
-#if LOG_NDEBUG == 0
- ALOGV("New overrides:");
- printLongString(overrides.c_str(), overrides.size());
-#endif
+ if (!LOG_NDEBUG) {
+ ALOGV("New overrides:");
+ printLongString(overrides.c_str(), overrides.size());
+ }
f = fopen(fileName, "wb");
if (f == NULL) {
diff --git a/media/libstagefright/MediaCodecSource.cpp b/media/libstagefright/MediaCodecSource.cpp
index 6568d25..b272448 100644
--- a/media/libstagefright/MediaCodecSource.cpp
+++ b/media/libstagefright/MediaCodecSource.cpp
@@ -682,7 +682,6 @@ void MediaCodecSource::onMessageReceived(const sp<AMessage> &msg) {
size_t size;
int64_t timeUs;
int32_t flags;
- native_handle_t* handle = NULL;
CHECK(msg->findInt32("index", &index));
CHECK(msg->findSize("offset", &offset));
diff --git a/media/libstagefright/filters/Android.mk b/media/libstagefright/filters/Android.mk
index c3eaa54..179f054 100644
--- a/media/libstagefright/filters/Android.mk
+++ b/media/libstagefright/filters/Android.mk
@@ -20,7 +20,7 @@ LOCAL_C_INCLUDES := \
intermediates := $(call intermediates-dir-for,STATIC_LIBRARIES,libRS,TARGET,)
LOCAL_C_INCLUDES += $(intermediates)
-LOCAL_CFLAGS += -Wno-multichar -Werror
+LOCAL_CFLAGS += -Wno-multichar -Werror -Wall
LOCAL_CLANG := true
LOCAL_MODULE:= libstagefright_mediafilter
diff --git a/media/libstagefright/foundation/Android.mk b/media/libstagefright/foundation/Android.mk
index 3c95f0b..c68264c 100644
--- a/media/libstagefright/foundation/Android.mk
+++ b/media/libstagefright/foundation/Android.mk
@@ -29,7 +29,7 @@ LOCAL_SHARED_LIBRARIES := \
liblog \
libpowermanager
-LOCAL_CFLAGS += -Wno-multichar -Werror
+LOCAL_CFLAGS += -Wno-multichar -Werror -Wall
LOCAL_CLANG := true
LOCAL_MODULE:= libstagefright_foundation
diff --git a/media/libstagefright/http/Android.mk b/media/libstagefright/http/Android.mk
index a627898..5fb51c1 100644
--- a/media/libstagefright/http/Android.mk
+++ b/media/libstagefright/http/Android.mk
@@ -21,7 +21,7 @@ LOCAL_MODULE:= libstagefright_http_support
LOCAL_CFLAGS += -Wno-multichar
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
include $(BUILD_SHARED_LIBRARY)
diff --git a/media/libstagefright/httplive/Android.mk b/media/libstagefright/httplive/Android.mk
index a30be66..2639deb 100644
--- a/media/libstagefright/httplive/Android.mk
+++ b/media/libstagefright/httplive/Android.mk
@@ -12,7 +12,7 @@ LOCAL_C_INCLUDES:= \
$(TOP)/frameworks/av/media/libstagefright \
$(TOP)/frameworks/native/include/media/openmax
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
LOCAL_SHARED_LIBRARIES := \
diff --git a/media/libstagefright/httplive/PlaylistFetcher.cpp b/media/libstagefright/httplive/PlaylistFetcher.cpp
index a4e523d..e44b0d9 100644
--- a/media/libstagefright/httplive/PlaylistFetcher.cpp
+++ b/media/libstagefright/httplive/PlaylistFetcher.cpp
@@ -750,8 +750,6 @@ void PlaylistFetcher::queueDiscontinuity(
}
void PlaylistFetcher::onMonitorQueue() {
- bool downloadMore = false;
-
// in the middle of an unfinished download, delay
// playlist refresh as it'll change seq numbers
if (!mDownloadState->hasSavedState()) {
diff --git a/media/libstagefright/id3/Android.mk b/media/libstagefright/id3/Android.mk
index f791899..68bd017 100644
--- a/media/libstagefright/id3/Android.mk
+++ b/media/libstagefright/id3/Android.mk
@@ -4,7 +4,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
ID3.cpp
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
LOCAL_MODULE := libstagefright_id3
@@ -18,7 +18,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
testid3.cpp
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
LOCAL_SHARED_LIBRARIES := \
diff --git a/media/libstagefright/matroska/Android.mk b/media/libstagefright/matroska/Android.mk
index 771952b..1e8c2b2 100644
--- a/media/libstagefright/matroska/Android.mk
+++ b/media/libstagefright/matroska/Android.mk
@@ -8,7 +8,7 @@ LOCAL_C_INCLUDES:= \
$(TOP)/external/libvpx/libwebm \
$(TOP)/frameworks/native/include/media/openmax \
-LOCAL_CFLAGS += -Wno-multichar -Werror
+LOCAL_CFLAGS += -Wno-multichar -Werror -Wall
LOCAL_CLANG := true
LOCAL_MODULE:= libstagefright_matroska
diff --git a/media/libstagefright/mpeg2ts/Android.mk b/media/libstagefright/mpeg2ts/Android.mk
index 0dcb3c5..16b0160 100644
--- a/media/libstagefright/mpeg2ts/Android.mk
+++ b/media/libstagefright/mpeg2ts/Android.mk
@@ -13,7 +13,7 @@ LOCAL_C_INCLUDES:= \
$(TOP)/frameworks/av/media/libstagefright \
$(TOP)/frameworks/native/include/media/openmax
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
LOCAL_MODULE:= libstagefright_mpeg2ts
diff --git a/media/libstagefright/omx/Android.mk b/media/libstagefright/omx/Android.mk
index 71cbcfc..5f0f567 100644
--- a/media/libstagefright/omx/Android.mk
+++ b/media/libstagefright/omx/Android.mk
@@ -31,7 +31,7 @@ LOCAL_SHARED_LIBRARIES := \
libdl
LOCAL_MODULE:= libstagefright_omx
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
include $(BUILD_SHARED_LIBRARY)
diff --git a/media/libstagefright/omx/tests/Android.mk b/media/libstagefright/omx/tests/Android.mk
index f7280f6..02e97f1 100644
--- a/media/libstagefright/omx/tests/Android.mk
+++ b/media/libstagefright/omx/tests/Android.mk
@@ -11,7 +11,7 @@ LOCAL_C_INCLUDES := \
$(TOP)/frameworks/av/media/libstagefright \
$(TOP)/frameworks/native/include/media/openmax
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
LOCAL_MODULE := omx_tests
@@ -38,7 +38,7 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_C_INCLUDES := \
frameworks/av/media/libstagefright/omx \
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
include $(BUILD_NATIVE_TEST)
diff --git a/media/libstagefright/rtsp/Android.mk b/media/libstagefright/rtsp/Android.mk
index 12a946c..c5e8c35 100644
--- a/media/libstagefright/rtsp/Android.mk
+++ b/media/libstagefright/rtsp/Android.mk
@@ -31,7 +31,7 @@ ifeq ($(TARGET_ARCH),arm)
LOCAL_CFLAGS += -Wno-psabi
endif
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
@@ -55,7 +55,7 @@ LOCAL_C_INCLUDES:= \
frameworks/av/media/libstagefright \
$(TOP)/frameworks/native/include/media/openmax
-LOCAL_CFLAGS += -Wno-multichar -Werror
+LOCAL_CFLAGS += -Wno-multichar -Werror -Wall
LOCAL_CLANG := true
LOCAL_MODULE_TAGS := optional
diff --git a/media/libstagefright/tests/Android.mk b/media/libstagefright/tests/Android.mk
index 532106b..111e6c5 100644
--- a/media/libstagefright/tests/Android.mk
+++ b/media/libstagefright/tests/Android.mk
@@ -31,7 +31,7 @@ LOCAL_C_INCLUDES := \
frameworks/av/media/libstagefright/include \
$(TOP)/frameworks/native/include/media/openmax \
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
LOCAL_32_BIT_ONLY := true
@@ -63,7 +63,7 @@ LOCAL_C_INCLUDES := \
frameworks/av/media/libstagefright/include \
$(TOP)/frameworks/native/include/media/openmax \
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
include $(BUILD_NATIVE_TEST)
@@ -93,7 +93,7 @@ LOCAL_C_INCLUDES := \
LOCAL_32_BIT_ONLY := true
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
include $(BUILD_NATIVE_TEST)
diff --git a/media/libstagefright/timedtext/Android.mk b/media/libstagefright/timedtext/Android.mk
index 1202a4d..58fb12f 100644
--- a/media/libstagefright/timedtext/Android.mk
+++ b/media/libstagefright/timedtext/Android.mk
@@ -9,7 +9,7 @@ LOCAL_SRC_FILES:= \
TimedTextSRTSource.cpp \
TimedTextPlayer.cpp
-LOCAL_CFLAGS += -Wno-multichar -Werror
+LOCAL_CFLAGS += -Wno-multichar -Werror -Wall
LOCAL_CLANG := true
LOCAL_C_INCLUDES:= \
diff --git a/media/libstagefright/timedtext/test/Android.mk b/media/libstagefright/timedtext/test/Android.mk
index 06ea307..e0e0e0d 100644
--- a/media/libstagefright/timedtext/test/Android.mk
+++ b/media/libstagefright/timedtext/test/Android.mk
@@ -26,7 +26,7 @@ LOCAL_SHARED_LIBRARIES := \
libstagefright_foundation \
libutils
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
include $(BUILD_NATIVE_TEST)
diff --git a/media/libstagefright/webm/Android.mk b/media/libstagefright/webm/Android.mk
index c9fb83c..bc53c56 100644
--- a/media/libstagefright/webm/Android.mk
+++ b/media/libstagefright/webm/Android.mk
@@ -3,7 +3,7 @@ include $(CLEAR_VARS)
LOCAL_CPPFLAGS += -D__STDINT_LIMITS
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
LOCAL_SRC_FILES:= EbmlUtil.cpp \
diff --git a/media/libstagefright/wifi-display/Android.mk b/media/libstagefright/wifi-display/Android.mk
index 0d9ba6f..fb28624 100644
--- a/media/libstagefright/wifi-display/Android.mk
+++ b/media/libstagefright/wifi-display/Android.mk
@@ -30,7 +30,7 @@ LOCAL_SHARED_LIBRARIES:= \
libui \
libutils \
-LOCAL_CFLAGS += -Wno-multichar -Werror
+LOCAL_CFLAGS += -Wno-multichar -Werror -Wall
LOCAL_CLANG := true
LOCAL_MODULE:= libstagefright_wfd
diff --git a/media/libstagefright/wifi-display/VideoFormats.cpp b/media/libstagefright/wifi-display/VideoFormats.cpp
index 27393fb..dbc511c 100644
--- a/media/libstagefright/wifi-display/VideoFormats.cpp
+++ b/media/libstagefright/wifi-display/VideoFormats.cpp
@@ -382,7 +382,6 @@ bool VideoFormats::parseFormatSpec(const char *spec) {
disableAll();
unsigned native, dummy;
- unsigned res[3];
size_t size = strlen(spec);
size_t offset = 0;
diff --git a/media/libstagefright/wifi-display/rtp/RTPSender.cpp b/media/libstagefright/wifi-display/rtp/RTPSender.cpp
index a4eb378..c66a898 100644
--- a/media/libstagefright/wifi-display/rtp/RTPSender.cpp
+++ b/media/libstagefright/wifi-display/rtp/RTPSender.cpp
@@ -252,8 +252,6 @@ status_t RTPSender::queueTSPackets(
int64_t timeUs;
CHECK(tsPackets->meta()->findInt64("timeUs", &timeUs));
- const size_t numTSPackets = tsPackets->size() / 188;
-
size_t srcOffset = 0;
while (srcOffset < tsPackets->size()) {
sp<ABuffer> udpPacket =
diff --git a/media/libstagefright/wifi-display/source/PlaybackSession.cpp b/media/libstagefright/wifi-display/source/PlaybackSession.cpp
index b37a46c..5e2f0bf 100644
--- a/media/libstagefright/wifi-display/source/PlaybackSession.cpp
+++ b/media/libstagefright/wifi-display/source/PlaybackSession.cpp
@@ -821,21 +821,27 @@ void WifiDisplaySource::PlaybackSession::schedulePullExtractor() {
return;
}
+ int64_t delayUs = 1000000; // default delay is 1 sec
int64_t sampleTimeUs;
status_t err = mExtractor->getSampleTime(&sampleTimeUs);
- int64_t nowUs = ALooper::GetNowUs();
+ if (err == OK) {
+ int64_t nowUs = ALooper::GetNowUs();
- if (mFirstSampleTimeRealUs < 0ll) {
- mFirstSampleTimeRealUs = nowUs;
- mFirstSampleTimeUs = sampleTimeUs;
- }
+ if (mFirstSampleTimeRealUs < 0ll) {
+ mFirstSampleTimeRealUs = nowUs;
+ mFirstSampleTimeUs = sampleTimeUs;
+ }
- int64_t whenUs = sampleTimeUs - mFirstSampleTimeUs + mFirstSampleTimeRealUs;
+ int64_t whenUs = sampleTimeUs - mFirstSampleTimeUs + mFirstSampleTimeRealUs;
+ delayUs = whenUs - nowUs;
+ } else {
+ ALOGW("could not get sample time (%d)", err);
+ }
sp<AMessage> msg = new AMessage(kWhatPullExtractorSample, this);
msg->setInt32("generation", mPullExtractorGeneration);
- msg->post(whenUs - nowUs);
+ msg->post(delayUs);
mPullExtractorPending = true;
}
diff --git a/media/libstagefright/yuv/Android.mk b/media/libstagefright/yuv/Android.mk
index 5b36825..dc67288 100644
--- a/media/libstagefright/yuv/Android.mk
+++ b/media/libstagefright/yuv/Android.mk
@@ -12,7 +12,7 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_MODULE:= libstagefright_yuv
-LOCAL_CFLAGS += -Werror
+LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
include $(BUILD_SHARED_LIBRARY)