Before calling NewStringUTF, check that the metadata value is actually
valid utf-8, and replace the offending characters with "?" if it is not.
b/5534491
Change-Id: I43de4307e739ae0b7d4177937ed33aa1dfb90d98
Because we request 400x240 thumbnails. 100 thumbnails needs 38M,
which is too much. Change it to 70 now.
Also handle the case if the thumbnail callback throws exception.
Change-Id: Iac4ee72f308b7c7a6ae860983197601cf89bee8f
1. Use the correct Get*Field functions according to the field type.
2. When we have exceptions, return.
Change-Id: I1878d806e26798a0977ff71a781551088e45f6fb
We don't need to have precise position for thumbnails, so we add
a tolerance parameter to the decoder. The decoder can return an
earlier frame within the tolerance time given.
Change-Id: I0a49ed6b03f8c3264606e4143dd5ecf48e9d0f62
o also, we should releae the surface object when release is called, not wait until finalize is called.
related-to-bug: 5157956
Change-Id: I0233ad61d8349c3e3800de68b752b9548ece1742
This removes the ParcelSurfaceTexture class since that functionality has been
folded into Surface.java. The change also updates the MediaPlayer to get rid
of setParcelSurfaceTexture() and modifies setTexture() to use the new Surface
functionality in order to simplify the code.
Change-Id: Iafa75ea3188263928128325d8a726786971b4de4
android_media_AudioEffect_native_setup() was not initializing
properly the effect descriptor for audio pre processings.
AudioEffect tests should create per processing effects on a valid
AudioRecord session.
Change-Id: Ia1862ca91c98e272f9374b9225a7d4ce7ef132fc
For using the MediaRecorder in MFF (Mobile Filter Framework),
getMediaRecorder method in mediarecorder jni was earlier changed to
a non static method. Changed it back to a static method.
Also, added a new source type to MediaRecorder.VideoSource for recording
GRalloc buffers.
Change-Id: I031fad45c12b0ac9602d9e451d4767e95a86234d
Added APIs to control pre processes applied on captured audio.
Those APIs are still hidden until reviewed by API council.
Three types of standard pre processes are supported:
- Automatic Gain Control (AGC) by AutomaticGainControl class
- Acoustic Echo Cancellation (AEC) by AcousticEchoCanceler class
- Noise Suppression (NS) by NoiseSuppressor class
A method is added to AudioEffect class to query audio pre processings
applied by default by the platform on a given AudioRecord session ID.
Change-Id: I0b9fceeb8c704dd06319c3b52b85c96fe871d51d
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
There is nothing in this file that requires a global lock.
Furthermore, the lock can cause timeouts in native_finalize if one instance
is being garbage collected while another is busy in processDirectory
Bug: 5002520
Change-Id: I8717f8edeb932200d9f76b3d98915cfbe18b6ec6
Signed-off-by: Mike Lockwood <lockwood@android.com>
Moved specific effect header files to
system/media/audio_effects/include/audio_effects
and renamed to lower case (effect_xxx.h).
Change-Id: Icfc2264bfd013cab0395d7e310ada636b9fe3621
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
This adds support for setting a SurfaceTexture as the MediaPlayer video
sink by using a ParcelSurfaceTexture object. The goal is to enable a
SurfaceTexture to pass through Binder (via ParcelSurfaceTexture) and then
be set on the MediaPlayer.
Change-Id: Ife5689ce673eb4bee1c377019db761685217b71d
PTP mode will be implemented as a separate USB function instead.
Change-Id: I9304c1936c70604ab2ed9704c6b95e11b61f5ba2
Signed-off-by: Mike Lockwood <lockwood@android.com>