summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-05-11 11:24:09 -0700
committerGloria Wang <gwang@google.com>2011-05-25 17:53:29 -0700
commit965d08ba16ee82bc85f69546360c18e7da907406 (patch)
treef581723790736b2ded3529c33d16a7b39701fbbe /media/libstagefright/include
parent162f7d15ac5c8c23d1c3de171239f3a4e6e06b2a (diff)
downloadframeworks_av-965d08ba16ee82bc85f69546360c18e7da907406.zip
frameworks_av-965d08ba16ee82bc85f69546360c18e7da907406.tar.gz
frameworks_av-965d08ba16ee82bc85f69546360c18e7da907406.tar.bz2
For out of band timed text support (timed text in a separate file).
Change-Id: I9e024a63eb9bf6f839deee3c7766a66e63126c96
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r--media/libstagefright/include/AwesomePlayer.h1
-rw-r--r--media/libstagefright/include/TimedTextPlayer.h91
2 files changed, 1 insertions, 91 deletions
diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h
index 3c9a121..a9e8e95 100644
--- a/media/libstagefright/include/AwesomePlayer.h
+++ b/media/libstagefright/include/AwesomePlayer.h
@@ -231,6 +231,7 @@ private:
int64_t mLastVideoTimeUs;
TimedTextPlayer *mTextPlayer;
+ mutable Mutex mTimedTextLock;
sp<WVMExtractor> mWVMExtractor;
diff --git a/media/libstagefright/include/TimedTextPlayer.h b/media/libstagefright/include/TimedTextPlayer.h
deleted file mode 100644
index ac41b4f..0000000
--- a/media/libstagefright/include/TimedTextPlayer.h
+++ /dev/null
@@ -1,91 +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 TIMEDTEXT_PLAYER_H_
-
-#define TIMEDTEXT_PLAYER_H_
-
-#include <media/MediaPlayerInterface.h>
-#include <media/stagefright/foundation/ABase.h>
-
-#include "include/TimedEventQueue.h"
-
-namespace android {
-
-class MediaSource;
-class AwesomePlayer;
-class MediaBuffer;
-
-class TimedTextPlayer {
-public:
- TimedTextPlayer(AwesomePlayer *observer,
- const wp<MediaPlayerBase> &listener,
- TimedEventQueue *queue);
-
- virtual ~TimedTextPlayer();
-
- // index: the index of the text track which will
- // be turned on
- status_t start(uint8_t index);
-
- void pause();
-
- void resume();
-
- status_t seekTo(int64_t time_us);
-
- void addTextSource(sp<MediaSource> source);
-
- status_t setTimedTextTrackIndex(int32_t index);
-
-private:
- Mutex mLock;
-
- sp<MediaSource> mSource;
-
- bool mSeeking;
- int64_t mSeekTimeUs;
-
- bool mStarted;
-
- sp<TimedEventQueue::Event> mTextEvent;
- bool mTextEventPending;
-
- TimedEventQueue *mQueue;
-
- wp<MediaPlayerBase> mListener;
- AwesomePlayer *mObserver;
-
- MediaBuffer *mTextBuffer;
- Parcel mData;
-
- Vector<sp<MediaSource> > mTextTrackVector;
-
- void reset();
-
- void onTextEvent();
- void postTextEvent(int64_t delayUs = -1);
- void cancelTextEvent();
-
- void notifyListener(
- int msg, const void *data = NULL, size_t size = 0);
-
- DISALLOW_EVIL_CONSTRUCTORS(TimedTextPlayer);
-};
-
-} // namespace android
-
-#endif // TIMEDTEXT_PLAYER_H_