diff options
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r-- | media/libstagefright/include/AACExtractor.h | 4 | ||||
-rw-r--r-- | media/libstagefright/include/APE.h | 43 | ||||
-rw-r--r-- | media/libstagefright/include/AwesomePlayer.h | 6 | ||||
-rw-r--r-- | media/libstagefright/include/NuCachedSource2.h | 12 | ||||
-rw-r--r-- | media/libstagefright/include/OMX.h | 2 | ||||
-rw-r--r-- | media/libstagefright/include/OMXNodeInstance.h | 5 | ||||
-rw-r--r-- | media/libstagefright/include/SampleIterator.h | 5 |
7 files changed, 76 insertions, 1 deletions
diff --git a/media/libstagefright/include/AACExtractor.h b/media/libstagefright/include/AACExtractor.h index e98ca82..9a0ba2f 100644 --- a/media/libstagefright/include/AACExtractor.h +++ b/media/libstagefright/include/AACExtractor.h @@ -21,6 +21,7 @@ #include <media/stagefright/MediaExtractor.h> #include <utils/Vector.h> +#include "include/APE.h" namespace android { @@ -48,6 +49,9 @@ private: Vector<uint64_t> mOffsetVector; int64_t mFrameDurationUs; + APE ape; + sp<MetaData> mApeMeta; + AACExtractor(const AACExtractor &); AACExtractor &operator=(const AACExtractor &); }; diff --git a/media/libstagefright/include/APE.h b/media/libstagefright/include/APE.h new file mode 100644 index 0000000..db49bb0 --- /dev/null +++ b/media/libstagefright/include/APE.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) Texas Instruments - http://www.ti.com/ + * + * 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 APE_TAG_H_ + +#define APE_TAG_H_ + +#include <utils/RefBase.h> +#include <media/stagefright/DataSource.h> +#include <media/stagefright/MetaData.h> + +namespace android { + +class APE{ +public: + APE(); + ~APE(); + bool isAPE(uint8_t *apeTag) const; + bool parseAPE(const sp<DataSource> &source, off64_t offset, + sp<MetaData> &meta); + +private: + uint32_t itemNumber; + uint32_t itemFlags; + size_t lenValue; +}; + +} //namespace android + +#endif //APE_TAG_H_ diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h index 758b2c9..1a8e6c8 100644 --- a/media/libstagefright/include/AwesomePlayer.h +++ b/media/libstagefright/include/AwesomePlayer.h @@ -109,6 +109,9 @@ struct AwesomePlayer { void postAudioTearDown(); status_t dump(int fd, const Vector<String16> &args) const; + status_t suspend(); + status_t resume(); + private: friend struct AwesomeEvent; friend struct PreviewPlayer; @@ -193,6 +196,7 @@ private: uint32_t mFlags; uint32_t mExtractorFlags; uint32_t mSinceLastDropped; + bool mDropFramesDisable; // hevc test int64_t mTimeSourceDeltaUs; int64_t mVideoTimeUs; @@ -355,6 +359,8 @@ private: bool mAudioTearDownWasPlaying; int64_t mAudioTearDownPosition; + bool mIsFirstFrameAfterResume; + status_t setVideoScalingMode(int32_t mode); status_t setVideoScalingMode_l(int32_t mode); status_t getTrackInfo(Parcel* reply) const; diff --git a/media/libstagefright/include/NuCachedSource2.h b/media/libstagefright/include/NuCachedSource2.h index d36da6a..1f282ca 100644 --- a/media/libstagefright/include/NuCachedSource2.h +++ b/media/libstagefright/include/NuCachedSource2.h @@ -28,7 +28,7 @@ struct ALooper; struct PageCache; struct NuCachedSource2 : public DataSource { - NuCachedSource2( + static sp<NuCachedSource2> Create( const sp<DataSource> &source, const char *cacheConfig = NULL, bool disconnectAtHighwatermark = false); @@ -66,12 +66,20 @@ struct NuCachedSource2 : public DataSource { String8 *cacheConfig, bool *disconnectAtHighwatermark); + virtual status_t disconnectWhileSuspend(); + virtual status_t connectWhileResume(); + protected: virtual ~NuCachedSource2(); protected: friend struct AHandlerReflector<NuCachedSource2>; + NuCachedSource2( + const sp<DataSource> &source, + const char *cacheConfig, + bool disconnectAtHighwatermark); + enum { kPageSize = 65536, kDefaultHighWaterThreshold = 20 * 1024 * 1024, @@ -118,6 +126,8 @@ protected: bool mDisconnectAtHighwatermark; + bool mSuspended; + void onMessageReceived(const sp<AMessage> &msg); void onFetch(); void onRead(const sp<AMessage> &msg); diff --git a/media/libstagefright/include/OMX.h b/media/libstagefright/include/OMX.h index d468dfc..e7c4f6d 100644 --- a/media/libstagefright/include/OMX.h +++ b/media/libstagefright/include/OMX.h @@ -140,6 +140,8 @@ public: virtual void binderDied(const wp<IBinder> &the_late_who); + virtual bool isSecure(IOMX::node_id node); + OMX_ERRORTYPE OnEvent( node_id node, OMX_IN OMX_EVENTTYPE eEvent, diff --git a/media/libstagefright/include/OMXNodeInstance.h b/media/libstagefright/include/OMXNodeInstance.h index f68e0a9..e5fb45b 100644 --- a/media/libstagefright/include/OMXNodeInstance.h +++ b/media/libstagefright/include/OMXNodeInstance.h @@ -125,6 +125,10 @@ struct OMXNodeInstance { const void *data, size_t size); + bool isSecure() const { + return mIsSecure; + } + // handles messages and removes them from the list void onMessages(std::list<omx_message> &messages); void onMessage(const omx_message &msg); @@ -142,6 +146,7 @@ private: OMX_HANDLETYPE mHandle; sp<IOMXObserver> mObserver; bool mDying; + bool mIsSecure; // Lock only covers mGraphicBufferSource. We can't always use mLock // because of rare instances where we'd end up locking it recursively. diff --git a/media/libstagefright/include/SampleIterator.h b/media/libstagefright/include/SampleIterator.h index 7053247..2ef41ae 100644 --- a/media/libstagefright/include/SampleIterator.h +++ b/media/libstagefright/include/SampleIterator.h @@ -14,6 +14,10 @@ * limitations under the License. */ +#ifndef SAMPLE_ITERATOR_H_ + +#define SAMPLE_ITERATOR_H_ + #include <utils/Vector.h> namespace android { @@ -75,3 +79,4 @@ private: } // namespace android +#endif // SAMPLE_ITERATOR_H_ |