diff options
author | James Dong <jdong@google.com> | 2012-02-28 18:49:34 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-02-28 18:49:34 -0800 |
commit | ee31e56a16324058025ee3090452c72901977d8a (patch) | |
tree | 10de573d1c61a72dbc611fe033f20972957bac88 /media | |
parent | 1b3d01de3837b7710dfccc06af37ffaec2cf8ecf (diff) | |
parent | 3008f0329bb5a3e4ce93ec7b597893a318b5bd11 (diff) | |
download | frameworks_base-ee31e56a16324058025ee3090452c72901977d8a.zip frameworks_base-ee31e56a16324058025ee3090452c72901977d8a.tar.gz frameworks_base-ee31e56a16324058025ee3090452c72901977d8a.tar.bz2 |
Merge "Moves TimedTextDriver.h into include/media/stagefright/timedtext."
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/Android.mk | 1 | ||||
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 3 | ||||
-rw-r--r-- | media/libstagefright/timedtext/Android.mk | 1 | ||||
-rw-r--r-- | media/libstagefright/timedtext/TimedTextDriver.cpp | 3 | ||||
-rw-r--r-- | media/libstagefright/timedtext/TimedTextDriver.h | 81 | ||||
-rw-r--r-- | media/libstagefright/timedtext/TimedTextPlayer.cpp | 2 |
6 files changed, 5 insertions, 86 deletions
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk index cfb1e29..95bcada 100644 --- a/media/libstagefright/Android.mk +++ b/media/libstagefright/Android.mk @@ -58,6 +58,7 @@ LOCAL_SRC_FILES:= \ LOCAL_C_INCLUDES:= \ $(JNI_H_INCLUDE) \ $(TOP)/frameworks/base/include/media/stagefright/openmax \ + $(TOP)/frameworks/base/include/media/stagefright/timedtext \ $(TOP)/external/flac/include \ $(TOP)/external/tremolo \ $(TOP)/external/openssl/include \ diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 8cfb8d3..b21e86a 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -30,13 +30,12 @@ #include "include/MPEG2TSExtractor.h" #include "include/WVMExtractor.h" -#include "timedtext/TimedTextDriver.h" - #include <binder/IPCThreadState.h> #include <binder/IServiceManager.h> #include <media/IMediaPlayerService.h> #include <media/stagefright/foundation/hexdump.h> #include <media/stagefright/foundation/ADebug.h> +#include <media/stagefright/timedtext/TimedTextDriver.h> #include <media/stagefright/AudioPlayer.h> #include <media/stagefright/DataSource.h> #include <media/stagefright/FileSource.h> diff --git a/media/libstagefright/timedtext/Android.mk b/media/libstagefright/timedtext/Android.mk index dde2066..d2d5f7b 100644 --- a/media/libstagefright/timedtext/Android.mk +++ b/media/libstagefright/timedtext/Android.mk @@ -12,6 +12,7 @@ LOCAL_SRC_FILES:= \ LOCAL_CFLAGS += -Wno-multichar LOCAL_C_INCLUDES:= \ $(JNI_H_INCLUDE) \ + $(TOP)/frameworks/base/include/media/stagefright/timedtext \ $(TOP)/frameworks/base/media/libstagefright LOCAL_MODULE:= libstagefright_timedtext diff --git a/media/libstagefright/timedtext/TimedTextDriver.cpp b/media/libstagefright/timedtext/TimedTextDriver.cpp index 9ec9415..c70870e 100644 --- a/media/libstagefright/timedtext/TimedTextDriver.cpp +++ b/media/libstagefright/timedtext/TimedTextDriver.cpp @@ -27,8 +27,7 @@ #include <media/stagefright/Utils.h> #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/ALooper.h> - -#include "TimedTextDriver.h" +#include <media/stagefright/timedtext/TimedTextDriver.h> #include "TextDescriptions.h" #include "TimedTextPlayer.h" diff --git a/media/libstagefright/timedtext/TimedTextDriver.h b/media/libstagefright/timedtext/TimedTextDriver.h deleted file mode 100644 index efedb6e..0000000 --- a/media/libstagefright/timedtext/TimedTextDriver.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2012 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 TIMED_TEXT_DRIVER_H_ -#define TIMED_TEXT_DRIVER_H_ - -#include <media/stagefright/foundation/ABase.h> // for DISALLOW_* macro -#include <utils/Errors.h> // for status_t -#include <utils/RefBase.h> -#include <utils/threads.h> - -namespace android { - -class ALooper; -class MediaPlayerBase; -class MediaSource; -class Parcel; -class TimedTextPlayer; -class TimedTextSource; - -class TimedTextDriver { -public: - TimedTextDriver(const wp<MediaPlayerBase> &listener); - - ~TimedTextDriver(); - - // TODO: pause-resume pair seems equivalent to stop-start pair. - // Check if it is replaceable with stop-start. - status_t start(); - status_t stop(); - status_t pause(); - status_t resume(); - - status_t seekToAsync(int64_t timeUs); - - status_t addInBandTextSource(const sp<MediaSource>& source); - status_t addOutOfBandTextSource(const Parcel &request); - - status_t setTimedTextTrackIndex(int32_t index); - -private: - Mutex mLock; - - enum State { - UNINITIALIZED, - STOPPED, - PLAYING, - PAUSED, - }; - - sp<ALooper> mLooper; - sp<TimedTextPlayer> mPlayer; - wp<MediaPlayerBase> mListener; - - // Variables to be guarded by mLock. - State mState; - Vector<sp<TimedTextSource> > mTextInBandVector; - Vector<sp<TimedTextSource> > mTextOutOfBandVector; - // -- End of variables to be guarded by mLock - - status_t setTimedTextTrackIndex_l(int32_t index); - - DISALLOW_EVIL_CONSTRUCTORS(TimedTextDriver); -}; - -} // namespace android - -#endif // TIMED_TEXT_DRIVER_H_ diff --git a/media/libstagefright/timedtext/TimedTextPlayer.cpp b/media/libstagefright/timedtext/TimedTextPlayer.cpp index bf7cbf6..bda7b46 100644 --- a/media/libstagefright/timedtext/TimedTextPlayer.cpp +++ b/media/libstagefright/timedtext/TimedTextPlayer.cpp @@ -20,12 +20,12 @@ #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/AMessage.h> +#include <media/stagefright/timedtext/TimedTextDriver.h> #include <media/stagefright/MediaErrors.h> #include <media/MediaPlayerInterface.h> #include "TimedTextPlayer.h" -#include "TimedTextDriver.h" #include "TimedTextSource.h" namespace android { |