summaryrefslogtreecommitdiffstats
path: root/media
Commit message (Collapse)AuthorAgeFilesLines
* Fixed build problem with disabled SSE.sergeyu@chromium.org2010-04-112-2/+8
| | | | | | | | | BUG=19113 TEST=Code builds with disabled SSE. Review URL: http://codereview.chromium.org/1576032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44214 0039d316-1c4b-4281-b951-d872f2087c98
* add filtering to player_wtlfbarchard@chromium.org2010-04-095-27/+76
| | | | | | | | | BUG=19113 TEST=none Review URL: http://codereview.chromium.org/1576030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44130 0039d316-1c4b-4281-b951-d872f2087c98
* Optimized version of bilinear video scaler. It is about 2 times faster than ↵sergeyu@chromium.org2010-04-099-470/+808
| | | | | | | | | | | Skia that is currently used for video scaling. BUG=19113 TEST=none Review URL: http://codereview.chromium.org/1556021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44119 0039d316-1c4b-4281-b951-d872f2087c98
* Hierarchy. Hierarchy. Hierarchy!!!avi@chromium.org2010-04-091-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1561020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44107 0039d316-1c4b-4281-b951-d872f2087c98
* Flush audio data after seekhclam@chromium.org2010-04-084-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is about 400 to 600 ms of audio that needs to be flushed after seek, this have a pretty UX effect. This is partially fixed in this patch by reducing the amount of data down to about at most 500 ms stored in the hardware buffer. This patch clears data in the software buffer in the browser process when seek happens. We could reduce the amount of hardware buffer to further reduce the amount of lag but that can be fixed by subsequent patch. BUG=24150 TEST=audio still works, audio still play after seek the playback of old data after seek is substantially reduced. Few changes in this patch: 1. Flush software buffer after seek in browser process 2. Get rid of prerolling, this actually has not effect at all, so getting rid of useless code Needs to be done after this patch: 1. Further reduce the remaining data after seek and pause 2. Still hit the DCHECK in ClockImpl::Play(), this doesn't seem to be a new problem introduced in this patch Review URL: http://codereview.chromium.org/1508021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43983 0039d316-1c4b-4281-b951-d872f2087c98
* Assume pending buffered bytes is zero when ALSA has underrun.scherkus@chromium.org2010-04-085-16/+73
| | | | | | | | | | | | | According to docs, snd_pcm_delay() may not reach zero when ALSA has underrun. Furthermore it may return negative numbers when underrun, leading to an underflow when converted to uint32. Previously none of this was an issue however as of r43546 we now wait for pending buffered bytes to reach zero before notifying that the audio stream has finished. This doesn't completely fix the Linux ended event issue, but is a required fix regardless. BUG=30452 TEST=media_unittests Review URL: http://codereview.chromium.org/1618006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43914 0039d316-1c4b-4281-b951-d872f2087c98
* Remove outdated TODO.scherkus@chromium.org2010-04-071-3/+0
| | | | | | | | | | BUG=none TEST=none TBR=fbarchard Review URL: http://codereview.chromium.org/1630008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43815 0039d316-1c4b-4281-b951-d872f2087c98
* media disable threads for ogg to avoid shutdown crashfbarchard@chromium.org2010-04-072-1/+13
| | | | | | | | | BUG=40458 TEST=ffmpeg_tests still2.ogv Review URL: http://codereview.chromium.org/1539022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43800 0039d316-1c4b-4281-b951-d872f2087c98
* Don't clear VideoRendererImpl's proxy_ variable during OnStop().scherkus@chromium.org2010-04-061-3/+7
| | | | | | | | | | | | | | | | | | | | Nasty threading issue involving PipelineThread, VideoRendererThread and RenderThread: - VideoRendererThread continuously calls OnFrameAvailable(), as expected - RenderThread gets the signal to destroy a <video> - RenderThread blocks on PipelineThread to finish clean up - PipelineThread calls OnStop(), which sets proxy_ to NULL - Race condition occurs if VideoRendererThread was already on its way to call OnFrameAvailable() again Now we could fix this by adding more locks (i.e., inside VideoRendererBase::ThreadMain() before we call OnFrameAvailable()), but that defeats the entire point of keeping VideoRendererThread as lock-free as possible. We could also add an extra lock in VideoRendererImpl to synchronize access to proxy_, but that's unnecessary as proxy_ outlives VideoRendererImpl so there's no need to set it to NULL. Furthermore it's OK to keep calling proxy_->Repaint() since that will post tasks to the RenderThread, which is conveniently blocked on PipelineThread to finish, who is blocked on VideoRendererThread to finish calling proxy_->Repaint()! After that task is posted, everything unblocks and terminates and when RenderThread resumes it notifies proxy_ to cancel any pending tasks (such as that last repaint). BUG=35858 TEST=layout tests should crash less frequently on shutdown Review URL: http://codereview.chromium.org/1625003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43766 0039d316-1c4b-4281-b951-d872f2087c98
* Audio cut off ~500ms too earlyhclam@chromium.org2010-04-021-2/+4
| | | | | | | | | | | | | | | | BUG=23055 TEST=layout tests and audio won't cut off too early with this file: http://commons.wikimedia.org/wiki/File:Montreal2.ogg This patch fix the problem by adding an extra condition to determine the end of playback by using the information of buffered audio data in the browser process. If both the renderer process and browser process don't have any more audio data then end of playback is resulted. Review URL: http://codereview.chromium.org/1581008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43546 0039d316-1c4b-4281-b951-d872f2087c98
* Enable support for additional media formats by using the duration from ↵scherkus@chromium.org2010-04-021-1/+7
| | | | | | | | | | | | | | | AVFormatContext, if present. Some media formats do not have a duration specified in the individual audio/video streams. However if the container itself lists a duration we can simply rely on that value. Patch by ducksource@gmail.com BUG=none TEST=additional media formats should be playable in Chrome if enabled in FFmpeg Review URL: http://codereview.chromium.org/1608005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43439 0039d316-1c4b-4281-b951-d872f2087c98
* ffmpeg_tests do audio for audio formats (ie wma)fbarchard@chromium.org2010-03-301-40/+47
| | | | | | | | | BUG=http://code.google.com/p/chromium-os/issues/detail?id=2156 TEST=run ffmpeg_tests on an audio file and it should report success and performance Review URL: http://codereview.chromium.org/1544002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43120 0039d316-1c4b-4281-b951-d872f2087c98
* Minor C++ fixes found by Clang.evan@chromium.org2010-03-301-1/+1
| | | | | | | | | In cases where I've added an #include, it's generally due to Clang being more picky about templates being available during expansions. Review URL: http://codereview.chromium.org/1432003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43098 0039d316-1c4b-4281-b951-d872f2087c98
* Fix use_system_ffmpeg and clean up ffmpeg.gypscherkus@chromium.org2010-03-302-8/+24
| | | | | | | | | | | | | To make use_system_ffmpeg work more correctly, we now use the system include path for headers and make use of the version number macros to determine the shared library names. Also removed a bunch of cruft without breaking anything on Windows, Mac or Linux. BUG=23602, 39430 TEST=ffmpeg should still work both with and without use_system_ffmpeg Review URL: http://codereview.chromium.org/1503002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43030 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 42727 - ffmpeg roll chromium binariesfbarchard@chromium.org2010-03-262-4/+3
| | | | | | | | | | | bug=none test=none TBR=fbarchard@chromium.org Review URL: http://codereview.chromium.org/1401002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42728 0039d316-1c4b-4281-b951-d872f2087c98
* ffmpeg roll chromium binariesfbarchard@chromium.org2010-03-262-3/+4
| | | | | | | | bug=none test=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42727 0039d316-1c4b-4281-b951-d872f2087c98
* - OpenBSD media/audio support stubpvalchev@google.com2010-03-264-7/+115
| | | | | | | | - FreeBSD has ALSA, add it to media.gyp Review URL: http://codereview.chromium.org/1301003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42699 0039d316-1c4b-4281-b951-d872f2087c98
* Removed custom FFmpegLock. Removed ffmpeg headers from ↵scherkus@chromium.org2010-03-259-60/+63
| | | | | | | | | | | | | third_party/ffmpeg/include. Patch by sergeyu@chromium.org BUG=23271 TEST=none Review URL: http://codereview.chromium.org/1289003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42573 0039d316-1c4b-4281-b951-d872f2087c98
* Change PipelineImplTest in media_unittests to workaround gmock bughclam@chromium.org2010-03-241-49/+59
| | | | | | | | | | | | | | | | media_unittests is hanging due to the latest gMock roll. This hang is caused by a deadlock in gMock described here: http://code.google.com/p/googlemock/issues/detail?id=79 This workaround works by manually releasing mock objects in certain order to avoid deadlock. BUG=38976 TEST=run media_unittests after gmock roll Review URL: http://codereview.chromium.org/1206001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42523 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 42415 - Removed custom FFmpegLock. Removed ffmpeg headers from ↵scherkus@chromium.org2010-03-248-54/+60
| | | | | | | | | | | | | | | | third_party/ffmpeg/include. Patch by sergeyu@chromium.org BUG=23271 TEST=none Review URL: http://codereview.chromium.org/1213002 TBR=scherkus@chromium.org Review URL: http://codereview.chromium.org/1240002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42422 0039d316-1c4b-4281-b951-d872f2087c98
* Removed custom FFmpegLock. Removed ffmpeg headers from ↵scherkus@chromium.org2010-03-248-60/+54
| | | | | | | | | | | | | third_party/ffmpeg/include. Patch by sergeyu@chromium.org BUG=23271 TEST=none Review URL: http://codereview.chromium.org/1213002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42415 0039d316-1c4b-4281-b951-d872f2087c98
* Merged VideoSurface, VideoFrame and VideoFrameImpl in VideoFrame.scherkus@chromium.org2010-03-2321-631/+578
| | | | | | | | | | | Patch by sergeyu@chromium.org BUG=28100 TEST=Ran media_unittests Review URL: http://codereview.chromium.org/1226001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42391 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 41386 - Removed custom FFmpegLock. Removed ffmpeg headers from ↵jrg@chromium.org2010-03-128-54/+60
| | | | | | | | | | | | | | | | | | | | | third_party/ffmpeg/include. Bot unhappy Automatic: "media_unittests" on "Vista Tests" from 41386: ... scherkus@chromium.org ... http://chrome-buildbot:8010/builders/Vista%20Tests/builds/17009/steps/media_unittests/logs/stdio Patch by sergeyu@chromium.org BUG=23271 TEST=none Review URL: http://codereview.chromium.org/909002 TBR=scherkus@chromium.org Review URL: http://codereview.chromium.org/854006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41389 0039d316-1c4b-4281-b951-d872f2087c98
* Removed custom FFmpegLock. Removed ffmpeg headers from ↵scherkus@chromium.org2010-03-128-60/+54
| | | | | | | | | | | | | third_party/ffmpeg/include. Patch by sergeyu@chromium.org BUG=23271 TEST=none Review URL: http://codereview.chromium.org/909002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41386 0039d316-1c4b-4281-b951-d872f2087c98
* win: string_util.h -> utf_string_conversions.h fix.jhawkins@google.com2010-03-113-3/+3
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/830002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41292 0039d316-1c4b-4281-b951-d872f2087c98
* Move wtl from chrome/third_party to third_party/. Thistony@chromium.org2010-03-092-3/+3
| | | | | | | | | | | breaks dependencies on chrome from webkit, app, views and base. BUG=37649 TEST=compiles Review URL: http://codereview.chromium.org/699001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41001 0039d316-1c4b-4281-b951-d872f2087c98
* media: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-063-3/+3
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/668227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40852 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crashing in FFmpegGlueTest.Write and friendshclam@chromium.org2010-03-051-20/+15
| | | | | | | | | | | | | | | | BUG=36037 TEST=FFmpegGlueTest.* runs on build bot FFmpegGlueTest.Write was crashing on build bots due to that it has dependencies on previous test to run. And strangely the build bot didn't run all the test cases, resulting the crash. This is fixed by extracting the initialization step and putting it into a common test setup task. Review URL: http://codereview.chromium.org/668034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40800 0039d316-1c4b-4281-b951-d872f2087c98
* omx_unittests to load OpenMAX library dynamicallyhclam@chromium.org2010-03-052-1/+8
| | | | | | | | Now OpenMAX library has to be loaded dynamically. Review URL: http://codereview.chromium.org/667010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40693 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DecoderBaseTest in media testhclam@chromium.org2010-03-031-35/+59
| | | | | | | | | | It was failing on XP (dbg) because of weird name clashing of class. BUG=32947 BUG=37139 Review URL: http://codereview.chromium.org/660355 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40566 0039d316-1c4b-4281-b951-d872f2087c98
* Fix problem linking with OpenMAX IL stubhclam@chromium.org2010-03-031-0/+1
| | | | | | | | | The dependency on OpenMAX IL stub is off. It creates failure depending on the build order. Review URL: http://codereview.chromium.org/665010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40551 0039d316-1c4b-4281-b951-d872f2087c98
* Fix license headers in X11/GL/GLES video renderers.scherkus@chromium.org2010-03-033-9/+9
| | | | | | | | | | TBR=piman BUG=none TEST=none Review URL: http://codereview.chromium.org/666006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40542 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing some subtle issues with player_x11 and GL/GLES video renderers.scherkus@chromium.org2010-03-035-58/+56
| | | | | | | | | BUG=n/a TEST=n/a Review URL: http://codereview.chromium.org/665008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40539 0039d316-1c4b-4281-b951-d872f2087c98
* ffmpeg better message for error on opening file if the file opens but the ↵fbarchard@chromium.org2010-03-033-13/+43
| | | | | | | | | | | codec is not supported. BUG=37256 TEST=ffmpeg_tests.exe d:\mediatests\elephant2.m4v with chromium and you should get 'File format not supported' Review URL: http://codereview.chromium.org/661426 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40472 0039d316-1c4b-4281-b951-d872f2087c98
* Generate stubs for OpenMAX ILhclam@chromium.org2010-03-025-3/+57
| | | | | | | | | | | | Generate stubs for OpenMAX IL so we don't need a real OpenMAX library for building. The actual library is loaded during runtime. TEST=Build is green TEST=Running omx_test works on hardware with OpenMAX support Review URL: http://codereview.chromium.org/661135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40418 0039d316-1c4b-4281-b951-d872f2087c98
* Using bitstream filters if OpenMAX is enabledhclam@chromium.org2010-03-013-24/+51
| | | | | | | | | | | | | | | Use FFmpeg bitstream filters if OpenMAX is enabled. The following filters are used: 1. h264_mp4toannexb 2. mpeg4video_es 3. vc1_asftorcv 4. vc1_asftoannexg TEST=run player_x11 with --enable-openmax and the above formats work Review URL: http://codereview.chromium.org/661059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40306 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the tree after r40232.jhawkins@chromium.org2010-02-281-1/+1
| | | | | | | | | TBR=hclam BUG=none TEST=none Review URL: http://codereview.chromium.org/661254 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40233 0039d316-1c4b-4281-b951-d872f2087c98
* Disable a media unit testhclam@chromium.org2010-02-271-1/+1
| | | | | | | | | | DecoderBaseTest.FlowControl is crashing on XP (dbg). TBR=scherkus, nsylvain Review URL: http://codereview.chromium.org/661253 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40232 0039d316-1c4b-4281-b951-d872f2087c98
* Fix flow control in media::DecoderBasehclam@chromium.org2010-02-273-13/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | The flow control in media::DecoderBase was incorrect because it reads too aggressively to the demuxer stream and failed some DCHECKs when asynchronous decoding like OpenMAX is used. An example of a failing case is: Action Pending Read Pending Decode Read Request Read 1 0 1 Read 2 0 2 ReadComplete 1 1 2 ReadComplete 0 2 2 DecodeComplete 1 1 1 DecodeComplete 1 0 0 Because of the aggressive read in OnDecodeComplete in DecoderBase. Even if all the read requests are fulfiled there is still on pending read issued to the demuxer stream. This mismatch is fixed in this patch. BUG=32947 TEST=media_unittests Review URL: http://codereview.chromium.org/660170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40189 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent integer underflow when calculating next_fill_time_ms in ↵scherkus@chromium.org2010-02-251-5/+14
| | | | | | | | | | | AlsaPcmOutputStream. BUG=35819 TEST=play any content containing audio under linux, the sound should no longer cut out Review URL: http://codereview.chromium.org/660066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40070 0039d316-1c4b-4281-b951-d872f2087c98
* Some fixes to player_x11 when OpenMAX is enabledhclam@chromium.org2010-02-205-18/+19
| | | | | | | | | | | - remove the --enable-h264-annexb-filter flag - OmxVideoDecodeEngine have some problems dealing EOS buffers TEST=player_x11 runs with --enable-openmax Review URL: http://codereview.chromium.org/652008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39542 0039d316-1c4b-4281-b951-d872f2087c98
* Fix misuse of OmxCodechclam@chromium.org2010-02-191-1/+1
| | | | | | | | | | | | In the last refactoring, OmxCodec was used incorrectly as NULL parameter was passed in. Using the correct parameter now. TEST=player_x11 --enable-openmax should work TBR=scherkus Review URL: http://codereview.chromium.org/651068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39505 0039d316-1c4b-4281-b951-d872f2087c98
* Pulled out Callback code into base/callback.h. This is the first step ↵akalin@chromium.org2010-02-1928-31/+55
| | | | | | | | | | | | | towards redoing the Callback interfaces. Added and removed includes as needed. BUG=35223 TEST=trybots Review URL: http://codereview.chromium.org/646061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39419 0039d316-1c4b-4281-b951-d872f2087c98
* Solaris: Second set adding in Solaris as an OS optionevan@chromium.org2010-02-181-2/+2
| | | | | | | | | | TEST=compiles BUG=30101 Patch by James Choi <jchoi42@pha.jhu.edu>. Review URL: http://codereview.chromium.org/606075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39362 0039d316-1c4b-4281-b951-d872f2087c98
* gles2: fix stride supportpiman@chromium.org2010-02-171-3/+26
| | | | | | Review URL: http://codereview.chromium.org/626009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39283 0039d316-1c4b-4281-b951-d872f2087c98
* Add comment to unit tests previously disabledhclam@chromium.org2010-02-171-0/+8
| | | | | | | | | | | | | FFmpegGlueTest and friends are crashing on the build bots. Some of them are disabled and need comment in the code to indicate the bug number. BUG=36037 TBR=scherkus, finnur Review URL: http://codereview.chromium.org/619012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39253 0039d316-1c4b-4281-b951-d872f2087c98
* Disable FFmpegGlueTest.Write and friendshclam@chromium.org2010-02-171-4/+4
| | | | | | | | | | | | FFmpegGlueTest.Write starts to crash. Can't fix it shortly so disable it and its friends. BUG=36037 TBR=finnur, scherkus Review URL: http://codereview.chromium.org/624001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39252 0039d316-1c4b-4281-b951-d872f2087c98
* API to allow strategy class to work on the output buffer of OpenMAXhclam@chromium.org2010-02-1712-147/+1343
| | | | | | | | | | | | | | Added interface of OmxOutputSink to interact with OmxCodec to perform buffer negotiation and buffer read signaling. TEST=media_unittests --gtest_filter=Omx* BUG=32753 BUG=32754 BUG=32870 Review URL: http://codereview.chromium.org/593047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39247 0039d316-1c4b-4281-b951-d872f2087c98
* media: remove redundant gyp excludesevan@chromium.org2010-02-171-24/+0
| | | | | | | | | | I moved all of these general patterns to common.gypi. Also rearrange the common.gypi patterns to cover more common Linux patterns. Review URL: http://codereview.chromium.org/608032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39236 0039d316-1c4b-4281-b951-d872f2087c98
* Software performance qualification.fbarchard@chromium.org2010-02-132-0/+474
| | | | | | | | | BUG=32758 TEST=build this test in release mode, get test data (see source), and run the test. Review URL: http://codereview.chromium.org/552231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38989 0039d316-1c4b-4281-b951-d872f2087c98