summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/StagefrightRecorder.h
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | Change the framework to use the new camera preview path.Jamie Gennis2010-08-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | This change makes the camera HAL interface take an ANativeWindow interface from which all the camera preview buffers will be allocated. The framework code running in application processes now passes a Surface object rather than an ISurface to the camera server via Binder when setting the preview surface. The camera server then forwards that Surface object (which implements the ANativeWindow interface) to the camera HAL, which uses it to communicate with SurfaceFlinger to allocate the camera preview buffers. Change-Id: Ie438f721559cd7de5e4f848a26d96360dda07b5f
* | am 1f513d88: am c17f35dd: Merge "Support for Gtalk video, includes AMR/H.263 ↵Andreas Huber2010-08-051-1/+2
|\ \ | |/ | | | | | | | | | | | | | | assembler and packetization support, extensions to MediaRecorder to stream via RTP over a pair of UDP sockets as well as various fixes to the RTP implementation." into gingerbread Merge commit '1f513d8821670a33d6361ea521b6756163a3f9bf' * commit '1f513d8821670a33d6361ea521b6756163a3f9bf': Support for Gtalk video, includes AMR/H.263 assembler and packetization support, extensions to MediaRecorder to stream via RTP over a pair of UDP sockets as well as various fixes to the RTP implementation.
| * Support for Gtalk video, includes AMR/H.263 assembler and packetization ↵Andreas Huber2010-08-041-1/+2
| | | | | | | | | | | | support, extensions to MediaRecorder to stream via RTP over a pair of UDP sockets as well as various fixes to the RTP implementation. Change-Id: I95b8dd487061add9bade15749e563b01cd99d9a6
* | Allowing useStillCameraForTimeLapse to be set through MediaRecorder.javaNipun Kwatra2010-08-021-0/+2
| | | | | | | | | | | | | | | | | | | | This will allow apps to make the decision of whether to use still image mode or video mode for time lapse capture. - setTimeLapseParameters now takes in a useStillCameraForTimeLapse parameter. - Added support in StagefrightRecorder for passing through this parameter. Change-Id: Iafbcb76f9a7903118ea5eb822c81008619630f03
* | Allowing setting of time lapse parameters through MediaRecorder.javaNipun Kwatra2010-07-221-0/+3
| | | | | | | | | | | | | | | | added setTimeLapseParameters() to MediaRecorder.java and SetParameter support in StagefrightRecorder to allow enabling time lapse and setting the corresponding parameters. Change-Id: I509040aa71f8d3fc37337b0894a81d9c0fd7a40a
* | am 9049fe60: am d7514ec6: Merge "Progress status notification" into gingerbreadJames Dong2010-07-201-2/+0
|\ \ | |/ | | | | | | | | | | Merge commit '9049fe60c20640bd606741c8f45f3f781a1684f5' * commit '9049fe60c20640bd606741c8f45f3f781a1684f5': Progress status notification
| * Progress status notificationJames Dong2010-07-201-2/+0
| | | | | | | | | | | | - Keep track of per-track progress Change-Id: Ibd36f0e8c78581928c8aa2f5e23c5e7e0615c2cc
* | am b068b47c: am d6a85a21: Merge "Support user-supplied timescales for ↵James Dong2010-07-151-2/+8
|\ \ | |/ | | | | | | | | | | | | | | authoring" into gingerbread Merge commit 'b068b47c6d0214256116a0c661740bddf7acc18c' * commit 'b068b47c6d0214256116a0c661740bddf7acc18c': Support user-supplied timescales for authoring
| * Support user-supplied timescales for authoringJames Dong2010-07-141-2/+8
| | | | | | | | | | | | - also, change all the real time unit to microseconds in MPEG4Writer Change-Id: I260f512f2eb670ade7b8858a56335a5d639de756
* | am 4f440632: am 929642ee: Add runtime dumpsys support for media recorder clientJames Dong2010-07-091-0/+1
|\ \ | |/ | | | | | | | | | | Merge commit '4f4406322dafd6e128b437edbc541327f0b38d04' * commit '4f4406322dafd6e128b437edbc541327f0b38d04': Add runtime dumpsys support for media recorder client
| * Add runtime dumpsys support for media recorder clientJames Dong2010-07-081-0/+1
| | | | | | | | Change-Id: I4c8a81720f3be2db54678a7e84fe12849255046b
* | am b3598832: am c4243342: Merge "Allow application to set two more encoding ↵James Dong2010-07-071-0/+4
|\ \ | |/ | | | | | | | | | | | | | | paramters: video profile and level" into gingerbread Merge commit 'b35988329ac1a574898db9226039e37e352c57a8' * commit 'b35988329ac1a574898db9226039e37e352c57a8': Allow application to set two more encoding paramters: video profile and level
| * Allow application to set two more encoding paramters: video profile and levelJames Dong2010-07-071-0/+4
| | | | | | | | Change-Id: I673e681cefe184d5c556c612c54600a24a2143e5
* | Adding timelapse capture from videocamera.Nipun Kwatra2010-07-011-0/+2
|/ | | | | | | | | | | Current implementation looks at the timestamps of all incoming frames in CameraSource::dataCallbackTimestamp(). It drops all frames until enough time has elapsed to get the next time lapse frame. When enough time has passed to capture the next time lapse frame, the frame is no longer dropped and the timestamp of this frame is modified to be one frame time (1/framerate) ahead of the last encoded frame's time stamp. Change-Id: I82b9d5e96113dffa6901aac3b8a8ef999ffc1d0b
* Refactor Stagefright::StartMPEG4Recording()James Dong2010-07-011-1/+7
| | | | | | - Also, better error handling Change-Id: Ic18d08dc6489adf92c6a588efa4baca66429b175
* Separate MediaRecorderClient with MediaPlayerClientJames Dong2010-06-281-2/+2
| | | | | | | | | | - An alternative would be to define a common base class that both MediaRecorderClient and MediaPlayerClient can derive. But since the common code, onTransact() and notify() uses some Binder code, having a common base class may not gain us too much in terms of code reuse. Change-Id: Ibc06720278ad173fceacff3d267b7060856c6316
* Provide progress status report during authoringJames Dong2010-06-251-2/+8
| | | | | | | | | - Track either the number of A/V frames authored, or the time elapsed - Track the completion of the authoring - Add multiple camera support for authoring by accepting a camera id parameter - Set file type based on the OUTPUT_FORMAT requested Change-Id: I0f9d31b3b7a8fa43eb53f572410fb0ebd4fa0bb7
* Enable passing parameters to the MediaWriter at runtime (at start() call).James Dong2010-06-251-0/+2
| | | | | | | | | | - estimate the moov box size for mp4 file writer based on the file size/duration limit and target bit rate. - can switch to use 64 bit file offset at runtime rebased Change-Id: Ibbe1f57e91ab2605820d5d96e8048d11e5559c53
* Track maximum amplitude and fix getMaxAmplitude()James Dong2010-06-241-0/+2
| | | | | | - only start to track the max amplitude after the first call to getMaxAmplitude() Change-Id: I64d3d9ca0542202a8535a211425e8bccceca50fc
* Check and clip some video encoding parameters against media profiles before ↵James Dong2010-06-171-0/+7
| | | | | | passing them to video encoder Change-Id: I69e0e7411806a4ece6c0bf0e02c74eaaf48a17ac