am 4a4c7289: Fix race condition when streaming MP2TS to media server
* commit '4a4c728965b10df683d37b4b7ac27211e02006ad':
Fix race condition when streaming MP2TS to media server
diff --git a/src/Android.mk b/src/Android.mk
index 60a7cab..8d2a7ed 100644
--- a/src/Android.mk
+++ b/src/Android.mk
@@ -177,7 +177,6 @@
LOCAL_SHARED_LIBRARIES := \
libutils \
libmedia \
- libmedia_native \
libbinder \
libstagefright \
libstagefright_foundation \
diff --git a/src/android/android_sles_conversions.h b/src/android/android_sles_conversions.h
index 9f6aac4..cab6578 100644
--- a/src/android/android_sles_conversions.h
+++ b/src/android/android_sles_conversions.h
@@ -62,13 +62,15 @@
}
-static inline audio_channel_mask_t sles_to_android_channelMaskIn(SLuint32 nbChannels, SLuint32 channelMask) {
+static inline audio_channel_mask_t sles_to_android_channelMaskIn(SLuint32 nbChannels,
+ SLuint32 channelMask) {
// FIXME handle channel mask mapping between SL ES and Android
return audio_channel_in_mask_from_count(nbChannels);
}
-static inline audio_channel_mask_t sles_to_android_channelMaskOut(SLuint32 nbChannels, SLuint32 channelMask) {
+static inline audio_channel_mask_t sles_to_android_channelMaskOut(SLuint32 nbChannels,
+ SLuint32 channelMask) {
// FIXME handle channel mask mapping between SL ES and Android
return audio_channel_out_mask_from_count(nbChannels);
}
diff --git a/tests/mimeUri/slesTestSlowDownUri.cpp b/tests/mimeUri/slesTestSlowDownUri.cpp
index 0c2dc7e..2fc472d 100644
--- a/tests/mimeUri/slesTestSlowDownUri.cpp
+++ b/tests/mimeUri/slesTestSlowDownUri.cpp
@@ -282,7 +282,8 @@
res = (*seekItf)->SetLoop(seekItf, SL_BOOLEAN_TRUE, 0, SL_TIME_UNKNOWN); CheckErr(res);
/* Set up marker and position callbacks */
- res = (*playItf)->RegisterCallback(playItf, PlayEventCallback, (void *) rateItf); CheckErr(res);
+ res = (*playItf)->RegisterCallback(playItf, PlayEventCallback, (void *) rateItf);
+ CheckErr(res);
res = (*playItf)->SetCallbackEventsMask(playItf,
SL_PLAYEVENT_HEADATEND | SL_PLAYEVENT_HEADATMARKER | SL_PLAYEVENT_HEADATNEWPOS);
res = (*playItf)->SetMarkerPosition(playItf, 1500); CheckErr(res);
@@ -307,7 +308,8 @@
for (index = 0; ; ++index) {
SLpermille minRate, maxRate, stepSize;
SLuint32 capabilities;
- res = (*rateItf)->GetRateRange(rateItf, index, &minRate, &maxRate, &stepSize, &capabilities);
+ res = (*rateItf)->GetRateRange(rateItf, index, &minRate, &maxRate, &stepSize,
+ &capabilities);
if (res == SL_RESULT_PARAMETER_INVALID) {
if (index == 0) {
fprintf(stderr, "implementation supports no rate ranges\n");
diff --git a/tests/sandbox/Android.mk b/tests/sandbox/Android.mk
index 4f39385..929c364 100644
--- a/tests/sandbox/Android.mk
+++ b/tests/sandbox/Android.mk
@@ -322,7 +322,8 @@
LOCAL_MODULE_TAGS := tests
LOCAL_C_INCLUDES:= \
- $(call include-path-for, wilhelm)
+ $(call include-path-for, wilhelm) \
+ $(call include-path-for, audio-utils)
LOCAL_SRC_FILES:= \
playbq.c
@@ -343,8 +344,7 @@
LOCAL_MODULE:= slesTest_playbq
-# commented out because libsndfile is not yet standard
-#include $(BUILD_EXECUTABLE)
+include $(BUILD_EXECUTABLE)
# monkey
diff --git a/tests/sandbox/playbq.c b/tests/sandbox/playbq.c
index 68e236a..e1a7639 100644
--- a/tests/sandbox/playbq.c
+++ b/tests/sandbox/playbq.c
@@ -26,7 +26,7 @@
#include <SLES/OpenSLES.h>
#ifdef ANDROID
-#include "sndfile.h"
+#include <audio_utils/sndfile.h>
#else
#include <sndfile.h>
#endif
@@ -225,9 +225,6 @@
switch (sfinfo.format & SF_FORMAT_SUBMASK) {
case SF_FORMAT_PCM_16:
case SF_FORMAT_PCM_U8:
- case SF_FORMAT_ULAW:
- case SF_FORMAT_ALAW:
- case SF_FORMAT_IMA_ADPCM:
break;
default:
fprintf(stderr, "unsupported sub-format 0x%x\n", sfinfo.format & SF_FORMAT_SUBMASK);