269 Commits

Author SHA1 Message Date
Andreas Huber
5b7ced6a4e Support passing headers to MediaMetadataRetriever's setDataSource API
Change-Id: Ib1a5c08fc5034cac05034db27007a35c9b660b26
related-to-bug: 3506316
2011-03-21 11:13:59 -07:00
James Dong
be3c82f25d am 782ffe91: am 9c0c5b56: am 2f1f2248: Fix missing AOSP copyright headers for a bunch of media framework files
* commit '782ffe91da665c6b1fb9e297faa6e0dc6035f40c':
  Fix missing AOSP copyright headers for a bunch of media framework files
2011-03-17 12:38:58 -07:00
James Dong
2f1f2248c8 Fix missing AOSP copyright headers for a bunch of media framework files
bug - 4119349

Change-Id: If5924e16a5f596d5d73d9beb66eaf5ac9a6f0e50
2011-03-17 11:10:40 -07:00
James Dong
ed73246b32 Add memory leak tracking/debugging code to drm server
bug - 4099038

Change-Id: I6c048eaf3d7f34bc144b8daaa5fdef1ed474af66
2011-03-14 18:48:19 -07:00
Gloria Wang
396f6de660 Merge "- To track the usage of all audio output devices - 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()" 2011-03-02 19:51:04 -08:00
Gloria Wang
9b3f1521b5 - To track the usage of all audio output devices
- 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
2011-03-02 16:53:24 -08:00
Andreas Huber
669ad13de9 Allow optional specification of a PTS timestamp when signalling a discontinuity.
If present, rendering will be suppressed until reaching the timestamp.

Change-Id: Ic64bdf4225063c5a4d042ea9809960b843a46d19
related-to-bug: 3489454
2011-03-02 15:38:32 -08:00
Andreas Huber
a28f6f11f2 Merge "Suppress the logging of URLs when in incognito mode." 2011-02-24 14:49:10 -08:00
Andreas Huber
53182c439c Suppress the logging of URLs when in incognito mode.
Change-Id: Ib951b495eae15669e160ef54686eab0eeb9b366a
related-to-bug: 3336575
2011-02-24 14:42:48 -08:00
Glenn Kasten
373ed6fc79 Merge "Bug 3438258 Add SurfaceTexture as MediaPlayer sink" 2011-02-24 12:37:02 -08:00
Glenn Kasten
cc562a3576 Bug 3438258 Add SurfaceTexture as MediaPlayer sink
This change enables the use of a SurfaceTexture in place of a Surface
as the video sink for an android.media.MediaPlayer. The new API
MediaPlayer.setTexture is currently hidden.

This includes:
 - New Java and C++ interfaces
 - C++ plumbing and implementation (JNI, Binder)
 - Stagefright AwesomePlayer and NuPlayer use ANativeWindow
   (either Surface or SurfaceTextureClient)

Change-Id: I2b568bee143d9eaf3dfc6cc4533c1bebbd5afc51
2011-02-23 15:02:56 -08:00
Gloria Wang
62e05a6159 To collect the total usage time of encoders in the media recorder
Change-Id: I94c9c94dec6bd714a3ebf96b4465b94f069e55b8
2011-02-23 13:20:21 -08:00
Gloria Wang
d211f41f76 - Add method in MediaPlayerService to collect and pull
codec usage (duration) for the battery app
- Collect MediaPlayer decoding usage data

Change-Id: I0ef4e32b6a041ba1fe73c19f9c67185c61d03965
2011-02-22 22:42:05 -08:00
Andreas Huber
d6c421f1a0 Remove legacy, AwesomePlayer-based http live implementation.
Change-Id: I455d0faa5612dcd4d2bb6f2b3c7b64a1caaabf69
2011-02-16 09:19:40 -08:00
James Dong
75fb238b3f Should reset errno to 0 before calling strtoll().
bug - 3431238

Change-Id: I855847209d2e022242b8eb62985759922ab94779
2011-02-08 15:41:58 -08:00
James Dong
5f3ab06e90 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
2011-01-26 12:11:22 -08:00
Andreas Huber
19922adceb Some tweaks to HTTP live / nuplayer behaviour
- play audio-only streams again
- workaround for malformed streams that switch PIDs across bandwidths
- attempt to pick a different bandwidth stream if the previously chosen one appears
  to be malformed/unsupported.

Change-Id: I426d0a40dc725aa242f619d4c9d048b69aca55c9
related-to-bug: 2368598
2011-01-21 10:34:40 -08:00
Andreas Huber
601fe0e595 Implement missing pause/resume support for NuPlayer.
Change-Id: Ia3f1ce521dd4b70e134ef03aa7c9db8e8d39a134
related-to-bug: 2368598
2011-01-20 15:23:04 -08:00
James Dong
44b004b0c2 Eliminate recording sound by starting the video track before audio track.
Due to the variable delays in the system, the recording sound can still be heard
if the audio track is started early. This happens even after we suppress a relative
long period of initial audio for a recording session. By starting the video track
before the audio track, we effectively play the recording sound earlier.

bug - 3371141

Change-Id: I2cccf77eae953d96827fc080c618b1d962445c26
2011-01-20 06:58:16 -08:00
James Dong
5fb60c7af2 Use metadata in video buffers for timelapse video recording by default to eliminate memcpy
bug - 3361771

Change-Id: Ib37ffe4be8edc8708baa76b3507b6f11372536d9
2011-01-18 21:33:58 -08:00
James Dong
183fa14b47 Fix the sluggish preview during timelapse video recording because software encoder is used.
bug - 3361771

Change-Id: Ic5344e9eabe7f1b82910b65b4260e4ad8dc51c32
2011-01-18 14:28:37 -08:00
James Dong
54815a78af Add audio encoding parameters check
bug - 3345296

Change-Id: If3f33955f5473b0c5ad9c9b85f8b5cb21ddd7e65
2011-01-12 20:45:16 -08:00
James Dong
11eab056dd Publish MediaMetadataRetriever.java as public API
o Removed setMode() methods and related mode constants
o Removed some of the unused the metadata keys
o Updated the javadoc

o part of a multi-project change.

bug - 2433195

Change-Id: I5ed167f1fd6a53cb143b7dc385b149431d434438
2011-01-12 14:14:11 -08:00
Andreas Huber
7caa130a98 NuPlayer now properly sends MEDIA_SET_VIDEOSIZE notifications.
Change-Id: I99b4223ad6ecfd8839a3c0e737fef3165565d76d
related-to-bug: 3336496
2011-01-10 10:38:31 -08:00
Andreas Huber
d7069ca0bc Use NuPlayer for HTTP live streaming playback by default.
Reversed the property logic, set media.httplive.disable-nuplayer to true to revert

Change-Id: I1057940667aaab56bb75c9ea15c2cdcab736f3c6
2011-01-06 14:14:56 -08:00
Andreas Huber
847551cff3 Some more fixes regarding HTTP live in NuPlayer.
Change-Id: I9e29615fa8ee6c7bd4189373a75c20caef3fd2b1
2011-01-05 16:24:27 -08:00
Andreas Huber
08e10cb404 Seek/Duration support for completed http live streams in NuPlayer.
Change-Id: I55bbe75d87140c07b1927d14ad24130fce803463
related-to-bug: 3321475
2011-01-05 14:48:31 -08:00
Andreas Huber
cbeaca7a81 Properly shutdown the decoders on a reset() in NuPlayer's implementation.
related-to-bug: 3321470
Change-Id: Ida6d2171c5a3a407188d4633602b764f8fe7086a
2011-01-04 14:07:58 -08:00
Andreas Huber
54e6649e4c Squashed commit of the following:
commit eaeaa2672d4e0a82891493b2bde8bdd0c0e79a1b
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 23 10:26:48 2010 -0800

    Remove lowest bandwidth stream if using the legacy player.

    Change-Id: I2f885e26344996de9152f8fda9fd6bdef89bf953

commit 7d652972615b2750fd8f1c21b9fab0e136df2b82
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 23 10:14:36 2010 -0800

    Don't clear the packet source's format for legacy discontinuities.

    Change-Id: I9bd5a21b9bd28043ad38bd0658ccc8eda3c1079a

commit 2b18a45aac17cbfe1aa089d0f6510957d438dd64
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 23 10:13:55 2010 -0800

    Use NuPlayer for HTTP live streaming based on runtime property.

    adb shell setprop media.httplive.enable-nuplayer true

    Change-Id: I22738df3403985dc8e6992b1ab5da5747309f773

commit 50d899fb7b9ea52c3994b0a58e993998d926aeed
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 16:25:22 2010 -0800

    Make ACodec a lot less verbose.

    Change-Id: I94c7e499b61032321ffaf999f5ad2c913cde6a48

commit b19e1740cb4d02990a56844654b5d019987c6405
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 16:22:22 2010 -0800

    Wait until we have fresh codec-specific-data before instantiating the decoders

    after a discontinuity involving a format change.

    Change-Id: I7bcf9b5ae3319f08bf8978a117e8ee5220902e37

commit 06428c006906c9099e430aface3b439ff1d36ecc
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 15:20:38 2010 -0800

    Disable random seeks in the streaming tool for now.

    Change-Id: Ie86fde422dcfc4b2c7a01be51a193fda9c88cd71

commit e19db68f3bea8a61c191f60f6940f30e3a0d5f1b
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 15:20:27 2010 -0800

    Tweak HTTP live parameters.

    Change-Id: If4b71e12485facc523a8a43d8213d0feb190daab

commit 1e9942791538c2256b579d96c6c04264b0d8b087
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 14:48:23 2010 -0800

    Enable http live streaming through NuPlayer for http URLs containing the string m3u8

    Change-Id: I1691fe12ae8f1507fe3673313959cd50bc324624

commit 4c33f96a6e499ee0efe0e70b687094430cb7c1c0
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 14:40:27 2010 -0800

    Support for HTTP live streaming in NuPlayer.

    Change-Id: Iacba1c3ebaeb8d3b972185deaf4cff18c8009c54

commit ddf705ce553708bc5b13d89a878484cf839bd674
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 13:42:47 2010 -0800

    StreamingSource now a subclass of abstract NuPlayer::Source

    Change-Id: Ia6c7c639628910b9d1f37decc55da48b07a70de3

commit 9e04a8406b1882a8e3fdeb7b4d52db5ae70b970a
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 13:33:52 2010 -0800

    Refactor media data sourcing to NuPlayer::Source.

    Change-Id: I1db9fb08c4e527bf7b19c29978cf342c2b0a0bc9

Change-Id: I9610a097481dda58f22142eacda3ac2dba0b63f9
2010-12-23 10:27:40 -08:00
Andreas Huber
222e689267 Distinguish discontinuities w/ a format change from those without.
Shutdown decoders as needed in anticipation of a format change, otherwise just flush.

Change-Id: Ieb04f8aa8658569b091409c4903075fd496e5abb
2010-12-22 10:03:04 -08:00
Andreas Huber
41c3f74048 Squashed commit of the following:
commit 63be8ceb8b2354fb997a277c0092abae015ecf10
Author: Andreas Huber <andih@google.com>
Date:   Fri Dec 17 13:45:34 2010 -0800

    Enable handling of discontinuities that involve potential format changes.

    Change-Id: I21848a113db8764abb54bdcf302b0923253eaf4d

commit d18a7f80ec09af382026809263dcbbfa9e7a9ec8
Author: Andreas Huber <andih@google.com>
Date:   Fri Dec 17 13:45:01 2010 -0800

    Signal whether or not a format change occured as part of the discontinuity.

    Change-Id: I06e64f542f4369549c9cebbb892dc612346ae43d

commit c400adbd5fdbd65cfef7aed9ec65bcaace4bb69b
Author: Andreas Huber <andih@google.com>
Date:   Fri Dec 17 13:44:46 2010 -0800

    A little more instrumentation of ACodec

    Change-Id: I07f4aeccbbd15cdd9f80f48c3f92ee984ef6d92b

commit 1d802ee01f47b3cdc5b89502cec7fbb595e197a3
Author: Andreas Huber <andih@google.com>
Date:   Fri Dec 17 13:43:58 2010 -0800

    Only sync audio/video queues if both types of media are actually present.

    Change-Id: Ic88edf9bb1ebd4034c08747cce9877a4e28e0d35

commit e402da39d9a4d8b75653a78f728e20a3ef0fb497
Author: Andreas Huber <andih@google.com>
Date:   Fri Dec 17 13:42:24 2010 -0800

    Disable the random seek for now.

    Change-Id: Iddd597b546e2f229e88214f9bdd6452bb188105e

Change-Id: I27c4d9ba916080be94ce6117dbb095e9022ed62b
2010-12-21 10:22:33 -08:00
James Dong
26ea64c744 Backward-compatibility max file size support, ignoring 0 or negative file size limit
bug - 3281011

Change-Id: I2d3ae4565602e2374ca794c5e8d0837ad33cf0e8
2010-12-20 11:59:17 -08:00
Andreas Huber
687b32d83e Properly announce decoder output format changes, make sure AMessage::dup does.
Change-Id: Ia77f6b6d5e5c5055583740dfe876b8a3c22be9b6
2010-12-16 10:08:26 -08:00
Andreas Huber
a15874665f Initial support for a true streaming player for mpeg2 transport streams.
Change-Id: I153eec439d260a5524b21270e16d36940ec3161a
2010-12-15 15:18:26 -08:00
James Dong
08800f3fdc First step towards renabling Timelapse video recording
Change-Id: I93836b066fb69d5152d3774546a9935057a1f12f
2010-12-09 15:37:04 -08:00
James Dong
5df53fe2f0 Remove check if the target video resolution is not supported by CameraSource
and clean up Camera is CameraSource could not created.

bug - 3254411

Change-Id: I43497c450e7007de5ce027e2912b1421119e8887
2010-12-05 16:08:30 -08:00
James Dong
faf09ba940 Prepare for publishing MediaMetadataRetriever as public API
step one:
o replaced captureFrame with getFrameAtTime
o removed getMode

bug - 2433195

Change-Id: I38a8cecef29014692f0b08b8818326e3ebb40a12
2010-12-03 15:32:47 -08:00
James Dong
6312dd6d2b If camera source uses the metadata, we must use HW encoder
Software video encoders are not able to deal with non-YUV metadata in the video buffer sent from camera

bug - 3242213

Change-Id: I97361ed88b2a687190e5129459011afff7f32c2d
2010-12-02 14:50:07 -08:00
James Dong
6785699f19 am 80639875: am d4c5478a: Merge "Be conservative in estimating the file size limit." into gingerbread
* commit '806398755fdc63438b607856574e5b885ad98e6b':
  Be conservative in estimating the file size limit.
2010-12-02 10:24:24 -08:00
James Dong
5cdcf16ec7 Be conservative in estimating the file size limit.
bug - 3045580

Change-Id: Ifdffa354b9433639c3f246a0eb581ef14af1e797
2010-11-30 18:18:08 -08:00
Andreas Huber
52b52cdfb7 Support streaming data across binder boundaries.
Change-Id: Ifbac61406dcb81343765f99ccba08bd90f9274cc
2010-11-23 14:46:13 -08:00
Andreas Huber
1bb0ffd098 Squashed commit of the following:
commit 0870f7bdd10a7cd36087d723d1957d8e1b967ca7
Author: Andreas Huber <andih@google.com>
Date:   Mon Nov 22 12:57:04 2010 -0800

    set_surface_crop doesn't seem to work right yet, stop using it in the SoftwareRenderer.

    Change-Id: If0a24f78b7810a6cecaa82eb4f23d0f90c22cc42

commit 4767b52bee3a54ae117a8708d6832276a44e6a6a
Author: Andreas Huber <andih@google.com>
Date:   Mon Nov 22 11:14:57 2010 -0800

    info->mMediaBuffer may still be NULL at this point...

    Change-Id: I25a71569015b1bb87f1ea7efff7588958774426f

commit 0cef79874e1f1ddb10b7402177a87d3cffc7de92
Author: Andreas Huber <andih@google.com>
Date:   Mon Nov 22 10:55:12 2010 -0800

    QCOM's YVU420 color format conversion has now been tested.

    Change-Id: I7fef4b642a928af15d42f006f7cdc107d5ff1d67

commit 84fe05a6c969ede0ce8a85a530e110afca07c7a7
Author: Andreas Huber <andih@google.com>
Date:   Mon Nov 22 09:59:50 2010 -0800

    Removed remaining traces of suspend/resume. Proper reporting of video dimensions based on cropping rectangle.

    Change-Id: Ib238b80cbc1f19e7d312f2422eb5e9ab6b06b1bc

commit 50970cdc837c5c498bcf0cb61b436196ca9e2ef7
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 16:11:06 2010 -0800

    Revamped Software Renderer respects the crop rectangle.

    Removed obsolete ADRENO support code.

    Change-Id: I984cbc8a99c4d97e09e7d1b1292099c88b9ae535

commit 8abbc6a5608bff650f968540f24a2eab75f254ed
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 16:10:41 2010 -0800

    The metadata retriever now respects the crop rectangle while capturing a video frame.

    Change-Id: Id3377176060086d16717f62c77ce26fabe899050

commit 2d42e4466609d304e88bd2cdd6eb7b297340cc21
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 16:09:50 2010 -0800

    Changed ColorConverter APIs to be more general.

    Clients can now refer to crop rectangles in both source and destination.

    Change-Id: Ief151d736818396d0389ec04e7df5650e3ad7c04

commit 273184303d54a54febd3e9c3dd4df30507ea78b5
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 15:04:06 2010 -0800

    The stagefright commandline tool now writes the extracted video frame to /sdcard/out.jpg

    Change-Id: Ieb2ab3fda7a7cd9294beccb8db0eed75096eeef4

commit 2d43390328cadf4ba94c1c3c02e4fb30baa29690
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 14:36:55 2010 -0800

    The AVC software decoder now properly advertises the cropping rectangle.

    Change-Id: Idb7a8a7e2fde5740f0fc34b7e8c92eca2577104b

commit 9a7ed23c2fac8ce19dce7a34a603acee945a89f6
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 13:40:39 2010 -0800

    OMXCodec now signals a format change if the cropping rectangle changes.

    ...and puts the cropping info into its output format.

    Change-Id: I3ffbd8e877ba286fe06a82c536ef20d92548d2e2

commit efe0323947029df1c502599ccc288c8d676dfd31
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 19 11:29:39 2010 -0800

    Stagefright's MetaData object now supports rectangle items.

    Change-Id: I5667bb5ee6622c76104b99fb57f60abb802a8504

Change-Id: I27cb78f2c5e0353f95fdfc5cb53991949ed75b70
2010-11-22 14:05:21 -08:00
James Dong
2747e0e07f Removed uncessary FILE structure pointer for I/O
o also move the fd owner from caller to callee in the Writers

Change-Id: I510ccfdd0fcc58f1777fea4ed1349fd251852c65
2010-11-19 10:48:22 -08:00
Andreas Huber
c23dabfb20 Remove all traces of legacy renderer support in stagefright.
Change-Id: I17b8e0dbf53fca37c96830c41131b4bc0c24ca6d
2010-11-16 13:05:53 -08:00
James Dong
8ec2d9add9 Remove legacy PV stuff
Change-Id: I60ffea7c65592df4b3a80c590c863f1f79b371fd
2010-11-15 08:36:42 -08:00
James Dong
aac193cf38 Separate the key for audio sampling rate and video frame rate in MetaData.h
Change-Id: Ia33befaa7e6df8762703002d01aa79c04f15f040
2010-11-11 22:11:20 -08:00
James Dong
5d0b783c44 Fix uninitialized variable
o This was missed while the rotation patch was hand merged.

Change-Id: I4016f9fb9cd54c5e853da15bbaaa50b1d1dac8c8
2010-11-10 14:07:13 -08:00
James Dong
b9d7e01eb8 Rotation support
- We only support 0, 90, 180, and 270 degree clockwise rotation

- Some players are known to ignore composition matrix in the MP4 file,
  although this is part of the MP4 file standard.
  Both QT and YT are supporting the rotation

The original patch (65a73f4e8c79d05c0d9001b660325748d4ecf37b) was not merged.
The only change I made is to reuse the same kKeyRotation in MetaData.h;
and thus do not neeed to use kKeyRotationDegree.

Change-Id: Ib328716d4842201c4adf57e4ddfe1f1ac1ae4d8a
2010-11-09 11:48:29 -08:00
James Dong
d1959717c2 am c4a2ead2: am d2d62d04: Merge "Support extracting thumbnail from rotated video tracks" into gingerbread
* commit 'c4a2ead2aa5ab4403553e4956ba71b44782f0c84':
  Support extracting thumbnail from rotated video tracks
2010-11-08 19:25:41 -08:00
James Dong
53ebc72fd8 Support extracting thumbnail from rotated video tracks
Change-Id: Ife0a2536aaac5ff1efdf1035b9d2c892773ee16c
2010-11-08 16:52:59 -08:00