diff options
author | Andreas Huber <andih@google.com> | 2009-11-16 15:43:38 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2009-11-16 15:43:38 -0800 |
commit | 30ab66297501757d745b9ae10da61adcd891f497 (patch) | |
tree | e287230832c3cf3437df7ac07c282975e95044e7 /include/media/stagefright | |
parent | 057eacf4578ac6b90ee18c524670e01445bf2732 (diff) | |
download | frameworks_av-30ab66297501757d745b9ae10da61adcd891f497.zip frameworks_av-30ab66297501757d745b9ae10da61adcd891f497.tar.gz frameworks_av-30ab66297501757d745b9ae10da61adcd891f497.tar.bz2 |
Squashed commit of the following:
commit 333057b355f8c260c549553b9a0634755c838b6a
Author: Andreas Huber <andih@google.com>
Date: Fri Nov 13 15:35:48 2009 -0800
Some more tweaks to AVC encoding on sholes.
commit 9981d0ee52ec5b8b0182aae733d1571e3ebb8390
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 12 16:36:57 2009 -0800
Support for avc encoding, including sholes specific tweaks to pick the right colorspace for the camera to not require transcoding.
commit 5ba0ebbbd4efca51f3ae1f60e2ca31e7d2cf136d
Author: Andreas Huber <andih@google.com>
Date: Wed Nov 11 09:50:03 2009 -0800
Enable actual (camera) video-only recording using h.263 or mpeg4 encoding.
commit 3fd59c3526a37fe7c696f4a978925d1831c09313
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 10 14:57:48 2009 -0800
Allow switching between the PV recorder implementation and one supported by stagefright.
This is controlled through the property "media.stagefright.enable-record".
Diffstat (limited to 'include/media/stagefright')
-rw-r--r-- | include/media/stagefright/CameraSource.h | 5 | ||||
-rw-r--r-- | include/media/stagefright/MPEG4Writer.h | 2 | ||||
-rw-r--r-- | include/media/stagefright/MetaData.h | 3 | ||||
-rw-r--r-- | include/media/stagefright/OMXCodec.h | 1 |
4 files changed, 10 insertions, 1 deletions
diff --git a/include/media/stagefright/CameraSource.h b/include/media/stagefright/CameraSource.h index ff3ea05..ea435de 100644 --- a/include/media/stagefright/CameraSource.h +++ b/include/media/stagefright/CameraSource.h @@ -26,6 +26,7 @@ namespace android { +class ICamera; class IMemory; class ISurface; class Camera; @@ -33,9 +34,12 @@ class Camera; class CameraSource : public MediaSource { public: static CameraSource *Create(); + static CameraSource *CreateFromICamera(const sp<ICamera> &icamera); virtual ~CameraSource(); + void setPreviewSurface(const sp<ISurface> &surface); + virtual status_t start(MetaData *params = NULL); virtual status_t stop(); @@ -48,6 +52,7 @@ private: friend class CameraSourceListener; sp<Camera> mCamera; + sp<ISurface> mPreviewSurface; Mutex mLock; Condition mFrameAvailableCondition; diff --git a/include/media/stagefright/MPEG4Writer.h b/include/media/stagefright/MPEG4Writer.h index 6b0399f..2ca04fa 100644 --- a/include/media/stagefright/MPEG4Writer.h +++ b/include/media/stagefright/MPEG4Writer.h @@ -33,6 +33,7 @@ class MetaData; class MPEG4Writer : public RefBase { public: MPEG4Writer(const char *filename); + MPEG4Writer(int fd); void addSource(const sp<MediaSource> &source); status_t start(); @@ -65,6 +66,7 @@ private: List<off_t> mBoxes; off_t addSample(MediaBuffer *buffer); + off_t addLengthPrefixedSample(MediaBuffer *buffer); MPEG4Writer(const MPEG4Writer &); MPEG4Writer &operator=(const MPEG4Writer &); diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h index c2d8f98..583128f 100644 --- a/include/media/stagefright/MetaData.h +++ b/include/media/stagefright/MetaData.h @@ -38,7 +38,8 @@ enum { kKeyESDS = 'esds', // raw data kKeyAVCC = 'avcc', // raw data kKeyWantsNALFragments = 'NALf', - kKeyIsSyncFrame = 'sync', + kKeyIsSyncFrame = 'sync', // int32_t (bool) + kKeyIsCodecConfig = 'conf', // int32_t (bool) kKeyTime = 'time', // int64_t (usecs) kKeyDuration = 'dura', // int64_t (usecs) kKeyColorFormat = 'colf', diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h index 7890883..4c60623 100644 --- a/include/media/stagefright/OMXCodec.h +++ b/include/media/stagefright/OMXCodec.h @@ -159,6 +159,7 @@ private: const char *mime, OMX_U32 width, OMX_U32 height); status_t setupMPEG4EncoderParameters(); + status_t setupAVCEncoderParameters(); void setVideoOutputFormat( const char *mime, OMX_U32 width, OMX_U32 height); |