111 Commits

Author SHA1 Message Date
James Dong
42d66573ff Use PV_PLAYER to handle RTSP streaming
bug - 2594865

Change-Id: Ice5b89b1d53bbc4da033892fe545bdf51ac7267f
2010-04-14 08:57:14 -07:00
Dave Sparks
6c26fe4e8e Fix build. I screwed up a merge. 2010-03-02 12:56:37 -08:00
Dave Sparks
16433e2fe3 Add locking to signal in AudioCache::notify(). Bug 2317844. 2010-03-02 12:35:20 -08:00
James Dong
3d23a61588 Add some space and total memory amount to the memory dump from the media server process. 2010-02-25 10:06:32 -08:00
Andreas Huber
406a18b5b3 Implement legacy behaviour for MediaPlayer's behaviour of starting from the start of the media on a start() call instead of resuming at the current position, if previously reached the end of the stream. Also properly report number of frames played to audio flinger. Finally, delay spawing the queue thread until actually used.
related-to-bug: 2453220
2010-02-18 16:45:13 -08:00
Gloria Wang
190dd57fb8 Merge "Replace Tremor with Tremolo (an ARM optimised version of the Tremor library for doing Ogg Vorbis decompression)" 2010-02-12 17:04:29 -08:00
Gloria Wang
8d00b53cc4 Replace Tremor with Tremolo (an ARM optimised version of the Tremor library for doing Ogg Vorbis decompression) 2010-02-12 16:46:40 -08:00
Andreas Huber
fbb3885024 New API on java's MediaPlayer to suspend/resume a session.
related-to-bug: 2231576
2010-02-12 12:44:10 -08:00
Mathias Agopian
000479f9e3 split libsurfaceflinger_client and libcamera_client out of libui 2010-02-11 13:16:22 -08:00
Andreas Huber
259b7c1c1b Fixing AMR recording code. 2010-02-10 15:04:31 -08:00
Andreas Huber
6ed937ebe9 Implementation of stagefright-enabled MediaPlayerService::decode functionality
related-to-bug: 2359268
2010-02-10 10:20:34 -08:00
Andreas Huber
ba53068245 Merge "Properly implement asynchronous preparation of media playback." 2010-02-08 16:39:24 -08:00
Andreas Huber
6be780ebd4 Properly implement asynchronous preparation of media playback.
related-to-bug: 2413002
2010-02-08 16:23:47 -08:00
Gloria Wang
2c51014050 Use Tremor for sim-eng, and Tremolo for other targets. 2010-02-08 14:37:41 -08:00
Gloria Wang
96827283df Revert "Replace Tremor with Tremolo (an ARM optimised version of the Tremor library for doing Ogg Vorbis decompression)"
This reverts commit 2f46c062b05254671aec96a98b431f91ae7b270c.
2010-02-05 18:50:17 -08:00
Gloria Wang
2f46c062b0 Replace Tremor with Tremolo (an ARM optimised version of the Tremor library for doing Ogg Vorbis decompression) 2010-02-04 17:32:56 -08:00
Mathias Agopian
1875b7e2cf Don't use MemoryDealer in MetadataRetrieverClient as it's not necessary.
Use a MemoryHeapBase directly instead.
2010-01-29 17:16:30 -08:00
Mathias Agopian
6faf7893b6 Simplify the MemoryDealer implementation
At some point the implementation became complicated because of
SurfaceFlinger's special needs, since we are now relying on gralloc
we can go back to much simpler MemoryDealer.

Removed HeapInterface and AllocatorInterface, since those don't need
to be paramterized anymore. Merged SimpleMemory and Allocation.
Made SimplisticAllocator non virtual.

Removed MemoryDealer flags (READ_ONLY, PAGE_ALIGNED)

Removed a lot of unneeded code.
2010-01-29 14:51:06 -08:00
Andreas Huber
433c9acaf7 Support the specification of additional HTTP headers in the creation of a DataSource.
related-to-bug: 2393577
2010-01-28 13:04:28 -08:00
Andreas Huber
2564300936 API Extension: Support for optionally specifying a map of extra request headers when specifying the uri of media data to be played.
related-to-bug: 2393577

Original change by Andrei Popescu <andreip@google.com>
2010-01-28 11:52:43 -08:00
Eric Laurent
0986e7907f Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync
Added getRenderPosition() API to IAudioFlinger to retreive number of audio frames
written by AudioFlinger to audio HAL and by DSP to DAC.

Added getRenderPosition() API to AudioHardwareInterface to retreive number of audio frames
written by DSP to DAC.

Exposed AudioTrack::getPosition() to AudioSink() to make it available to media player.

Removed excessive log in AudioHardwareGeneric.
2010-01-26 18:40:39 -08:00
Andreas Huber
996dddff64 Support for audio recording into AMR NB/WB files as well as audio tracks in MPEG4 files.
related-to-bug: 2295449
2010-01-26 09:10:33 -08:00
Andreas Huber
2cb5c9c633 Special-case .wmv and .wma metadata retrieval and playback to use PV if available.
related-to-bug: 2381874
2010-01-21 10:31:05 -08:00
Marco Nelissen
e274db1efd b/2353646
Fix music visualizations to also work with audiotrack callbacks, which
stagefright uses. This slightly changes the way the data is stored,
since before we were relying on the buffers being written always
being at least 4K, whereas the callbacks are generally for smaller
amounts of data. Now we append all the data to a big circular buffer,
then return chunks of that buffer for visualization. When there are
multiple things playing at the same time, this will give the wrong
result, but (1) that was the case before as well, and (2) will be
fixed once we start visualizing the mixer output instead of the
mixer inputs.
2010-01-12 10:27:04 -08:00
Andreas Huber
e4a838051d Reorganize some of the stagefright implementation related to metadata. 2010-01-08 11:54:36 -08:00
Andreas Huber
67aee053ba Use stagefright for http streaming if the right property is set. 2010-01-05 09:27:02 -08:00
Andreas Huber
7782fdf5b7 Make metadata support through stagefright property dependent until it's ready. 2010-01-04 15:02:02 -08:00
Andreas Huber
6a3a018f91 Disable HTTP playback and metadata support in stagefright, use PV instead. 2009-12-17 13:51:37 -08:00
Andreas Huber
1314e73786 AwesomePlayer now renders either remote (IOMXRenderer) or locally depending on what kind of decoder was instantiated. Split off color conversion code into its own shared library. 2009-12-14 14:18:22 -08:00
Dave Sparks
9472b35ba1 am 14f89404: Fix media player decode function. Bug 2317821.
Merge commit '14f8940472217e8b0164d8f213679710d623d528' into eclair-mr2

* commit '14f8940472217e8b0164d8f213679710d623d528':
  Fix media player decode function. Bug 2317821.
2009-12-10 17:57:10 -08:00
Dave Sparks
14f8940472 Fix media player decode function. Bug 2317821.
There was a recent change to OpenCORE that broke the MediaPlayer::decode()
function for all OpenCORE supported formats (MP3, AAC, and AMR-NB/WB). The
affect is that SoundPool is unreliable for all of these formats. This patch
changes the logic in the AudioCache object that processes messages from the
media player. The old logic was fragile. This change should make it more
robust against changes.
2009-12-09 20:36:31 -08:00
Andreas Huber
bfb9fb143b Refactor MediaScanner. Some steps on the way towards being able to build the tree without OpenCore. 2009-12-03 13:21:54 -08:00
Dave Sparks
b904c2a452 Remove old hack A/V sync hack that is no longer needed. 2009-12-03 10:13:32 -08:00
Dave Sparks
ebcb7c3167 am 8424ec32: Merge change I0f9a53d4 into eclair
Merge commit '8424ec323b2bc38887370c75e2c1fcd84bcdb013' into eclair-mr2

* commit '8424ec323b2bc38887370c75e2c1fcd84bcdb013':
  Set metadata retriever thread group to the caller's group.
2009-11-23 19:58:00 -08:00
Dave Sparks
0f9a53d499 Set metadata retriever thread group to the caller's group.
This patch modifies the native binder interface to the metadata
retriever to pass the caller's thread group across the binder
interface. On the server side, the thread scheduler group is
set to the caller's scheduler group temporarily and restored
after the request has completed. This patch also reverts a
previous patch where the priority of the thread was forced to
a low priority foreground thread.

This should give apps more control over the priority of their
metadata retrieval, particularly allow background process to
run without hogging the CPU.
2009-11-23 16:51:15 -08:00
Andreas Huber
27366fc954 Squashed commit of the following:
commit 1efc38dc3c33fef57b759002db3965ed07a28cb0
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 19 14:36:14 2009 -0800

    Sending the SEEK-COMPLETE notification temporarily broke seeking backwards in time behaviour. This is now fixed.

    Also, get rid of the semi-random delay after posting buffers to surface flinger in favour of delaying the buffer release until the next frame is displayed.

commit 51973062eb5ee63fd64b845d72bac517cc3369cf
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 14:01:43 2009 -0800

    Fix one more unit test, properly send seek-complete notification only after seek actually completed.

commit cb22250b34b1fcfe1bf459723a761fd003950229
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 12:31:36 2009 -0800

    Fix seek-while-paused in AwesomePlayer, revert to using FileSource if MmapSource fails.

commit 25eb9241138ddf7bb27ce90657116c5f8a94d880
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 12:30:40 2009 -0800

    Support seeking and duration in AMRExtractor, assuming all frames are the same size.

commit 44192f2ebb7ea3bbd3ba5910025692dbc6a08faa
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 10:21:44 2009 -0800

    MediaPlayerImpl is dead, long live AwesomePlayer.

commit c5b52d3c0674f5dc94db506afbce52401cceddac
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 18 09:42:23 2009 -0800

    New implementation of the stagefright mediaplayer.
2009-11-23 10:44:30 -08:00
Andreas Huber
ea6a38c63b Squashed commit of the following:
commit 333057b355f8c260c549553b9a0634755c838b6a
Author: Andreas Huber <andih@google.com>
Date:   Fri Nov 13 15:35:48 2009 -0800

    Some more tweaks to AVC encoding on sholes.

commit 9981d0ee52ec5b8b0182aae733d1571e3ebb8390
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 12 16:36:57 2009 -0800

    Support for avc encoding, including sholes specific tweaks to pick the right colorspace for the camera to not require transcoding.

commit 5ba0ebbbd4efca51f3ae1f60e2ca31e7d2cf136d
Author: Andreas Huber <andih@google.com>
Date:   Wed Nov 11 09:50:03 2009 -0800

    Enable actual (camera) video-only recording using h.263 or mpeg4 encoding.

commit 3fd59c3526a37fe7c696f4a978925d1831c09313
Author: Andreas Huber <andih@google.com>
Date:   Tue Nov 10 14:57:48 2009 -0800

    Allow switching between the PV recorder implementation and one supported by stagefright.

    This is controlled through the property "media.stagefright.enable-record".
2009-11-16 15:43:38 -08:00
Andreas Huber
d533ca61fa am cfe45c77: Merge change I96c4d4b3 into eclair
Merge commit 'cfe45c775ddb5e48bf556aee7422298260eb4fd8' into eclair-mr2

* commit 'cfe45c775ddb5e48bf556aee7422298260eb4fd8':
  Fix for random audio output failures, properly dup() the file descriptor in IMediaPlayer::setDataSource to assume ownership as the caller will otherwise close it.
2009-11-10 12:29:34 -08:00
Andreas Huber
da440f137f Fix for random audio output failures, properly dup() the file descriptor in IMediaPlayer::setDataSource to assume ownership as the caller will otherwise close it. 2009-11-10 12:26:26 -08:00
Andreas Huber
dcaa220ff5 DO NOT MERGE: Squashed commit of the following:
commit 08259dd3dc9026887f9bbfedaf45866eb56ea9bc
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 12:02:31 2009 -0800

    DO NOT MERGE: Use PV for metadata extraction even if stagefright is used for playback.

commit 991832fe4dc012e51d3d9ed8d647c7f09991858f
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:24:11 2009 -0800

    DO NOT MERGE: Do not assert if we encounter OMX_StateInvalid. All bets are off though.

commit cec45cf302d9218fe79956cbe8a462d7ca3a10bb
Author: Andreas Huber <andih@google.com>
Date:   Mon Oct 26 16:11:54 2009 -0700

    DO NOT MERGE: When freeing an OMX node, attempt to transition it from its current state all the way to "Loaded" in order to properly free any allocated buffers.

commit 34a1e885ef9113d68acbc26d36fcc47fdebbed84
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:10:49 2009 -0800

    DO NOT MERGE: Fix heap corruptin in OMXNodeInstance.

commit 5a47f7439a1298b330541a7e4e647a8b44487388
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:08:19 2009 -0800

    DO NOT MERGE: Fix seek-on-initial-read behaviour of OMXCodec.

commit 45bed64722501b9f411a2940aff5aff4cc4d2e98
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:02:23 2009 -0800

    DO NOT MERGE: Renaming string.h to stagefright_string.h to avoid conflicts.

commit 6738e306a50196f31a73d4fc7b7c45faff639903
Author: Andreas Huber <andih@google.com>
Date:   Thu Oct 15 13:46:54 2009 -0700

    DO NOT MERGE: Reimplement the OMX backend for stagefright.

    Besides a major cleanup and refactoring, OMX is now a singleton living in the media server, it listens for death notifications of node observers/clients that allocated OMX nodes and performs/attempts cleanup.

    Changed APIs to conform to the rest of the system.
2009-11-05 13:06:17 -08:00
Marco Nelissen
1166ff76eb am 1d9246e8: Merge change Id095e180 into eclair
Merge commit '1d9246e8bb8de624e14c55dce57e93da18cfd7a8' into eclair-mr2

* commit '1d9246e8bb8de624e14c55dce57e93da18cfd7a8':
  Make sure the visualization stops immediately when sound stops, instead of continuing for a fraction of a second.
2009-11-02 14:41:28 -08:00
Marco Nelissen
758613de28 Make sure the visualization stops immediately when sound stops, instead of continuing for a fraction of a second. 2009-11-02 13:55:04 -08:00
Gloria Wang
9cf962809d am 3a814141: Merge change Iee0486e2 into eclair
Merge commit '3a8141416a0b1d517d4729eba4bcf914c468e20b' into eclair-mr2

* commit '3a8141416a0b1d517d4729eba4bcf914c468e20b':
  Dump media recorder PID in dumpsys media.player, and fix minor bugs.
2009-10-29 19:35:16 -07:00
Gloria Wang
608a2630bb Dump media recorder PID in dumpsys media.player, and fix minor bugs. 2009-10-29 15:46:37 -07:00
Android (Google) Code Review
9d73409e76 Merge change Ic5e3d73f into eclair-mr2
* changes:
  LOG_ASSERT needs a message.
2009-10-29 11:09:53 -04:00
Patrick Scott
c5e3d73f92 LOG_ASSERT needs a message.
This fails to build when asserts are turned on.
2009-10-29 08:31:36 -04:00
Dave Sparks
5a7691f0e1 am e8543418: Merge change I7c0d20a7 into eclair
Merge commit 'e8543418783f8f8f9a6bafdaa1dd6289661eac85' into eclair-mr2

* commit 'e8543418783f8f8f9a6bafdaa1dd6289661eac85':
  Run the metadataretriever at background priority. Bug 2187133.
2009-10-28 11:38:08 -07:00
Andreas Huber
27123468b3 Use a simple replacement for String8 that allocates its storage beforehand to avoid reentering the heap while we're examining it (leak checker). 2009-10-27 15:50:04 -07:00
Dave Sparks
7c0d20a753 Run the metadataretriever at background priority. Bug 2187133.
This change forces metadata retreiver threads to background priority.
Uses an inner class to encapsulate the priority change so that it
automatically restores priority when returning to the client.
2009-10-26 16:28:26 -07:00
Andreas Huber
9a12baf929 New API to instantiate a MediaExtractor given a URI and optional MIME type.
Also DataSources now must provide a method initCheck()
and DataSource::reat_at has been renamed to readAt to conform to
standard API naming guidelines.
2009-10-23 10:35:08 -07:00