439 Commits

Author SHA1 Message Date
Marco Nelissen
9f03d4f921 Merge "Revert "use utf8_length() instead of local function, isValidUtf8()"" 2013-02-12 18:46:22 +00:00
Marco Nelissen
a0a73ed1e6 Revert "use utf8_length() instead of local function, isValidUtf8()"
This reverts commit 1a8b6c29aaa5a1591097daca0876808cc029cbda

Reason for revert: utf8_length handles a slightly different range than the checkjni code, so it's possible for a given string to pass the utf8_length check, but then fail the jni  check.

Change-Id: I81e15c95edd8f89782d8ad9025e68502b9340f22
2013-02-12 18:33:41 +00:00
James Dong
5d5526aa86 Merge "Handle errors from AudioEffect::queryNumberEffects" 2012-12-21 14:05:09 -08:00
Peter Karlsson
4526f0de0a Handle errors from AudioEffect::queryNumberEffects
There may be cases where queryNumberEffects fails leading
to the usage of the uninitialized numEffects.

Change-Id: If6d46987021ff6f0c9a2123d8714ff5fdf9ced45
2012-11-16 16:14:54 +01:00
Martin Storsjo
93077a2902 MediaCodec: Allow getting the codec info directly
This saves the caller from manually iterating through the
MediaCodecList for finding the right codec.

This adds new public API.

Change-Id: I8462f040573427542d86d1b957a5aef53dd55e8e
2012-11-14 20:52:01 +02:00
Martin Storsjo
056ef2ed5f MediaCodec: Allow getting the chosen component name
Currently, when the codec was opened by createDecoder/EncoderByType,
the caller does not know what codec actually was chosen, and
(for encoders) thus cannot know what color formats it supports.

This adds new public API.

Change-Id: Ie471f40f8104b37d27ced3dba5a54facc6504b1b
2012-11-14 14:46:57 +02:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08:00
James Dong
097922b9c1 Throw an exception instead of crash when a surface does not have a binding surface texture
o related-to-bug: 7270329

Change-Id: I498d72187968e89d9498d01b10719569e12be2af
2012-10-04 09:16:40 -07:00
Mike Lockwood
f6f1661457 MtpDatabase: Use actual file size instead of media database size column
Fixes problems with file transfer from device to host that can occur
if the database size value is wrong.

Bug: 6954446

Change-Id: I03c3dd4b75267d1f4613f0b588c8899ded9a70be
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-09-12 15:50:59 -07:00
Jeff Brown
64a55af0ac Add plumbing for new surface flinger display API.
Cleaned up the implementation of Surface and SurfaceSession
to use more consistent naming and structure.

Added JNI for all of the new surface flinger display API calls.

Enforced the requirement that all Surfaces created by
the window manager be named.

Updated the display manager service to use the new methods.

Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
2012-08-27 14:34:54 -07:00
Marco Nelissen
c209a06cfd Let apps provide a custom data source for extractors
Adds android.media.DataSource, which is modeled after its native namesake,
and a new method on MediaExtractor that lets apps specify their implementation
of a DataSource as the source of data for the extractor.

Change-Id: If1b169bd18d2691ebc4f8996494dfc8ee0894b6c
2012-08-24 10:36:51 -07:00
Jean-Baptiste Queru
f96fcd5095 am 26f8ce83: Merge "To avoid the JNI memory leaks in video editor codes"
* commit '26f8ce83e04c4efd10c09bb83cfacdcd154d9450':
  To avoid the JNI memory leaks in video editor codes
2012-08-20 14:50:45 -07:00
wfeng6
c96a7294a4 To avoid the JNI memory leaks in video editor codes
There is a protential memory leak in video editor JNI codes.
When importing so many video clips, the number of local reference
will exceed 512, which will cause the Dalvik virtual machine
crash. The patch will free each local reference when it's no
longer used to avoid memory leaks.

Change-Id: Iecd986c83f05a1103641746d6d43eef0a9c5ee40
Author: Wei Feng <wei.feng@intel.com>
Signed-off-by: Wei Feng <wei.feng@intel.com>
Singed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 40786
2012-08-17 10:22:57 +08:00
Jean-Baptiste Queru
0bf666a875 am 4da3769d: Merge "mediacodec: Don\'t crash if trying to open a codec that does not exist"
* commit '4da3769d30851f0b517a688a5c835715d7d0b0bf':
  mediacodec: Don't crash if trying to open a codec that does not exist
2012-08-13 09:48:24 -07:00
Martin Storsjo
e68323325b mediacodec: Don't crash if trying to open a codec that does not exist
Change-Id: If75e3156517993629f50622a84a9ac573fced815
2012-08-13 08:47:01 -07:00
Insun Kang
333c09945e Changed to obtain a parcel in each notify() call in jni.
Change-Id: I5faf0f5d1fdf76a5b4bd1cff37aa58df79d18e85
related-to-bug: 6785452
2012-07-10 22:23:01 +09:00
James Dong
c6693f6fee Add NOTICE and MODULE_LICENSE_APACH2 to libvideoeditor_jni.so
Change-Id: Ibe37c2e6ede6143dc4e27c6072867bc58aa1c08a
related-to-bug: 6647465
2012-06-12 14:05:14 -07:00
Keun young Park
bb52c49c9a rename exif to exif_jni due to refactoring in external/jhead
- also pull libexif_jni from media_jni

Bug: 6623618
Change-Id: I4f06a4614c5fddcf98d95caff16a2c40f345dade
2012-06-07 10:36:41 -07:00
James Dong
54c40e033e Fixed a buffer overflow issue
The allocated array has one byte less than the required length. Allocating the size one byte larger fixes the issue.
contribution was originally from teng.hong@nxp.com

Change-Id: I3aa2e6b995fd18e30649a34f201646082aab44ee
related-to-bug: 6347465
2012-05-29 18:08:51 -07:00
James Dong
5ddb19e530 Remove dependency of libvideoeditor_jni.so on static libs from video editor engine
related-to-bug: 6502980

Change-Id: I77aa67dac73ecb6200cfc885c426c23d70929e5d
2012-05-16 01:04:40 -07:00
James Dong
f20e4f4b1a Revert "Remove dependency of libvideoeditor_jni.so on static libs from video editor engine"
This reverts commit cbaa821b7f286a54767cc8bc549504ea2ed86e4d.
2012-05-15 14:51:52 -07:00
James Dong
cbaa821b7f Remove dependency of libvideoeditor_jni.so on static libs from video editor engine
related-to-bug: 6328360

Change-Id: Ifc9ffc671f454135db31590805c38f9635e5c815
2012-05-15 00:31:45 -07:00
James Dong
909c4b855a Merge "Improve notifying TimedText by reducing marshall/unmarshalling." into jb-dev 2012-05-11 16:45:19 -07:00
Andreas Huber
b842599e51 Make sure crop rect information is visible from java.
Change-Id: Ib914de3d42349efcd7af301d43bec82a21d24ce5
related-to-bug: 6471684
2012-05-10 11:32:15 -07:00
Andreas Huber
f86374adec Remove SEEK_CLOSEST constant from MediaExtractor, its implementation makes no
sense for the java API.

Change-Id: I3f2eabb5ca5ffb6c1f03141bfd303310111e8774
related-to-bug: 6276111
2012-05-09 11:32:51 -07:00
Insun Kang
8902097bb6 Improve notifying TimedText by reducing marshall/unmarshalling.
o Removes mParcel from TimedText class.
o Converts native parcel into java parcel object directly without
copying to an intermediate byte array.
o JNIMediaPlayerListener::notify checks for Java exceptions, logs them,
and clears the exception state.

related-to-bug: 6405934

Change-Id: I8b82d3cd5b9b3ef8cad27e805202a0e445a88a45
2012-05-09 20:14:09 +09:00
Andreas Huber
3dd7fd08a8 Return codec buffers that are marked as having host endianness.
Change-Id: Iedfd829d108e65ee368909af14ace68b63e0e168
related-to-bug: 6364139
2012-05-08 13:50:45 -07:00
Andreas Huber
60d610bf10 Various changes to Media* APIs requested by the api council.
Change-Id: Iec2f50c99cf5f00a442737231361334e9ab46340
related-to-bug: 6432753
2012-05-03 16:02:29 -07:00
Andreas Huber
b12a539069 New API to set the video rendering mode on a MediaCodec instance.
Change-Id: I6d765bb4cab7bcf29f09364293c24e8a6930078b
related-to-bug: 6364139
2012-04-30 14:46:22 -07:00
Andreas Huber
f2855b3df5 The MediaExtractor can now unselect tracks and has more control over seeking.
Change-Id: I12c28bf31fe9fb4057352999fa38213ae289a417
related-to-bug: 6276111
2012-04-26 10:43:31 -07:00
Dianne Hackborn
d6bdbb8da1 am b4781b9b: am ea8ceca8: am 90577af7: Merge "use utf8_length() instead of local function, isValidUtf8()"
* commit 'b4781b9b489bc8b0049e1e92b7ab00e32b02b12c':
  use utf8_length() instead of local function, isValidUtf8()
2012-04-24 13:50:21 -07:00
Andreas Huber
74a78b0f6e Add the ability to query the amount of cached data to MediaExtractor.
Change-Id: I47ae60bc6fb8d88979c1f0d650b6ac528e811371
related-to-bug: 6364341
2012-04-20 11:57:26 -07:00
Andreas Huber
bfc56f497d DRM errors signaled by the CryptoPlugin are now visible to MediaCodec clients
through a custom exception "MediaCodec.CryptoException".

Change-Id: I30215e9e13bab68abad23e27dcead7c1accd07f1
related-to-bug: 6365261
2012-04-19 13:42:14 -07:00
Jean-Michel Trivi
5cef554cc8 Merge "Add support for scaling mode parameter in Visualizer effect" 2012-04-19 09:09:06 -07:00
Andreas Huber
ab57d03bdb Fix a typo and choose a reasonable default for crypto-mode (0 would be unencrypted)
Change-Id: Ia46a7d7dd405bd569f319a64e43123d802c867d3
related-to-bug: 6275919
2012-04-18 15:59:43 -07:00
Andreas Huber
91befdc0c4 Information required to decrypt buffers is now packaged into MediaCodec.CryptoInfo
New API on MediaExtractor to retrieve a CryptoInfo structure where applicable.

Change-Id: I18edfc9ac56a4544c8f17cba24401b96dacbff7d
related-to-bug: 6275919
2012-04-18 12:19:51 -07:00
Andreas Huber
2b9d6bd092 Make seekTo not throw exceptions.
Change-Id: I9d0469962364b86fbab920e9ac65f468fc630737
related-to-bug: 6276111
2012-04-17 15:02:22 -07:00
Jean-Michel Trivi
e1123e7f36 Add support for scaling mode parameter in Visualizer effect
Add set/get methods to set how the Visualizer scales the captured
 data.

Change-Id: Ia1da00fd5474dd3484b59caf7d1d0a812d0347de
2012-04-17 14:44:23 -07:00
Andreas Huber
2952c5d03c MediaCrypto's constructor can throw RuntimeException.
Change-Id: I5718e9abab0d1465882580e826747d6a78bdefb5
related-to-bug: 6275919
2012-04-17 11:24:11 -07:00
Andreas Huber
07ea426e3a Unhide new media related java APIs.
Change-Id: If0b8201eaca74f51f3499b6ecdfb73088586ee24
2012-04-16 10:14:05 -07:00
Homin Lee
1a8b6c29aa use utf8_length() instead of local function, isValidUtf8()
utf8_length() from libutils returns -1 when source not contains
valid sequence for UTF-8. Fixed to use it and removed the local
function isValidUtf8().

Change-Id: If2834ce1d1ae07fd8526ce8bc5df3fd3f44e85c8
Signed-off-by: Homin Lee <suapapa@insignal.co.kr>
2012-04-13 12:31:48 +09:00
James Dong
f3d9f5d097 Merge "Fix failure from setDataSource(String path) when path is a local file" 2012-04-12 12:08:31 -07:00
James Dong
e00b6f3a57 Fix failure from setDataSource(String path) when path is a local file
o the failure was because the mediaserver does not have read permission to sdcard
o related-to-bug: 6325960,6322913

Change-Id: I4feec01b8165c78563eee8aab69cb24df3244d03
2012-04-12 11:50:17 -07:00
James Dong
0041b5c561 Fix thumbnail generation failure
o Change the impl of MediaMetadataRetriever.setDataSource(String).
  It opens and passes an fd to the media framework
  rather than pass the file path directly to the media server. The change is needed since media
  server does not have read permission to sdcard
o Remove the unnecessary jni method

Change-Id: I5a2f47dde804523d264b588f855ba2575a99c179
2012-04-11 14:56:34 -07:00
Andreas Huber
9e6bcce17d New JAVA API to support submitting encrypted buffers of input data.
Change-Id: Ib0df9a9427b4580946179860495b26f743558597
related-to-bug: 6275919
2012-04-06 12:14:47 -07:00
Andreas Huber
8240d9239d New Crypto JAVA class to facilitate decryption via MediaCodec.
Change-Id: Ic4e395faa84f003793c2804f2badabab9e7f1034
related-to-bug: 6275919
2012-04-04 14:06:32 -07:00
Andreas Huber
0e97fc248e More DRM/crypto support.
related-to-bug: 6275919
Change-Id: I9179c03f1f91f939afcb3b1c6514a200bf586c93
2012-04-03 14:16:07 -07:00
Andreas Huber
5a04bf3955 New API to query available codecs and their capabilities.
Change-Id: I448ba443a96d8fee2bc9179750d57362ed31d9d9
2012-04-02 15:43:42 -07:00
James Dong
ba4d043331 frameworks base Android.mk file changes
Change-Id: I7459b9e959a60751b8fa6e0d893cb2c820c064ce
2012-03-28 11:03:25 -07:00