summaryrefslogtreecommitdiffstats
path: root/media
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Suppress slider thumb jumping around during seekinghclam@chromium.org2009-08-219-16/+91
| | | | | | | | | | | | | BUG=19396 TEST=Open a video, seek to any position, the thumb should stops a bit and then goes forward from there. Preventing the slider thumb from jumping around after seek by freezing the clock until we get a valid time update from the audio renderer. Review URL: http://codereview.chromium.org/173072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23937 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the folding define macro.ajwong@chromium.org2009-08-201-7/+0
| | | | | | | | | | | It will never be disabled anyways and just leaves a block of code open for bitrot. BUG=none TEST=none Review URL: http://codereview.chromium.org/171017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23852 0039d316-1c4b-4281-b951-d872f2087c98
* Bump kNumBuffers to 3fbarchard@chromium.org2009-08-202-16/+22
| | | | | | | | BUG=17940 TEST=This vid should not stutter http://fbarchard-v64.ad.corp.google.com/testmatrix/color/color2.mp4 Review URL: http://codereview.chromium.org/174134 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23849 0039d316-1c4b-4281-b951-d872f2087c98
* Enabled mono playback support for Linux.scherkus@chromium.org2009-08-202-5/+20
| | | | | | | | | | BUG=19788 TEST=try playing any mono audio source, should just work! Review URL: http://codereview.chromium.org/173109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23846 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent current time jumping around when seekhclam@chromium.org2009-08-191-3/+10
| | | | | | | | | | | | | | | | | BUG=19396 TEST=Open a .ogg file, seek, now the thumb won't jumps to 0 back and forth again. Using a <video> to play a video file, when you seek (especially ogg files) it will jump to time = 0 and jumps back to the desired seek position back and forth. This is because ogg files are muxed in a way that audio packets have large gaps between valid timestamps. This patch will avoid using invalid timestamps from audio packets to estimate the current time. Review URL: http://codereview.chromium.org/173027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23754 0039d316-1c4b-4281-b951-d872f2087c98
* Possible deadlock in PCM audio Start() methodcpu@chromium.org2009-08-182-6/+47
| | | | | | | | | | | | | - Implement Alpha's idea of pausing the device while we queue the first two packets. - This way we don't risk the chance to enter the callback from two threads at the same time. TEST=unit test added BUG=19276 Review URL: http://codereview.chromium.org/173022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23668 0039d316-1c4b-4281-b951-d872f2087c98
* Renames the ambiguous hwnd variable to |parent|.scherkus@chromium.org2009-08-181-2/+2
| | | | | | | | | | | | | Patch submitted by Thiago Farina: http://codereview.chromium.org/171072 BUG=None TEST=None Review URL: http://codereview.chromium.org/174017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23654 0039d316-1c4b-4281-b951-d872f2087c98
* A quick fix for YUV overflow on Mac concern.fbarchard@chromium.org2009-08-183-32/+88
| | | | | | | | | BUG=18672 TEST=run videos in debug mode and watch for DCHECK. Review URL: http://codereview.chromium.org/170019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23599 0039d316-1c4b-4281-b951-d872f2087c98
* Removes hungarian notations from list.h.paul@chromium.org2009-08-171-37/+36
| | | | | | | | | | | | Landing a patch for Thiago Farina, original CL: http://codereview.chromium.org/171026 BUG=none TEST=none Review URL: http://codereview.chromium.org/172048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23564 0039d316-1c4b-4281-b951-d872f2087c98
* Workaround a race condition caused by not synchronization destruction of the ↵ajwong@chromium.org2009-08-151-0/+7
| | | | | | | | | | | pipeline. BUG=16059 TEST=none Review URL: http://codereview.chromium.org/171018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23514 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes crash due to NullAudioRenderer calling GetPlaybackRate() during ↵scherkus@chromium.org2009-08-151-18/+16
| | | | | | | | | | | | | initialization. This mostly affects test_shell as NullAudioRenderer is only used with chrome when passing --disable-audio. BUG=13907 TEST=test should crash less Review URL: http://codereview.chromium.org/172018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23507 0039d316-1c4b-4281-b951-d872f2087c98
* Framework to display disabled mute button when audio fails.kylep@chromium.org2009-08-141-0/+5
| | | | | | | | BUG=18970 TEST=play a video with no audio hardware, verify that UI changes Review URL: http://codereview.chromium.org/169010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23491 0039d316-1c4b-4281-b951-d872f2087c98
* demux duplicate data the same way as mp3 does.fbarchard@chromium.org2009-08-142-86/+49
| | | | | | | | | 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/160529 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23455 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented end-of-stream callback for media::PipelineImpl.scherkus@chromium.org2009-08-1216-84/+320
| | | | | | | | | | | | | | | A new method HasEnded() was added to renderer interfaces. Renderers return true when they have both received and rendered an end-of-stream buffer. For audio this translates to sending the very last buffer to the hardware. For video this translates to displaying a black frame after the very last frame has been displayed. Renderers can notify the pipeline that the value of HasEnded() has changed to true via FilterHost::NotifyEnded(). Instead of tracking which renderers have called NotifyEnded(), the pipeline uses the notification to poll every renderer. The ended callback will only be executed once every renderer returns true for HasEnded(). This has a nice benefit of being able to ignore extra NotifyEnded() calls if we already determine the pipeline has ended. With the changes to WebMediaPlayerImpl, we should now properly support both the ended event and looping. BUG=16768,17970,18433,18846 TEST=media_unittests, media layout tests, ended event, timeupdate should stop firing, looping should work, seeking after video ends Review URL: http://codereview.chromium.org/164403 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23255 0039d316-1c4b-4281-b951-d872f2087c98
* media player cleanup of old unused menu itemsfbarchard@chromium.org2009-08-116-131/+9
| | | | | | | | | BUG=17415 TEST=options menu has no greyed out items in it. about box date updated. Review URL: http://codereview.chromium.org/164334 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23067 0039d316-1c4b-4281-b951-d872f2087c98
* AudioRendererHost send ViewMsg_AudioStreamStatehclam@chromium.org2009-08-111-9/+0
| | | | | | | | | | | | | AudioRendererHost should use ViewMsg_AudioStreamState to notify renderer of its state instead of AudioOutputStream::State. The enum of AudioOutputStream::State is not used anywhere, thus removed. TEST=unit_tests --gtest_filter=Audio* Review URL: http://codereview.chromium.org/165255 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23061 0039d316-1c4b-4281-b951-d872f2087c98
* Updated decode logic to estimate timestamps if the demuxer has not assigned one.kylep@chromium.org2009-08-112-9/+23
| | | | | | | | BUG=18208,18726 TEST=none Review URL: http://codereview.chromium.org/165270 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23038 0039d316-1c4b-4281-b951-d872f2087c98
* Mute audio under OLA when given rate would cause poor quality.kylep@chromium.org2009-08-102-3/+21
| | | | | | | | BUG=18362 TEST=none Review URL: http://codereview.chromium.org/164031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22974 0039d316-1c4b-4281-b951-d872f2087c98