summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice
Commit message (Collapse)AuthorAgeFilesLines
* In order to recover from video lagging behind audio, drop avc framesAndreas Huber2011-09-166-44/+132
| | | | | | that are not referenced by other frames before feeding them into the decoder. Change-Id: I822190af8f8329567bff8da1ea23136d0a765481
* Various improvements to nuplayer playbackAndreas Huber2011-09-167-56/+102
| | | | | | | | | | | | | | | | | | | | - Drastically cut down the number of times we supply the AudioSink with data by estimating the time until the sink would run out of data and then scheduling a refill in advance of that. - Use a dedicated looper for video decoders since they are currently taking too long to return from OMX_FillThisBuffer (bug 5325201) - Revise thread priorities for the OMX dispatcher and software codecs, instead of running them at ANDROID_PRIORITY_AUDIO, they now only run at ANDROID_PRIORITY_FOREGROUND - Since threads created by pthread_create inherit all of the parent threads attributes including thread priority, briefly reset thread priority to ANDROID_PRIORITY_FOREGROUND before instantiating OMX components and then restore it. Change-Id: If9332a3a20dad5485333d68c11de0d2d5d3fffc3
* Don't post position updates too frequentlyAndreas Huber2011-09-132-3/+17
| | | | | | | i.e. don't hog my message queue. related-to-bug: 5284760 Change-Id: I8e2d36a11dbee1567b18ed13dc5257a65c6eeda7
* Require INTERNET permission for network-based content.Dave Burke2011-09-022-67/+28
| | | | | | Bug #1870981 Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
* I have one HLS stream that switches stream PIDs from one bandwidth to the nextAndreas Huber2011-08-312-2/+17
| | | | | | | this change intends to support its very limited case and signals an error in all other cases of unexpected PID changes that we cannot recover from. Change-Id: Icbfdf9fe7461969e2a8781ed416f54d891dd789a
* Discontinuities are only signalled on streams that have been identified, i.e.Andreas Huber2011-08-311-0/+13
| | | | | | | | | | | | | those that have a queue. This ensures that the player doesn't observe discontinuities that don't match up across streams. Also, make sure output buffers arriving from the decoder to be rendered are sent back to the decoder if we started flushing. Finally, don't parse TS packets for streams we don't support. And don't allocate memory for them. Change-Id: I708e0de4cba8110a62e4c8ceb1e5702430d5d2bb
* ATSParser now supports a mode in which PTS is considered to be absolute timeAndreas Huber2011-08-301-1/+1
| | | | | | i.e. PTS 0 <=> media time 0 Change-Id: If10a0f98c129b95e8430dc419664b1def92e547e
* Return an error to the client instead of asserting if decoder instantiation ↵Andreas Huber2011-08-291-4/+2
| | | | | | | | | fails after a surface change. Change-Id: Ic7758cbeb107032db68a1c3b8e2984710a12dd8b related-to-bug: 5212725
* Signal errors to the client instead of asserting in ACodec.Andreas Huber2011-08-262-19/+32
| | | | | | Also make sure NuPlayer can properly shutdown in certain edge cases. Change-Id: Iceb16d600d87ba66c802e60e95bf62f66487a453
* Error handling in ACodec and Nuplayer.Andreas Huber2011-08-163-18/+35
| | | | | | | Codec errors (and codec not found errors) now trigger a controlled shutdown of playback and signal errors to the MediaPlayer client. Change-Id: I2ee23ff2a1422d05a1a21e50ecb87d7c7ab958cc
* Add a null check to handle failure of android::createPlayerJason Simmons2011-08-121-1/+3
| | | | Change-Id: Id56bd0c16104e46d8dc71f13d8a44aefe251fad4
* Network traffic accounting for chromium stack support in mediaserver.Ashish Sharma2011-08-051-4/+5
| | | | | | | - Atribute network activity to uid calling the mediaplayer - Enables logging of chromium network stack in logcat Change-Id: I2d28c8392248a056b3cee305dd4d4475ebba4337
* Do not support still image capture mode for timelapse video recordingJames Dong2011-07-244-197/+7
| | | | | | related-to-bug: 4973779 Change-Id: Ica665217ab10247b2242acc4e93d4fe9f83e3f45
* Connect MediaRecorder Native to SurfaceMediaSourcePannag Sanketi2011-07-224-50/+160
| | | | | | | | | | | | | | | | | 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
* Fix seek behaviour at startup and teardown of media session that hasn't been ↵Andreas Huber2011-07-152-3/+11
| | | | | | | | started Nuplayer specific. Change-Id: I7b0be52c29bdb7032414d63c503d686df7844bf6
* Enable signalling of a stream discontinuity involving a format-changeAndreas Huber2011-07-131-2/+11
| | | | | | | through IStreamListener. Change-Id: Ic0409cdc4891ad26b61f2f98bdda3c7fb2e2de6a related-to-bug: 5022434
* Remove the simulator target from all makefiles.Jeff Brown2011-07-111-9/+2
| | | | | | Bug: 5010576 Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
* 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