795 Commits

Author SHA1 Message Date
Gloria Wang
87e639bc15 Merge "- Add method in MediaPlayerService to collect and pull codec usage (duration) for the battery app - Collect MediaPlayer decoding usage data" 2011-02-23 09:58:33 -08:00
Gloria Wang
d211f41f76 - Add method in MediaPlayerService to collect and pull
codec usage (duration) for the battery app
- Collect MediaPlayer decoding usage data

Change-Id: I0ef4e32b6a041ba1fe73c19f9c67185c61d03965
2011-02-22 22:42:05 -08:00
Andreas Huber
8c7c6dc413 Support more MPEG4-LATM audio functionality.
related-to-bug: 3474610

Change-Id: I6dab40e8b465922c62be9ee7f168718822c6caac
Now skipping extra header that the spec claimed shouldn't be present in LATM...
2011-02-22 13:21:38 -08:00
James Dong
cbeebb194b A/V synchronization at the beginning of a recording session
o do not use edts/elst boxes since these optional boxes are ignored
o manipulate the first video/audio frame duration to make sure that the rest
  of the audio/video is in sync (ideally, we should only manipulate
  the vidoe frame duration, not the audio)
o reduce the initial audio mute/suppression period, which is used to
  eliminate the "recording" sound.

bug - 3405882 and 3362703

Change-Id: Ib0acfb4f3843b365157288951dc122b006299c18
2011-02-17 14:43:16 -08:00
James Dong
d33a4ccb5c Decouple AudioRecord read and audio encoding
bug - 3313754

Change-Id: I951dd0e21e34aa1412c391f003bc32103d0424b0
2011-02-16 11:23:21 -08:00
Gloria Wang
94f4019994 Merge "Add AAC extractor" 2011-02-15 17:22:01 -08:00
Gloria Wang
c5b0abf900 Add AAC extractor
Change-Id: Iedb08525ac72e65ba98e5c791734da0720a0e3f6
2011-02-15 17:16:22 -08:00
James Dong
fe84cf13cd Make available h263 DSI information from MPEG4Extractor
bug - 3446863

Change-Id: Idbaf7a564d544784fdbc36ed0339c98a519adc88
2011-02-11 15:25:03 -08:00
Glenn Kasten
8b4b97a14a Bug 3352047 Wrong message when adjusting volume
Add hidden AudioManager.getDevicesForStream and output device codes.

Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
2011-02-10 14:37:42 -08:00
James Dong
f6a2bff0c9 Reduce blocking time in file write
bug - 3418787

Change-Id: I4723662bf46ed07271be8468f84ae5d93cb793fa
2011-02-09 15:44:32 -08:00
Andreas Huber
5ed9a80571 Merge "Handle some edge cases when seeking while starting up OMXCodec" 2011-02-08 13:15:37 -08:00
Andreas Huber
b928983334 Handle some edge cases when seeking while starting up OMXCodec
These were exposed by the new preview-seekframe while paused code.
In particular, the codec may have been in state RECONFIGURING when attempting
to seek, or we may have initiated flushing of the output port and this may not
have completed yet by the time we want to reconfigure the output port.

Change-Id: Id7640ade11dbc7205a22f648ea0b5e3e9b49cf4b
related-to-bug: 3392259
2011-02-08 13:10:25 -08:00
Gloria Wang
c2dc4729e3 - Do not use global DrmManagerClient
- Release the DrmManagerClient and DecryptHandle in DataSource
Fix for bug 3429811

Change-Id: I549f72b75225751877eb0e630ce8098f8ec6316f
2011-02-07 15:10:33 -08:00
Andreas Huber
6760f9832d Improvements/fixes to ACodec.
- Make sure ACodec reverts its state when it's shutdown
- Defer "resume" to after handling the OutputPortSettingsChange

- If the OMX_EventPortSettingsChanged event comes in while we're flushing, defer it
  and make sure the output port can be disabled by deleting all buffers not already
  owned by the component.

Change-Id: I1f8cdffa71237b57d4275a48b834647a7b263e8b
2011-02-04 10:12:26 -08:00
Eric Laurent
2e8fbebff4 am 6f1bd261: am 9c0a1003: Merge "Fix issue 3371080" into honeycomb
* commit '6f1bd261b7fd86ac7817ca061dfb55b95150b836':
  Fix issue 3371080
2011-02-03 17:18:46 -08:00
Glenn Kasten
f9f223edb4 Bug 1804058 FLAC extractor
Note: dependent on external/flac for libFLAC

Implemented and tested:
 * FLAC container
 * mono and stereo
 * standard sample rates
 * standard bit depths
 * sniffer
 * media scanner
 * Vorbis comment metadata including album art
 * random access seeking with "torture test"
 * web browser integration for audio/flac (not audio/x-flac), but
   note that most web servers don't correctly report the MIME type

Not implemented:
 * 24-bit to 16-bit dither or noise shaping in AudioFlinger
 * 96 kHz to 44.1 or 48 kHz downsampling low pass filter in AudioFlinger
 * replay gain is better done in AudioFlinger
 * multi-channel, would need AudioFlinger support
 * Ogg container, does not seem to be very popular yet

Change-Id: I300873e8c0cfc2e95403d9adb5064d16a2923f17
2011-02-03 13:39:10 -08:00
Eric Laurent
25101b0b9a Fix issue 3371080
Modified default volume control logic in AudioService:
1 IN_CALL volume if in video/audio chat
2 NOTIFICATION if notification is playing or was playing less than 5s ago.
3 MUSIC

Modified silent mode:
- now also affect MUSIC stream type
- entering silent mode when VOL- hard key is pressed once while selected
stream volume is already at 0 (except for VOICE_CALL stream).
- exiting silent mode when pressing VOL+ hard key while in silent mode

Play sound FX (audible selections, keyboard clicks) at a fixed volume.

Modified audio framework:
- isStreamActive() method now implemented in AudioPolicyManagerBase (previously AudioFlinger)
- iStreamActive() now specifies a time window during which the stream is considered
active after it actually stopped.

Change-Id: I7e5a0724099450b9fc90825224180ac97322785f
2011-02-03 09:26:24 -08:00
James Dong
5f3ab06e90 Make sure that key frame is generated for timelapse video recording if there 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
2011-01-26 12:11:22 -08:00
Andreas Huber
2ffbb18053 Protect notification callback parameters with a mutex.
This avoids the race condition where notifications are dispatched to a NULL receiver
after notifications have been disabled.

Change-Id: I6d351ffbee97616e2c35559c132a6c5e6a66948a
related-to-bug: 3394139
2011-01-26 11:20:42 -08:00
Mike Lockwood
8151dc3229 StagefrightMediaScanner: Close metadata retriever after we are done scanning
This prevents the mediaserver from leaking a file descriptor after
the media scanner runs

BUG: 3373546

Change-Id: I82a8bae82306de3da56a5c7da5b03ecf106a4efc
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-25 15:20:04 -08:00
Andreas Huber
5e9dc94a3c Properly rotate video that's marked as such and decoded to a surface.
Change-Id: I1e9144db3447e58c99aac3f47702ad471678789c
related-to-bug: 3378148
2011-01-21 14:32:31 -08:00
Andreas Huber
19922adceb Some tweaks to HTTP live / nuplayer behaviour
- play audio-only streams again
- workaround for malformed streams that switch PIDs across bandwidths
- attempt to pick a different bandwidth stream if the previously chosen one appears
  to be malformed/unsupported.

Change-Id: I426d0a40dc725aa242f619d4c9d048b69aca55c9
related-to-bug: 2368598
2011-01-21 10:34:40 -08:00
James Dong
08adfd29ae Fix the presentation video resolution when it is different from the actual image resolution of the video.
bug - 3352413

Change-Id: I8f08f3896e9fb90f09119dccdb88b82af60f79f2
2011-01-19 08:33:07 -08:00
Dharmaray Kundargi
3b3cddccc1 integrate videoeditor preview player.
Change-Id: I83084f494605c8e6f4d198afa8c36f9e29579667
2011-01-16 16:43:20 -08:00
James Dong
11eab056dd Publish MediaMetadataRetriever.java as public API
o Removed setMode() methods and related mode constants
o Removed some of the unused the metadata keys
o Updated the javadoc

o part of a multi-project change.

bug - 2433195

Change-Id: I5ed167f1fd6a53cb143b7dc385b149431d434438
2011-01-12 14:14:11 -08:00
Andreas Huber
748ba9a951 Merge "NuPlayer now properly sends MEDIA_SET_VIDEOSIZE notifications." into honeycomb 2011-01-10 11:26:38 -08:00
Andreas Huber
7caa130a98 NuPlayer now properly sends MEDIA_SET_VIDEOSIZE notifications.
Change-Id: I99b4223ad6ecfd8839a3c0e737fef3165565d76d
related-to-bug: 3336496
2011-01-10 10:38:31 -08:00
James Dong
681e89c082 Avoid deadlock in OMX::freeNode by making sure OMXCodecObserver does not hold the last reference of OMXCodec object
bug - 3336424

Change-Id: I4c79b66a900c527e3ae6a833f76d5da1b75c5a89
2011-01-10 08:57:50 -08:00
Marco Nelissen
ee35aff744 Add support for the "compilation" tag in mp3, mp4 and ogg, and also add
support for two common ways of specifying album artist in ogg files.
b/3311831

(cherry-picked from GB because of weird automerger failure)

Change-Id: Ibf12a3d6bc8bbc2ac5ea815de6b33414b8f53f0f
2011-01-07 12:42:07 -08:00
Andreas Huber
c0dbe3a445 Colorconverter may not support some src/dst bitmap configurations.
Let it return an appropriate error code instead of asserting.

Change-Id: I7fe0dfa169e1cbdecb04c5fcbe8501e73362d05e
related-to-bug: 3328212
2011-01-06 12:42:33 -08:00
James Dong
6c30cfb0c5 am a8ce7736: am 35e8dcb9: Merge "Suppress the recording sound in the recorded video" into gingerbread
* commit 'a8ce773607c26dd4336f57856afce507fb98a279':
  Suppress the recording sound in the recorded video
2011-01-05 17:57:55 -08:00
James Dong
a8ce773607 am 35e8dcb9: Merge "Suppress the recording sound in the recorded video" into gingerbread
* commit '35e8dcb9df8c3d77ede120e3f1aaf842b2928639':
  Suppress the recording sound in the recorded video
2011-01-05 17:55:27 -08:00
Andreas Huber
a4bbc386a0 Merge "Seek/Duration support for completed http live streams in NuPlayer." 2011-01-05 14:50:00 -08:00
Andreas Huber
08e10cb404 Seek/Duration support for completed http live streams in NuPlayer.
Change-Id: I55bbe75d87140c07b1927d14ad24130fce803463
related-to-bug: 3321475
2011-01-05 14:48:31 -08:00
James Dong
876e44dfb5 Merge "Use video output if necessary for timelapse video recording" 2011-01-05 10:27:55 -08:00
James Dong
a7ac739b74 Suppress the recording sound in the recorded video
bug - 3309194

Change-Id: Ib8fb248943bc22f963d67537bfdbc6056c5a159b
2011-01-04 17:34:44 -08:00
James Dong
a1d2d8f7a5 Use video output if necessary for timelapse video recording
Change-Id: I88d0cc824f0fbf8b2f392fbc23c69b5bfefda1b8
2011-01-04 16:09:07 -08:00
Andreas Huber
cbeaca7a81 Properly shutdown the decoders on a reset() in NuPlayer's implementation.
related-to-bug: 3321470
Change-Id: Ida6d2171c5a3a407188d4633602b764f8fe7086a
2011-01-04 14:07:58 -08:00
Mike Lockwood
076e05b488 MediaScanner: Add support for scanning empty directories
Currently the media scanner does not create database entries for directories
unless they contain a file that is scanned.
Fixing this so we provide a consistent view of the world to MTP.

Change-Id: Ia776acfeae23192183e7192d63cdc34d830ea889
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-16 15:35:36 -08:00
Andreas Huber
687b32d83e Properly announce decoder output format changes, make sure AMessage::dup does.
Change-Id: Ia77f6b6d5e5c5055583740dfe876b8a3c22be9b6
2010-12-16 10:08:26 -08:00
Andreas Huber
a15874665f Initial support for a true streaming player for mpeg2 transport streams.
Change-Id: I153eec439d260a5524b21270e16d36940ec3161a
2010-12-15 15:18:26 -08:00
James Dong
2144f6316d Revert "Allows the authoring engine to skip frame."
o Skipping frames could lead to a lot of issues such as I frames is lost etc.
  It is not being used anyway.

This reverts commit 53d4e0d58e2d5c18f6e026c705af833b9bdd7aba.

Conflicts:

	media/libstagefright/AudioSource.cpp
	media/libstagefright/CameraSource.cpp

Change-Id: I3abba1647de48db25bdc369066eb2a7ae4dedec2
2010-12-11 10:57:03 -08:00
Andreas Huber
bbbcf65532 Better buffer status management and verification in OMXCodec.
Change-Id: I90410f2ac0d8ff86076a239dc6e281b1bc4d8643
2010-12-08 09:07:28 -08:00
Andreas Huber
b0fa4f2c6f Merge "API Support for both synchronous and queued commands, optionally associated metadata." 2010-12-07 10:12:47 -08:00
Andreas Huber
ae9d507253 API Support for both synchronous and queued commands, optionally associated metadata.
Change-Id: Idb90d64cb638942210c5822b3cba2f05b087d601
2010-12-06 12:45:50 -08:00
James Dong
5df53fe2f0 Remove check if the target video resolution is not supported by CameraSource
and clean up Camera is CameraSource could not created.

bug - 3254411

Change-Id: I43497c450e7007de5ce027e2912b1421119e8887
2010-12-05 16:08:30 -08:00
James Dong
faf09ba940 Prepare for publishing MediaMetadataRetriever as public API
step one:
o replaced captureFrame with getFrameAtTime
o removed getMode

bug - 2433195

Change-Id: I38a8cecef29014692f0b08b8818326e3ebb40a12
2010-12-03 15:32:47 -08:00
Andreas Huber
52b52cdfb7 Support streaming data across binder boundaries.
Change-Id: Ifbac61406dcb81343765f99ccba08bd90f9274cc
2010-11-23 14:46:13 -08:00
Andreas Huber
1bb0ffd098 Squashed commit of the following:
commit 0870f7bdd10a7cd36087d723d1957d8e1b967ca7
Author: Andreas Huber <andih@google.com>
Date:   Mon Nov 22 12:57:04 2010 -0800

    set_surface_crop doesn't seem to work right yet, stop using it in the SoftwareRenderer.

    Change-Id: If0a24f78b7810a6cecaa82eb4f23d0f90c22cc42

commit 4767b52bee3a54ae117a8708d6832276a44e6a6a
Author: Andreas Huber <andih@google.com>
Date:   Mon Nov 22 11:14:57 2010 -0800

    info->mMediaBuffer may still be NULL at this point...

    Change-Id: I25a71569015b1bb87f1ea7efff7588958774426f

commit 0cef79874e1f1ddb10b7402177a87d3cffc7de92
Author: Andreas Huber <andih@google.com>
Date:   Mon Nov 22 10:55:12 2010 -0800

    QCOM's YVU420 color format conversion has now been tested.

    Change-Id: I7fef4b642a928af15d42f006f7cdc107d5ff1d67

commit 84fe05a6c969ede0ce8a85a530e110afca07c7a7
Author: Andreas Huber <andih@google.com>
Date:   Mon Nov 22 09:59:50 2010 -0800

    Removed remaining traces of suspend/resume. Proper reporting of video dimensions based on cropping rectangle.

    Change-Id: Ib238b80cbc1f19e7d312f2422eb5e9ab6b06b1bc

commit 50970cdc837c5c498bcf0cb61b436196ca9e2ef7
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 16:11:06 2010 -0800

    Revamped Software Renderer respects the crop rectangle.

    Removed obsolete ADRENO support code.

    Change-Id: I984cbc8a99c4d97e09e7d1b1292099c88b9ae535

commit 8abbc6a5608bff650f968540f24a2eab75f254ed
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 16:10:41 2010 -0800

    The metadata retriever now respects the crop rectangle while capturing a video frame.

    Change-Id: Id3377176060086d16717f62c77ce26fabe899050

commit 2d42e4466609d304e88bd2cdd6eb7b297340cc21
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 16:09:50 2010 -0800

    Changed ColorConverter APIs to be more general.

    Clients can now refer to crop rectangles in both source and destination.

    Change-Id: Ief151d736818396d0389ec04e7df5650e3ad7c04

commit 273184303d54a54febd3e9c3dd4df30507ea78b5
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 15:04:06 2010 -0800

    The stagefright commandline tool now writes the extracted video frame to /sdcard/out.jpg

    Change-Id: Ieb2ab3fda7a7cd9294beccb8db0eed75096eeef4

commit 2d43390328cadf4ba94c1c3c02e4fb30baa29690
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 14:36:55 2010 -0800

    The AVC software decoder now properly advertises the cropping rectangle.

    Change-Id: Idb7a8a7e2fde5740f0fc34b7e8c92eca2577104b

commit 9a7ed23c2fac8ce19dce7a34a603acee945a89f6
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 13:40:39 2010 -0800

    OMXCodec now signals a format change if the cropping rectangle changes.

    ...and puts the cropping info into its output format.

    Change-Id: I3ffbd8e877ba286fe06a82c536ef20d92548d2e2

commit efe0323947029df1c502599ccc288c8d676dfd31
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 11:29:39 2010 -0800

    Stagefright's MetaData object now supports rectangle items.

    Change-Id: I5667bb5ee6622c76104b99fb57f60abb802a8504

Change-Id: I27cb78f2c5e0353f95fdfc5cb53991949ed75b70
2010-11-22 14:05:21 -08:00
James Dong
04d070f293 Merge "Removed uncessary FILE structure pointer for I/O" 2010-11-19 16:49:10 -08:00