diff options
author | Deva Ramasubramanian <dramasub@codeaurora.org> | 2015-11-09 18:55:59 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-04-13 13:54:55 -0700 |
commit | 322d0a4dd98eae78c0f0acbebc2b622be9fd5438 (patch) | |
tree | cebe390e9f518f712f391deb3e7456037754a408 /media/libavextensions/stagefright | |
parent | d38f17584c22d77b8b0bac85279ce72e1576c34c (diff) | |
download | frameworks_av-322d0a4dd98eae78c0f0acbebc2b622be9fd5438.zip frameworks_av-322d0a4dd98eae78c0f0acbebc2b622be9fd5438.tar.gz frameworks_av-322d0a4dd98eae78c0f0acbebc2b622be9fd5438.tar.bz2 |
libstagefright: Allow for MPEG4Writer extension
Defer MPEG4 muxer creation to AVFactory.
Change-Id: If0918be77ab7f8d82c78203f371df789e3cc29b8
Diffstat (limited to 'media/libavextensions/stagefright')
-rw-r--r-- | media/libavextensions/stagefright/AVExtensions.h | 3 | ||||
-rw-r--r-- | media/libavextensions/stagefright/AVFactory.cpp | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/media/libavextensions/stagefright/AVExtensions.h b/media/libavextensions/stagefright/AVExtensions.h index b0e4bb5..c4c9aae 100644 --- a/media/libavextensions/stagefright/AVExtensions.h +++ b/media/libavextensions/stagefright/AVExtensions.h @@ -59,6 +59,7 @@ class ICameraRecordingProxy; class String16; class IGraphicBufferProducer; struct Size; +class MPEG4Writer; /* * Factory to create objects of base-classes in libstagefright @@ -107,6 +108,8 @@ struct AVFactory { const sp<IGraphicBufferProducer>& surface, int64_t timeBetweenFrameCaptureUs, bool storeMetaDataInVideoBuffers = true); + + virtual MPEG4Writer *CreateMPEG4Writer(int fd); // ----- NO TRESSPASSING BEYOND THIS LINE ------ DECLARE_LOADABLE_SINGLETON(AVFactory); }; diff --git a/media/libavextensions/stagefright/AVFactory.cpp b/media/libavextensions/stagefright/AVFactory.cpp index f6d5f53..7420d12 100644 --- a/media/libavextensions/stagefright/AVFactory.cpp +++ b/media/libavextensions/stagefright/AVFactory.cpp @@ -45,6 +45,7 @@ #include <media/stagefright/CameraSource.h> #include <media/stagefright/CameraSourceTimeLapse.h> #include <camera/CameraParameters.h> +#include <media/stagefright/MPEG4Writer.h> #include "common/ExtensionsLoader.hpp" #include "stagefright/AVExtensions.h" @@ -120,6 +121,11 @@ CameraSourceTimeLapse* AVFactory::CreateCameraSourceTimeLapseFromCamera( clientName, clientUid, videoSize, videoFrameRate, surface, timeBetweenFrameCaptureUs, storeMetaDataInVideoBuffers); } + +MPEG4Writer* AVFactory::CreateMPEG4Writer(int fd) { + return new MPEG4Writer(fd); +} + // ----- NO TRESSPASSING BEYOND THIS LINE ------ AVFactory::AVFactory() { } |