summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MediaCodecSource.cpp
Commit message (Collapse)AuthorAgeFilesLines
* stagefright: Remove the HAL3 limitation from the video reference clock selectionRicardo Cerqueira2016-08-101-2/+1
| | | | | | | | Usage of boot-time as the timestamp reference isn't necessarily limited to HAL3. A single property check for media.camera.ts.monotonic is enough to cover all cases. Change-Id: Ic56dbcc6ba32c25bccde6dd0bbf07d4c918af43e
* frameworks/av: Fix video recording breaksKeith Mok2016-04-151-5/+4
| | | | | | | | | | | | | | | | | Change Id0af9c8aed1a983095275ac03f7f59abc31594cc using boot time for video recording start time as default, but it is specific on devices using qcom camera HAL3 and it breaks all devices using camera HAL1. Fix by changing the default behaviour when property media.camera.ts.monotonic is not set. And newer devices such as 8996 might need to setprop media.camera.ts.monotonic 0 in order to work properly when using camera HAL3. Change-Id: Iee07ed1147713a6397fff43e3bbd4f4ed08b56b7
* video: Use boot clock for recording start timeSurajit Podder2016-04-131-1/+9
| | | | | | | | | | | | | Camera HAL3 uses boot time for buffer timestamp, rather than system monotonic time. This leads to issues as framework uses system monotonic time as reference start time for timestamp adjustment. Add change to use boot time for reference start time. CRs-Fixed: 946735 Change-Id: Id0af9c8aed1a983095275ac03f7f59abc31594cc
* stagefright: Forward-port HFR and HSR supportSteve Kondik2016-01-051-0/+5
| | | | | | * CAF commit bd42a7ac3a60c0d8a079b4567484c9b006bac8ad upstream Change-Id: I457ccab603647f3139ea2199a544f64ac3d1a214
* libstagefright: add NULL check in MediaCodecSource's pullerKim Zhang2015-11-071-1/+1
| | | | | | | | | When CameraSource/AudioSource is stopped, puller will read a NULL buffer with success, so we should add NULL check before release it. Change-Id: I8924167fc79c7880e80115aafbb9cc7c3e9e885c CRs-Fixed: 813924 (cherry picked from commit 3dfbe3ae49c44301a8d484c2c5aaf0c8e1b53203)
* stagefright: Remove additional deep-copy of encoder buffersShivaprasad Hongal2015-10-291-0/+2
| | | | | | | | | | | | | | MPEG4Writer makes a copy of encoded buffer to avoid holding on to the read buffer. This is not needed with MediaCodecSource, as the encoded-output buffer is already copied to a heap buffer. This saves a copy and some power. However, cloning the buffer is still needed for upstream sources that cannot afford to keep the buffers with writer up until they are released. So, pass a hint in buffer's metadata to indicate if it is OK to delay the release and not copy the buffer Change-Id: Ib59ac29ebc6ce4afd6fc272688a8260438ab1517
* video: Modify classes to support camcorder pause/resumeSurajit Podder2015-10-061-1/+4
| | | | | | | | | * Modify MediaRecorder, CameraSource, AudioSource to be extendable. * Add hooks to instantiate extended implementations to implement pause/resume. Change-Id: I847263fc69e4f613c5ea60fb6809c7da176d3a8d
* audio: add support for HW AAC encoderSathishKumar Mani2015-10-061-2/+6
| | | | | | | | Add support for HW AAC encoder by including it in the list of available encoders and use it for encoding only if system property 'qcom.hw.aac.encoder' is set Change-Id: I08279fb077f4675736ed76d26c2681a2d1776aab
* avextensions: Add support for Codec Extension featuresShalaj Jain2015-10-061-0/+4
| | | | | | | | | | Add support for Codec extension features like skype, vqzip, b-frame encoding, prefer adaptive playback etc. Add extensions to support encode batching. Also enable Werror for libavextensions. Change-Id: Ia342d4abe4bb1e21b9ff2b8213fb96421485a333
* Audio: post error to client during SSRDhanalakshmi Siddani2015-10-061-3/+7
| | | | | | | - Add support to post error to client if SSR is triggered during NT mode encoding Change-Id: Idf10939f1eb0c719a692e4f53f6e3040633fab40
* stagefright: ask for flex-YUV camera buffers for software encodersLajos Molnar2015-06-261-1/+28
| | | | | Bug: 13222807 Change-Id: I854b73a63cf9239311729598241725d84e8513aa
* stagefright: rename usePersistentInputSurface to setInputSurfaceChong Zhang2015-05-131-1/+1
| | | | | | | | and clear persistent surface pointer when MediaRecorder is reset bug: 21045118 bug: 21045402 Change-Id: Ifd0d6deeb969f2252123929541b30b518cecbf9a
* MediaRecorder: implement persistent input surface APIsChong Zhang2015-05-011-4/+17
| | | | | | | Bug: 19127604 Bug: 19489395 Change-Id: I7dd8015a8fe029f9867fcdb52322629c77eff50b
* stagefright: make more warnings errorsLajos Molnar2015-04-171-1/+0
| | | | Change-Id: I9b1ad60fbfb866dbf9c00843e06553c3eb25c113
* mediaplayer: use async mode in NuPlayerMarco Nelissen2015-04-101-3/+3
| | | | | Bug: 14679336 Change-Id: I5e471a6e13be82a375afc2718599f27cd0255bf5
* stagefright: don't use ALooperRoster mutex for reply handlingLajos Molnar2015-03-101-4/+4
| | | | | | | | Change replyID-s from uint32_t to an object Move reply handling into the loopers (to reuse a common mutex) Bug: 19607784 Change-Id: Iaa035b846c424c5687ed17ce1079b325e86c54be
* media: switch to new AMessage handlingLajos Molnar2015-03-051-12/+10
| | | | | Bug: 19607784 Change-Id: I94cddcb81f671422ad4982a23dc4acfe57a9f1aa
* Stagefright: use MediaCodec in async mode for recordingPraveen Chavan2014-11-121-164/+105
| | | | | | | | | Async mode reduces the number of messages posted between MediaCodec and MediaCodecSource. This reduces thread wakeups and helps reduce CPU utilization. Bug: 18246026 Change-Id: I4b0837f309fdd12e323c1dfa72525f5a31971a03
* MediaRecorder: only dequeue available buffers from MediaCodecChong Zhang2014-10-031-5/+14
| | | | | Bug: 17514968 Change-Id: If232f92d163deb2440b927315c69e0c4d51ca290
* MediaBuffer: ABuffer will release MediaBuffer when it's destructed.Wei Jia2014-09-191-16/+3
| | | | | Bug: 17454455 Change-Id: Ia423bcc2e1fa39137f114eac44912ed15357bb99
* MediaCodecSource: stop puller from caller's thread instead of looperChong Zhang2014-08-041-32/+42
| | | | | | | | | | | | | | | | | | | | Currently CameraSource/AudioSource's stop() and read() are both called from the puller's looper. This works if source operates normally (i.e. read() returns regularly before source is stopped), as the stop() will eventually be handled by the looper. However, if for some reason the source hang, it will get stuck in read(), and the stop() will never be processed, which could lead to ANR (in addition to the source hang). We need to move the source's stop out of the puller's looper. It also can't be on MediaCodecSource's looper, because the source's stop synchrounously waits for all outstanding buffers to return, these are only returned when MediaCodecSource's looper processes the buffer. This change moves the stop to MediaCodecSource::stop, after encoder is shutdown. Bug: 16522726 Change-Id: Ie91f563c5d8a98ab091bf1945af4e51f662b9403
* libstagefright: 64-bit compile warningsMark Salyzyn2014-06-261-2/+5
| | | | Change-Id: I3d1146714fa23be3d4e696599b6f70cac1f9d28b
* warnings be gone.Andreas Huber2014-02-111-2/+2
| | | | Change-Id: Ie3bae3f037730e316d7fca12e7a3527973f752ef
* Change StagefrightRecorder to use MediaCodecChong Zhang2014-02-051-0/+881
Bug: 12305192 Change-Id: I72d7cb571be5bd348b58ad650f3269d24c15d350