166 Commits

Author SHA1 Message Date
Dave Sparks
124a346c7a Fix media.player dumpsys to output open/mapped files correctly. Bug 2866669.
The dump function whitelists several directories as filters to the output.
The mount point changed for SD card in Froyo, and we started filtering files
that were open on the SD card. This fix changes the filter for the SD card,
and adds the directory for data files as well.

Change-Id: I61b67c3d11d93dbd530e8b3566000e79bc037137
2010-09-27 17:04:05 -07:00
Andreas Huber
30cfa20dfc Reverse the default setting of media.stagefright.enable-{rtsp,record} in preparation for building without opencore.
Change-Id: I1ca6bd8faba0185f9694f9dc04d2b3e6a7ab5ac3
related-to-bug: 2370115
2010-08-30 12:46:12 -07:00
James Dong
3f51fa78ad Runtime dump support for MediaWriter
Change-Id: I10b2c474de612ee4cef4b7c9eae2ee1dd8c2e895
2010-08-23 10:34:05 -07:00
Nipun Kwatra
fb45748a1e setParamMaxFileDurationUs should allow zero time input as per API of setMaxDuration.
according to MediaRecorder::setMaxDuration documentation we should disable duration limit
when zero or negative time is passed. Currently setParamMaxFileDurationUs was treating
zero/negative as an error case. Fixed that.

Change-Id: I468c3bcc74cb5a34ee3e172cef5147550d6be096
2010-08-20 14:06:48 -07:00
James Dong
d036662470 Make MediaWriter stop and pause return errors if necessary
o Make the API consistent with SF framework, which the MediaSource
  provides a return status for stop

o Also, helps to convey errors that occurred right when a
  premature stop() is called, leading to a potentially
  mal-formed output file.

Change-Id: I52a932345f38570fdf8ea04d67d73dd94ccd30ef
2010-08-19 13:33:13 -07:00
James Dong
eff30e3d1b Change the default time scale for audio/video track during recording
and reduce rounding errors in calculating the sample duration

- Default time scale for tracks other than audio is set to 90000.
- Audio track by default uses the audio sampling rate as the time scale.
- Default movie time scale remains to be 1000.
- The default time scale values will be overwritten by a user-supplied value if exits.

Change-Id: I81b40ed0626ea45e9fd24a89e21a2c5a4a2c3415
2010-08-16 10:38:35 -07:00
James Dong
c6280bce51 Fix all fd leaks in authoring engine
Change-Id: I17798543f9dd41cc8bef6f6086e66932f9f97be8
2010-08-11 17:18:30 -07:00
Andreas Huber
57648e4eec 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.
Change-Id: I95b8dd487061add9bade15749e563b01cd99d9a6
2010-08-04 11:49:24 -07:00
James Dong
af3f29e62b Replace CHECK with a failure return value when mCamera->setParameters() fails
if the camera is locked by someone else.

bug - 2827892

Change-Id: I217d4a00f04ebd57b557d3faef28787c14f23ea0
2010-08-03 15:29:20 -07:00
James Dong
d973a533da Merge "Lower the lower bound for max file duration check" into gingerbread 2010-07-30 14:28:26 -07:00
James Dong
8894de6d3e Lower the lower bound for max file duration check
- This fixed a CTS test where 200 ms is being used

Change-Id: Ib598b7b94be54e98a96703c58c5f244bc379cf7d
2010-07-30 12:41:59 -07:00
Jean-Baptiste Queru
154a320069 resolved conflicts for merge of 27eecb70 to gingerbread
Change-Id: If064f2f4950fc1a4ff38e6927fe2120af76b26f1
2010-07-30 12:08:31 -07:00
Jean-Baptiste Queru
83407b993f fix inaccurate copyrights
Change-Id: I33b0f68f2da34ca4728211d83159cf32a127f6dd
2010-07-29 17:41:35 -07:00
James Dong
63299c0387 Interleave the audio and video by default
- default interleave duration is set to 1 second

This can dramatically reduce the memory usage
by the MP4 file writer.

Change-Id: Ia3ff202cabfcd2d3f183065d31e4596617c2dded
2010-07-28 10:08:03 -07:00
Eric Laurent
7070b36549 Added support for auxiliary audio effects to AudioTrack and MediaPlayer.
Added methods to AudioTrack and MediaPlayer java classes to enable use of
auxiliary audio effects. The effect can be attached and detached by specifying its
ID and the send level controlled.

Change-Id: Ie74ff54a453096a742688476f612ce355543b6f3
2010-07-21 06:28:01 -07:00
James Dong
85edea7958 Progress status notification
- Keep track of per-track progress

Change-Id: Ibd36f0e8c78581928c8aa2f5e23c5e7e0615c2cc
2010-07-20 08:39:57 -07:00
James Dong
52d13f01a6 Support user-supplied timescales for authoring
- also, change all the real time unit to microseconds in MPEG4Writer

Change-Id: I260f512f2eb670ade7b8858a56335a5d639de756
2010-07-14 17:29:17 -07:00
James Dong
1cc31e629e Initial checkin for software AVC encoder
- Since the software encoder assumes the input is YUV420 planar,
  color conversion needs to be added when the input color format
  does not meet the requirement. With this patch, I only added
  a single color conversion from YUV420 semi planar to YUV420
  planar. We can add more as we go.

Change-Id: If8640c9e5a4f73d385ae9bb2022e57f7f62b91b9
2010-07-13 10:58:20 -07:00
James Dong
929642ee00 Add runtime dumpsys support for media recorder client
Change-Id: I4c8a81720f3be2db54678a7e84fe12849255046b
2010-07-08 21:25:55 -07:00
Eric Laurent
dacabf97c6 Merge "Added Visualizer effect." into gingerbread 2010-07-07 16:23:30 -07:00
James Dong
81c929a684 Allow application to set two more encoding paramters: video profile and level
Change-Id: I673e681cefe184d5c556c612c54600a24a2143e5
2010-07-07 12:11:53 -07:00
Eric Laurent
df9b81ced4 Added Visualizer effect.
The visualizer enables application to retrieve part of the currently playing audio for visualization purpose.
It is not an audio recording interface and only returns partial and low quality audio content as a waveform or
a frequency representation (FFT).

Removed temporary hack made in MediaPlayer for animated wall papers based on audio visualization (snoop() method.

This commit also includes a change in AudioEffect class:
 - the enable()/disable() methods have been replaced bya more standard setEnabled() method.
 - some fixes in javadoc

Change-Id: Id092a1340e9e38dae68646ade7be054e3a36980e
2010-07-07 11:00:28 -07:00
James Dong
7b06de6d5a Refactor Stagefright::StartMPEG4Recording()
- Also, better error handling

Change-Id: Ic18d08dc6489adf92c6a588efa4baca66429b175
2010-07-01 10:28:38 -07:00
James Dong
c0ab2a6458 Added encoding parameters set up for H263 video encoder
Also:
- Allowed start() call when encoder already starts and stop() call when encoder has not started yet
- Handled default value for audio/video sources/encoders and file output format

Change-Id: I03b2f7d3cf570baa0fd011a8c0ad200f2f2a5da1
2010-06-29 16:44:19 -07:00
James Dong
fe1bafecde Separate MediaRecorderClient with MediaPlayerClient
- 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
2010-06-28 15:32:26 -07:00
James Dong
09936ed192 Provide progress status report during authoring
- 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
2010-06-25 16:20:42 -07:00
James Dong
6feaa46496 Enable passing parameters to the MediaWriter at runtime (at start() call).
- 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
2010-06-25 10:24:35 -07:00
James Dong
57e7f83c03 Track maximum amplitude and fix getMaxAmplitude()
- only start to track the max amplitude after the first call to getMaxAmplitude()

Change-Id: I64d3d9ca0542202a8535a211425e8bccceca50fc
2010-06-24 21:59:25 -07:00
Andreas Huber
8d65dd2653 Remove most stagefright property overrides, remove VorbisPlayer and VorbisMetadataRetriever as this functionality is now provided by stagefright.
Change-Id: Ieafe75a4550c273ad59b4518d7cd4c0fce0f7cce
related-to-bug: 2370115
2010-06-23 16:40:57 -07:00
Eric Laurent
619346f902 Added support for audio sessions in MediaPlayer and AudioTrack.
Audio sessions are used to associate audio effects to particular instances (or groups) of MediaPlayers or AudioTracks.

Change-Id: Ib94eec43241cfcb416590f435ddce7ab39a07640
2010-06-22 17:14:04 -07:00
James Dong
42a18c09e7 Check and clip some video encoding parameters against media profiles before passing them to video encoder
Change-Id: I69e0e7411806a4ece6c0bf0e02c74eaaf48a17ac
2010-06-17 11:34:10 -07:00
James Dong
d77d2a980c Remove hard-coded number of audio channels in AudioSource
Change-Id: I5f362252c25e2251bbfa9818b711ee23b4975248
2010-06-14 17:45:35 -07:00
James Dong
08c7473ce9 Initial checkin for pause and resume control
Change-Id: Ibdcf7bea5fb66baa81878704ba4091dfcfe382ee
2010-06-11 13:48:48 -07:00
James Dong
71d714ccbf Remove the lock/unlock workaround from CameraService
bug - 2677772

Change-Id: I7c996daad8b3bfc89e9fa2d655dc18c9a5c68f2f
2010-06-09 21:30:43 -07:00
James Dong
1244eab2ce Remove some hard-coded encoding parameters
Change-Id: I7a8ccd5d57891a6a585c8da2ee53acb094955913
2010-06-08 12:30:58 -07:00
Andreas Huber
7a747b8e0d Initial checkin of preliminary rtsp support for stagefright.
Change-Id: I0722aa888098c0c1361c97a4c1b123d910afc207
2010-06-07 15:34:45 -07:00
James Dong
c6161722ad Properly handle start code in H264/AVC encoder output
- Some H264/AVC encoder output start code in each output buffer, and others don't.
  This patch always strips the start code first so that the sample contains the correct size.
- Also properly initialize the interleave duration.

Change-Id: I692043ce7e38f0215e1097aad9e847a57907b6e4
2010-05-20 18:02:52 -07:00
James Dong
ec9e76f921 Workaround for preview frame rate setting and encoder profile and level settings on passion
1. QCOM camera HAL does not honor the preview frame rate set request. see bug - 2701282
2. QCOM video encoder has lots of 0-length output buffers if the default level setting is changed. see bug - 2660974

Change-Id: Id01d94bb77dc242c4712d56a91b0d69a96ba6c2f
2010-05-20 12:01:29 -07:00
James Dong
68510e60f9 Detect and handle premature termination of a recording session
Change-Id: Ifb83b19f3e68580345b23efed5d5956fb81baeb8
2010-05-14 11:48:00 -07:00
James Dong
1824486e04 Handle recording file size and/or duration limit
Change-Id: Ib9ed1f3ebd8fef550cc130a7ef11f2905fa9aedc
2010-05-14 10:46:56 -07:00
The Android Open Source Project
21a534d955 am 1d628c5d: merge from open-source master
Merge commit '1d628c5d3dd7998b29c339292a2dc391015d0782' into kraken

* commit '1d628c5d3dd7998b29c339292a2dc391015d0782':
  Accept media files by file extension in case insensitive manner.
2010-05-14 09:46:11 -07:00
The Android Open Source Project
1d628c5d3d merge from open-source master
Change-Id: I934cf85c4673f9ca3a9549c2074907ad572310f4
2010-05-14 09:44:36 -07:00
James Dong
e292b3bc9c Remove dummy surface in CameraSource
bug - 2680919

Change-Id: Ia0308cf57fd67058b4dd0e042b3ce97f13df475f
2010-05-13 12:08:29 -07:00
James Dong
2cd841d485 Added initial validation on video/audio encoding parameters before/at start()
Change-Id: I1a40dd247202f70e3e5429d74533d349b88f1d54
2010-05-11 13:10:02 -07:00
Andreas Huber
8a1c0934b0 am 71bd9fc8: am 100ef9be: Merge "Disable vorbis seek when streaming from localhost." into froyo
Merge commit '71bd9fc81e3154b9cad22ca7ff2d9c6ed6fdbe6c' into kraken

* commit '71bd9fc81e3154b9cad22ca7ff2d9c6ed6fdbe6c':
  Disable vorbis seek when streaming from localhost.
2010-05-06 12:43:59 -07:00
Andreas Huber
62f7ffe106 Disable vorbis seek when streaming from localhost.
Change-Id: Icda523ae1c89e26482f1c1767fe3a8b9222bb30f
related-to-bug: 2654400
2010-05-06 10:31:57 -07:00
James Dong
3300e9667e Support audio and video track interleaving in the recorded mp4 file
Change-Id: Ifa27eb23ee265f84fe06773b29b0eb2b0b075b60
2010-05-05 11:34:43 -07:00
James Dong
8d30b2d284 Merge "Support AAC recording" into kraken 2010-05-04 14:40:28 -07:00
Andreas Huber
ce0bd71735 am 8ea45aad: am e083d0a2: Merge "Support for Ogg Vorbis decoding in stagefright." into froyo
Merge commit '8ea45aad100ee25067b2e83703454c71a968ba4f' into kraken

* commit '8ea45aad100ee25067b2e83703454c71a968ba4f':
  Support for Ogg Vorbis decoding in stagefright.
2010-05-04 14:30:34 -07:00
Andreas Huber
eb5eef3819 Support for Ogg Vorbis decoding in stagefright.
Set the magic property media.stagefright.enable-vorbis to true to use the new implementation instead of the standalon vorbis player for file-based playback. HTTP streaming of vorbis content will always go through stagefright.

Change-Id: Ie3843a99fadb22372f89540d0f8d65196e0c2af8
related-to-bug: 2654400
2010-05-04 11:58:16 -07:00