summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/StagefrightRecorder.h
Commit message (Collapse)AuthorAgeFilesLines
* stagefright: Forward-port HFR and HSR supportSteve Kondik2016-01-051-2/+2
| | | | | | * CAF commit bd42a7ac3a60c0d8a079b4567484c9b006bac8ad upstream Change-Id: I457ccab603647f3139ea2199a544f64ac3d1a214
* StagefrightRecorder: Add support for WAVE recordingMichael Bestas2015-12-121-0/+1
| | | | | | * Forward port the cm-12.1 code Change-Id: I77373a236108507b8fa76cc8d3016de36aade301
* stagefright: Act V: I am become death, the destroyer of worldsSteve Kondik2015-11-241-1/+3
| | | | | | | | * In which our hero unites the legions of distant worlds together as one at last to fight anew until the segfaults boil the lands and the New Version cometh. Change-Id: I869b2ab254968ed7a133827ea9e5ba6056f68a5c
* stagefright: Squashed commit of pause/resume featuresSteve Kondik2015-11-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 2 APIs (suspend/resume) in MediaPlayer - API:suspend() will just pause the player and release all the decoders to replace release() which will release the whole player - API:resume() will just init the decoders again, then start() will be called to restart streaming playback - Add a check in AwesomePlayer::onVideoEvent() to make sure the first seek operation will always seek to the next i-frame Change-Id: Ie4c82906a2a056378119921a656128ebdc1007c4 audio: Add pause support for hardware omx component - ADSP doesn't enter sleep state after wma playback is paused and power suspended. - No support for NT session pause in case of hardware component. NT session need to be paused to put ADSP into power collapse. - Add support of pause in stagefright to ensure device enters suspend mode. Also add intermediate states to avoid concurrency issues between read and pause. Change-Id: I41b946b8c8805e6ee303646b63513b5b16514ef6 libstagefright: Drain input buffer on resume - Buffers returned from codec in paused state are not drained. When codec is resumed these buffers are not drained until the next flush, and may cause timed out issue. - Added change to drain input buffers for sw decoders when resuming. Change-Id: Ida2ab1d5dc3a1910accdd6fb89548262a912d8e7 CRs-Fixed: 569585, 574967 libstagefright: camcorder pause-resume implementation - Add pause resume feature in camcorder app. So that user can pause recording and resume later which results in a single recorded clip. Change-Id: Id19c45ae5bb85265aa4d5304b160ebf119d9575a libstagefright: support pause/resume for timelapse recording Modify the timestamp calculation mechanism in CameraSourceTimeLapse in order to support pause/resume. Change-Id: Icb02ea798b0b807ffb7ada2d1ef5b2414b74edfb
* video: Modify classes to support camcorder pause/resumeSurajit Podder2015-10-061-3/+3
| | | | | | | | | * Modify MediaRecorder, CameraSource, AudioSource to be extendable. * Add hooks to instantiate extended implementations to implement pause/resume. Change-Id: I847263fc69e4f613c5ea60fb6809c7da176d3a8d
* audio: add support for extended audio encodingMingming Yin2015-10-061-0/+4
| | | | | | - add support for EVRC, QCELP, and LPCM encoding. Change-Id: I2f93a88ed5c9bd502399ef145a5802d1a15fcc45
* libstagefright: MPEG4Writer: Add support for HEVC muxingLubin Yin2015-10-061-2/+3
| | | | | | | | | | | | Changes done to enable HEVC muxing - writing HVCC atom - configure HEVC encoder Fix HEVC flag initialization Check for HEVC for single track usecase Change-Id: I1757d0c442e7cc3ef251431f220395131a1eb4ec
* avextensions: Add support for Codec Extension featuresShalaj Jain2015-10-061-0/+3
| | | | | | | | | | Add support for Codec extension features like skype, vqzip, b-frame encoding, prefer adaptive playback etc. Add extensions to support encode batching. Also enable Werror for libavextensions. Change-Id: Ia342d4abe4bb1e21b9ff2b8213fb96421485a333
* Stagefright: Make classes customizable and add AV extensionsPraveen Chavan2015-10-061-2/+2
| | | | | | | | | | | Change access modifiers and qualify methods with virtual, to allow extensions. Add facility for loading customizations (Extended classes) dynamically. Conflicts: media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp Change-Id: Icc8965754fb1c73175a13a9ad24c19665ad60988
* MediaRecorder: enable audio for slow motion recordingChong Zhang2015-07-171-5/+4
| | | | | | bug:22460747 Change-Id: I23f773ecf7b86928a8eacd25a481636e645affbe
* Camera1 API: Support SW encoders for new camera HALsEino-Ville Talvala2015-06-081-2/+1
| | | | | | | | | | | | - Support new set video format/dataspace command in camera service - HALv3: Select gralloc usage flags based on format - HALv1: Pass format command directly to HAL layer - Use format/dataspace command in CameraSource - Switch all API1 recording to use metadata mode - Switch all >= HALv2 API1 recording to use kMetadataBufferTypeANWBuffer Bug: 13222807 Change-Id: I2e609b92c65792611bb1dab09e0c41c363ebbc42
* stagefright: rename usePersistentInputSurface to setInputSurfaceChong Zhang2015-05-131-1/+1
| | | | | | | | and clear persistent surface pointer when MediaRecorder is reset bug: 21045118 bug: 21045402 Change-Id: Ifd0d6deeb969f2252123929541b30b518cecbf9a
* MediaRecorder: implement persistent input surface APIsChong Zhang2015-05-011-0/+3
| | | | | | | Bug: 19127604 Bug: 19489395 Change-Id: I7dd8015a8fe029f9867fcdb52322629c77eff50b
* Respect the record audio app op - mediaSvet Ganov2015-04-291-1/+1
| | | | Change-Id: I3a97977b6e9a09355e2008f780d22d480fb7308b
* libmediaplayerservice: fix warnings, make warnings errors, use clangLajos Molnar2015-04-171-1/+1
| | | | Change-Id: I1b2f6b65c5abbc366068a60b8909104f31b94228
* MediaRecorder: pass capture fps in floatChong Zhang2015-02-231-1/+2
| | | | | | bug: 19460202 Change-Id: Ic8f2dc02dfd482c4b2065b16e28721fc6e3cf696
* StageFrightRecorder: update setVideoFrameRate sanity checkZhijun He2015-02-091-0/+2
| | | | | | Allow high speed recording fps to be up to 1000fps Change-Id: I975d11b8a9abbd50ce6982fb46f4a4a3a035e475
* Remove filename based writer constructorsMarco Nelissen2014-12-101-1/+0
| | | | | | | MediaPlayerService can't open files (it needs an already opened file descriptor), so these were just wasting space. Change-Id: I323044a6c1814a7bff952ed71b5c7792df2abf03
* StagefrightRecorder: default to codec and fps from camcorder low profileChong Zhang2014-09-111-0/+1
| | | | | Bug: 16870964 Change-Id: I18425af630d3f041a3bcf77fbae3f07856fe8af2
* StagefrightRecorder: webm (video only) supportRobert Shih2014-07-221-2/+2
| | | | | Bug: 16329805 Change-Id: I8a0ecd100fca397add97a1416125bcc6aeb86364
* initialize encoder at start() time for camera sourceChong Zhang2014-02-261-0/+1
| | | | | Bug: 13156212 Change-Id: I845ef51f662f04c50179dbfb128204922a424e1d
* Change StagefrightRecorder to use MediaCodecChong Zhang2014-02-051-14/+12
| | | | | Bug: 12305192 Change-Id: I72d7cb571be5bd348b58ad650f3269d24c15d350
* Merge "Fixed StagefrightRecorder::setupVideoEncoder to use the clipped ↵Robert Shih2013-11-151-10/+2
|\ | | | | | | bitrate value mVideoBitRate; removed unused arguments after refactoring."
| * Fixed StagefrightRecorder::setupVideoEncoder to use the clipped bitrate valueRobert Shih2013-11-111-10/+2
| | | | | | | | | | | | | | mVideoBitRate; removed unused arguments after refactoring. Bug: 11074303 Change-Id: Ieb5dd7dc67e5bc16b6e580ba11b157e4365f3cd6
* | StageFrightRecorder: do not use meta-data mode for software encodersLajos Molnar2013-10-301-1/+2
|/ | | | | | | | | | Camera HAL v1 uses vendor-specific camera-source meta-data mode, but software encoders use generic gralloc-source mode, so they are not compatible. Change-Id: I0d1bab8eada26dcb70c97b1eec83f06d1f331239 Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 11446505
* remove uses of Surface in favor or IGraphicBufferProducerMathias Agopian2013-03-121-2/+2
| | | | Change-Id: I13d7a9553aa335bca790a3a59d389d7533c83d57
* CameraService and Stagefright: Support AppOpsEino-Ville Talvala2013-02-251-0/+3
| | | | | | | | | | | | | Camera: - Signal to AppOpsService when camera usage starts and stops - Listen to permissions revocations and act on them - Currently just kill camera connection when permissions lost Stagefright: - Pass on client name, UID to camera as needed Bug: 8181262 Change-Id: I9e33c9d05e9daa77dbb2d795045d08eb887ec8f0
* Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-3/+3
| | | | | | | | | | The C++ class names don't match what the classes do, so rename ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to GLConsumer. Bug 7736700 Change-Id: I64520a55f8c09fe6215382ea361c539a9940cba5
* Fix an issue where we should allow negative values but did notJames Dong2011-10-051-2/+2
| | | | | Change-Id: Ia8d718b4e6aec4c17db86e30134132f767fd72c5 related-to-bug: 5419527
* Do not support still image capture mode for timelapse video recordingJames Dong2011-07-241-12/+3
| | | | | | related-to-bug: 4973779 Change-Id: Ica665217ab10247b2242acc4e93d4fe9f83e3f45
* Connect MediaRecorder Native to SurfaceMediaSourcePannag Sanketi2011-07-221-0/+18
| | | | | | | | | | | | | | | | | Making a connection from MediaRecorder Native layer to the SurfaceMediaSource for the purpose of encoding GL Frames. This will be called from the java side inside the Mobile Filter Framework. The mediarecorder native layer (client), when set the videosource to option VIDEO_SOURCE_FRAMES, asks the StageFrightRecorder on the mediaserver side to create a SurfaceMediaSource object and pass it back as a sp<ISurfaceTexture> object. Using that, the client side will dequeue and queue buffers. Connecting the GL Frames to the obtained sp<ISurfaceTexture> is not part of this CL. Related to bug id: 4529323 Change-Id: I651bec718dd5b935779e7d7a050b841c2d0b0fcd
* Use advertised h264 encoding parameters by default if the profile is not ↵James Dong2011-07-081-0/+1
| | | | | | | | baseline o Force to use AVC baseline profile for camcorder low quality videos Change-Id: I3424c57dd0c55fc4991f5767b57695c8f3420ecb
* Add framework support for camcorder zoom.Wu-cheng Li2011-06-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to allow applications using the camera during recording. Camera service allows only one client at a time. Since camcorder application needs to own the camera to do things like zoom, the media recorder cannot access the camera directly during recording. So ICameraRecordingProxy is a proxy of ICamera, which allows the media recorder to start/stop the recording and release recording frames. ICameraRecordingProxyListener is an interface that allows the recorder to receive video frames during recording. ICameraRecordingProxy startRecording() stopRecording() releaseRecordingFrame() ICameraRecordingProxyListener dataCallbackTimestamp() The camcorder app opens the camera and starts the preview. The app passes ICamera and ICameraRecordingProxy to the media recorder by MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in MediaRecorder::start(). After setup, the recorder disconnects from camera service. The recorder calls ICameraRecordingProxy::startRecording() and passes a ICameraRecordingProxyListener to the app. The app connects back to camera service and starts the recording. The app owns the camera and can do things like zoom. The media recorder receives the video frames from the listener and releases them by ICameraRecordingProxy::releaseRecordingFrame. The recorder calls ICameraRecordingProxy::stopRecording() to stop the recording. The call sequences are as follows: 1. The app: Camera.unlock(). 2. The app: MediaRecorder.setCamera(). 3. Start recording (1) The app: MediaRecorder.start(). (2) The recorder: ICamera.unlock() and ICamera.disconnect(). (3) The recorder: ICameraRecordingProxy.startRecording(). (4) The app: ICamera.reconnect(). (5) The app: ICamera.startRecording(). 4. During recording (1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp() (2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame(). 5. Stop recording (1) The app: MediaRecorder.stop() (2) The recorder: ICameraRecordingProxy.stopRecording(). (3) The app: ICamera.stopRecording(). bug:2644213 Change-Id: I15269397defc25cbbcae16abc071c8349c123122
* Support platform and camera dependent recording start time offsetJames Dong2011-05-141-0/+1
| | | | | | related-to-bug: 4390777 Change-Id: Icb52973ad4ac716f04fb103ef527915a966d06d5
* Support for storing geo information in the recorded mp4/3gpp file.James Dong2011-05-131-0/+4
| | | | | | | o Geo data (latitude and longitude) is stored in udta box Change-Id: I76e4aeb741c4b339f3753d3d28190151f3ea4919 related-to-bug: 4260295
* update for new audio.h header locationDima Zavin2011-05-121-1/+1
| | | | | Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876 Signed-off-by: Dima Zavin <dima@android.com>
* Initial check-in for AACWriterJames Dong2011-05-041-1/+2
| | | | | | Change-Id: Ia21ca39a404484b2dda25c6101780d2ff11c4623 related-to-bug: 4211046
* audio/media: convert to using the audio HAL and new audio defsDima Zavin2011-04-271-2/+4
| | | | | Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5 Signed-off-by: Dima Zavin <dima@android.com>
* To collect the total usage time of encoders in the media recorderGloria Wang2011-02-231-0/+2
| | | | Change-Id: I94c9c94dec6bd714a3ebf96b4465b94f069e55b8
* Add audio encoding parameters checkJames Dong2011-01-121-0/+4
| | | | | | bug - 3345296 Change-Id: If3f33955f5473b0c5ad9c9b85f8b5cb21ddd7e65
* Rotation supportJames Dong2010-11-091-0/+2
| | | | | | | | | | | | | | - We only support 0, 90, 180, and 270 degree clockwise rotation - Some players are known to ignore composition matrix in the MP4 file, although this is part of the MP4 file standard. Both QT and YT are supporting the rotation The original patch (65a73f4e8c79d05c0d9001b660325748d4ecf37b) was not merged. The only change I made is to reuse the same kKeyRotation in MetaData.h; and thus do not neeed to use kKeyRotationDegree. Change-Id: Ib328716d4842201c4adf57e4ddfe1f1ac1ae4d8a
* Use meta data in the media recording frameworkJames Dong2010-11-041-0/+1
| | | | | | o This patch allows us to do 720p video recording Change-Id: I2ea37e80a59630145396b08ebcdc6ee71df53333
* resolved conflicts for merge of a127c07c to masterKenny Root2010-10-141-0/+1
|\ | | | | | | Change-Id: Ifdfc6681cba00f36456eaf7a97f34a75b9d0c086
| * Support for writing to MPEG2 transport stream files.Andreas Huber2010-10-121-0/+1
| | | | | | | | Change-Id: If3b7a807bc224a4b1cb2236537c3ebdc5aee0d97
* | Move Camera specific logic out from StagefrightRecorder to CameraSourceJames Dong2010-10-081-11/+2
| | | | | | | | | | | | | | o updated comments and streamlined the logic in checkVideoSize() and checkFrameRate() as suggested Change-Id: I49d04ac7998d4a215997aa63555dfb6e814e38d3
* | Use setVideoSize API in StagefrightRecorderJames Dong2010-10-041-0/+4
| | | | | | | | Change-Id: Ia7ddf5e8d2b931453d2cb801169906191349ca07
* | Implemented frequent read returns for quick stop in time lapse.Nipun Kwatra2010-09-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the frame capture interval is large, read will block for a long time. Due to the way the mediaRecorder framework works, a stop() call from mediaRecorder waits until the read returns, causing a long wait for stop() to return. To avoid this, we return a copy of the last read frame with the same time stamp if a frame is not available quickly. This keeps the read() call from blocking too long. This method is triggered when startQuickReadReturns() is called on CameraSourceTimeLapse. In the still camera case, also using waitRelative on Condition instaed of sleeping, so that we can wake it up. Also for the idle check instead of sleeping, we now wait on a condition variable, which is woken up when the last takePicture callback gets called. Change-Id: Ia74386e175536aee0f44ae2f8b114c353d3d72f5
* | Moving decision to use still camera to CameraSourceTimeLapseNipun Kwatra2010-09-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | CameraSourceTimeLapse now decides whether to use still or video camera automatically. It checks if the passed in size is a valid preview size and if it is, then uses the video camera else uses the still camera. Removed from StagefrightRecorder the support to set parameter useStillCameraForTimeLapse. Change-Id: I71f5b0fc7080ca524792381efe918d22e41a7f36
* | Support for auxiliary video parameters.Nipun Kwatra2010-09-011-4/+10
| | | | | | | | | | | | | | | | Added support for passing width, height and video bitrate for the auxiliary video. Also setting encoder level depending on the video size and bitrate. Change-Id: I4a90046853f67287c3e7e6babc75b4827f0c3e73
* | Adding support for parallel recording sessions.Nipun Kwatra2010-08-311-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added setOutputFileAuxiliary to pass the auxiliary file descriptor. The java interface through JNI will be checked in next. - renamed setupCameraSource to setupCamera as the function just sets the camera. - Added setupCameraSource which sets up the camera source. This functionality was in setupVideoEncoder before. - setupVideoEncoder now takes in a cameraSource instead of creating it on it own. - Refactored startMPEG4Recording() to use setupMPEG4Recording, setupMPEG4MetaData. - setupMPEG4Recording() takes in file descriptor, bitrates to setup a mpeg4 writer. This function can be called multiple times to setup multiple writers. - Added setupMPEG4MetaData() for setting up the meta data for mpeg4 writer. startMPEG4Recording() now calls setupMPEG4Recording, setupMPEG4MetaData for each recording session. Change-Id: I07f5334a1ff8e12a36f58e94129fcfa6add2208b