346 Commits

Author SHA1 Message Date
Steve Block
f68633da3c Rename LOG_ASSERT to ALOG_ASSERT
Change-Id: Ie2c7ea6560656d65bad791a61996174c75677517
2012-01-19 14:45:08 -08:00
Steve Block
c6aacce371 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
Change-Id: I1de629b4632a4b3187ca1a28d6416daccd35f924
2012-01-19 14:45:03 -08:00
Steve Block
a51f0e707f Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)
Change-Id: I8fbdfa7a7581f481968dbb65aa40f7042936d7cb
2012-01-19 14:44:59 -08:00
Steve Block
933e856150 Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)
Change-Id: I26f76452ac49e2890b14d133c065493d8df0fb4a
2012-01-19 14:44:56 -08:00
Steve Block
1afd5bab4e Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)
Change-Id: I44f267700356967dc51e8f85ebf457dc85cfb229
2012-01-19 14:44:50 -08:00
Steve Block
06ade6ae1b Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)
Change-Id: I5321ebd12e9c6248a108529e82c4e1af2a4405e3
2012-01-19 14:44:31 -08:00
Andreas Huber
68f592a821 Merge "Don't perform RTSP seeks right away but queue them for 200ms" into ics-mr1 2011-12-08 13:33:16 -08:00
Andreas Huber
21902a8a48 Don't perform RTSP seeks right away but queue them for 200ms
and only execute the last one.

Change-Id: I9ab342396ec9c9c03624a4b0306d1e180ceca000
related-to-bug: 5732960
2011-12-08 13:04:50 -08:00
Andreas Huber
f6ae711450 Fix Bitreader "putBits" implementation, make sure we emulate timestamps
if we don't receive npt time mapping from the rtsp server (i.e. live stream)

Change-Id: I5147d665bd90c9a303ad6ffdafbf770f930f917c
related-to-bug: 5660357
2011-12-08 12:27:47 -08:00
Andreas Huber
564fee3666 Merge "Make sure we can properly shutdown even if" into ics-mr1 2011-11-29 14:09:10 -08:00
Andreas Huber
351143fb0e Merge "Updated (internal) API for IStreamSource to signal discontinuities" into ics-mr1 2011-11-29 14:08:45 -08:00
Andreas Huber
a10613fea8 Updated (internal) API for IStreamSource to signal discontinuities
Change-Id: Idd4b9d8e7cec16b3e3c91c70e75144d42be30f96
related-to-bug: 5553055
2011-11-29 11:59:10 -08:00
Andreas Huber
66a051af37 Finer granularity discontinuity support.
No clients can signal a format change on either audio or video track (or both)
and a time discontinuity (timestamps changed) independantly.

Change-Id: I3e6cf4e7c260e85759879d61a9b517f68431c22f
related-to-bug: 5553055
2011-11-28 16:45:13 -08:00
Andreas Huber
551aeac336 Make sure we can properly shutdown even if
a) one of the two decoders has a pending discontinuity
b) the renderer holds on to all output buffers for that decoder
c) the renderer is paused

if all three conditions are met the decoder won't ask for more input data
and therefore never see the discontinuity.

To avoid this we briefly resume the renderer just before shutting down.

Change-Id: I9e08af2a1eb4298d1cd00497d6aa33f4ad184e9a
related-to-bug: 5655016
2011-11-28 16:27:35 -08:00
Glenn Kasten
f2c2b1c484 am 19998120: Merge "Bug 5478024 drop after decode if can\'t drop before" into ics-mr0
* commit '19998120f53caceb620f138c6eea182f1e693660':
  Bug 5478024 drop after decode if can't drop before
2011-11-09 16:41:19 +00:00
Andreas Huber
26f70db99f Merge "Remove surface legacy APIs and code." into ics-mr1 2011-11-08 08:48:31 -08:00
Glenn Kasten
f330986fa8 Bug 5478024 drop after decode if can't drop before
Change-Id: Iaa64553be1a710da5d42be4e3a1e1d6dc873e371
2011-11-04 18:05:35 -07:00
Andreas Huber
efa4015ae3 DO NOT MERGE Poll input data with a small timeout and don't consume a full core.
Change-Id: I3c288698920fe6ead0df24a52330483609821a41
related-to-bug: 5549263
2011-11-03 18:15:43 -07:00
Andreas Huber
e395f645aa Poll input data with a small timeout and don't consume a full core.
Change-Id: I3c288698920fe6ead0df24a52330483609821a41
related-to-bug: 5549263
2011-11-03 11:00:21 -07:00
Andreas Huber
95be24585f Remove surface legacy APIs and code.
All surfaces are now supported through surface textures.

Change-Id: I95dd823e7099c0c32a48a1121624149dcc29d9c6
2011-10-28 09:39:23 -07:00
Andreas Huber
27ed12492d Merge "Properly report that we're no longer playing after receiving event" into ics-mr1 2011-10-28 09:13:54 -07:00
Jamie Gennis
fc9592f8a5 am 08479cee: Merge "Stagefright: ANW::connect in MediaPlayerService" into ics-mr0
* commit '08479ceeba56c460fb52f60a24df27776f1936c3':
  Stagefright: ANW::connect in MediaPlayerService
2011-10-28 02:14:01 +00:00
Jamie Gennis
2fa0ac2e44 Stagefright: ANW::connect in MediaPlayerService
This change moves the ANativeWindow connect and disconnect logic from
MediaPlayer to MediaPlayerService::Client.

Bug: 5502654
Change-Id: Ifc43b98b01ad8f35d62d7ece43110724ec7fda3d
2011-10-26 18:40:00 -07:00
Andreas Huber
e96e84b577 Properly report that we're no longer playing after receiving event
MEDIA_PLAYBACK_COMPLETE or MEDIA_ERROR.

Change-Id: I03eeba751d3728adb33d9c66de4c7444a91696f3
2011-10-26 15:23:31 -07:00
James Dong
c7d927466e am b3cdadb6: Merge "Check whether media recorder client exists before dumping." into ics-mr0
* commit 'b3cdadb639027f62c7c1637ca962a70d2d1f3b4d':
  Check whether media recorder client exists before dumping.
2011-10-19 17:57:58 -07:00
James Dong
dc8bbe79b8 Check whether media recorder client exists before dumping.
Change-Id: I1f3a644a958975e4cf6c02099c53e30cc4d2fd82
related-to-bug: 5477177
2011-10-18 22:29:20 -07:00
Andreas Huber
a6be6dcd03 NuPlayer is now taking on the task of streaming over RTSP.
Change-Id: Ie204db8810807f1e7981959e34dc0149e5d9563a
2011-10-13 11:31:06 -07:00
James Dong
56f71d7dfa Fix an issue where we should allow negative values but did not
Change-Id: Ia8d718b4e6aec4c17db86e30134132f767fd72c5
related-to-bug: 5419527
2011-10-05 20:43:52 -07:00
Andreas Huber
d33b3881f7 Merge "Signal an appropriate error even if there are no active streams yet." 2011-09-27 13:36:22 -07:00
Andreas Huber
7922619e9c Signal an appropriate error even if there are no active streams yet.
Change-Id: I3ac1053ad288558b62ee18056dfd0a9ce0da8f49
related-to-bug: 5372901
2011-09-27 12:13:37 -07:00
Eric Laurent
53719fc4c5 Merge "Fix issue 5373048: AudioCache decode errors" 2011-09-27 10:32:17 -07:00
Eric Laurent
9968a36f29 Fix issue 5373048: AudioCache decode errors
When decoding a file for the SoundPool, do not
reject the entire file in case of error but
return what was decoded so far instead.

Change-Id: Iff199a1b6a4c8e064e42a0dfe0704e0ae36a27fd
2011-09-27 10:23:38 -07:00
Andreas Huber
928baf1f54 Propagate error signalled by the source all the way to the output EOS notification.
Change-Id: I30e959a6d669f09745c59fbdebee08f869511cf7
related-to-bug: 5372901
2011-09-26 10:53:29 -07:00
Glenn Kasten
cd5c896381 Bug 5234242 audio continues after discontinuity
Reduce to 8 buffers of 10 packets from 16 buffers of 20 packets.

Change-Id: Ifdb5e15535989fbb6e5e1b70d5f9f71dc66a5c83
2011-09-21 10:40:01 -07:00
Andreas Huber
950fc9d115 In order to recover from video lagging behind audio, drop avc frames
that are not referenced by other frames before feeding them into the decoder.

Change-Id: I822190af8f8329567bff8da1ea23136d0a765481
2011-09-16 15:19:59 -07:00
Andreas Huber
115cac8131 Various improvements to nuplayer playback
- Drastically cut down the number of times we supply the AudioSink with data
by estimating the time until the sink would run out of data and then scheduling
a refill in advance of that.

- Use a dedicated looper for video decoders since they are currently taking
too long to return from OMX_FillThisBuffer (bug 5325201)

- Revise thread priorities for the OMX dispatcher and software codecs, instead
of running them at ANDROID_PRIORITY_AUDIO, they now only run at
ANDROID_PRIORITY_FOREGROUND

- Since threads created by pthread_create inherit all of the parent threads
attributes including thread priority, briefly reset thread priority to
ANDROID_PRIORITY_FOREGROUND before instantiating OMX components and then
restore it.

Change-Id: If9332a3a20dad5485333d68c11de0d2d5d3fffc3
2011-09-16 10:44:02 -07:00
Andreas Huber
fa6dfdcfd7 Don't post position updates too frequently
i.e. don't hog my message queue.

related-to-bug: 5284760
Change-Id: I8e2d36a11dbee1567b18ed13dc5257a65c6eeda7
2011-09-13 09:48:22 -07:00
Dave Burke
fc301b0bb5 Require INTERNET permission for network-based content.
Bug #1870981

Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
2011-09-02 11:26:59 +01:00
Andreas Huber
eeddb0e504 I have one HLS stream that switches stream PIDs from one bandwidth to the next
this change intends to support its very limited case and signals an error in
all other cases of unexpected PID changes that we cannot recover from.

Change-Id: Icbfdf9fe7461969e2a8781ed416f54d891dd789a
2011-08-31 16:29:05 -07:00
Andreas Huber
ea8c9b1bd9 Discontinuities are only signalled on streams that have been identified, i.e.
those that have a queue. This ensures that the player doesn't observe discontinuities
that don't match up across streams.

Also, make sure output buffers arriving from the decoder to be rendered are sent
back to the decoder if we started flushing.

Finally, don't parse TS packets for streams we don't support. And don't allocate
memory for them.

Change-Id: I708e0de4cba8110a62e4c8ceb1e5702430d5d2bb
2011-08-31 15:35:49 -07:00
Andreas Huber
ebd266c034 ATSParser now supports a mode in which PTS is considered to be absolute time
i.e. PTS 0 <=> media time 0

Change-Id: If10a0f98c129b95e8430dc419664b1def92e547e
2011-08-30 16:06:28 -07:00
Andreas Huber
07754c513f Return an error to the client instead of asserting if decoder instantiation fails
after a surface change.

Change-Id: Ic7758cbeb107032db68a1c3b8e2984710a12dd8b
related-to-bug: 5212725
2011-08-29 13:01:23 -07:00
Andreas Huber
6032a6018d Signal errors to the client instead of asserting in ACodec.
Also make sure NuPlayer can properly shutdown in certain edge cases.

Change-Id: Iceb16d600d87ba66c802e60e95bf62f66487a453
2011-08-26 16:02:19 -07:00
Andreas Huber
d84fd7927e Error handling in ACodec and Nuplayer.
Codec errors (and codec not found errors) now trigger a controlled shutdown
of playback and signal errors to the MediaPlayer client.

Change-Id: I2ee23ff2a1422d05a1a21e50ecb87d7c7ab958cc
2011-08-16 13:48:44 -07:00
Jason Simmons
d9792ac752 Add a null check to handle failure of android::createPlayer
Change-Id: Id56bd0c16104e46d8dc71f13d8a44aefe251fad4
2011-08-12 13:46:55 -07:00
Ashish Sharma
d5a20d8d75 Network traffic accounting for chromium stack support in mediaserver.
- Atribute network activity to uid calling the mediaplayer
        - Enables logging of chromium network stack in logcat

Change-Id: I2d28c8392248a056b3cee305dd4d4475ebba4337
2011-08-05 12:58:14 -07:00
James Dong
83dd43f45a Do not support still image capture mode for timelapse video recording
related-to-bug: 4973779

Change-Id: Ica665217ab10247b2242acc4e93d4fe9f83e3f45
2011-07-24 10:33:54 -07:00
Pannag Sanketi
897e27bc75 Connect MediaRecorder Native to SurfaceMediaSource
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
2011-07-22 14:17:25 -07:00
Andreas Huber
bd8fbfa956 Fix seek behaviour at startup and teardown of media session that hasn't been started
Nuplayer specific.

Change-Id: I7b0be52c29bdb7032414d63c503d686df7844bf6
2011-07-15 16:26:47 -07:00
Andreas Huber
67d464f47e Enable signalling of a stream discontinuity involving a format-change
through IStreamListener.

Change-Id: Ic0409cdc4891ad26b61f2f98bdda3c7fb2e2de6a
related-to-bug: 5022434
2011-07-13 09:47:09 -07:00