summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice
Commit message (Collapse)AuthorAgeFilesLines
* Use advertised h264 encoding parameters by default if the profile is not ↵James Dong2011-07-082-0/+60
| | | | | | | | baseline o Force to use AVC baseline profile for camcorder low quality videos Change-Id: I3424c57dd0c55fc4991f5767b57695c8f3420ecb
* Charge network traffic to the uid of the process using the MediaPlayer.Andreas Huber2011-07-0110-11/+64
| | | | | Change-Id: I2bcb54b8232afd3fc7ee16289f37c7a7b3f23067 related-to-bug: 4517282
* Add framework support for camcorder zoom.Wu-cheng Li2011-06-274-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove unneeded #include <sys/resource.h>Glenn Kasten2011-06-151-1/+0
| | | | | | Suggested in code review for previous change. Change-Id: Ic3225b240367dc6c9bf56fb4498fb8a0f9f806ec
* Make dumpsys(media.player) more useful by having AwesomePlayer populate it.Andreas Huber2011-06-083-0/+9
| | | | Change-Id: I12ba7d542331a8293d67a0d47378b8be4f777759
* Remove dead code related to gettidGlenn Kasten2011-06-033-42/+5
| | | | | | The gettid system call is always available now. Change-Id: Ib78b41781eda182dc8605daf456bbea7ff7c2dc0
* Revert "Use AudioTrack::event_type not int in callback"Glenn Kasten2011-06-012-2/+2
| | | This reverts commit 2225e4b7049fa3fb9d39a068b8268b63c952d7c1
* Use AudioTrack::event_type not int in callbackGlenn Kasten2011-06-012-2/+2
| | | | Change-Id: Ifefc708d46874e04fd0d01cb6e2d43b987ee796c
* Use channel mask instead of channel count for track creationJean-Michel Trivi2011-06-011-1/+1
| | | | | | | | | | | | | | | | | Record and playback objects (resp AudioRecord and AudioTrack) are created using a channel mask, but this information is lost in the mixer because only the channel count is known to AudioFlinger. A channel count can always be derived from a channel mask. The change consists in: - disambiguiting variable names for channel masks and counts - passing the mask information from the client to AudioFlinger and the mixer. - when using the DIRECT ouput, only verifying the format of the track is compatible with the output's for PCM. Change-Id: I50d87bfb7d7afcabdf5f12d4ab75ef3a54132c0e
* Support mpeg1,2 audio and mpeg1,2,4 video content extraction from .ts streams.Andreas Huber2011-05-252-4/+4
| | | | Change-Id: I9d2ee63495f161e30daba7c3aab16cb9d8ced6a5
* Support platform and camera dependent recording start time offsetJames Dong2011-05-142-0/+10
| | | | | | related-to-bug: 4390777 Change-Id: Icb52973ad4ac716f04fb103ef527915a966d06d5
* Support for storing geo information in the recorded mp4/3gpp file.James Dong2011-05-132-0/+40
| | | | | | | 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-126-6/+6
| | | | | Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876 Signed-off-by: Dima Zavin <dima@android.com>
* The decoder wrapper is no longer needed. Also disable building old-style ↵Andreas Huber2011-05-125-691/+4
| | | | | | decoders. Change-Id: Ie022f1a6dffe619c1b0385aa13f63e097282cfe4
* Initial check-in for AACWriterJames Dong2011-05-042-6/+24
| | | | | | Change-Id: Ia21ca39a404484b2dda25c6101780d2ff11c4623 related-to-bug: 4211046
* Add setParameter/getParameter to MediaPlayer API.Gloria Wang2011-04-298-0/+51
| | | | | | for bug 1982947 Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
* audio/media: convert to using the audio HAL and new audio defsDima Zavin2011-04-276-23/+35
| | | | | Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5 Signed-off-by: Dima Zavin <dima@android.com>
* Add extra headers specified in the media player's setDataSource callAndreas Huber2011-04-203-19/+28
| | | | | | | to all http requests made by the http live implementation. Change-Id: I9dd78bb261bc678ea98c82009ca2634b74f3cd58 related-to-bug: 4315346
* - Add another parameter in notify() to be able to send timed text sampleGloria Wang2011-04-132-5/+9
| | | | | | | | through listener during video playback. - Add OnTimedTextListener in the MediaPlayer For feature request 800939. Change-Id: I65072c27acb4c0037109a72be38c73e9f667420f
* Merge "This reverts an earlier change 4aeec2da39fce4de9b07b694d59fd308ffb3d491"Andreas Huber2011-04-041-1/+8
|\
| * This reverts an earlier change 4aeec2da39fce4de9b07b694d59fd308ffb3d491Andreas Huber2011-04-041-1/+8
| | | | | | | | | | | | | | | | | | | | Instead of returning 0-filled buffers after EOS from AudioTrack we do this work in AudioOutput instead. That way the EOS signal (0 frames returned) is preserved in AudioCache which otherwise would lead to a heap size overflow filling everything with zeroes. Change-Id: I7e07429ba887957a4340dd4b21eef4bba76248cd related-to-bug: 3514073
* | Avoid a race condition while signaling audio EOS/seek complete by acquiring ↵Andreas Huber2011-04-041-1/+1
|/ | | | | | | the lock. Change-Id: Idfea452ff661b264e013fe515bcd2a2762bd959c related-to-bug: 4193552
* merge libsurfaceflinger_client into libguiMathias Agopian2011-03-251-2/+1
| | | | | | | | | | | | this is the first step in unifying surfacetexture and surface. for this reason the header files were not moved, as most of them will eventually go away. NOTE: currently we keep libsurfaceflinger_client.so as an empty library to workaround prebuilt binaries wrongly linking against it. Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
* Enable http-live support for https:// urls, fix a parsing issue.Andreas Huber2011-03-211-1/+2
| | | | | Change-Id: I2284e1d62babde7f739fba6a3cb4e2619f0e62f9 related-to-bug: 4148291
* Merge "Fix issue 3483718: audio streaming and A2DP."Eric Laurent2011-03-211-9/+12
|\
| * Fix issue 3483718: audio streaming and A2DP.Eric Laurent2011-03-211-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that when switching from A2DP to device speakers or headset, The AudioTrack binder interface to AudioFlinger must be destroyed and restored to accomodate new buffer size requirements. Current AudioTrack implementation did not restore properly the PCM buffer write index which caused a mismatch between the written frame count in the mediaplayer renderer and the AudioTrack. The renderer could then believe the AudioTrack buffer was full and stop writing data preventing the AudioTrack to reach a bufffer full condition and resume playback. The rendered was also modified to refresh the AudioTrack frame count (buffer size) inside the write loop in NuPlayer::Renderer::onDrainAudioQueue() as this count can change from one write to the next. Also modified AudioTrack::obtainBuffer() to check for track invalidated status before querying for available space in the buffer. This avoids writing to the old track's buffer until full before detecting the invalidated condition and create a new track. Change-Id: I16a857e464e466880847f52f640820aa271539ad
* | Support passing headers to MediaMetadataRetriever's setDataSource APIAndreas Huber2011-03-214-7/+13
|/ | | | | Change-Id: Ib1a5c08fc5034cac05034db27007a35c9b660b26 related-to-bug: 3506316
* am 782ffe91: am 9c0c5b56: am 2f1f2248: Fix missing AOSP copyright headers ↵James Dong2011-03-171-0/+16
|\ | | | | | | | | | | | | for a bunch of media framework files * commit '782ffe91da665c6b1fb9e297faa6e0dc6035f40c': Fix missing AOSP copyright headers for a bunch of media framework files
| * Fix missing AOSP copyright headers for a bunch of media framework filesJames Dong2011-03-171-0/+16
| | | | | | | | | | | | bug - 4119349 Change-Id: If5924e16a5f596d5d73d9beb66eaf5ac9a6f0e50
* | Add memory leak tracking/debugging code to drm serverJames Dong2011-03-141-136/+2
|/ | | | | | bug - 4099038 Change-Id: I6c048eaf3d7f34bc144b8daaa5fdef1ed474af66
* Merge "- To track the usage of all audio output devices - To track the ↵Gloria Wang2011-03-022-2/+129
|\ | | | | | | currently used audio device - The devices are separated as speaker and other audio devices - Provide the collected data to battery application through pullBatteryData()"
| * - To track the usage of all audio output devicesGloria Wang2011-03-022-2/+129
| | | | | | | | | | | | | | | | - To track the currently used audio device - The devices are separated as speaker and other audio devices - Provide the collected data to battery application through pullBatteryData() Change-Id: I374c755266b5ac6b1c6c630400f4daf901ea8acc
* | Allow optional specification of a PTS timestamp when signalling a discontinuity.Andreas Huber2011-03-026-6/+67
|/ | | | | | | If present, rendering will be suppressed until reaching the timestamp. Change-Id: Ic64bdf4225063c5a4d042ea9809960b843a46d19 related-to-bug: 3489454
* Merge "Suppress the logging of URLs when in incognito mode."Andreas Huber2011-02-244-5/+22
|\
| * Suppress the logging of URLs when in incognito mode.Andreas Huber2011-02-244-5/+22
| | | | | | | | | | Change-Id: Ib951b495eae15669e160ef54686eab0eeb9b366a related-to-bug: 3336575
* | Merge "Bug 3438258 Add SurfaceTexture as MediaPlayer sink"Glenn Kasten2011-02-2413-16/+71
|\ \ | |/ |/|
| * Bug 3438258 Add SurfaceTexture as MediaPlayer sinkGlenn Kasten2011-02-2313-16/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change enables the use of a SurfaceTexture in place of a Surface as the video sink for an android.media.MediaPlayer. The new API MediaPlayer.setTexture is currently hidden. This includes: - New Java and C++ interfaces - C++ plumbing and implementation (JNI, Binder) - Stagefright AwesomePlayer and NuPlayer use ANativeWindow (either Surface or SurfaceTextureClient) Change-Id: I2b568bee143d9eaf3dfc6cc4533c1bebbd5afc51
* | To collect the total usage time of encoders in the media recorderGloria Wang2011-02-232-7/+81
|/ | | | Change-Id: I94c9c94dec6bd714a3ebf96b4465b94f069e55b8
* - Add method in MediaPlayerService to collect and pullGloria Wang2011-02-222-0/+116
| | | | | | | codec usage (duration) for the battery app - Collect MediaPlayer decoding usage data Change-Id: I0ef4e32b6a041ba1fe73c19f9c67185c61d03965
* Remove legacy, AwesomePlayer-based http live implementation.Andreas Huber2011-02-161-11/+7
| | | | Change-Id: I455d0faa5612dcd4d2bb6f2b3c7b64a1caaabf69
* 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
* Some tweaks to HTTP live / nuplayer behaviourAndreas Huber2011-01-211-3/+9
| | | | | | | | | | - 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
* Implement missing pause/resume support for NuPlayer.Andreas Huber2011-01-204-5/+85
| | | | | Change-Id: Ia3f1ce521dd4b70e134ef03aa7c9db8e8d39a134 related-to-bug: 2368598
* 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-122-18/+89
| | | | | | bug - 3345296 Change-Id: If3f33955f5473b0c5ad9c9b85f8b5cb21ddd7e65
* Publish MediaMetadataRetriever.java as public APIJames Dong2011-01-122-26/+3
| | | | | | | | | | | | 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
* NuPlayer now properly sends MEDIA_SET_VIDEOSIZE notifications.Andreas Huber2011-01-102-12/+45
| | | | | Change-Id: I99b4223ad6ecfd8839a3c0e737fef3165565d76d related-to-bug: 3336496