Loading media/tests/audiotests/Android.mk +12 −10 Original line number Diff line number Diff line ifeq ($(TARGET_ARCH),arm) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE:= shared_mem_test LOCAL_SRC_FILES := \ shared_mem_test.cpp LOCAL_SHARED_LIBRARIES := \ libc \ libcutils \ Loading @@ -14,8 +15,9 @@ LOCAL_SHARED_LIBRARIES := \ libbinder \ libhardware_legacy \ libmedia LOCAL_MODULE_TAGS := tests include $(BUILD_EXECUTABLE) LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code endif include $(BUILD_EXECUTABLE) media/tests/audiotests/shared_mem_test.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -133,12 +133,8 @@ int AudioTrackTest::Test01() { ************************************************************/ void AudioTrackTest::Generate(short *buffer, long bufferSz, long amplitude, unsigned long &phi, long dPhi) { long pi13 = 25736; // 2^13*pi // fill buffer for(int i0=0; i0<bufferSz; i0++) { long sample; long l0, l1; buffer[i0] = ComputeSine( amplitude, phi); phi += dPhi; } Loading Loading @@ -210,7 +206,7 @@ int main() { * global main * ************************************************************/ int main(int argc, char *argv[]) { int main() { return android::main(); } media/tests/players/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -26,5 +26,6 @@ LOCAL_SHARED_LIBRARIES:= \ LOCAL_MODULE:= invoke_mock_media_player LOCAL_MODULE_TAGS := tests eng LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code include $(BUILD_SHARED_LIBRARY) media/tests/players/invoke_mock_media_player.cpp +19 −15 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ class Player: public MediaPlayerBase virtual bool hardwareOutput() {return true;} virtual status_t setDataSource( const sp<IMediaHTTPService> &httpService, const sp<IMediaHTTPService>& /* httpService */, const char *url, const KeyedVector<String8, String8> *) { ALOGV("setDataSource %s", url); Loading @@ -69,24 +69,28 @@ class Player: public MediaPlayerBase return OK; } virtual status_t setDataSource(int fd, int64_t offset, int64_t length) {return OK;} virtual status_t setDataSource(int /* fd */, int64_t /* offset */, int64_t /* length */) { return OK; } virtual status_t setVideoSurfaceTexture( const sp<IGraphicBufferProducer>& bufferProducer) {return OK;} const sp<IGraphicBufferProducer>& /* bufferProducer */) { return OK; } virtual status_t prepare() { return OK; } virtual status_t prepareAsync() { return OK; } virtual status_t start() { return OK; } virtual status_t stop() { return OK; } virtual status_t pause() { return OK; } virtual bool isPlaying() { return true; } virtual status_t seekTo(int msec) {return OK;} virtual status_t getCurrentPosition(int *msec) {return OK;} virtual status_t getDuration(int *msec) {return OK;} virtual status_t seekTo(int /* msec */) { return OK; } virtual status_t getCurrentPosition(int* /* msec */) { return OK; } virtual status_t getDuration(int* /* msec */) { return OK; } virtual status_t reset() {return OK;} virtual status_t setLooping(int loop) {return OK;} virtual status_t setLooping(int /* loop */) { return OK; } virtual player_type playerType() {return TEST_PLAYER;} virtual status_t invoke(const Parcel& request, Parcel *reply); virtual status_t setParameter(int key, const Parcel &request) {return OK;} virtual status_t getParameter(int key, Parcel *reply) {return OK;} virtual status_t setParameter(int /* key */, const Parcel& /* request */) { return OK; } virtual status_t getParameter(int /* key */, Parcel* /* reply */) { return OK; } private: Loading Loading
media/tests/audiotests/Android.mk +12 −10 Original line number Diff line number Diff line ifeq ($(TARGET_ARCH),arm) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE:= shared_mem_test LOCAL_SRC_FILES := \ shared_mem_test.cpp LOCAL_SHARED_LIBRARIES := \ libc \ libcutils \ Loading @@ -14,8 +15,9 @@ LOCAL_SHARED_LIBRARIES := \ libbinder \ libhardware_legacy \ libmedia LOCAL_MODULE_TAGS := tests include $(BUILD_EXECUTABLE) LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code endif include $(BUILD_EXECUTABLE)
media/tests/audiotests/shared_mem_test.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -133,12 +133,8 @@ int AudioTrackTest::Test01() { ************************************************************/ void AudioTrackTest::Generate(short *buffer, long bufferSz, long amplitude, unsigned long &phi, long dPhi) { long pi13 = 25736; // 2^13*pi // fill buffer for(int i0=0; i0<bufferSz; i0++) { long sample; long l0, l1; buffer[i0] = ComputeSine( amplitude, phi); phi += dPhi; } Loading Loading @@ -210,7 +206,7 @@ int main() { * global main * ************************************************************/ int main(int argc, char *argv[]) { int main() { return android::main(); }
media/tests/players/Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -26,5 +26,6 @@ LOCAL_SHARED_LIBRARIES:= \ LOCAL_MODULE:= invoke_mock_media_player LOCAL_MODULE_TAGS := tests eng LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code include $(BUILD_SHARED_LIBRARY)
media/tests/players/invoke_mock_media_player.cpp +19 −15 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ class Player: public MediaPlayerBase virtual bool hardwareOutput() {return true;} virtual status_t setDataSource( const sp<IMediaHTTPService> &httpService, const sp<IMediaHTTPService>& /* httpService */, const char *url, const KeyedVector<String8, String8> *) { ALOGV("setDataSource %s", url); Loading @@ -69,24 +69,28 @@ class Player: public MediaPlayerBase return OK; } virtual status_t setDataSource(int fd, int64_t offset, int64_t length) {return OK;} virtual status_t setDataSource(int /* fd */, int64_t /* offset */, int64_t /* length */) { return OK; } virtual status_t setVideoSurfaceTexture( const sp<IGraphicBufferProducer>& bufferProducer) {return OK;} const sp<IGraphicBufferProducer>& /* bufferProducer */) { return OK; } virtual status_t prepare() { return OK; } virtual status_t prepareAsync() { return OK; } virtual status_t start() { return OK; } virtual status_t stop() { return OK; } virtual status_t pause() { return OK; } virtual bool isPlaying() { return true; } virtual status_t seekTo(int msec) {return OK;} virtual status_t getCurrentPosition(int *msec) {return OK;} virtual status_t getDuration(int *msec) {return OK;} virtual status_t seekTo(int /* msec */) { return OK; } virtual status_t getCurrentPosition(int* /* msec */) { return OK; } virtual status_t getDuration(int* /* msec */) { return OK; } virtual status_t reset() {return OK;} virtual status_t setLooping(int loop) {return OK;} virtual status_t setLooping(int /* loop */) { return OK; } virtual player_type playerType() {return TEST_PLAYER;} virtual status_t invoke(const Parcel& request, Parcel *reply); virtual status_t setParameter(int key, const Parcel &request) {return OK;} virtual status_t getParameter(int key, Parcel *reply) {return OK;} virtual status_t setParameter(int /* key */, const Parcel& /* request */) { return OK; } virtual status_t getParameter(int /* key */, Parcel* /* reply */) { return OK; } private: Loading