summaryrefslogtreecommitdiffstats
path: root/media
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash caused by calling GetBufferedRanges() before init segment gets ↵acolwell@chromium.org2012-06-212-2/+15
| | | | | | | | | | | | appended. BUG=132933 TEST=ChunkDemuxerTest.TestGetBufferedRangesBeforeInitSegment Review URL: https://chromiumcodereview.appspot.com/10574047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143324 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Fix a pass-by-value.jhawkins@chromium.org2012-06-201-1/+1
| | | | | | | | | | | | | | CID_COUNT=1 CID=104236 BUG=none TEST=none R=groby TBR=vrk Review URL: https://chromiumcodereview.appspot.com/10578050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143267 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Fix uninitialized scalar variables.kmadhusu@chromium.org2012-06-204-21/+85
| | | | | | | | | | | CID=104262, 104261, 104260, 104259, 104258, 104257, 104256, 104255, 104254, 104253, 104252, 104251, 104250, 104249, 104248, 104247, 104246, 104245, 104244, 104243, 104242 BUG=none TEST=none TBR=acolwell@chromium.org Review URL: https://chromiumcodereview.appspot.com/10579031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143229 0039d316-1c4b-4281-b951-d872f2087c98
* Change VideoDecoder::ReadCB to take const scoped_refptr<VideoFrame>&.xhwang@chromium.org2012-06-204-6/+6
| | | | | | | | | | BUG=none TEST=media_unittests, media layout tests. Review URL: https://chromiumcodereview.appspot.com/10559074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143192 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 143115 - Provide a Chrome-owned buffer to FFmpeg for video decoding, ↵nirnimesh@chromium.org2012-06-205-121/+51
| | | | | | | | | | | | | | | | | | | | | | instead of letting it allocate a buffer internally and then copy it to our own buffers after decoding finishes. This saves one memcpy() per decoded video frame. +++ REVERT NOTICE +++ Broke all pyauto tests: http://build.chromium.org/p/chromium.pyauto/builders/Linux%20%28deb%29/builds/34569 +++ +++ Review URL: https://chromiumcodereview.appspot.com/10451051 TBR=rbultje@chromium.org Review URL: https://chromiumcodereview.appspot.com/10592012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143125 0039d316-1c4b-4281-b951-d872f2087c98
* Provide a Chrome-owned buffer to FFmpeg for video decoding, instead ofrbultje@chromium.org2012-06-205-51/+121
| | | | | | | | | | letting it allocate a buffer internally and then copy it to our own buffers after decoding finishes. This saves one memcpy() per decoded video frame. Review URL: https://chromiumcodereview.appspot.com/10451051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143115 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ChunkDemuxer so it properly outputs buffered ranges.acolwell@chromium.org2012-06-208-319/+353
| | | | | | | | | | | | BUG=133042 TEST=None. Verified manually by a simple test page that appends some data and then checks the buffered attribute. I will convert this to a LayoutTest soon. Review URL: https://chromiumcodereview.appspot.com/10558011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143106 0039d316-1c4b-4281-b951-d872f2087c98
* Add UMA reporting for GpuVideoDecoder::Initialize status.fischman@chromium.org2012-06-205-2/+41
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10582026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143102 0039d316-1c4b-4281-b951-d872f2087c98
* Add Decryptor interface.xhwang@chromium.org2012-06-1911-70/+115
| | | | | | | | | | | | This is in preparation for the ProxyDecryptor and PpapiDecryptor. BUG=123260 TEST=media_unittests, media layout tests Review URL: https://chromiumcodereview.appspot.com/10539150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143030 0039d316-1c4b-4281-b951-d872f2087c98
* Add element_type in scoped_refptr.xhwang@chromium.org2012-06-191-5/+2
| | | | | | | | | | | | | | This will enable ::testing::IsNull and ::testing::NotNull on scoped_refptr. It was not working because GetRawPointer needs element_type to be defined in the Pointer type. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10558017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142997 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for a ChromeOS uninitialized variable warning.strobe@google.com2012-06-191-2/+11
| | | | | | | | | | | The |is_encrypted| flag is also disabled to avoid any use of the incomplete encryption code. TEST=Manual, run on try bot Review URL: https://chromiumcodereview.appspot.com/10579004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142975 0039d316-1c4b-4281-b951-d872f2087c98
* Android: native targets shouldn't depend on java targets.torne@chromium.org2012-06-191-1/+0
| | | | | | | | | | | | | | | The native targets for base/net/etc should not depend on the base_java/net_java/etc targets, as they don't actually use the Java code (only the JNI headers generated from them by base_jni_headers/net_jni_headers/etc). Removing this dependency allows the native code to be built without causing ant to run. The targets which build Android APKs (like base_unittests_apk) already depend on the Java targets. Review URL: https://chromiumcodereview.appspot.com/10553036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142917 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 142862 - Change the way we are stopping audio stream on Mac once again.kkania@chromium.org2012-06-193-79/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r142235 was not enough, we were not touching audio buffers after stop, but OS could still touch audio queue. That causes problems if we were deleting audio stream immediately after stopping, e.g. if audio mixer tried to keep audio stream opened after last logical stream stopped and then stopped/closed it. I was able to reproduce the problem locally (for whatever reason this time it worked), and after the fix it (finally) went away -- browsert_tests PPAPITest.Audio_Creation successfully runs for 300 iterations. When I revert to previos way of signaling, problem resurfaces again. Fix is to use "property listener" to listen to "is running" audio queue property, and signal "stream stopped" event only after "is running" property changes to false. Functions that do are documented in the Apple core audio documentation but not used in samples, so they are hard to find if you don't know what to look for. Also re-enabling mixer change to keep physical stream opened for some time, That should complete browser-side mixer work and fix several related bugs. BUG=102395 BUG=114701 BUG=129190 BUG=131720 TEST=No observable diffs, but crashes and seek problems should go away. Review URL: https://chromiumcodereview.appspot.com/10560038 TBR=enal@chromium.org Review URL: https://chromiumcodereview.appspot.com/10583009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142886 0039d316-1c4b-4281-b951-d872f2087c98
* Change the way we are stopping audio stream on Mac once again.enal@chromium.org2012-06-183-56/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r142235 was not enough, we were not touching audio buffers after stop, but OS could still touch audio queue. That causes problems if we were deleting audio stream immediately after stopping, e.g. if audio mixer tried to keep audio stream opened after last logical stream stopped and then stopped/closed it. I was able to reproduce the problem locally (for whatever reason this time it worked), and after the fix it (finally) went away -- browsert_tests PPAPITest.Audio_Creation successfully runs for 300 iterations. When I revert to previos way of signaling, problem resurfaces again. Fix is to use "property listener" to listen to "is running" audio queue property, and signal "stream stopped" event only after "is running" property changes to false. Functions that do are documented in the Apple core audio documentation but not used in samples, so they are hard to find if you don't know what to look for. Also re-enabling mixer change to keep physical stream opened for some time, That should complete browser-side mixer work and fix several related bugs. BUG=102395 BUG=114701 BUG=129190 BUG=131720 TEST=No observable diffs, but crashes and seek problems should go away. Review URL: https://chromiumcodereview.appspot.com/10560038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142862 0039d316-1c4b-4281-b951-d872f2087c98
* Generalize AesDecryptor to make it more spec compliant.xhwang@chromium.org2012-06-1620-121/+481
| | | | | | | | | | BUG=123260 TEST=media_unittests, encrypted-media layout tests. Review URL: https://chromiumcodereview.appspot.com/10534096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142553 0039d316-1c4b-4281-b951-d872f2087c98
* Allow any AVC level in Media Source ISO BMFF codec strings.strobe@google.com2012-06-152-6/+14
| | | | | | | | | | BUG=129072 TEST=ChunkDemuxerTest Review URL: https://chromiumcodereview.appspot.com/10544166 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142520 0039d316-1c4b-4281-b951-d872f2087c98
* Change the code to use 2 buffers on presumable good Windows boxes.enal@chromium.org2012-06-155-24/+54
| | | | | | | | | | | | | | | | | I.e. running non-Vista and having more than single core. Changed unit tests as well. (Earlier that CL was part of bugger one, changing the way audio mixer is working, but it causes problems on Mac). BUG=132009 TEST=Startup of 2nd stream should become somewhat faster. TEST=Run tests on Win7 and XP myself. Review URL: https://chromiumcodereview.appspot.com/10540034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142488 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 142430 - Do not stop audio physical stream immediately after logical ↵kkania@chromium.org2012-06-156-70/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | one had stopped. Wait some time. We are still stopping/closing the stream, as (1) it is better for battery life, and (2) some people can hear active device even when it is playing silence. That increased audio startup latency, especially on Windows, because we are using 3 buffers on Windows. To fix that I changed the code to use 2 buffers on presumable good Windows boxes -- i.e. running non-Vista and having more than single core. Changed unit tests as well. That CL finishes work on browser-side audio mixer. Not sure how important it is, though -- hopefully it will provide some time while implementing renderer-side mixer. That CL also fixes bug 131720. Looks that it was caused by timing change, and starting stream earlier causes less dropped frames. (I still cannot understand why on modern system we should have even single dropped frame, and why slight timing change caused us to drop frame, but that is different question...) BUG=114701 BUG=129190 BUG=131720 BUG=132009 TEST=Should not be noticeable difference in behavior. TEST=Startup of 2nd stream should become somewhat faster. TEST=Run tests on Win7 and XP myself. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=141770 Review URL: https://chromiumcodereview.appspot.com/10540034 TBR=enal@chromium.org Review URL: https://chromiumcodereview.appspot.com/10544183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142444 0039d316-1c4b-4281-b951-d872f2087c98
* Do not stop audio physical stream immediately after logical one had stopped.enal@chromium.org2012-06-156-58/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wait some time. We are still stopping/closing the stream, as (1) it is better for battery life, and (2) some people can hear active device even when it is playing silence. That increased audio startup latency, especially on Windows, because we are using 3 buffers on Windows. To fix that I changed the code to use 2 buffers on presumable good Windows boxes -- i.e. running non-Vista and having more than single core. Changed unit tests as well. That CL finishes work on browser-side audio mixer. Not sure how important it is, though -- hopefully it will provide some time while implementing renderer-side mixer. That CL also fixes bug 131720. Looks that it was caused by timing change, and starting stream earlier causes less dropped frames. (I still cannot understand why on modern system we should have even single dropped frame, and why slight timing change caused us to drop frame, but that is different question...) BUG=114701 BUG=129190 BUG=131720 BUG=132009 TEST=Should not be noticeable difference in behavior. TEST=Startup of 2nd stream should become somewhat faster. TEST=Run tests on Win7 and XP myself. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=141770 Review URL: https://chromiumcodereview.appspot.com/10540034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142430 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes a bug related to Start/Stop/Start/Stop calling sequences in ↵henrika@chromium.org2012-06-152-10/+45
| | | | | | | | | | | | | WASAPIAudioOutputStream. BUG=132956 TEST=media_unittests --gtest_also_run_disabled_tests --gtest_filter=WinAudioOutputTest* It is also possible to play out the file in segments where each segment start with a call to Start() and stops with a call to Stop(). To do so, modify the kNumFileSegments (defaults to 1) to a suitable integer number (e.g 10). It will ensure that the 20s file is played out in 2 seconds long segments with a fresh Stop(), Start() calling sequence between each sequence. Review URL: https://chromiumcodereview.appspot.com/10556006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142425 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ISO BMFF support in Media Source (try 2).strobe@google.com2012-06-1524-0/+3193
| | | | | | | | | | | Previous review: https://chromiumcodereview.appspot.com/10536014/ BUG=129072 TEST=MP4StreamParserTest Review URL: https://chromiumcodereview.appspot.com/10534172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142409 0039d316-1c4b-4281-b951-d872f2087c98
* Use NSS for symmetric key crypto operations on Windows and Mac.ddorwin@chromium.org2012-06-151-1/+1
| | | | | | | | | | | | | | | Encryptor, HMAC, and SymmetricKey now use NSS on all platforms except Android. This allows us to use them inside the sandbox, something that was not possible when using the platform APIs. On Windows, Native Client 64-bit builds still use the the platform APIs. BUG=127803,124741 TEST=Existing tests since there is no change in functionality. Review URL: https://chromiumcodereview.appspot.com/10543146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142356 0039d316-1c4b-4281-b951-d872f2087c98
* Roll FFmpeg to pick up security fixes.dalecurtis@google.com2012-06-151-2/+5
| | | | | | | | | | | | | | | | | | | Pulls in the following security fixes: 59c122b matroskadec: add assert on lack of overflow in pkt_size+offset 4b7c523 matroskadec: change size check in matroska_decode_buffer() to unsigned 08169fc matroskadec: move lace_size check up so it catches all code pathes 88a740a matroskadec: change assert to av_assert0() 71529bd Fix incorrect unsigned->signed conversion. Adds a new test for the issue. BUG=132779 TEST=ffmpeg_regression_tests, video test matrix. TBR=scherkus Review URL: https://chromiumcodereview.appspot.com/10546180 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142328 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 142268 - Implement ISO BMFF support in Media Source.gbillock@chromium.org2012-06-1524-3192/+0
| | | | | | | | | | | | | BUG=129072 TEST=MP4StreamParserTest Review URL: https://chromiumcodereview.appspot.com/10536014 TBR=strobe@google.com Review URL: https://chromiumcodereview.appspot.com/10533164 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142283 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ISO BMFF support in Media Source.strobe@google.com2012-06-1424-0/+3192
| | | | | | | | | | BUG=129072 TEST=MP4StreamParserTest Review URL: https://chromiumcodereview.appspot.com/10536014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142268 0039d316-1c4b-4281-b951-d872f2087c98
* Change the way we are stopping audio stream on Mac.enal@chromium.org2012-06-144-46/+44
| | | | | | | | | | | | | | | We are seeing countless problems when restarting or closing audio stream, and suspect it is caused by wrong use of Mac OS X API. Do it exactly as done in Apple's Mac core audio sample -- Stop() does not stop the stream itelf, but instead waits for audio callback to stop and signal that stream is stopped. BUG=102395 TEST=No observable diffs, but crashes and seek problems should go away. Review URL: https://chromiumcodereview.appspot.com/10545160 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142235 0039d316-1c4b-4281-b951-d872f2087c98
* Notify SourceBufferStream of each cluster's start time as it gets parsedvrk@google.com2012-06-149-35/+245
| | | | | | | | | | | | | Passes cluster start time information from WebMStreamParser to ChunkDemuxer to SourceBufferStream. SourceBufferStream can then use this information when fulfilling seeks. BUG=131438 TEST=media_unittests, go/vekbm Review URL: https://chromiumcodereview.appspot.com/10540122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142221 0039d316-1c4b-4281-b951-d872f2087c98
* Move forward declaration of DecoderBuffer into media namespace.xhwang@chromium.org2012-06-141-1/+2
| | | | | | | | | | BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10533140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142206 0039d316-1c4b-4281-b951-d872f2087c98
* Fix sign inversion of 24-bit wav files.rtoy@google.com2012-06-141-1/+1
| | | | | | | | | | | | | On a 32-bit machine (1L << 31) is negative. BUG=132320 TEST=Covered in webkit bug 88794 Review URL: https://chromiumcodereview.appspot.com/10533118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142180 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the ant warning of 'includeantruntime was not set' in android buildshouqun.liu@intel.com2012-06-131-1/+1
| | | | | | | | | | BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10543107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142029 0039d316-1c4b-4281-b951-d872f2087c98
* Media: Don't use a scoped handle for a wait object.rvargas@chromium.org2012-06-132-19/+15
| | | | | | | | | BUG=132586 TEST=none Review URL: https://chromiumcodereview.appspot.com/10543149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142024 0039d316-1c4b-4281-b951-d872f2087c98
* Calculate the buffered ranges in ChunkDemuxer::GetBufferedRanges()annacc@chromium.org2012-06-135-6/+306
| | | | | | | | | | BUG=129852 TEST=media_unittests Review URL: https://chromiumcodereview.appspot.com/10539115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141859 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 141770 - Do not stop audio physical stream immediately after logical ↵cpu@chromium.org2012-06-138-83/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | one had stopped. Wait some time. We are still stopping/closing the stream, as (1) it is better for battery life, and (2) some people can hear active device even when it is playing silence. That increased audio startup latency, especially on Windows, because we are using 3 buffers on Windows. To fix that I changed the code to use 2 buffers on presumable good Windows boxes -- i.e. running non-Vista and having more than single core. Changed unit tests as well. That CL finishes work on browser-side audio mixer. Not sure how important it is, though -- hopefully it will provide some time while implementing renderer-side mixer. Also moved code for crash Mac OS X into audio mixer, because problem can manifest itself if Close() called immediately after Stop(). That CL also fixes bug 131720. Looks that it was caused by timing change, and starting stream earlier causes less dropped frames. (I still cannot understand why on modern system we should have even single dropped frame, and why slight timing change caused us to drop frame, but that is different question...) BUG=129190 BUG=131720 BUG=131720 BUG=102395 TEST=Should not be noticeable difference in behavior. Run tests on Win7 and XP myself. TEST=Mac crashes on seeks should go away, too. Review URL: https://chromiumcodereview.appspot.com/10540034 TBR=enal@chromium.org Review URL: https://chromiumcodereview.appspot.com/10532116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141820 0039d316-1c4b-4281-b951-d872f2087c98
* Do not stop audio physical stream immediately after logical one had stopped.enal@chromium.org2012-06-128-87/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wait some time. We are still stopping/closing the stream, as (1) it is better for battery life, and (2) some people can hear active device even when it is playing silence. That increased audio startup latency, especially on Windows, because we are using 3 buffers on Windows. To fix that I changed the code to use 2 buffers on presumable good Windows boxes -- i.e. running non-Vista and having more than single core. Changed unit tests as well. That CL finishes work on browser-side audio mixer. Not sure how important it is, though -- hopefully it will provide some time while implementing renderer-side mixer. Also moved code for crash Mac OS X into audio mixer, because problem can manifest itself if Close() called immediately after Stop(). That CL also fixes bug 131720. Looks that it was caused by timing change, and starting stream earlier causes less dropped frames. (I still cannot understand why on modern system we should have even single dropped frame, and why slight timing change caused us to drop frame, but that is different question...) BUG=129190 BUG=131720 BUG=131720 BUG=102395 TEST=Should not be noticeable difference in behavior. Run tests on Win7 and XP myself. TEST=Mac crashes on seeks should go away, too. Review URL: https://chromiumcodereview.appspot.com/10540034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141770 0039d316-1c4b-4281-b951-d872f2087c98
* Return the results of Append in ChunkDemuxer::On{Audio,Video}Buffers()annacc@chromium.org2012-06-121-8/+2
| | | | | | | | | | | | We weren't able to successfully return results until overlaps etc. were properly computed in SourceBufferStream::Append(). That's fixed now (http://crbug.com/125072), so let's start returning! BUG=132314 TEST=media_unittests Review URL: https://chromiumcodereview.appspot.com/10542128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141767 0039d316-1c4b-4281-b951-d872f2087c98
* Add MP4 DASH test fileacolwell@chromium.org2012-06-121-0/+0
| | | | | | | | | | TBR=acolwell@chromium.org BUG=129072 TEST=None Review URL: https://chromiumcodereview.appspot.com/10539117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141766 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure GpuVideoDecoder satisfies outstanding reads before firing callback ↵fischman@chromium.org2012-06-121-1/+1
| | | | | | | | | | | | | | | | indicating it is reset. Previously GVD would post the fake frame to VideoRendererBase, but fire the callback without waiting for VRB to process the frame. Now the callback is posted to the same loop so VRB is guaranteed to see the frame before VRB::OnDecoderFlushDone() DCHECKs that !pending_read_. TEST=closing a tab playing HW-accelerated video no longer DCHECKs in VRB::OnDecoderFlushDone. Review URL: https://chromiumcodereview.appspot.com/10536122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141746 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize member variables.jhawkins@chromium.org2012-06-121-1/+4
| | | | | | | | | | | | | CID_COUNT=4 CID=104190,104193,104197,104204 BUG=none TEST=none R=groby TBR=rdsmith,vrk,tommi Review URL: https://chromiumcodereview.appspot.com/10538083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141688 0039d316-1c4b-4281-b951-d872f2087c98
* Implement support for 2 source ids (1 for audio and 1 for video).annacc@chromium.org2012-06-124-72/+342
| | | | | | | | | | | | This patch allows data to be appended to 2 different sources (1 audio and 1 video). Also makes sure that appended data matches the mimetype provided in AddId(). BUG=122909 TEST=ChunkDemuxerTest.* Review URL: https://chromiumcodereview.appspot.com/10545066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141679 0039d316-1c4b-4281-b951-d872f2087c98
* CrasOutput: Handle Close() being called after a failed Open().dgreid@chromium.org2012-06-121-2/+8
| | | | | | | | | | | | | | | If Open() fails due to the pipe() or pthread_create() system calls failing, client_ will be non-null but will have been freed. To fix this, set client_ to NULL on failures in Open(), and check before using it in Close(). BUG=132040 TEST=Change the cras library to return errors from the client_connect() or client_run() functions, then watch as the errors cause a crash when you add an audio stream. Review URL: https://chromiumcodereview.appspot.com/10546090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141638 0039d316-1c4b-4281-b951-d872f2087c98
* Remove duplicate CPU detection code; use base::CPU instead.dalecurtis@chromium.org2012-06-129-194/+51
| | | | | | | | | | BUG=none TEST=media_unittests. Review URL: https://chromiumcodereview.appspot.com/10537082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141627 0039d316-1c4b-4281-b951-d872f2087c98
* Replace Pipeline::SetNetworkActivity() with BufferedDataSource -> ↵fischman@chromium.org2012-06-1213-62/+3
| | | | | | | | | | | | | WebMediaPlayerImpl callback. This removes a bunch of plumbing that's completely unnecessary. Concretely: Before: BufferedResourceLoader -> BufferedDataSource -> DemuxerHost -> DataSourceHost -> Pipeline -> WebMediaPlayerImpl After: BufferedResourceLoader -> BufferedDataSource -> WebMediaPlayerImpl Review URL: https://chromiumcodereview.appspot.com/10535101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141619 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using avcodec_decode_audio4, avcodec_alloc_context3.dalecurtis@chromium.org2012-06-117-86/+118
| | | | | | | | | | | | | | | | Allows us to remove another patch from FFmpeg relating to using deprecated features! We're now using the latest and greatest! FFmpeg side changes here, https://gerrit.chromium.org/gerrit/24823 BUG=112673 TEST=ffmpeg_regression_tests, webaudio tests. Review URL: https://chromiumcodereview.appspot.com/10540067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141524 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 141476 - Do not stop audio physical stream immediately after logical ↵sail@chromium.org2012-06-116-70/+58
| | | | | | | | | | | | | | | | | | | | | | | | one had stopped. Wait some time. We are still stopping/closing the stream, as (1) it is better for battery life, and (2) some people can hear active device even when it is playing silence. That increased audio startup latency, especially on Windows, because we are using 3 buffers on Windows. To fix that I changed the code to use 2 buffers on presumable good Windows boxes -- i.e. running non-Vista and having more than single core. Changed unit tests as well. BUG=129190 TEST=Should not be noticeable difference in behavior. Run tests on Win7 and XP myself. Review URL: https://chromiumcodereview.appspot.com/10540034 TBR=enal@chromium.org Review URL: https://chromiumcodereview.appspot.com/10535117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141505 0039d316-1c4b-4281-b951-d872f2087c98
* Do not stop audio physical stream immediately after logical one had stopped.enal@chromium.org2012-06-116-58/+70
| | | | | | | | | | | | | | | | | | | Wait some time. We are still stopping/closing the stream, as (1) it is better for battery life, and (2) some people can hear active device even when it is playing silence. That increased audio startup latency, especially on Windows, because we are using 3 buffers on Windows. To fix that I changed the code to use 2 buffers on presumable good Windows boxes -- i.e. running non-Vista and having more than single core. Changed unit tests as well. BUG=129190 TEST=Should not be noticeable difference in behavior. Run tests on Win7 and XP myself. Review URL: https://chromiumcodereview.appspot.com/10540034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141476 0039d316-1c4b-4281-b951-d872f2087c98
* Update ChunkDemuxer to allow midstream initialization segments that match ↵acolwell@chromium.org2012-06-113-33/+161
| | | | | | | | | | | | the first one. BUG=122913 TEST=ChunkDemuxerTest.TestMultipleHeaders Review URL: https://chromiumcodereview.appspot.com/10535058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141460 0039d316-1c4b-4281-b951-d872f2087c98
* Make the other Java modules debuggablehaitao.feng@intel.com2012-06-081-1/+1
| | | | | | | | | | BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10541068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141327 0039d316-1c4b-4281-b951-d872f2087c98
* open camera with O_RDWR.wjia@chromium.org2012-06-081-1/+2
| | | | | | | | | | This is somehow needed for Linux kernel 3.3 and above. If camera is opened with O_RDONLY, mmap will fail. However, since we are not going to modify device memory, it should be allowed to open camera with O_RDONLY. BUG=http://code.google.com/p/webrtc/issues/detail?id=512 Review URL: https://chromiumcodereview.appspot.com/10542080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141308 0039d316-1c4b-4281-b951-d872f2087c98
* Fix gcc 4.7 building problems.pkasting@chromium.org2012-06-081-7/+12
| | | | | | | | | | This is being submitted on behalf of shanhan@google.com, original CL at https://chromiumcodereview.appspot.com/10537037/ . BUG=None TEST=Built successfully using GCC-4.7 under linux Review URL: https://chromiumcodereview.appspot.com/10543080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141286 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Fix pass by value error in source_buffer_stream::DeleteAfter() ↵kmadhusu@chromium.org2012-06-081-2/+2
| | | | | | | | | | | | | function. BUG=none TEST=none CID=104188 Review URL: https://chromiumcodereview.appspot.com/10546075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141268 0039d316-1c4b-4281-b951-d872f2087c98