summaryrefslogtreecommitdiffstats
path: root/media
Commit message (Collapse)AuthorAgeFilesLines
* media::FFmpegDemuxer giving too much errorshclam@chromium.org2009-09-301-2/+4
| | | | | | | | | | | NOTIMPLEMENTED() is reached when performing layout tests. It is changed to LOG(INFO) so messages go to stderr and won't affect layout tests. BUG=13447 Review URL: http://codereview.chromium.org/242078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27655 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid potential "NULL used as int" warnings by changing ASSERT_EQ(NULL, ...) ↵pkasting@chromium.org2009-09-292-3/+3
| | | | | | | | | to ASSERT_TRUE(... == NULL). Patch by Jacob Mandelson (see http://codereview.chromium.org/202057 ), r=me. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27511 0039d316-1c4b-4281-b951-d872f2087c98
* Add --verbose=N option to set ffmpeg log message level.fbarchard@chromium.org2009-09-241-3/+16
| | | | | | Review URL: http://codereview.chromium.org/219012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27069 0039d316-1c4b-4281-b951-d872f2087c98
* Off by one in YUV scale caused an extra read (mostly harmless)fbarchard@chromium.org2009-09-223-21/+3
| | | | | | | | | BUG=22594 TEST=none Review URL: http://codereview.chromium.org/212043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26797 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing build bustage caused by r26759hclam@chromium.org2009-09-211-1/+1
| | | | | | | | | | TBR=ajwong StringPrintf should use %u instead of %zd. Review URL: http://codereview.chromium.org/216042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26763 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up the unittest to correct order of expects, and give correct tracing ↵ajwong@chromium.org2009-09-211-18/+28
| | | | | | | | info. Review URL: http://codereview.chromium.org/209054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26759 0039d316-1c4b-4281-b951-d872f2087c98
* Mac YUV with a single YUV table of 6k instead of 3 tables of 2k.fbarchard@chromium.org2009-09-212-278/+66
| | | | | | | | | BUG=20749 TEST=play mac video... it should be 3 times faster rendering and visibly smoother Review URL: http://codereview.chromium.org/208048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26740 0039d316-1c4b-4281-b951-d872f2087c98
* Disable FFmpeg logging as it interferes with layout tests.scherkus@chromium.org2009-09-194-0/+13
| | | | | | | | | | | | We could disable logging as soon as FFmpeg is loaded in InitializeMediaLibrary(), but we may want logging enabled for different applications using the media library (i.e., media_bench). BUG=16779 TEST=running chrome, test_shell on theora videos shouldn't print any boring log messages Review URL: http://codereview.chromium.org/212013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26641 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Mac YUV assembly"ajwong@chromium.org2009-09-182-63/+273
| | | | | | | | This reverts commit r26614. Review URL: http://codereview.chromium.org/213034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26621 0039d316-1c4b-4281-b951-d872f2087c98
* Mac YUV assemblyfbarchard@chromium.org2009-09-182-273/+63
| | | | | | | | BUG=20749 TEST=play mac video... it should be 3 times faster rendering and visibly smoother Review URL: http://codereview.chromium.org/208030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26614 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing audio in machclam@chromium.org2009-09-173-8/+94
| | | | | | | | | | | | | | | | | | | | | | | | TEST=media_unittests BUG=21574 Several problems in mac audio: 1. AudioQueueEnqueueBuffer doesn't accept empty buffers. But we often hit buffer underrun with various reasons. In order to simulate the behavior of Windows that empty buffer would make the callback be called after a short time, we write a short buffer of silence. 2. Mac audio doesn't provide pending bytes (unplayed buffer size in audio buffer). This is now fixed by having a running counter. 3. After Stop() is called, Start() will take a long time for the audio packet to be played. It is found that AudioQueueEnqueueBuffer should be called before AudioQueueStart otherwise we'll hit this problem of long delay for start. Review URL: http://codereview.chromium.org/194112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26510 0039d316-1c4b-4281-b951-d872f2087c98
* Pause for <video> should have immediate effect on audiohclam@chromium.org2009-09-171-2/+3
| | | | | | | | | | | | | BUG=20351 A bug found while fixing mac audio. IPCAudioSouce transist to a wrong state after Play() is called. Resulting to pause having no effect. This will solve the problem of audio keeps playing a while after it is paused. Review URL: http://codereview.chromium.org/193095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26500 0039d316-1c4b-4281-b951-d872f2087c98
* AudioHardwareGetProperty is deprecated in Mac OS X 10.6 ("Snow Leopard").mark@chromium.org2009-09-171-5/+15
| | | | | | | | | | | All audio hardware properties can be accessed via AudioObjectGetPropertyData, present since Mac OS X 10.4 ("Tiger"). BUG=20925 sort of TEST=Builds in all sorts of configurations Review URL: http://codereview.chromium.org/210009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26478 0039d316-1c4b-4281-b951-d872f2087c98
* Don't redefine what Snow Leopard provides if Snow Leopard has provided it.mark@chromium.org2009-09-161-1/+3
| | | | | | Review URL: http://codereview.chromium.org/205015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26347 0039d316-1c4b-4281-b951-d872f2087c98
* Force inclusion of build/common.gypi for all chromium gyp files.yaar@chromium.org2009-09-151-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Why: Simpler build code. If everybody includes it, it should be included automatically. Why now: The webkit chromium builds need it be specified, since can't default to build/common.gypi. What was done: 1. build/common.gypi's contents were moved to a new file build/gyp_chromium.gypi 2. tools/gyp/gyp_chromium was moved to build/gyp_chromium and made to automatically include build/gyp_chromium.gypi. 3. lots of gyp files were fixed to not refer to build/common.gypi any more. 4. o3d which also builds independently of chrome, was fixed to have a gyp_o3d that includes gyp_chromium.gypi too. 5. build/common.gypi was left empty, because there are some external projects that still refer to it. Things that are left to do after this patch is in: 1. The following external files (in other repositories) need to stop include common.gypi ./third_party/hunspell/hunspell.gyp ./third_party/icu/icu.gyp ./v8/tools/gyp/v8.gyp 2. Once nobody refers to common.gypi anymore, delete common.gypi -or- Delete gyp_chromium.gypi and move its content back to common.gypi Tested on mac, win and linux. On win, got a few unit tests errors on chrome bookmarks, which should not be related. I'm running again with clobber to verify. Review URL: http://codereview.chromium.org/206006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26302 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 26070 from media tests failuremhm@chromium.org2009-09-124-76/+286
| | | | | | | | | | | | | | | | | | 6 failed media_unittests - CreateFrame - Clamp - YV12 - YV16 - YV12 - YV16 TBR=fbarchard BUG=none TEST=none Review URL: http://codereview.chromium.org/202068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26074 0039d316-1c4b-4281-b951-d872f2087c98
* Media Bench file IO redux to address mp4 parsing issue.fbarchard@chromium.org2009-09-122-117/+262
| | | | | | | | | BUG=21322 TEST=run media_bench on regression corpus. Old version crashes/fails. New version should report errors and/or work. Review URL: http://codereview.chromium.org/199049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26072 0039d316-1c4b-4281-b951-d872f2087c98
* Mac Assembler and Linux cleanupfbarchard@chromium.org2009-09-124-286/+76
| | | | | | | | | BUG=20749 TEST=play mac video... it should be time times faster rendering and visibly smoother Review URL: http://codereview.chromium.org/180066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26070 0039d316-1c4b-4281-b951-d872f2087c98
* Removes hungarian notation in media\player. Thanks to thiago.farina@gmail.comfbarchard@chromium.org2009-09-091-56/+55
| | | | | | | | BUG=none TEST=none. just internal cleanup of a todo git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25735 0039d316-1c4b-4281-b951-d872f2087c98
* Added USE_GDK, set when either TOOLKIT_GTK or TOOLKIT_VIEWS is set butbenl@chromium.org2009-09-072-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not OS_WIN. Added USE_X11. Set when OS_LINUX or OS_FREEBSD is set. Added USE_BASE_DATA_PACK for base::DataPack usage, set for OS_MACOSX, OS_LINUX or OS_FREEBSD. Added USE_NSS for ... nss (for crypto). Windows and MacOS use platform-specific libraries. All of the above cause slightly odd formulations like: #if defined(OS_WIN) ... #elif defined(USE_BASE_DATA_PACK) ... #endif Possibly should also define USE_DLL_FOR_DATA, etc? Or something? Wrapped various references to struct stat64 and stat64() to use struct stat and stat() for FreeBSD - but a "man stat64" on Linux suggests that we could do the same thing for at least Linux, too, and perhaps eliminate the wrapper? git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25599 0039d316-1c4b-4281-b951-d872f2087c98
* Media bench add -hash, 64 bit IO, and some cleanup of dumpfbarchard@chromium.org2009-09-052-12/+47
| | | | | | | | BUG=21126 TEST=use media_bench -hash and it compare txt files instead of raw dump output. Should be substantially faster. Review URL: http://codereview.chromium.org/195012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25563 0039d316-1c4b-4281-b951-d872f2087c98
* Added file_protocol.h to media.gypscherkus@chromium.org2009-09-041-0/+1
| | | | | | | | | | | TBR=fbarchard BUG=none TEST=none Review URL: http://codereview.chromium.org/193016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25421 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented file URLProtocol for media_bench.scherkus@chromium.org2009-09-046-4/+81
| | | | | | | | | | BUG=none TEST=media_bench should work out of the box with chromium's ffmpeg binaries Review URL: http://codereview.chromium.org/196018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25420 0039d316-1c4b-4281-b951-d872f2087c98
* linux: fix yuv_row on ARM (don't use MMX).piman@chromium.org2009-09-041-2/+1
| | | | | | | Review URL: http://codereview.chromium.org/193011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25417 0039d316-1c4b-4281-b951-d872f2087c98
* Apply some sanity checks to the values coming back to us from FFmpeg.cevans@chromium.org2009-09-043-1/+42
| | | | | | | | | | | | Put the limits in a new standalone header file that can be re-used in other place where we have similar limits. BUG=NONE TEST=media_unittests pass Review URL: http://codereview.chromium.org/200011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25416 0039d316-1c4b-4281-b951-d872f2087c98
* media_bench optionally dump raw output to a file.fbarchard@chromium.org2009-09-031-5/+73
| | | | | | | | | BUG=20709 TEST=use ffmpeg to dump raw yuv and compare to media_bench output. Review URL: http://codereview.chromium.org/171113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25375 0039d316-1c4b-4281-b951-d872f2087c98
* Uses POINT instead of CPoint to reduce the dependency in ATL.scherkus@chromium.org2009-09-031-1/+1
| | | | | | | | | | | | | Patch submitted by Thiago Farina: http://codereview.chromium.org/188017 BUG= http://crbug.com/2185 TEST=None Review URL: http://codereview.chromium.org/199009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25365 0039d316-1c4b-4281-b951-d872f2087c98
* Fix messy includes in media\player.maruel@chromium.org2009-09-0313-149/+68
| | | | | | | | | | This should never have been checked-in as-is. TEST=still compiles BUG=none Review URL: http://codereview.chromium.org/193007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25350 0039d316-1c4b-4281-b951-d872f2087c98
* Do not permit a seek to a negative position. This was already an errorcevans@chromium.org2009-09-032-1/+5
| | | | | | | | | | | | | | | condition (in the FFmpeg glue code) but the position would be left set to negative. If the API consumer ignored the error code for the seek and then attempted a read, that might be a bad state. I am fixing this to avoid any risk of this upsetting the stream read code. FFmpeg would seem to commit this sort of API abuse. BUG=NONE TEST=FFmpegDemuxerTest.ProtocolGetSetPosition Review URL: http://codereview.chromium.org/201002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25334 0039d316-1c4b-4281-b951-d872f2087c98
* Ignore audio decode errors in the same way video decode errors are done.fbarchard@chromium.org2009-09-021-1/+6
| | | | | | | | BUG=18040 TEST=2:48 this video has an error http://fbarchard-v64.ad.corp.google.com/mediatests/dailymotion.html Review URL: http://codereview.chromium.org/190013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25220 0039d316-1c4b-4281-b951-d872f2087c98
* mmx for linux yuv convert function.fbarchard@chromium.org2009-09-015-88/+903
| | | | | | | | | BUG=18449,20718 TEST=play a video on linux without scaling and it should go 4 times faster than with scaling. Review URL: http://codereview.chromium.org/174442 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25001 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-285-10/+7
| | | | | | | | | | | This reverts commit r24792. TBR=estade Review URL: http://codereview.chromium.org/179028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a ton of compiler warnings.estade@chromium.org2009-08-285-7/+10
| | | | | | | | | | | | | | | Most of these are classes with virtual methods lacking virtual destructors or NULL used in non-pointer context. BUG=none TEST=app_unittests && base_unittests --gtest_filter=-ConditionVariableTest.LargeFastTaskTest patch by Jacob Mandelson <jlmjlm [at] gmail> http://codereview.chromium.org/171028/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24792 0039d316-1c4b-4281-b951-d872f2087c98
* Fix memory leask in media yuv_convert unit tests. Replace pointers init'd by ↵jshin@chromium.org2009-08-281-22/+22
| | | | | | | | | | | plain new[] with scoped_array. BUG=20497 (http://crbug.com/20497) TEST=Valgrind does not report memory leaks any more in media/base/yuv_convert_unittest.cc Review URL: http://codereview.chromium.org/182010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24735 0039d316-1c4b-4281-b951-d872f2087c98
* Delay calling NotifyEnded() until the audio hardware has played the last of ↵scherkus@chromium.org2009-08-272-7/+18
| | | | | | | | | | | | | | the audio. Previously we were calling NotifyEnded() when we had sent the last of the audio to the hardware. This is a small change to call NotifyEnded() when the audio hardware replies asking for additional data. Not perfect, but better than what we were doing before. TEST=play a short seamless audio clip on loop, it should be closer to seamless looping BUG=20349 Review URL: http://codereview.chromium.org/173520 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24637 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build bustage r24568hclam@chromium.org2009-08-271-0/+2
| | | | | | | | TBR=scherkus Review URL: http://codereview.chromium.org/173549 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24570 0039d316-1c4b-4281-b951-d872f2087c98
* Make audio and video in sync while playback rate != 1.0hclam@chromium.org2009-08-271-0/+1
| | | | | | | | | | | | | | BUG=20290 TEST=play a video with rate 0.5, audio and video should be in sync This change use the playback rate as a scaling factor for delay introduced in the audio hardware buffer. After we scaled the amount of audio buffer not played, we'll be able to make audio / video in sync again. Review URL: http://codereview.chromium.org/174584 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24568 0039d316-1c4b-4281-b951-d872f2087c98
* Output format change to allow longer durations.fbarchard@chromium.org2009-08-261-1/+1
| | | | | | | | | BUG=20289 TEST=run media_bench on sonyh2.ogv. formatting looks bad Review URL: http://codereview.chromium.org/173455 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24425 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up AudioRendererAlgorithmOLA when dealing with very little remaining data.scherkus@chromium.org2009-08-256-26/+230
| | | | | | | | | | | | | | | Since the main OLA loop refuses to process data when there isn't enough to process, it was possible in some situations for OLA to hold on to a few remaining bytes and never be completely "finished". This resulted in the ended event not firing, which leads to looping not working. The solution was to simply consume all remaining data and replace it with muted audio in the destination buffer. Not the best solution (we end up losing <8ms of audio at the end), but it works and is a safe fix. I also lowered the OLA threshold to 0.5x since we sound the same as other implementations so why not :P TEST=media_unittests, ended+looping when rate != 1.0f BUG=19105,19856 Review URL: http://codereview.chromium.org/174270 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24189 0039d316-1c4b-4281-b951-d872f2087c98
* Provide unplayed bytes ALSA implementation of audiohclam@chromium.org2009-08-244-3/+32
| | | | | | | | | | | | | BUG=19921 TEST=play an video track on linux, AV should be in sync. Use snd_pcm_delay() to provide the number of unplayed bytes in linux's audio implementation. This information will correct the sync problem for linux. Review URL: http://codereview.chromium.org/173288 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24163 0039d316-1c4b-4281-b951-d872f2087c98
* Providing unplayed bytes in audio hardware bufferhclam@chromium.org2009-08-2415-37/+126
| | | | | | | | | | | | | | | | | BUG=20007 TEST=WinAudioTest.PCMWaveStreamPendingBytes We used to guess what is in the hardware audio buffer to perform audio sync. But due the triple buffering and other platforms has other buffering scheme we need to be able to know how many bytes are left in the hardware buffer. We provide this data via AudioCallback::OnMoreData(), so we can predict when the requested buffer will be played. Review URL: http://codereview.chromium.org/174243 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24114 0039d316-1c4b-4281-b951-d872f2087c98
* qt_faststart use %PRIX64 for 64 bit value printfs for better compatibility ↵fbarchard@chromium.org2009-08-211-5/+6
| | | | | | | | | | | with linux64 and mingw. Thanks to ambro on IIRC. BUG=19999 TEST=use qt-faststart on mingw or linux64 and notice some of the printfs have invalid values. Review URL: http://codereview.chromium.org/174272 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24046 0039d316-1c4b-4281-b951-d872f2087c98
* Correct network state and ready state reporting.ajwong@chromium.org2009-08-215-0/+26
| | | | | | | | | | | | | For network state, make it return "loading" for everything that's not a file source since our cache does not yet reliably support caching the full media w/o need for a network. For ready state, correctly handle seeks to drop from HaveEnoughData down to HaveMetaData until the seek completes. Also implement the seeking() function. BUG=18975 TEST=none Review URL: http://codereview.chromium.org/165432 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24036 0039d316-1c4b-4281-b951-d872f2087c98
* Updates to be able to build all targets in Linux x64.deanm@chromium.org2009-08-211-7/+11
| | | | | | | Review URL: http://codereview.chromium.org/174261 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24029 0039d316-1c4b-4281-b951-d872f2087c98
* Timing code for measuring DLL load performance.fbarchard@chromium.org2009-08-211-1/+29
| | | | | | | | | BUG=18466 TEST=reduce DLL sizes with -O2 and other options, and test performance with this code. Review URL: http://codereview.chromium.org/165039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24017 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Issue 160529 in a nice way with unittest.fbarchard@chromium.org2009-08-214-54/+33
| | | | | | | | | | | | Original CL171023 by Song YeWen. BUG=16020 TEST=test with all media types and ensure there are no memory leaks are functional differences from previous version. Review URL: http://codereview.chromium.org/174027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24016 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting r24002 due to test_shell_tests rednessajwong@chromium.org2009-08-215-26/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24004 0039d316-1c4b-4281-b951-d872f2087c98
* Correct network state and ready state reporting.ajwong@chromium.org2009-08-215-0/+26
| | | | | | | | | | | | | For network state, make it return "loading" for everything that's not a file source since our cache does not yet reliably support caching the full media w/o need for a network. For ready state, correctly handle seeks to drop from HaveEnoughData down to HaveMetaData until the seek completes. Also implement the seeking() function. BUG=18975 TEST=none Review URL: http://codereview.chromium.org/165432 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24002 0039d316-1c4b-4281-b951-d872f2087c98
* Threadsafe access to AudioSource callback. Release stream on close. Handle ↵ajwong@chromium.org2009-08-215-46/+151
| | | | | | | | | | | | | | | | | | | | error on open better. This should fix the memory leak on stream close by synchronizing the removal of the audio source callback with the signaling of a close event to both the audio source, and to the audio manager. This change also makes it possible to go from kPlaying -> kPlaying because the audio source callback can be swapped correctly. Lastly, Open() is made more robust by failing early on an error state. BUG=19860,18217 TEST=none Review URL: http://codereview.chromium.org/173168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23988 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build bustagehclam@chromium.org2009-08-211-1/+1
| | | | | | | | | | Fix build bustage because of signed / unsigned mismatch. TBR=scherkus Review URL: http://codereview.chromium.org/174211 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23938 0039d316-1c4b-4281-b951-d872f2087c98