From 559bf2836f5da25b75bfb229fec0d20d540ee426 Mon Sep 17 00:00:00 2001 From: James Dong Date: Wed, 28 Mar 2012 10:29:14 -0700 Subject: AV Android make files changes o plus a few file relocation: ActivityManager.cpp/h, SoundPool.h, etc o remove some runtime dependencies to libandroid, libandroid_runtime, etc Change-Id: I047a47c5fb361dd5cf85cd98798c39f629a75d10 --- cmds/stagefright/Android.mk | 16 +- drm/common/Android.mk | 6 +- drm/drmserver/Android.mk | 6 +- drm/libdrmframework/Android.mk | 4 +- drm/libdrmframework/plugins/common/util/Android.mk | 4 +- .../plugins/forward-lock/FwdLockEngine/Android.mk | 4 +- .../internal-format/converter/Android.mk | 2 +- .../internal-format/decoder/Android.mk | 2 +- drm/libdrmframework/plugins/passthru/Android.mk | 8 +- include/media/SoundPool.h | 238 +++++++++++++++++++++ include/private/hwui/DrawGlInfo.h | 67 ------ libvideoeditor/lvpp/Android.mk | 10 +- libvideoeditor/lvpp/PreviewRenderer.h | 1 - libvideoeditor/vss/src/Android.mk | 2 +- .../vss/stagefrightshells/src/Android.mk | 10 +- media/libaah_rtp/Android.mk | 6 +- media/libmedia/SoundPool.cpp | 2 +- media/libmedia/SoundPool.h | 238 --------------------- media/libmedia/SoundPoolThread.h | 2 +- media/libmediaplayerservice/ActivityManager.cpp | 61 ++++++ media/libmediaplayerservice/ActivityManager.h | 31 +++ media/libmediaplayerservice/Android.mk | 6 +- media/libmediaplayerservice/MediaPlayerService.cpp | 3 +- .../libmediaplayerservice/MediaRecorderClient.cpp | 1 - .../MetadataRetrieverClient.cpp | 1 - media/libmediaplayerservice/nuplayer/Android.mk | 8 +- media/libstagefright/Android.mk | 4 +- media/libstagefright/chromium_http/Android.mk | 2 +- media/libstagefright/codecs/aacdec/Android.mk | 4 +- media/libstagefright/codecs/aacenc/Android.mk | 12 +- media/libstagefright/codecs/amrnb/dec/Android.mk | 6 +- media/libstagefright/codecs/amrnb/enc/Android.mk | 4 +- media/libstagefright/codecs/amrwb/Android.mk | 2 +- media/libstagefright/codecs/amrwbenc/Android.mk | 12 +- media/libstagefright/codecs/avc/enc/Android.mk | 2 +- media/libstagefright/codecs/g711/dec/Android.mk | 2 +- .../libstagefright/codecs/m4v_h263/dec/Android.mk | 4 +- .../libstagefright/codecs/m4v_h263/enc/Android.mk | 2 +- media/libstagefright/codecs/mp3dec/Android.mk | 4 +- media/libstagefright/codecs/on2/dec/Android.mk | 2 +- media/libstagefright/codecs/on2/h264dec/Android.mk | 2 +- media/libstagefright/codecs/vorbis/dec/Android.mk | 2 +- media/libstagefright/foundation/Android.mk | 2 +- media/libstagefright/httplive/Android.mk | 2 +- media/libstagefright/mpeg2ts/Android.mk | 2 +- media/libstagefright/omx/Android.mk | 2 +- media/libstagefright/omx/tests/Android.mk | 2 +- media/libstagefright/rtsp/Android.mk | 4 +- media/libstagefright/tests/Android.mk | 5 +- media/libstagefright/timedtext/Android.mk | 4 +- media/mediaserver/Android.mk | 8 +- services/camera/tests/CameraServiceTest/Android.mk | 2 +- 52 files changed, 426 insertions(+), 412 deletions(-) create mode 100644 include/media/SoundPool.h delete mode 100644 include/private/hwui/DrawGlInfo.h delete mode 100644 media/libmedia/SoundPool.h create mode 100644 media/libmediaplayerservice/ActivityManager.cpp create mode 100644 media/libmediaplayerservice/ActivityManager.h diff --git a/cmds/stagefright/Android.mk b/cmds/stagefright/Android.mk index 52a9293..8687fab 100644 --- a/cmds/stagefright/Android.mk +++ b/cmds/stagefright/Android.mk @@ -12,8 +12,8 @@ LOCAL_SHARED_LIBRARIES := \ libjpeg libgui LOCAL_C_INCLUDES:= \ - frameworks/base/media/libstagefright \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright \ + frameworks/av/media/libstagefright/include \ $(TOP)/frameworks/native/include/media/openmax \ external/jpeg \ @@ -37,7 +37,7 @@ LOCAL_SHARED_LIBRARIES := \ libstagefright liblog libutils libbinder libstagefright_foundation LOCAL_C_INCLUDES:= \ - frameworks/base/media/libstagefright \ + frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS += -Wno-multichar @@ -60,7 +60,7 @@ LOCAL_SHARED_LIBRARIES := \ libstagefright liblog libutils libbinder libstagefright_foundation LOCAL_C_INCLUDES:= \ - frameworks/base/media/libstagefright \ + frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS += -Wno-multichar @@ -84,7 +84,7 @@ LOCAL_SHARED_LIBRARIES := \ libstagefright liblog libutils libbinder libstagefright_foundation LOCAL_C_INCLUDES:= \ - frameworks/base/media/libstagefright \ + frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS += -Wno-multichar @@ -107,7 +107,7 @@ LOCAL_SHARED_LIBRARIES := \ libstagefright_foundation libmedia libmedia_native LOCAL_C_INCLUDES:= \ - frameworks/base/media/libstagefright \ + frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS += -Wno-multichar @@ -130,7 +130,7 @@ LOCAL_SHARED_LIBRARIES := \ libmedia libmedia_native libgui libcutils libui LOCAL_C_INCLUDES:= \ - frameworks/base/media/libstagefright \ + frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS += -Wno-multichar @@ -154,7 +154,7 @@ LOCAL_SHARED_LIBRARIES := \ libmedia libmedia_native libgui libcutils libui LOCAL_C_INCLUDES:= \ - frameworks/base/media/libstagefright \ + frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS += -Wno-multichar diff --git a/drm/common/Android.mk b/drm/common/Android.mk index f1136c9..db67534 100644 --- a/drm/common/Android.mk +++ b/drm/common/Android.mk @@ -32,9 +32,9 @@ LOCAL_SRC_FILES:= \ ReadWriteUtils.cpp LOCAL_C_INCLUDES := \ - $(TOP)/frameworks/base/include \ - $(TOP)/frameworks/base/drm/libdrmframework/include \ - $(TOP)/frameworks/base/drm/libdrmframework/plugins/common/include + $(TOP)/frameworks/av/include \ + $(TOP)/frameworks/av/drm/libdrmframework/include \ + $(TOP)/frameworks/av/drm/libdrmframework/plugins/common/include LOCAL_MODULE:= libdrmframeworkcommon diff --git a/drm/drmserver/Android.mk b/drm/drmserver/Android.mk index fd417cb..96205a1 100644 --- a/drm/drmserver/Android.mk +++ b/drm/drmserver/Android.mk @@ -30,9 +30,9 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_STATIC_LIBRARIES := libdrmframeworkcommon LOCAL_C_INCLUDES := \ - $(TOP)/frameworks/base/include \ - $(TOP)/frameworks/base/drm/libdrmframework/include \ - $(TOP)/frameworks/base/drm/libdrmframework/plugins/common/include + $(TOP)/frameworks/av/include \ + $(TOP)/frameworks/av/drm/libdrmframework/include \ + $(TOP)/frameworks/av/drm/libdrmframework/plugins/common/include LOCAL_MODULE:= drmserver diff --git a/drm/libdrmframework/Android.mk b/drm/libdrmframework/Android.mk index c534402..9e07fe3 100644 --- a/drm/libdrmframework/Android.mk +++ b/drm/libdrmframework/Android.mk @@ -32,8 +32,8 @@ LOCAL_STATIC_LIBRARIES := \ libdrmframeworkcommon LOCAL_C_INCLUDES += \ - $(TOP)/frameworks/base/drm/libdrmframework/include \ - $(TOP)/frameworks/base/include + $(TOP)/frameworks/av/drm/libdrmframework/include \ + $(TOP)/frameworks/av/include diff --git a/drm/libdrmframework/plugins/common/util/Android.mk b/drm/libdrmframework/plugins/common/util/Android.mk index 15dda80..d096453 100644 --- a/drm/libdrmframework/plugins/common/util/Android.mk +++ b/drm/libdrmframework/plugins/common/util/Android.mk @@ -26,12 +26,10 @@ LOCAL_SHARED_LIBRARIES := \ libutils \ libdl \ libdvm \ - libandroid_runtime \ - libnativehelper \ liblog -base := frameworks/base +base := frameworks/av LOCAL_C_INCLUDES += \ $(JNI_H_INCLUDE) \ diff --git a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/Android.mk b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/Android.mk index e359dbd..7c2b622 100644 --- a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/Android.mk +++ b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/Android.mk @@ -20,7 +20,7 @@ include $(CLEAR_VARS) # The flag below turns on local debug printouts #LOCAL_CFLAGS += -DDRM_OMA_FL_ENGINE_DEBUG -base := frameworks/base +base := frameworks/av # Determine whether the DRM framework uses 64-bit data types for file offsets and do the same. ifneq ($(shell grep -c 'off64_t offset' $(base)/drm/libdrmframework/plugins/common/include/IDrmEngine.h), 0) @@ -37,8 +37,6 @@ LOCAL_SHARED_LIBRARIES := \ libicuuc \ libutils \ libdl \ - libandroid_runtime \ - libnativehelper \ libcrypto \ libssl \ libdrmframework diff --git a/drm/libdrmframework/plugins/forward-lock/internal-format/converter/Android.mk b/drm/libdrmframework/plugins/forward-lock/internal-format/converter/Android.mk index 00bb788..37a3851 100644 --- a/drm/libdrmframework/plugins/forward-lock/internal-format/converter/Android.mk +++ b/drm/libdrmframework/plugins/forward-lock/internal-format/converter/Android.mk @@ -21,7 +21,7 @@ LOCAL_SRC_FILES := \ FwdLockConv.c LOCAL_C_INCLUDES := \ - frameworks/base/drm/libdrmframework/plugins/forward-lock/internal-format/common \ + frameworks/av/drm/libdrmframework/plugins/forward-lock/internal-format/common \ external/openssl/include LOCAL_SHARED_LIBRARIES := libcrypto diff --git a/drm/libdrmframework/plugins/forward-lock/internal-format/decoder/Android.mk b/drm/libdrmframework/plugins/forward-lock/internal-format/decoder/Android.mk index b625edf..d9b5cfd 100644 --- a/drm/libdrmframework/plugins/forward-lock/internal-format/decoder/Android.mk +++ b/drm/libdrmframework/plugins/forward-lock/internal-format/decoder/Android.mk @@ -21,7 +21,7 @@ LOCAL_SRC_FILES := \ FwdLockFile.c LOCAL_C_INCLUDES := \ - frameworks/base/drm/libdrmframework/plugins/forward-lock/internal-format/common \ + frameworks/av/drm/libdrmframework/plugins/forward-lock/internal-format/common \ external/openssl/include LOCAL_SHARED_LIBRARIES := libcrypto diff --git a/drm/libdrmframework/plugins/passthru/Android.mk b/drm/libdrmframework/plugins/passthru/Android.mk index d0d1439..d170d49 100644 --- a/drm/libdrmframework/plugins/passthru/Android.mk +++ b/drm/libdrmframework/plugins/passthru/Android.mk @@ -29,10 +29,10 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_C_INCLUDES += \ - $(TOP)/frameworks/base/drm/libdrmframework/include \ - $(TOP)/frameworks/base/drm/libdrmframework/plugins/passthru/include \ - $(TOP)/frameworks/base/drm/libdrmframework/plugins/common/include \ - $(TOP)/frameworks/base/include + $(TOP)/frameworks/av/drm/libdrmframework/include \ + $(TOP)/frameworks/av/drm/libdrmframework/plugins/passthru/include \ + $(TOP)/frameworks/av/drm/libdrmframework/plugins/common/include \ + $(TOP)/frameworks/av/include # Set the following flag to enable the decryption passthru flow #LOCAL_CFLAGS += -DENABLE_PASSTHRU_DECRYPTION diff --git a/include/media/SoundPool.h b/include/media/SoundPool.h new file mode 100644 index 0000000..002b045 --- /dev/null +++ b/include/media/SoundPool.h @@ -0,0 +1,238 @@ +/* + * Copyright (C) 2007 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SOUNDPOOL_H_ +#define SOUNDPOOL_H_ + +#include +#include +#include +#include +#include + +namespace android { + +static const int IDLE_PRIORITY = -1; + +// forward declarations +class SoundEvent; +class SoundPoolThread; +class SoundPool; + +// for queued events +class SoundPoolEvent { +public: + SoundPoolEvent(int msg, int arg1=0, int arg2=0) : + mMsg(msg), mArg1(arg1), mArg2(arg2) {} + int mMsg; + int mArg1; + int mArg2; + enum MessageType { INVALID, SAMPLE_LOADED }; +}; + +// callback function prototype +typedef void SoundPoolCallback(SoundPoolEvent event, SoundPool* soundPool, void* user); + +// tracks samples used by application +class Sample : public RefBase { +public: + enum sample_state { UNLOADED, LOADING, READY, UNLOADING }; + Sample(int sampleID, const char* url); + Sample(int sampleID, int fd, int64_t offset, int64_t length); + ~Sample(); + int sampleID() { return mSampleID; } + int numChannels() { return mNumChannels; } + int sampleRate() { return mSampleRate; } + audio_format_t format() { return mFormat; } + size_t size() { return mSize; } + int state() { return mState; } + uint8_t* data() { return static_cast(mData->pointer()); } + status_t doLoad(); + void startLoad() { mState = LOADING; } + sp getIMemory() { return mData; } + + // hack + void init(int numChannels, int sampleRate, audio_format_t format, size_t size, sp data ) { + mNumChannels = numChannels; mSampleRate = sampleRate; mFormat = format; mSize = size; mData = data; } + +private: + void init(); + + size_t mSize; + volatile int32_t mRefCount; + uint16_t mSampleID; + uint16_t mSampleRate; + uint8_t mState : 3; + uint8_t mNumChannels : 2; + audio_format_t mFormat; + int mFd; + int64_t mOffset; + int64_t mLength; + char* mUrl; + sp mData; +}; + +// stores pending events for stolen channels +class SoundEvent +{ +public: + SoundEvent() : mChannelID(0), mLeftVolume(0), mRightVolume(0), + mPriority(IDLE_PRIORITY), mLoop(0), mRate(0) {} + void set(const sp& sample, int channelID, float leftVolume, + float rightVolume, int priority, int loop, float rate); + sp sample() { return mSample; } + int channelID() { return mChannelID; } + float leftVolume() { return mLeftVolume; } + float rightVolume() { return mRightVolume; } + int priority() { return mPriority; } + int loop() { return mLoop; } + float rate() { return mRate; } + void clear() { mChannelID = 0; mSample.clear(); } + +protected: + sp mSample; + int mChannelID; + float mLeftVolume; + float mRightVolume; + int mPriority; + int mLoop; + float mRate; +}; + +// for channels aka AudioTracks +class SoundChannel : public SoundEvent { +public: + enum state { IDLE, RESUMING, STOPPING, PAUSED, PLAYING }; + SoundChannel() : mAudioTrack(NULL), mState(IDLE), mNumChannels(1), + mPos(0), mToggle(0), mAutoPaused(false) {} + ~SoundChannel(); + void init(SoundPool* soundPool); + void play(const sp& sample, int channelID, float leftVolume, float rightVolume, + int priority, int loop, float rate); + void setVolume_l(float leftVolume, float rightVolume); + void setVolume(float leftVolume, float rightVolume); + void stop_l(); + void stop(); + void pause(); + void autoPause(); + void resume(); + void autoResume(); + void setRate(float rate); + int state() { return mState; } + void setPriority(int priority) { mPriority = priority; } + void setLoop(int loop); + int numChannels() { return mNumChannels; } + void clearNextEvent() { mNextEvent.clear(); } + void nextEvent(); + int nextChannelID() { return mNextEvent.channelID(); } + void dump(); + +private: + static void callback(int event, void* user, void *info); + void process(int event, void *info, unsigned long toggle); + bool doStop_l(); + + SoundPool* mSoundPool; + AudioTrack* mAudioTrack; + SoundEvent mNextEvent; + Mutex mLock; + int mState; + int mNumChannels; + int mPos; + int mAudioBufferSize; + unsigned long mToggle; + bool mAutoPaused; +}; + +// application object for managing a pool of sounds +class SoundPool { + friend class SoundPoolThread; + friend class SoundChannel; +public: + SoundPool(int maxChannels, audio_stream_type_t streamType, int srcQuality); + ~SoundPool(); + int load(const char* url, int priority); + int load(int fd, int64_t offset, int64_t length, int priority); + bool unload(int sampleID); + int play(int sampleID, float leftVolume, float rightVolume, int priority, + int loop, float rate); + void pause(int channelID); + void autoPause(); + void resume(int channelID); + void autoResume(); + void stop(int channelID); + void setVolume(int channelID, float leftVolume, float rightVolume); + void setPriority(int channelID, int priority); + void setLoop(int channelID, int loop); + void setRate(int channelID, float rate); + audio_stream_type_t streamType() const { return mStreamType; } + int srcQuality() const { return mSrcQuality; } + + // called from SoundPoolThread + void sampleLoaded(int sampleID); + + // called from AudioTrack thread + void done_l(SoundChannel* channel); + + // callback function + void setCallback(SoundPoolCallback* callback, void* user); + void* getUserData() { return mUserData; } + +private: + SoundPool() {} // no default constructor + bool startThreads(); + void doLoad(sp& sample); + sp findSample(int sampleID) { return mSamples.valueFor(sampleID); } + SoundChannel* findChannel (int channelID); + SoundChannel* findNextChannel (int channelID); + SoundChannel* allocateChannel_l(int priority); + void moveToFront_l(SoundChannel* channel); + void notify(SoundPoolEvent event); + void dump(); + + // restart thread + void addToRestartList(SoundChannel* channel); + void addToStopList(SoundChannel* channel); + static int beginThread(void* arg); + int run(); + void quit(); + + Mutex mLock; + Mutex mRestartLock; + Condition mCondition; + SoundPoolThread* mDecodeThread; + SoundChannel* mChannelPool; + List mChannels; + List mRestart; + List mStop; + DefaultKeyedVector< int, sp > mSamples; + int mMaxChannels; + audio_stream_type_t mStreamType; + int mSrcQuality; + int mAllocated; + int mNextSampleID; + int mNextChannelID; + bool mQuit; + + // callback + Mutex mCallbackLock; + SoundPoolCallback* mCallback; + void* mUserData; +}; + +} // end namespace android + +#endif /*SOUNDPOOL_H_*/ diff --git a/include/private/hwui/DrawGlInfo.h b/include/private/hwui/DrawGlInfo.h deleted file mode 100644 index abcf41d..0000000 --- a/include/private/hwui/DrawGlInfo.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ANDROID_HWUI_DRAW_GL_INFO_H -#define ANDROID_HWUI_DRAW_GL_INFO_H - -namespace android { -namespace uirenderer { - -/** - * Structure used by OpenGLRenderer::callDrawGLFunction() to pass and - * receive data from OpenGL functors. - */ -struct DrawGlInfo { - // Input: current clip rect - int clipLeft; - int clipTop; - int clipRight; - int clipBottom; - - // Input: is the render target an FBO - bool isLayer; - - // Input: current transform matrix, in OpenGL format - float transform[16]; - - // Output: dirty region to redraw - float dirtyLeft; - float dirtyTop; - float dirtyRight; - float dirtyBottom; - - /** - * Values used by OpenGL functors to tell the framework - * what to do next. - */ - enum Status { - // The functor is done - kStatusDone, - // The functor is requesting a redraw (the clip rect - // used by the redraw is specified by DrawGlInfo.) - // The rest of the UI might redraw too. - kStatusDraw, - // The functor needs to be invoked again but will - // not redraw. Only the functor is invoked again - // (unless another functor requests a redraw.) - kStatusInvoke - }; -}; // struct DrawGlInfo - -}; // namespace uirenderer -}; // namespace android - -#endif // ANDROID_HWUI_DRAW_GL_INFO_H diff --git a/libvideoeditor/lvpp/Android.mk b/libvideoeditor/lvpp/Android.mk index 4c354ec..f805ff7 100755 --- a/libvideoeditor/lvpp/Android.mk +++ b/libvideoeditor/lvpp/Android.mk @@ -66,10 +66,10 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_C_INCLUDES += \ $(TOP)/system/media/audio_utils/include \ - $(TOP)/frameworks/base/media/libmediaplayerservice \ - $(TOP)/frameworks/base/media/libstagefright \ - $(TOP)/frameworks/base/media/libstagefright/include \ - $(TOP)/frameworks/base/media/libstagefright/rtsp \ + $(TOP)/frameworks/av/media/libmediaplayerservice \ + $(TOP)/frameworks/av/media/libstagefright \ + $(TOP)/frameworks/av/media/libstagefright/include \ + $(TOP)/frameworks/av/media/libstagefright/rtsp \ $(call include-path-for, corecg graphics) \ $(TOP)/frameworks/av/libvideoeditor/osal/inc \ $(TOP)/frameworks/av/libvideoeditor/vss/common/inc \ @@ -77,7 +77,7 @@ LOCAL_C_INCLUDES += \ $(TOP)/frameworks/av/libvideoeditor/vss/inc \ $(TOP)/frameworks/av/libvideoeditor/vss/stagefrightshells/inc \ $(TOP)/frameworks/av/libvideoeditor/lvpp \ - $(TOP)/frameworks/base/services/audioflinger \ + $(TOP)/frameworks/av/services/audioflinger \ $(TOP)/frameworks/native/include/media/editor \ $(TOP)/frameworks/native/include/media/openmax \ $(TOP)/frameworks/native/services/audioflinger diff --git a/libvideoeditor/lvpp/PreviewRenderer.h b/libvideoeditor/lvpp/PreviewRenderer.h index 91c2295..ce28276 100755 --- a/libvideoeditor/lvpp/PreviewRenderer.h +++ b/libvideoeditor/lvpp/PreviewRenderer.h @@ -22,7 +22,6 @@ #include #include #include -#include "SoftwareRenderer.h" namespace android { diff --git a/libvideoeditor/vss/src/Android.mk b/libvideoeditor/vss/src/Android.mk index df6925e..7d9cd9d 100755 --- a/libvideoeditor/vss/src/Android.mk +++ b/libvideoeditor/vss/src/Android.mk @@ -67,7 +67,7 @@ LOCAL_C_INCLUDES += \ $(TOP)/frameworks/av/libvideoeditor/vss/mcs/inc \ $(TOP)/frameworks/av/libvideoeditor/vss/common/inc \ $(TOP)/frameworks/av/libvideoeditor/vss/stagefrightshells/inc \ - $(TOP)/frameworks/base/services/audioflinger \ + $(TOP)/frameworks/av/services/audioflinger \ $(TOP)/frameworks/native/include/media/openmax \ $(TOP)/frameworks/native/services/audioflinger \ $(TOP)/system/media/audio_effects/include \ diff --git a/libvideoeditor/vss/stagefrightshells/src/Android.mk b/libvideoeditor/vss/stagefrightshells/src/Android.mk index acc6b0e..378a795 100755 --- a/libvideoeditor/vss/stagefrightshells/src/Android.mk +++ b/libvideoeditor/vss/stagefrightshells/src/Android.mk @@ -29,10 +29,10 @@ LOCAL_SRC_FILES:= \ VideoEditorAudioEncoder.cpp LOCAL_C_INCLUDES += \ - $(TOP)/frameworks/base/media/libmediaplayerservice \ - $(TOP)/frameworks/base/media/libstagefright \ - $(TOP)/frameworks/base/media/libstagefright/include \ - $(TOP)/frameworks/base/media/libstagefright/rtsp \ + $(TOP)/frameworks/av/media/libmediaplayerservice \ + $(TOP)/frameworks/av/media/libstagefright \ + $(TOP)/frameworks/av/media/libstagefright/include \ + $(TOP)/frameworks/av/media/libstagefright/rtsp \ $(call include-path-for, corecg graphics) \ $(TOP)/frameworks/av/libvideoeditor/lvpp \ $(TOP)/frameworks/av/libvideoeditor/osal/inc \ @@ -46,8 +46,6 @@ LOCAL_C_INCLUDES += \ LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils \ - libandroid_runtime \ - libnativehelper \ libmedia \ libbinder \ libstagefright \ diff --git a/media/libaah_rtp/Android.mk b/media/libaah_rtp/Android.mk index 6c927ba..df533ec 100644 --- a/media/libaah_rtp/Android.mk +++ b/media/libaah_rtp/Android.mk @@ -20,9 +20,9 @@ LOCAL_SRC_FILES := \ pipe_event.cpp LOCAL_C_INCLUDES := \ - frameworks/base/include \ - frameworks/base/media \ - frameworks/base/media/libstagefright \ + frameworks/av/include \ + frameworks/av/media \ + frameworks/av/media/libstagefright \ frameworks/native/include/media/openmax LOCAL_SHARED_LIBRARIES := \ diff --git a/media/libmedia/SoundPool.cpp b/media/libmedia/SoundPool.cpp index 306c57d..3b7b96a 100644 --- a/media/libmedia/SoundPool.cpp +++ b/media/libmedia/SoundPool.cpp @@ -28,7 +28,7 @@ #include -#include "SoundPool.h" +#include #include "SoundPoolThread.h" namespace android diff --git a/media/libmedia/SoundPool.h b/media/libmedia/SoundPool.h deleted file mode 100644 index 002b045..0000000 --- a/media/libmedia/SoundPool.h +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (C) 2007 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SOUNDPOOL_H_ -#define SOUNDPOOL_H_ - -#include -#include -#include -#include -#include - -namespace android { - -static const int IDLE_PRIORITY = -1; - -// forward declarations -class SoundEvent; -class SoundPoolThread; -class SoundPool; - -// for queued events -class SoundPoolEvent { -public: - SoundPoolEvent(int msg, int arg1=0, int arg2=0) : - mMsg(msg), mArg1(arg1), mArg2(arg2) {} - int mMsg; - int mArg1; - int mArg2; - enum MessageType { INVALID, SAMPLE_LOADED }; -}; - -// callback function prototype -typedef void SoundPoolCallback(SoundPoolEvent event, SoundPool* soundPool, void* user); - -// tracks samples used by application -class Sample : public RefBase { -public: - enum sample_state { UNLOADED, LOADING, READY, UNLOADING }; - Sample(int sampleID, const char* url); - Sample(int sampleID, int fd, int64_t offset, int64_t length); - ~Sample(); - int sampleID() { return mSampleID; } - int numChannels() { return mNumChannels; } - int sampleRate() { return mSampleRate; } - audio_format_t format() { return mFormat; } - size_t size() { return mSize; } - int state() { return mState; } - uint8_t* data() { return static_cast(mData->pointer()); } - status_t doLoad(); - void startLoad() { mState = LOADING; } - sp getIMemory() { return mData; } - - // hack - void init(int numChannels, int sampleRate, audio_format_t format, size_t size, sp data ) { - mNumChannels = numChannels; mSampleRate = sampleRate; mFormat = format; mSize = size; mData = data; } - -private: - void init(); - - size_t mSize; - volatile int32_t mRefCount; - uint16_t mSampleID; - uint16_t mSampleRate; - uint8_t mState : 3; - uint8_t mNumChannels : 2; - audio_format_t mFormat; - int mFd; - int64_t mOffset; - int64_t mLength; - char* mUrl; - sp mData; -}; - -// stores pending events for stolen channels -class SoundEvent -{ -public: - SoundEvent() : mChannelID(0), mLeftVolume(0), mRightVolume(0), - mPriority(IDLE_PRIORITY), mLoop(0), mRate(0) {} - void set(const sp& sample, int channelID, float leftVolume, - float rightVolume, int priority, int loop, float rate); - sp sample() { return mSample; } - int channelID() { return mChannelID; } - float leftVolume() { return mLeftVolume; } - float rightVolume() { return mRightVolume; } - int priority() { return mPriority; } - int loop() { return mLoop; } - float rate() { return mRate; } - void clear() { mChannelID = 0; mSample.clear(); } - -protected: - sp mSample; - int mChannelID; - float mLeftVolume; - float mRightVolume; - int mPriority; - int mLoop; - float mRate; -}; - -// for channels aka AudioTracks -class SoundChannel : public SoundEvent { -public: - enum state { IDLE, RESUMING, STOPPING, PAUSED, PLAYING }; - SoundChannel() : mAudioTrack(NULL), mState(IDLE), mNumChannels(1), - mPos(0), mToggle(0), mAutoPaused(false) {} - ~SoundChannel(); - void init(SoundPool* soundPool); - void play(const sp& sample, int channelID, float leftVolume, float rightVolume, - int priority, int loop, float rate); - void setVolume_l(float leftVolume, float rightVolume); - void setVolume(float leftVolume, float rightVolume); - void stop_l(); - void stop(); - void pause(); - void autoPause(); - void resume(); - void autoResume(); - void setRate(float rate); - int state() { return mState; } - void setPriority(int priority) { mPriority = priority; } - void setLoop(int loop); - int numChannels() { return mNumChannels; } - void clearNextEvent() { mNextEvent.clear(); } - void nextEvent(); - int nextChannelID() { return mNextEvent.channelID(); } - void dump(); - -private: - static void callback(int event, void* user, void *info); - void process(int event, void *info, unsigned long toggle); - bool doStop_l(); - - SoundPool* mSoundPool; - AudioTrack* mAudioTrack; - SoundEvent mNextEvent; - Mutex mLock; - int mState; - int mNumChannels; - int mPos; - int mAudioBufferSize; - unsigned long mToggle; - bool mAutoPaused; -}; - -// application object for managing a pool of sounds -class SoundPool { - friend class SoundPoolThread; - friend class SoundChannel; -public: - SoundPool(int maxChannels, audio_stream_type_t streamType, int srcQuality); - ~SoundPool(); - int load(const char* url, int priority); - int load(int fd, int64_t offset, int64_t length, int priority); - bool unload(int sampleID); - int play(int sampleID, float leftVolume, float rightVolume, int priority, - int loop, float rate); - void pause(int channelID); - void autoPause(); - void resume(int channelID); - void autoResume(); - void stop(int channelID); - void setVolume(int channelID, float leftVolume, float rightVolume); - void setPriority(int channelID, int priority); - void setLoop(int channelID, int loop); - void setRate(int channelID, float rate); - audio_stream_type_t streamType() const { return mStreamType; } - int srcQuality() const { return mSrcQuality; } - - // called from SoundPoolThread - void sampleLoaded(int sampleID); - - // called from AudioTrack thread - void done_l(SoundChannel* channel); - - // callback function - void setCallback(SoundPoolCallback* callback, void* user); - void* getUserData() { return mUserData; } - -private: - SoundPool() {} // no default constructor - bool startThreads(); - void doLoad(sp& sample); - sp findSample(int sampleID) { return mSamples.valueFor(sampleID); } - SoundChannel* findChannel (int channelID); - SoundChannel* findNextChannel (int channelID); - SoundChannel* allocateChannel_l(int priority); - void moveToFront_l(SoundChannel* channel); - void notify(SoundPoolEvent event); - void dump(); - - // restart thread - void addToRestartList(SoundChannel* channel); - void addToStopList(SoundChannel* channel); - static int beginThread(void* arg); - int run(); - void quit(); - - Mutex mLock; - Mutex mRestartLock; - Condition mCondition; - SoundPoolThread* mDecodeThread; - SoundChannel* mChannelPool; - List mChannels; - List mRestart; - List mStop; - DefaultKeyedVector< int, sp > mSamples; - int mMaxChannels; - audio_stream_type_t mStreamType; - int mSrcQuality; - int mAllocated; - int mNextSampleID; - int mNextChannelID; - bool mQuit; - - // callback - Mutex mCallbackLock; - SoundPoolCallback* mCallback; - void* mUserData; -}; - -} // end namespace android - -#endif /*SOUNDPOOL_H_*/ diff --git a/media/libmedia/SoundPoolThread.h b/media/libmedia/SoundPoolThread.h index d388388..7e96900 100644 --- a/media/libmedia/SoundPoolThread.h +++ b/media/libmedia/SoundPoolThread.h @@ -21,7 +21,7 @@ #include #include -#include "SoundPool.h" +#include namespace android { diff --git a/media/libmediaplayerservice/ActivityManager.cpp b/media/libmediaplayerservice/ActivityManager.cpp new file mode 100644 index 0000000..60a209f --- /dev/null +++ b/media/libmediaplayerservice/ActivityManager.cpp @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2006 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include + +#include "ActivityManager.h" + +namespace android { + +const uint32_t OPEN_CONTENT_URI_TRANSACTION = IBinder::FIRST_CALL_TRANSACTION + 4; + +// Perform ContentProvider.openFile() on the given URI, returning +// the resulting native file descriptor. Returns < 0 on error. +int openContentProviderFile(const String16& uri) +{ + int fd = -1; + + sp sm = defaultServiceManager(); + sp am = sm->getService(String16("activity")); + if (am != NULL) { + Parcel data, reply; + data.writeInterfaceToken(String16("android.app.IActivityManager")); + data.writeString16(uri); + status_t ret = am->transact(OPEN_CONTENT_URI_TRANSACTION, data, &reply); + if (ret == NO_ERROR) { + int32_t exceptionCode = reply.readExceptionCode(); + if (!exceptionCode) { + // Success is indicated here by a nonzero int followed by the fd; + // failure by a zero int with no data following. + if (reply.readInt32() != 0) { + fd = dup(reply.readFileDescriptor()); + } + } else { + // An exception was thrown back; fall through to return failure + ALOGD("openContentUri(%s) caught exception %d\n", + String8(uri).string(), exceptionCode); + } + } + } + + return fd; +} + +} /* namespace android */ diff --git a/media/libmediaplayerservice/ActivityManager.h b/media/libmediaplayerservice/ActivityManager.h new file mode 100644 index 0000000..451a004 --- /dev/null +++ b/media/libmediaplayerservice/ActivityManager.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ActivityManager_H +#define ActivityManager_H + +#include + +namespace android { + +// Perform a ContentProvider.openFile() call for the given URI. +// +// Returns the native file descriptor for the opened stream, < 0 on error. +extern int openContentProviderFile(const String16& uri); + +} + +#endif diff --git a/media/libmediaplayerservice/Android.mk b/media/libmediaplayerservice/Android.mk index 675c563..f173e2e 100644 --- a/media/libmediaplayerservice/Android.mk +++ b/media/libmediaplayerservice/Android.mk @@ -7,6 +7,7 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ + ActivityManager.cpp \ Crypto.cpp \ MediaRecorderClient.cpp \ MediaPlayerService.cpp \ @@ -26,7 +27,6 @@ LOCAL_SHARED_LIBRARIES := \ libmedia \ libmedia_native \ libcamera_client \ - libandroid_runtime \ libstagefright \ libstagefright_omx \ libstagefright_foundation \ @@ -40,8 +40,8 @@ LOCAL_STATIC_LIBRARIES := \ LOCAL_C_INCLUDES := \ $(call include-path-for, graphics corecg) \ - $(TOP)/frameworks/base/media/libstagefright/include \ - $(TOP)/frameworks/base/media/libstagefright/rtsp \ + $(TOP)/frameworks/av/media/libstagefright/include \ + $(TOP)/frameworks/av/media/libstagefright/rtsp \ $(TOP)/frameworks/native/include/media/openmax \ $(TOP)/external/tremolo/Tremolo \ diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 123d07f..cc3138d 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -34,8 +34,6 @@ #include -#include - #include #include #include @@ -59,6 +57,7 @@ #include +#include "ActivityManager.h" #include "MediaRecorderClient.h" #include "MediaPlayerService.h" #include "MetadataRetrieverClient.h" diff --git a/media/libmediaplayerservice/MediaRecorderClient.cpp b/media/libmediaplayerservice/MediaRecorderClient.cpp index beda945..eadc8ee 100644 --- a/media/libmediaplayerservice/MediaRecorderClient.cpp +++ b/media/libmediaplayerservice/MediaRecorderClient.cpp @@ -25,7 +25,6 @@ #include #include #include // for property_get -#include #include #include #include diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.cpp b/media/libmediaplayerservice/MetadataRetrieverClient.cpp index 776d288..e44031e 100644 --- a/media/libmediaplayerservice/MetadataRetrieverClient.cpp +++ b/media/libmediaplayerservice/MetadataRetrieverClient.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/media/libmediaplayerservice/nuplayer/Android.mk b/media/libmediaplayerservice/nuplayer/Android.mk index 73336ef..f97ba57 100644 --- a/media/libmediaplayerservice/nuplayer/Android.mk +++ b/media/libmediaplayerservice/nuplayer/Android.mk @@ -13,10 +13,10 @@ LOCAL_SRC_FILES:= \ StreamingSource.cpp \ LOCAL_C_INCLUDES := \ - $(TOP)/frameworks/base/media/libstagefright/httplive \ - $(TOP)/frameworks/base/media/libstagefright/include \ - $(TOP)/frameworks/base/media/libstagefright/mpeg2ts \ - $(TOP)/frameworks/base/media/libstagefright/rtsp \ + $(TOP)/frameworks/av/media/libstagefright/httplive \ + $(TOP)/frameworks/av/media/libstagefright/include \ + $(TOP)/frameworks/av/media/libstagefright/mpeg2ts \ + $(TOP)/frameworks/av/media/libstagefright/rtsp \ $(TOP)/frameworks/native/include/media/openmax LOCAL_MODULE:= libstagefright_nuplayer diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk index 8948abb..2169cac 100644 --- a/media/libstagefright/Android.mk +++ b/media/libstagefright/Android.mk @@ -1,7 +1,7 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) -include frameworks/base/media/libstagefright/codecs/common/Config.mk +include frameworks/av/media/libstagefright/codecs/common/Config.mk LOCAL_SRC_FILES:= \ ACodec.cpp \ @@ -57,7 +57,7 @@ LOCAL_SRC_FILES:= \ avc_utils.cpp \ LOCAL_C_INCLUDES:= \ - $(TOP)/frameworks/base/include/media/stagefright/timedtext \ + $(TOP)/frameworks/av/include/media/stagefright/timedtext \ $(TOP)/frameworks/native/include/media/hardware \ $(TOP)/frameworks/native/include/media/openmax \ $(TOP)/external/expat/lib \ diff --git a/media/libstagefright/chromium_http/Android.mk b/media/libstagefright/chromium_http/Android.mk index d595686..6ab2a00 100644 --- a/media/libstagefright/chromium_http/Android.mk +++ b/media/libstagefright/chromium_http/Android.mk @@ -9,7 +9,7 @@ LOCAL_SRC_FILES:= \ support.cpp LOCAL_C_INCLUDES:= \ - frameworks/base/media/libstagefright \ + $(TOP)/frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/openmax \ external/chromium \ external/chromium/android diff --git a/media/libstagefright/codecs/aacdec/Android.mk b/media/libstagefright/codecs/aacdec/Android.mk index fd6de79..b4445a7 100644 --- a/media/libstagefright/codecs/aacdec/Android.mk +++ b/media/libstagefright/codecs/aacdec/Android.mk @@ -147,7 +147,7 @@ LOCAL_SRC_FILES := \ LOCAL_CFLAGS := -DAAC_PLUS -DHQ_SBR -DPARAMETRICSTEREO -DOSCL_IMPORT_REF= -DOSCL_EXPORT_REF= -DOSCL_UNUSED_ARG= LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ LOCAL_ARM_MODE := arm @@ -163,7 +163,7 @@ LOCAL_SRC_FILES := \ SoftAAC.cpp LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ frameworks/native/include/media/openmax LOCAL_CFLAGS := -DOSCL_IMPORT_REF= diff --git a/media/libstagefright/codecs/aacenc/Android.mk b/media/libstagefright/codecs/aacenc/Android.mk index b47cb1e..0ad3f6c 100644 --- a/media/libstagefright/codecs/aacenc/Android.mk +++ b/media/libstagefright/codecs/aacenc/Android.mk @@ -1,6 +1,6 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -include frameworks/base/media/libstagefright/codecs/common/Config.mk +include frameworks/av/media/libstagefright/codecs/common/Config.mk @@ -64,9 +64,9 @@ LOCAL_STATIC_LIBRARIES := LOCAL_SHARED_LIBRARIES := LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ - frameworks/base/media/libstagefright/codecs/common/include \ - frameworks/base/include \ + frameworks/av/include \ + frameworks/av/media/libstagefright/include \ + frameworks/av/media/libstagefright/codecs/common/include \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/inc \ $(LOCAL_PATH)/basic_op @@ -94,8 +94,8 @@ LOCAL_SRC_FILES := \ SoftAACEncoder.cpp LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ - frameworks/base/media/libstagefright/codecs/common/include \ + frameworks/av/media/libstagefright/include \ + frameworks/av/media/libstagefright/codecs/common/include \ frameworks/native/include/media/openmax LOCAL_CFLAGS := -DOSCL_IMPORT_REF= diff --git a/media/libstagefright/codecs/amrnb/dec/Android.mk b/media/libstagefright/codecs/amrnb/dec/Android.mk index b81306d..5dc5560 100644 --- a/media/libstagefright/codecs/amrnb/dec/Android.mk +++ b/media/libstagefright/codecs/amrnb/dec/Android.mk @@ -39,7 +39,7 @@ LOCAL_SRC_FILES := \ src/wmf_to_ets.cpp LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/include \ $(LOCAL_PATH)/../common/include \ @@ -60,8 +60,8 @@ LOCAL_SRC_FILES := \ SoftAMR.cpp LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ - frameworks/base/media/libstagefright/codecs/amrwb/src \ + frameworks/av/media/libstagefright/include \ + frameworks/av/media/libstagefright/codecs/amrwb/src \ frameworks/native/include/media/openmax \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/include \ diff --git a/media/libstagefright/codecs/amrnb/enc/Android.mk b/media/libstagefright/codecs/amrnb/enc/Android.mk index 28246ae..d6e8b66 100644 --- a/media/libstagefright/codecs/amrnb/enc/Android.mk +++ b/media/libstagefright/codecs/amrnb/enc/Android.mk @@ -61,7 +61,7 @@ LOCAL_SRC_FILES := \ src/ton_stab.cpp LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/include \ $(LOCAL_PATH)/../common/include \ @@ -82,7 +82,7 @@ LOCAL_SRC_FILES := \ SoftAMRNBEncoder.cpp LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ frameworks/native/include/media/openmax \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/include \ diff --git a/media/libstagefright/codecs/amrwb/Android.mk b/media/libstagefright/codecs/amrwb/Android.mk index c9e1c25..677107f 100644 --- a/media/libstagefright/codecs/amrwb/Android.mk +++ b/media/libstagefright/codecs/amrwb/Android.mk @@ -43,7 +43,7 @@ LOCAL_SRC_FILES := \ src/weight_amrwb_lpc.cpp LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/include diff --git a/media/libstagefright/codecs/amrwbenc/Android.mk b/media/libstagefright/codecs/amrwbenc/Android.mk index d3c3041..71a60d3 100644 --- a/media/libstagefright/codecs/amrwbenc/Android.mk +++ b/media/libstagefright/codecs/amrwbenc/Android.mk @@ -1,6 +1,6 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -include frameworks/base/media/libstagefright/codecs/common/Config.mk +include frameworks/av/media/libstagefright/codecs/common/Config.mk @@ -95,9 +95,9 @@ LOCAL_STATIC_LIBRARIES := LOCAL_SHARED_LIBRARIES := LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ - frameworks/base/media/libstagefright/codecs/common/include \ - frameworks/base/include \ + frameworks/av/include \ + frameworks/av/media/libstagefright/include \ + frameworks/av/media/libstagefright/codecs/common/include \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/inc @@ -124,8 +124,8 @@ LOCAL_SRC_FILES := \ SoftAMRWBEncoder.cpp LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ - frameworks/base/media/libstagefright/codecs/common/include \ + frameworks/av/media/libstagefright/include \ + frameworks/av/media/libstagefright/codecs/common/include \ frameworks/native/include/media/openmax LOCAL_STATIC_LIBRARIES := \ diff --git a/media/libstagefright/codecs/avc/enc/Android.mk b/media/libstagefright/codecs/avc/enc/Android.mk index 54cc9b1..d80d3f8 100644 --- a/media/libstagefright/codecs/avc/enc/Android.mk +++ b/media/libstagefright/codecs/avc/enc/Android.mk @@ -25,7 +25,7 @@ LOCAL_MODULE := libstagefright_avcenc LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/../common/include \ - $(TOP)/frameworks/base/media/libstagefright/include \ + $(TOP)/frameworks/av/media/libstagefright/include \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS := \ diff --git a/media/libstagefright/codecs/g711/dec/Android.mk b/media/libstagefright/codecs/g711/dec/Android.mk index 42706a5..28be646 100644 --- a/media/libstagefright/codecs/g711/dec/Android.mk +++ b/media/libstagefright/codecs/g711/dec/Android.mk @@ -5,7 +5,7 @@ LOCAL_SRC_FILES := \ SoftG711.cpp LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ frameworks/native/include/media/openmax LOCAL_SHARED_LIBRARIES := \ diff --git a/media/libstagefright/codecs/m4v_h263/dec/Android.mk b/media/libstagefright/codecs/m4v_h263/dec/Android.mk index 8c245d1..a6b1edc 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/Android.mk +++ b/media/libstagefright/codecs/m4v_h263/dec/Android.mk @@ -41,7 +41,7 @@ LOCAL_MODULE := libstagefright_m4vh263dec LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/include \ - $(TOP)/frameworks/base/media/libstagefright/include \ + $(TOP)/frameworks/av/media/libstagefright/include \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS := -DOSCL_EXPORT_REF= -DOSCL_IMPORT_REF= @@ -58,7 +58,7 @@ LOCAL_SRC_FILES := \ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/include \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ frameworks/native/include/media/openmax LOCAL_CFLAGS := -DOSCL_EXPORT_REF= -DOSCL_IMPORT_REF= diff --git a/media/libstagefright/codecs/m4v_h263/enc/Android.mk b/media/libstagefright/codecs/m4v_h263/enc/Android.mk index 2b7c938..7cbb38f 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/Android.mk +++ b/media/libstagefright/codecs/m4v_h263/enc/Android.mk @@ -31,7 +31,7 @@ LOCAL_CFLAGS := \ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/include \ - $(TOP)/frameworks/base/media/libstagefright/include \ + $(TOP)/frameworks/av/media/libstagefright/include \ $(TOP)/frameworks/native/include/media/openmax include $(BUILD_STATIC_LIBRARY) diff --git a/media/libstagefright/codecs/mp3dec/Android.mk b/media/libstagefright/codecs/mp3dec/Android.mk index ed51aa5..ec8d7ec 100644 --- a/media/libstagefright/codecs/mp3dec/Android.mk +++ b/media/libstagefright/codecs/mp3dec/Android.mk @@ -43,7 +43,7 @@ LOCAL_SRC_FILES += \ endif LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/include @@ -64,7 +64,7 @@ LOCAL_SRC_FILES := \ SoftMP3.cpp LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ frameworks/native/include/media/openmax \ $(LOCAL_PATH)/src \ $(LOCAL_PATH)/include diff --git a/media/libstagefright/codecs/on2/dec/Android.mk b/media/libstagefright/codecs/on2/dec/Android.mk index 2997228..3223871 100644 --- a/media/libstagefright/codecs/on2/dec/Android.mk +++ b/media/libstagefright/codecs/on2/dec/Android.mk @@ -8,7 +8,7 @@ LOCAL_C_INCLUDES := \ $(TOP)/external/libvpx \ $(TOP)/external/libvpx/vpx_codec \ $(TOP)/external/libvpx/vpx_ports \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ frameworks/native/include/media/openmax \ LOCAL_STATIC_LIBRARIES := \ diff --git a/media/libstagefright/codecs/on2/h264dec/Android.mk b/media/libstagefright/codecs/on2/h264dec/Android.mk index 43c20f0..772fd60 100644 --- a/media/libstagefright/codecs/on2/h264dec/Android.mk +++ b/media/libstagefright/codecs/on2/h264dec/Android.mk @@ -34,7 +34,7 @@ LOCAL_SRC_FILES := \ SoftAVC.cpp \ LOCAL_C_INCLUDES := $(LOCAL_PATH)/./inc \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ frameworks/native/include/media/openmax \ MY_ASM := \ diff --git a/media/libstagefright/codecs/vorbis/dec/Android.mk b/media/libstagefright/codecs/vorbis/dec/Android.mk index fca70b7..395dd6b 100644 --- a/media/libstagefright/codecs/vorbis/dec/Android.mk +++ b/media/libstagefright/codecs/vorbis/dec/Android.mk @@ -6,7 +6,7 @@ LOCAL_SRC_FILES := \ LOCAL_C_INCLUDES := \ external/tremolo \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright/include \ frameworks/native/include/media/openmax \ LOCAL_SHARED_LIBRARIES := \ diff --git a/media/libstagefright/foundation/Android.mk b/media/libstagefright/foundation/Android.mk index d5025a1..b7577d6 100644 --- a/media/libstagefright/foundation/Android.mk +++ b/media/libstagefright/foundation/Android.mk @@ -15,7 +15,7 @@ LOCAL_SRC_FILES:= \ hexdump.cpp LOCAL_C_INCLUDES:= \ - frameworks/base/include/media/stagefright/foundation + frameworks/av/include/media/stagefright/foundation LOCAL_SHARED_LIBRARIES := \ libbinder \ diff --git a/media/libstagefright/httplive/Android.mk b/media/libstagefright/httplive/Android.mk index 90cb448..a3fa7a3 100644 --- a/media/libstagefright/httplive/Android.mk +++ b/media/libstagefright/httplive/Android.mk @@ -8,7 +8,7 @@ LOCAL_SRC_FILES:= \ M3UParser.cpp \ LOCAL_C_INCLUDES:= \ - $(TOP)/frameworks/base/media/libstagefright \ + $(TOP)/frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/openmax \ $(TOP)/external/openssl/include diff --git a/media/libstagefright/mpeg2ts/Android.mk b/media/libstagefright/mpeg2ts/Android.mk index eaa139d..c1a7a9d 100644 --- a/media/libstagefright/mpeg2ts/Android.mk +++ b/media/libstagefright/mpeg2ts/Android.mk @@ -10,7 +10,7 @@ LOCAL_SRC_FILES:= \ MPEG2TSExtractor.cpp \ LOCAL_C_INCLUDES:= \ - $(TOP)/frameworks/base/media/libstagefright \ + $(TOP)/frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/openmax LOCAL_MODULE:= libstagefright_mpeg2ts diff --git a/media/libstagefright/omx/Android.mk b/media/libstagefright/omx/Android.mk index d20ecb6..d7fbbbe 100644 --- a/media/libstagefright/omx/Android.mk +++ b/media/libstagefright/omx/Android.mk @@ -10,7 +10,7 @@ LOCAL_SRC_FILES:= \ SoftOMXPlugin.cpp \ LOCAL_C_INCLUDES += \ - frameworks/base/media/libstagefright \ + $(TOP)/frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/hardware \ $(TOP)/frameworks/native/include/media/openmax diff --git a/media/libstagefright/omx/tests/Android.mk b/media/libstagefright/omx/tests/Android.mk index 6aa7470..04441ca 100644 --- a/media/libstagefright/omx/tests/Android.mk +++ b/media/libstagefright/omx/tests/Android.mk @@ -8,7 +8,7 @@ LOCAL_SHARED_LIBRARIES := \ libstagefright libbinder libmedia libutils libstagefright_foundation LOCAL_C_INCLUDES := \ - frameworks/base/media/libstagefright \ + $(TOP)/frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/openmax LOCAL_MODULE := omx_tests diff --git a/media/libstagefright/rtsp/Android.mk b/media/libstagefright/rtsp/Android.mk index e0fe59b..d0f5259 100644 --- a/media/libstagefright/rtsp/Android.mk +++ b/media/libstagefright/rtsp/Android.mk @@ -18,7 +18,7 @@ LOCAL_SRC_FILES:= \ ASessionDescription.cpp \ LOCAL_C_INCLUDES:= \ - $(TOP)/frameworks/base/media/libstagefright/include \ + $(TOP)/frameworks/av/media/libstagefright/include \ $(TOP)/frameworks/native/include/media/openmax \ $(TOP)/external/openssl/include @@ -44,7 +44,7 @@ LOCAL_STATIC_LIBRARIES := \ libstagefright_rtsp LOCAL_C_INCLUDES:= \ - frameworks/base/media/libstagefright \ + frameworks/av/media/libstagefright \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS += -Wno-multichar diff --git a/media/libstagefright/tests/Android.mk b/media/libstagefright/tests/Android.mk index 656a630..a1e6be7 100644 --- a/media/libstagefright/tests/Android.mk +++ b/media/libstagefright/tests/Android.mk @@ -15,7 +15,6 @@ LOCAL_SRC_FILES := \ LOCAL_SHARED_LIBRARIES := \ libEGL \ libGLESv2 \ - libandroid \ libbinder \ libcutils \ libgui \ @@ -36,8 +35,8 @@ LOCAL_C_INCLUDES := \ bionic/libstdc++/include \ external/gtest/include \ external/stlport/stlport \ - frameworks/base/media/libstagefright \ - frameworks/base/media/libstagefright/include \ + frameworks/av/media/libstagefright \ + frameworks/av/media/libstagefright/include \ $(TOP)/frameworks/native/include/media/openmax \ include $(BUILD_EXECUTABLE) diff --git a/media/libstagefright/timedtext/Android.mk b/media/libstagefright/timedtext/Android.mk index 58ef9e3..f099bbd 100644 --- a/media/libstagefright/timedtext/Android.mk +++ b/media/libstagefright/timedtext/Android.mk @@ -11,8 +11,8 @@ LOCAL_SRC_FILES:= \ LOCAL_CFLAGS += -Wno-multichar LOCAL_C_INCLUDES:= \ - $(TOP)/frameworks/base/include/media/stagefright/timedtext \ - $(TOP)/frameworks/base/media/libstagefright + $(TOP)/frameworks/av/include/media/stagefright/timedtext \ + $(TOP)/frameworks/av/media/libstagefright LOCAL_MODULE:= libstagefright_timedtext diff --git a/media/mediaserver/Android.mk b/media/mediaserver/Android.mk index 4e9b4cf..5a73cdd 100644 --- a/media/mediaserver/Android.mk +++ b/media/mediaserver/Android.mk @@ -13,10 +13,10 @@ LOCAL_SHARED_LIBRARIES := \ # FIXME The duplicate audioflinger is temporary LOCAL_C_INCLUDES := \ - frameworks/native/services/audioflinger \ - frameworks/base/services/audioflinger \ - frameworks/base/services/camera/libcameraservice \ - frameworks/base/media/libmediaplayerservice + frameworks/av/media/libmediaplayerservice \ + frameworks/av/services/audioflinger \ + frameworks/av/services/camera/libcameraservice \ + frameworks/native/services/audioflinger LOCAL_MODULE:= mediaserver diff --git a/services/camera/tests/CameraServiceTest/Android.mk b/services/camera/tests/CameraServiceTest/Android.mk index cf7302a..41b6f63 100644 --- a/services/camera/tests/CameraServiceTest/Android.mk +++ b/services/camera/tests/CameraServiceTest/Android.mk @@ -9,7 +9,7 @@ LOCAL_MODULE:= CameraServiceTest LOCAL_MODULE_TAGS := tests LOCAL_C_INCLUDES += \ - frameworks/base/libs + frameworks/av/libs LOCAL_CFLAGS := -- cgit v1.1