diff options
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/IMediaPlayer.h | 1 | ||||
-rw-r--r-- | include/media/IStreamSource.h | 17 | ||||
-rw-r--r-- | include/media/MediaPlayerInterface.h | 3 | ||||
-rw-r--r-- | include/media/MediaProfiles.h | 20 | ||||
-rw-r--r-- | include/media/mediametadataretriever.h | 1 | ||||
-rw-r--r-- | include/media/mediaplayer.h | 1 | ||||
-rw-r--r-- | include/media/stagefright/ACodec.h | 2 | ||||
-rw-r--r-- | include/media/stagefright/CameraSource.h | 3 | ||||
-rw-r--r-- | include/media/stagefright/CameraSourceTimeLapse.h | 4 | ||||
-rw-r--r-- | include/media/stagefright/MediaDefs.h | 5 | ||||
-rw-r--r-- | include/media/stagefright/MetaData.h | 1 | ||||
-rw-r--r-- | include/media/stagefright/OMXCodec.h | 4 |
12 files changed, 41 insertions, 21 deletions
diff --git a/include/media/IMediaPlayer.h b/include/media/IMediaPlayer.h index 0e2cdf7..e905903 100644 --- a/include/media/IMediaPlayer.h +++ b/include/media/IMediaPlayer.h @@ -40,7 +40,6 @@ public: const KeyedVector<String8, String8>* headers) = 0; virtual status_t setDataSource(int fd, int64_t offset, int64_t length) = 0; virtual status_t setDataSource(const sp<IStreamSource>& source) = 0; - virtual status_t setVideoSurface(const sp<Surface>& surface) = 0; virtual status_t setVideoSurfaceTexture( const sp<ISurfaceTexture>& surfaceTexture) = 0; virtual status_t prepareAsync() = 0; diff --git a/include/media/IStreamSource.h b/include/media/IStreamSource.h index cc63356..19646b0 100644 --- a/include/media/IStreamSource.h +++ b/include/media/IStreamSource.h @@ -52,15 +52,20 @@ struct IStreamListener : public IInterface { static const char *const kKeyResumeAtPTS; // When signalling a discontinuity you can optionally - // signal that this is a "hard" discontinuity, i.e. the format - // or configuration of subsequent stream data differs from that - // currently active. To do so, include a non-zero int32_t value - // under the key "kKeyFormatChange" when issuing the DISCONTINUITY + // specify the type(s) of discontinuity, i.e. if the + // audio format has changed, the video format has changed, + // time has jumped or any combination thereof. + // To do so, include a non-zero int32_t value + // under the key "kKeyDiscontinuityMask" when issuing the DISCONTINUITY // command. - // The new logical stream must start with proper codec initialization + // If there is a change in audio/video format, The new logical stream + // must start with proper codec initialization // information for playback to continue, i.e. SPS and PPS in the case // of AVC video etc. - static const char *const kKeyFormatChange; + // If this key is not present, only a time discontinuity is assumed. + // The value should be a bitmask of values from + // ATSParser::DiscontinuityType. + static const char *const kKeyDiscontinuityMask; virtual void issueCommand( Command cmd, bool synchronous, const sp<AMessage> &msg = NULL) = 0; diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h index 4328d3c..80f43a3 100644 --- a/include/media/MediaPlayerInterface.h +++ b/include/media/MediaPlayerInterface.h @@ -117,9 +117,6 @@ public: return INVALID_OPERATION; } - // pass the buffered Surface to the media player service - virtual status_t setVideoSurface(const sp<Surface>& surface) = 0; - // pass the buffered ISurfaceTexture to the media player service virtual status_t setVideoSurfaceTexture( const sp<ISurfaceTexture>& surfaceTexture) = 0; diff --git a/include/media/MediaProfiles.h b/include/media/MediaProfiles.h index eab7648..250f267 100644 --- a/include/media/MediaProfiles.h +++ b/include/media/MediaProfiles.h @@ -48,15 +48,21 @@ enum camcorder_quality { }; /** - *Set CIF as default maximum import and export resolution of video editor. - *The maximum import and export resolutions are platform specific, - *which should be defined in media_profiles.xml. + * Set CIF as default maximum import and export resolution of video editor. + * The maximum import and export resolutions are platform specific, + * which should be defined in media_profiles.xml. + * Set default maximum prefetch YUV frames to 6, which means video editor can + * queue up to 6 YUV frames in the video encoder source. + * This value is used to limit the amount of memory used by video editor + * engine when the encoder consumes YUV frames at a lower speed + * than video editor engine produces. */ enum videoeditor_capability { VIDEOEDITOR_DEFAULT_MAX_INPUT_FRAME_WIDTH = 352, VIDEOEDITOR_DEFUALT_MAX_INPUT_FRAME_HEIGHT = 288, VIDEOEDITOR_DEFAULT_MAX_OUTPUT_FRAME_WIDTH = 352, VIDEOEDITOR_DEFUALT_MAX_OUTPUT_FRAME_HEIGHT = 288, + VIDEOEDITOR_DEFAULT_MAX_PREFETCH_YUV_FRAMES = 6 }; enum video_decoder { @@ -138,6 +144,8 @@ public: * videoeditor.input.height.max - max input video frame height * videoeditor.output.width.max - max output video frame width * videoeditor.output.height.max - max output video frame height + * maxPrefetchYUVFrames - max prefetch YUV frames in video editor engine. This value is used + * to limit the memory consumption. */ int getVideoEditorCapParamByName(const char *name) const; @@ -357,11 +365,12 @@ private: }; struct VideoEditorCap { VideoEditorCap(int inFrameWidth, int inFrameHeight, - int outFrameWidth, int outFrameHeight) + int outFrameWidth, int outFrameHeight, int frames) : mMaxInputFrameWidth(inFrameWidth), mMaxInputFrameHeight(inFrameHeight), mMaxOutputFrameWidth(outFrameWidth), - mMaxOutputFrameHeight(outFrameHeight) {} + mMaxOutputFrameHeight(outFrameHeight), + mMaxPrefetchYUVFrames(frames) {} ~VideoEditorCap() {} @@ -369,6 +378,7 @@ private: int mMaxInputFrameHeight; int mMaxOutputFrameWidth; int mMaxOutputFrameHeight; + int mMaxPrefetchYUVFrames; }; int getCamcorderProfileIndex(int cameraId, camcorder_quality quality) const; diff --git a/include/media/mediametadataretriever.h b/include/media/mediametadataretriever.h index 9aa6700..534afce 100644 --- a/include/media/mediametadataretriever.h +++ b/include/media/mediametadataretriever.h @@ -54,6 +54,7 @@ enum { METADATA_KEY_BITRATE = 20, METADATA_KEY_TIMED_TEXT_LANGUAGES = 21, METADATA_KEY_IS_DRM = 22, + METADATA_KEY_LOCATION = 23, // Add more here... }; diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h index 08835fb..e6a0cc5 100644 --- a/include/media/mediaplayer.h +++ b/include/media/mediaplayer.h @@ -170,7 +170,6 @@ public: status_t setDataSource(int fd, int64_t offset, int64_t length); status_t setDataSource(const sp<IStreamSource> &source); - status_t setVideoSurface(const sp<Surface>& surface); status_t setVideoSurfaceTexture( const sp<ISurfaceTexture>& surfaceTexture); status_t setListener(const sp<MediaPlayerListener>& listener); diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h index 5822877..3963d9c 100644 --- a/include/media/stagefright/ACodec.h +++ b/include/media/stagefright/ACodec.h @@ -166,6 +166,8 @@ private: bool allYourBuffersAreBelongToUs(); + size_t countBuffersOwnedByComponent(OMX_U32 portIndex) const; + void deferMessage(const sp<AMessage> &msg); void processDeferredMessages(); diff --git a/include/media/stagefright/CameraSource.h b/include/media/stagefright/CameraSource.h index 8c1c593..446720b 100644 --- a/include/media/stagefright/CameraSource.h +++ b/include/media/stagefright/CameraSource.h @@ -153,6 +153,9 @@ protected: bool mStarted; int32_t mNumFramesEncoded; + // Time between capture of two frames. + int64_t mTimeBetweenFrameCaptureUs; + CameraSource(const sp<ICamera>& camera, const sp<ICameraRecordingProxy>& proxy, int32_t cameraId, Size videoSize, int32_t frameRate, diff --git a/include/media/stagefright/CameraSourceTimeLapse.h b/include/media/stagefright/CameraSourceTimeLapse.h index 0e264c7..b060691 100644 --- a/include/media/stagefright/CameraSourceTimeLapse.h +++ b/include/media/stagefright/CameraSourceTimeLapse.h @@ -57,10 +57,6 @@ private: int32_t mVideoWidth; int32_t mVideoHeight; - // Time between capture of two frames during time lapse recording - // Negative value indicates that timelapse is disabled. - int64_t mTimeBetweenTimeLapseFrameCaptureUs; - // Time between two frames in final video (1/frameRate) int64_t mTimeBetweenTimeLapseVideoFramesUs; diff --git a/include/media/stagefright/MediaDefs.h b/include/media/stagefright/MediaDefs.h index 3e48459..2eb259e 100644 --- a/include/media/stagefright/MediaDefs.h +++ b/include/media/stagefright/MediaDefs.h @@ -31,7 +31,9 @@ extern const char *MEDIA_MIMETYPE_VIDEO_RAW; extern const char *MEDIA_MIMETYPE_AUDIO_AMR_NB; extern const char *MEDIA_MIMETYPE_AUDIO_AMR_WB; -extern const char *MEDIA_MIMETYPE_AUDIO_MPEG; +extern const char *MEDIA_MIMETYPE_AUDIO_MPEG; // layer III +extern const char *MEDIA_MIMETYPE_AUDIO_MPEG_LAYER_I; +extern const char *MEDIA_MIMETYPE_AUDIO_MPEG_LAYER_II; extern const char *MEDIA_MIMETYPE_AUDIO_AAC; extern const char *MEDIA_MIMETYPE_AUDIO_QCELP; extern const char *MEDIA_MIMETYPE_AUDIO_VORBIS; @@ -47,6 +49,7 @@ extern const char *MEDIA_MIMETYPE_CONTAINER_OGG; extern const char *MEDIA_MIMETYPE_CONTAINER_MATROSKA; extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG2TS; extern const char *MEDIA_MIMETYPE_CONTAINER_AVI; +extern const char *MEDIA_MIMETYPE_CONTAINER_MPEG2PS; extern const char *MEDIA_MIMETYPE_CONTAINER_WVM; diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h index 57f678c..4cdee17 100644 --- a/include/media/stagefright/MetaData.h +++ b/include/media/stagefright/MetaData.h @@ -85,6 +85,7 @@ enum { kKeyDate = 'date', // cstring kKeyWriter = 'writ', // cstring kKeyCompilation = 'cpil', // cstring + kKeyLocation = 'loc ', // cstring kKeyTimeScale = 'tmsl', // int32_t // video profile and level diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h index c21d19d..84f8282 100644 --- a/include/media/stagefright/OMXCodec.h +++ b/include/media/stagefright/OMXCodec.h @@ -336,6 +336,10 @@ private: int64_t retrieveDecodingTimeUs(bool isCodecSpecific); + status_t parseAVCCodecSpecificData( + const void *data, size_t size, + unsigned *profile, unsigned *level); + OMXCodec(const OMXCodec &); OMXCodec &operator=(const OMXCodec &); }; |