History log of /frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2d13b1d3eeaba31d8c15acc6037fd68b150a9a66 28-Apr-2016 Chien-Yu Chen <cychen@google.com> Camera: Fix passing video native handle for 64-bit app

Add new binder calls to pass video native handle so the video native
handle can be passed between 32-bit and 64-bit processes.

Remove problematic code that used IMemory to pass video native
handle because the sizes of VideoNativeMetadata are different in
32-bit and 64-bit processes.

Bug: 28403412
Change-Id: I3341b1812ecc41d61846bb72ca926ecb1674c9ec
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
6e0c00ba53d8e5ad14d9e447c3c040ce6fd81a47 02-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge changes from topic 'camera-native-aidl' into nyc-dev

* changes:
Camera: Clean up warnings and set -Werror
Camera: Switch camera2 to auto-gen C++ binder interfaces
d56db1d2bee182d1851097a9c712712fc094d117 18-Dec-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Switch camera2 to auto-gen C++ binder interfaces

- Move camera service AIDL files to frameworks/av
- Build C++ interface stubs with AIDL tools
- Add necessary native-side parcelables and update existing ones
- Remove manually-written stubs, rearrange remaining manual stubs
- Adjust implementations to work with auto-generated stubs
- Adjust method signatures for auto-gen differences
- Add rich error messages using binder::Status

Bug: 25091611
Change-Id: I6f69f34b9d1a3f8d1fb7db87357363f8fa8483ff
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
8fc3c670fff26cb21d1e16dbfcbc4410d7758574 01-Mar-2016 Chien-Yu Chen <cychen@google.com> CameraSource: Fix time lapse video recording

Add processBufferQueueFrame() to CameraSourceTimeLapse so it
can decide whether to skip current frame and change the timestamps.

Bug: 26525150
Change-Id: If499cba62c6569a72bb271d3e0b4c38862650f1a
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
98a668f6ea51e4d894d2ebb61a0e18287fb14008 18-Dec-2015 Chien-Yu Chen <cychen@google.com> Camera: Fix client permission check

Modify StageFright's CameraSource to forward calling PID as
client PID when connecting to CameraService so CameraService
can check if the client PID has permission to use camera.

Change CameraService to check calling UID is trusted before
using the passed in client PID and client UID to verify permission.

Bug: 24511454
Change-Id: I4906ab73510e2c75714690bed675e3c13aca3ccf
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
a5750e0dad9e90f2195ce36f2c4457fa04b2b83e 19-Jun-2014 Mark Salyzyn <salyzyn@google.com> libstagefright: 64-bit compile warnings

Change-Id: I3d1146714fa23be3d4e696599b6f70cac1f9d28b
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
1b24cf32e02a1372e57b3a2a432bc0adfe496e6d 16-Apr-2014 Mark Salyzyn <salyzyn@google.com> am e80631aa: am 839d11d1: Merge changes I0a744dc7,Id993a70d

* commit 'e80631aa1992ca50af679cd6a018c0ffda7f9b17':
media: use size_t for integer iterator to Vector::size()
media: 64 bit compile issues
3ab368e0810d894dcbc0971350c095049478a055 15-Apr-2014 Mark Salyzyn <salyzyn@google.com> media: use size_t for integer iterator to Vector::size()

Change-Id: I0a744dc7815a86a993df9b0623440be620ec8903
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
d411b4ca2945cd8974a3a78199fce94646950128 11-Apr-2014 Andreas Huber <andih@google.com> warnings be gone.

(cherry picked from commit 84333e0475bc911adc16417f4ca327c975cf6c36)

Modified by Mark Salyzyn <salyzyn@google.com> to keep merge conflicts
or errors downstream to a minimum.

Change-Id: Ic3b272f9cbf3155001aabd2f79728f1bc31de613
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
84333e0475bc911adc16417f4ca327c975cf6c36 08-Feb-2014 Andreas Huber <andih@google.com> warnings be gone.

Change-Id: Ie3bae3f037730e316d7fca12e7a3527973f752ef
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
7e3c19fbead7af39b3c0ca3d170406a98f97dbd0 26-Nov-2013 Robert Shih <robertshih@google.com> Merge "Avoid the call to CameraSourceTimeLapse::trySettingVideoSize if initialization failed in the parent class ctor CameraSource::CameraSource."
9bb976e1c78048081cf9df4d8a1db67311413e5b 22-Nov-2013 Robert Shih <robertshih@google.com> Avoid the call to CameraSourceTimeLapse::trySettingVideoSize if initialization
failed in the parent class ctor CameraSource::CameraSource.

Bug: 11636771
Change-Id: I5e6bffc1ebeeb1c2b84d6ed2049b2b3676ac046a
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
9c7f845780d62ea09469a8dac7117cc01adfea5c 30-Oct-2013 Lajos Molnar <lajos@google.com> StageFrightRecorder: do not use meta-data mode for software encoders

Camera HAL v1 uses vendor-specific camera-source meta-data mode, but
software encoders use generic gralloc-source mode, so they are not
compatible.

Change-Id: I0d1bab8eada26dcb70c97b1eec83f06d1f331239
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 11446505
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
99617adda9bc46c43f511f0940bc735c73de61de 13-Mar-2013 Mathias Agopian <mathias@google.com> remove uses of Surface in favor or IGraphicBufferProducer

Change-Id: I13d7a9553aa335bca790a3a59d389d7533c83d57
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
ceb388d6c03c38b96dc41c0ea4804b749aa077c4 19-Feb-2013 Eino-Ville Talvala <etalvala@google.com> CameraService and Stagefright: Support AppOps

Camera:
- Signal to AppOpsService when camera usage starts and stops
- Listen to permissions revocations and act on them
- Currently just kill camera connection when permissions lost

Stagefright:
- Pass on client name, UID to camera as needed

Bug: 8181262
Change-Id: I9e33c9d05e9daa77dbb2d795045d08eb887ec8f0
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
f1d5aa162c02a16b7195a43a9bcea4d592600ac4 07-Feb-2012 James Dong <jdong@google.com> Move away from MediaDebug and use ADebug instead

Change-Id: I963a3b6f79a7292891973cbeeaf3378b38629f08
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
b44c9d2bdc0d5b9cb03254022a58e017b516e9e6 03-Feb-2012 James Dong <jdong@google.com> Don't call virtual functions in the destructor for audio and camera source classes

Change-Id: Ia74ffc1c0cbd7971697f5e3c476e340ec5c7727a
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
df64d15042bbd5e0e4933ac49bf3c177dd94752c 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
b8a805261bf0282e992d3608035e47d05a898710 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
7c56bb3ac1fb758a222a0c23805704a2789657b6 22-Nov-2011 James Dong <jdong@google.com> am d0a25456: am 02740dc4: Merge "Fix log spamming during time lapse video recording" into ics-mr1

* commit 'd0a254566f5f0be5607b4d64839a575c888c94f6':
Fix log spamming during time lapse video recording
e8e5f86e9e310b065596c8cbbca1543eb833dee1 20-Nov-2011 James Dong <jdong@google.com> Fix log spamming during time lapse video recording

Change-Id: I4fc0809203684ebb02eaf217d7abad00aefc898f

related-to-bug: 5626569
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
6a9ab553ebd36705d3edacc6deb6a27dd6b799a3 08-Nov-2011 James Dong <jdong@google.com> am ee7ebb32: Merge "Fix a hang issue where the first frame can be dropped for timelapse video recording." into ics-mr1

* commit 'ee7ebb3257d9337627b175835dc3d08f9b8ab339':
Fix a hang issue where the first frame can be dropped for timelapse video recording.
93594b5aa16dbbb0b196f6e181a8ca099d7ab62b 27-Oct-2011 James Dong <jdong@google.com> Fix a hang issue where the first frame can be dropped for timelapse video recording.

Change-Id: I04754f1005a983953a80a659ff13f8762d0e120c
related-to-bug: 5523502
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
3856b090cd04ba5dd4a59a12430ed724d5995909 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
3cecf640c4daf2df616b278bd9986018c8182908 30-Jun-2011 James Dong <jdong@google.com> Do not support still image capture mode for timelapse video recording

related-to-bug: 4973779

Change-Id: Ica665217ab10247b2242acc4e93d4fe9f83e3f45
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
4ca2c7c913f8bd4ada13aca56d36045d42d1e00f 01-Jun-2011 Wu-cheng Li <wuchengli@google.com> Add framework support for camcorder zoom.

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
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
1fc87828715ef5cda402f1960231621672f91513 14-Jun-2011 James Dong <jdong@google.com> Enforce the rule that the timestamp from timelapse video source monotically increases

Change-Id: Ie5ccb43e0192420300da58525ec52af7544e8e9e
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
e468ac57f6e8afc6078c76d4eb1ac327112a3de0 18-Feb-2011 James Dong <jdong@google.com> Application-managed callback buffer support for raw image

bug - 3292153

Change-Id: I9789f7c5cde3a3889d7375e881181e9152d95fc2
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
7757f5010a771fb8824b6fdf9788f588a1577e3f 26-Jan-2011 James Dong <jdong@google.com> 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
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
2b4883641e324c50a2ee24c5bd15170c7d31e57d 19-Jan-2011 James Dong <jdong@google.com> Use metadata in video buffers for timelapse video recording by default to eliminate memcpy

bug - 3361771

Change-Id: Ib37ffe4be8edc8708baa76b3507b6f11372536d9
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
b0fb6bf746f1d611033c55a4a1ab5a4b0e212a95 11-Jan-2011 James Dong <jdong@google.com> Don't release the video recording frame after recording is stopped in CameraSourceTimeLapse.cpp

bug - 3334999

Change-Id: I1c83080713696221048da9b1a9f8c2ee48849ade
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
28934a90e168291f6c77c56e8a05f272e5151bbd 05-Jan-2011 James Dong <jdong@google.com> Use video output if necessary for timelapse video recording

Change-Id: I88d0cc824f0fbf8b2f392fbc23c69b5bfefda1b8
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
ba29002c7aee13c068049037cd14bba6a244da6b 10-Dec-2010 James Dong <jdong@google.com> First step towards renabling Timelapse video recording

Change-Id: I93836b066fb69d5152d3774546a9935057a1f12f
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
5c9523154d106b555db6c41f85ab205a4f189b02 19-Oct-2010 James Dong <jdong@google.com> Make camera source ready for handling meta-data video buffers.

bug - 3042125

Change-Id: I877b265c6bf8e0593121c8d5a95ae5599cdc6fb9
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
54ff19ac69ace7c05ea90d225e26dab3b133f487 08-Oct-2010 James Dong <jdong@google.com> Move Camera specific logic out from StagefrightRecorder to CameraSource

o updated comments and streamlined the logic in
checkVideoSize() and checkFrameRate() as suggested

Change-Id: I49d04ac7998d4a215997aa63555dfb6e814e38d3
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
78eff720c86eb6d4e3d45a144df60b2ca464d2d4 16-Sep-2010 Nipun Kwatra <nkwatra@google.com> Implemented frequent read returns for quick stop in time lapse.

If the frame capture interval is large, read will block for a long time.
Due to the way the mediaRecorder framework works, a stop() call from
mediaRecorder waits until the read returns, causing a long wait for
stop() to return. To avoid this, we return a copy of the last read
frame with the same time stamp if a frame is not available quickly.
This keeps the read() call from blocking too long. This method is
triggered when startQuickReadReturns() is called on
CameraSourceTimeLapse.

In the still camera case, also using waitRelative on Condition
instaed of sleeping, so that we can wake it up.
Also for the idle check instead of sleeping, we now wait on a
condition variable, which is woken up when the last takePicture
callback gets called.

Change-Id: Ia74386e175536aee0f44ae2f8b114c353d3d72f5
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
616715ab614ce25ea395a8e9a553a82637f1021d 16-Sep-2010 James Dong <jdong@google.com> Fix potential unintialized variable yuvformat

Change-Id: If0a77855d98b45769a154b25d6535f30cd41536a
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
3ee899e0466ecce107257beec04a2178939cf24e 15-Sep-2010 Nipun Kwatra <nkwatra@google.com> Disable shutter sound and play recording sound for still mode time lapse.

Disabling shutter sound when using still capture for time lapse recording.
We also play recording sound at the start and stop of recording as is
done for usual video recording.

Change-Id: I6a6fa0c7c867979624105eea74fc17945db1f517
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
155e833a7a5fc3e193691324cf9326da1bc3289a 02-Sep-2010 Nipun Kwatra <nkwatra@google.com> Moving decision to use still camera to CameraSourceTimeLapse

CameraSourceTimeLapse now decides whether to use still or video
camera automatically. It checks if the passed in size is a valid
preview size and if it is, then uses the video camera else uses
the still camera.

Removed from StagefrightRecorder the support to set parameter
useStillCameraForTimeLapse.

Change-Id: I71f5b0fc7080ca524792381efe918d22e41a7f36
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
900c1297683ab50ca8a2d73f937bd09d9e9b100a 11-Aug-2010 Nipun Kwatra <nkwatra@google.com> Call startPreview after stopping for mUseStillCameraForTimeLapse=true case.

In the case when stop is pressed after takePicture has been called
but the CAMERA_MSG_COMPRESSED_IMAGE message from camera has not yet
been received, preview was not getting restarted. The reason was that
CameraSource::stop sets the camera listener to NULL and hence the
dataCallback() function which handles the CAMERA_MSG_COMPRESSED_IMAGE
message and restarts preview never got called.

Change-Id: Ib8f3bb77d9eab1ed5a67798569025ea0d63d7fd4
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
7dbfa5a98c9f396ea63d0f322c3fa11df91d17a2 10-Aug-2010 Nipun Kwatra <nkwatra@google.com> use usleep instead of sleep.

Minor bugfix. sleep doesn't take fractional value for seconds, so use
usleep instead of sleep for sleeping small times.

Change-Id: I40e45c30cc595a54c18601117b9a1a3637652f60
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
fd150a8e03cdd8462eafd68f4a4231aa52f0e5a1 02-Aug-2010 Nipun Kwatra <nkwatra@google.com> including limits.h to fix simulator build.

Change-Id: I473a62ab8282e4e89e48ee6d7e99aec6ed37076a
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
40e2f3f9b41f44bdb59f7708a421b87f169a6ede 31-Jul-2010 Nipun Kwatra <nkwatra@google.com> Implementing getSupportedPictureSizes

Go through all the supported picture sizes and choose the smallest one with
both dimensions higher than the passed in video width and height.

Change-Id: I4e9fe7a6384a0feeb9e069239ec68c70fb5f3033
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
c4e47d1e81c4e4403663cb911e98dbf3ada9942c 28-Jul-2010 Nipun Kwatra <nkwatra@google.com> Support for video size to be different from captured picture size.

Adding support to allow video size to be different than the supported
picture sizes. A picture size larger than the demanded video size is
chosen. Captured pictures are then cropped to the size of the desired
video size. Cropping is done from the the center portion of the picture.

Change-Id: I6bcbe16f94b6ecbcf28b7f46826a81b4b6b8cbc3
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
e4e0a6994d39c4a7cba09c5fff442b2dca1df8f8 21-Jul-2010 Nipun Kwatra <nkwatra@google.com> Allowing setting of time lapse parameters through MediaRecorder.java

added setTimeLapseParameters() to MediaRecorder.java and SetParameter support
in StagefrightRecorder to allow enabling time lapse and setting the corresponding
parameters.

Change-Id: I509040aa71f8d3fc37337b0894a81d9c0fd7a40a
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
0aacf105eea098a0b47761a4a9a5c4d820611f2d 19-Jul-2010 Nipun Kwatra <nkwatra@google.com> Restart preview after each takePicture is done.

Preview is called when CAMERA_MSG_COMPRESSED_IMAGE is recieved by
dataCallback(). It needs to be started as a new thread so that the
callback can return, and the camera can know that takePicture() is
done.

Change-Id: I4d0febbc993aac43b37f9f4a824e9c7b8785f19e
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp
65e7e6facda89927cb26594b3b65ae81b3235ebc 12-Jul-2010 Nipun Kwatra <nkwatra@google.com> Adding support for timelapse capture using still camera's takepicture.
Also moving entire implementation into a new class CameraSourceTimeLapse
which inherits from CameraSource.

For timelapse capture using still camera, we start a thread which runs a
loop in which it calls Camera::takePicture() and then sleeps until the next
frame should be captured.
The function dataCallback() handles the callback from the camera with the
raw image data. This function copies the data and creates an artificial
timestamp corresponding to one frame time ahead of the last encoded frame's
time stamp. It then calls dataCallbackTimestamp() of the base class which
will think that it recieved the frame from a video camera and proceed as usual.

For moving the implementation to the subclass CameraSourceTimeLapse, added a
few virtual functions to CameraSource, which do the current thing for the base
class, but specialized things for CameraSourceTimeLapse.
E.g. startCameraRecording() in the base class just calls mCamera->startRecording(),
while in CameraSourceTimeLapse it may start a thread for the still camera case.

Change-Id: Ib787f24bd2e1f41681513f0257e1c4ca10a2b4de
/frameworks/av/media/libstagefright/CameraSourceTimeLapse.cpp