summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/StagefrightRecorder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make frameworks/av 64-bit compatibleKévin PETIT2014-02-111-3/+4
| | | | | | | | | | | | Contains the necessary changes to make frameworks/av build and work on a 64-bit machine. Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
* StageFrightRecorder: do not use meta-data mode for software encodersLajos Molnar2013-10-301-6/+25
| | | | | | | | | | 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
* Fix valgrind error.Marco Nelissen2013-03-271-1/+2
| | | | | | | The constructor calls reset(), which in turn calls stop(), which then accesses mCaptureTimeLapse before it has been initialized. Change-Id: Ia94ac740b9bd1a0389c72647a5639dd25320d92c
* remove uses of Surface in favor or IGraphicBufferProducerMathias Agopian2013-03-121-1/+1
| | | | Change-Id: I13d7a9553aa335bca790a3a59d389d7533c83d57
* CameraService and Stagefright: Support AppOpsEino-Ville Talvala2013-02-251-2/+11
| | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | 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 some missing checks against missing codecsJames Dong2012-10-111-14/+14
| | | | | | o related-to-bug: 6971073 Change-Id: Ia6d926663231f9a9ef31c82c85c70595c4a30ebe
* Codecs: Add MetaDataMode support to software video encoders.Eino-Ville Talvala2012-07-241-1/+0
| | | | | | | | | | | | | | This support is needed to enable efficient video recording with emulator and camera HAL 2. - Update SoftAVCEncoder and SoftMPEG4Encoder to support MetaDataMode extension. - Allow CameraSource to handle opaque pixel formats, so that MetaDataMode can be used. - Remove hardware codec restriction for MetaDataMode Bug: 6243944 Change-Id: I970eb3d55542a413b6d75a78f76d3a8583155601
* Added support for HE-AAC recordingDave Burke2012-04-301-2/+10
| | | | | | | | | Fixed bug in decoder related to sample rates / channel counts Made decoder follow Fraunhofer pattern Log if bitrate not available Bug: 6275957 Change-Id: I47a8e29358fa4a88ebc73fe02d46a2bfb96c64fe
* Add Fraunhofer AAC encoder with AAC-ELD support.Dave Burke2012-04-251-1/+9
| | | | Change-Id: I6cd499d257d72f50a5b508bed97796a591a51506
* Refactored SurfaceMediaSourceDaniel Lam2012-04-091-1/+1
| | | | | | | SurfaceMediaSource takes advantage of BufferQueue to avoid duplicated code. Change-Id: I5e60b8eca21e6c3cf728d363cd8f3786125182d1
* fix libgui header locationMathias Agopian2012-02-271-1/+1
| | | | Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
* Allow to record time lapse videos without using setProfile()James Dong2012-02-221-0/+6
| | | | | | | | o also added a check on whether capture rate was set before starting time lapse video recording. o related-to-bug: 6045507 Change-Id: I8e1fdc8e8931e2684ab3822dc6260db44658e87d
* Move away from MediaDebug and use ADebug insteadJames Dong2012-02-101-8/+8
| | | | Change-Id: I963a3b6f79a7292891973cbeeaf3378b38629f08
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-37/+37
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-19/+19
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-041-3/+3
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-49/+49
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Fix an issue where we should allow negative values but did notJames Dong2011-10-051-6/+6
| | | | | Change-Id: Ia8d718b4e6aec4c17db86e30134132f767fd72c5 related-to-bug: 5419527
* Do not support still image capture mode for timelapse video recordingJames Dong2011-07-241-173/+4
| | | | | | related-to-bug: 4973779 Change-Id: Ica665217ab10247b2242acc4e93d4fe9f83e3f45
* Connect MediaRecorder Native to SurfaceMediaSourcePannag Sanketi2011-07-221-19/+90
| | | | | | | | | | | | | | | | | 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/+59
| | | | | | | | 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-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+9
| | | | | | related-to-bug: 4390777 Change-Id: Icb52973ad4ac716f04fb103ef527915a966d06d5
* Support for storing geo information in the recorded mp4/3gpp file.James Dong2011-05-131-0/+36
| | | | | | | 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-5/+22
| | | | | | Change-Id: Ia21ca39a404484b2dda25c6101780d2ff11c4623 related-to-bug: 4211046
* audio/media: convert to using the audio HAL and new audio defsDima Zavin2011-04-271-14/+16
| | | | | 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-7/+79
| | | | Change-Id: I94c9c94dec6bd714a3ebf96b4465b94f069e55b8
* Should reset errno to 0 before calling strtoll().James Dong2011-02-081-0/+4
| | | | | | bug - 3431238 Change-Id: I855847209d2e022242b8eb62985759922ab94779
* Make sure that key frame is generated for timelapse video recording if there ↵James Dong2011-01-261-0/+8
| | | | | | | | | | | | | | | | | | | | | are at least two input video frames from camera source. This will fix the stop failure issue where we have to wait n * time_interval before a key frame can be received by the file writer, where o n is the actual number of buffers advertised by the video encoder o time_interval is the interval settings for timelapse video recording specifying the time distance between neighboring input video frames The fix includes two parts: o OMXCodec will not submit all n buffers at one time, but instead submit one input frame at one time if it become available. o Timelapse camera source made available the first two input frames and do not skip them so that the first compressed output frame data can be received regardless the specified time_interval bug - 3367659 Change-Id: Ia68cc2cb0d71aa7dc54540e9ad82fae911ad530b
* Eliminate recording sound by starting the video track before audio track.James Dong2011-01-201-6/+9
| | | | | | | | | | | Due to the variable delays in the system, the recording sound can still be heard if the audio track is started early. This happens even after we suppress a relative long period of initial audio for a recording session. By starting the video track before the audio track, we effectively play the recording sound earlier. bug - 3371141 Change-Id: I2cccf77eae953d96827fc080c618b1d962445c26
* Use metadata in video buffers for timelapse video recording by default to ↵James Dong2011-01-181-13/+1
| | | | | | | | eliminate memcpy bug - 3361771 Change-Id: Ib37ffe4be8edc8708baa76b3507b6f11372536d9
* Fix the sluggish preview during timelapse video recording because software ↵James Dong2011-01-181-1/+3
| | | | | | | | encoder is used. bug - 3361771 Change-Id: Ic5344e9eabe7f1b82910b65b4260e4ad8dc51c32
* Add audio encoding parameters checkJames Dong2011-01-121-18/+85
| | | | | | bug - 3345296 Change-Id: If3f33955f5473b0c5ad9c9b85f8b5cb21ddd7e65
* Backward-compatibility max file size support, ignoring 0 or negative file ↵James Dong2010-12-201-1/+9
| | | | | | | | size limit bug - 3281011 Change-Id: I2d3ae4565602e2374ca794c5e8d0837ad33cf0e8
* First step towards renabling Timelapse video recordingJames Dong2010-12-091-1/+1
| | | | Change-Id: I93836b066fb69d5152d3774546a9935057a1f12f
* Remove check if the target video resolution is not supported by CameraSourceJames Dong2010-12-051-1/+9
| | | | | | | | and clean up Camera is CameraSource could not created. bug - 3254411 Change-Id: I43497c450e7007de5ce027e2912b1421119e8887
* If camera source uses the metadata, we must use HW encoderJames Dong2010-12-021-2/+10
| | | | | | | | Software video encoders are not able to deal with non-YUV metadata in the video buffer sent from camera bug - 3242213 Change-Id: I97361ed88b2a687190e5129459011afff7f32c2d
* am 80639875: am d4c5478a: Merge "Be conservative in estimating the file size ↵James Dong2010-12-021-0/+8
|\ | | | | | | | | | | | | limit." into gingerbread * commit '806398755fdc63438b607856574e5b885ad98e6b': Be conservative in estimating the file size limit.
| * Be conservative in estimating the file size limit.James Dong2010-11-301-0/+8
| | | | | | | | | | | | bug - 3045580 Change-Id: Ifdffa354b9433639c3f246a0eb581ef14af1e797
| * Rotation supportJames Dong2010-11-051-0/+20
| | | | | | | | | | | | | | | | | | | | - 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 Change-Id: I1b7f66a801e9d9c49d889c9b06dd6173fa7e76c4
| * Revert "Support rotation in media recorder"James Dong2010-11-031-25/+0
| | | | | | | | This reverts commit f1febe470ac30f8992066cb263c10f58493c4c34.
| * Support rotation in media recorderJames Dong2010-11-031-0/+25
| | | | | | | | | | | | o needs to be tested with camera hal and camcorder application Change-Id: Ie343185c8ad3ec55da8850efbdcf19cf98993232
* | Removed uncessary FILE structure pointer for I/OJames Dong2010-11-191-4/+4
| | | | | | | | | | | | o also move the fd owner from caller to callee in the Writers Change-Id: I510ccfdd0fcc58f1777fea4ed1349fd251852c65
* | Separate the key for audio sampling rate and video frame rate in MetaData.hJames Dong2010-11-111-2/+2
| | | | | | | | Change-Id: Ia33befaa7e6df8762703002d01aa79c04f15f040
* | Fix uninitialized variableJames Dong2010-11-101-0/+1
| | | | | | | | | | | | o This was missed while the rotation patch was hand merged. Change-Id: I4016f9fb9cd54c5e853da15bbaaa50b1d1dac8c8
* | Rotation supportJames Dong2010-11-091-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-2/+12
| | | | | | | | | | | | o This patch allows us to do 720p video recording Change-Id: I2ea37e80a59630145396b08ebcdc6ee71df53333
* | Don't change the video recording frame rate if it is not requested.James Dong2010-10-251-3/+20
| | | | | | | | | | | | | | | | | | | | | | o set the default video frame rate to the current frame rate being used o add check on whether the requested frame rate is supported o fix an issue where the hardware video encoder setting was bypassed o increases the max frame rate from 30 t0 120 frames per second the actual frame rate will be clipped if the requested frame rate is too high when recording starts by checking the hardware encoder capabilities Change-Id: I1b47671d74da0ebcb9601bdca390d430cc048fbc