summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webmediaplayer_impl.h
Commit message (Collapse)AuthorAgeFilesLines
* Adding way to pass video frames between Chromium and WebKitvrk@google.com2010-08-311-0/+5
| | | | | | | | | | | | | This patch adds an implementation of the WebVideoFrame interface defined in WebKit, and it adds behavior to WebMediaPlayerImpl to pass video frame data between WebKit and Chromium. BUG=none TEST=none Review URL: http://codereview.chromium.org/3155050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58022 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unnecessary STL #includes from src/webkit.viettrungluu@chromium.org2010-08-191-2/+0
| | | | | | | | | BUG=none TEST=builds Review URL: http://codereview.chromium.org/3122029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56655 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt four at landing the "histogram.h removed from message_loop.h" patch.erg@chromium.org2010-07-151-0/+1
| | | | | | | | | | | | | | Previously committed as r52349 and r52336. Related commits: r52367, r52364 and r52343. Rerunning trybots due to previous trybot breakage. TEST=none BUG=none Review URL: http://codereview.chromium.org/2965015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52496 0039d316-1c4b-4281-b951-d872f2087c98
* Revert everything related to the relanding.erg@chromium.org2010-07-141-1/+0
| | | | | | Review URL: http://codereview.chromium.org/2982009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52367 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r52336.erg@chromium.org2010-07-141-0/+1
| | | | | | | | | | | | | | (I accidentally committed a previous version of the patch (the fixed version was in codereview since I had switched to my mac to address this exact compile failure.) BUG=none TEST=none TBR=evan Review URL: http://codereview.chromium.org/2937010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52349 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 52336 - More header cleanup:erg@chromium.org2010-07-141-1/+0
| | | | | | | | | | | | | | | | - Some cleanup to url_request.h - Remove task.h from headers that don't need it. - Remove histogram.h from message_loop.h BUG=none TEST=none Review URL: http://codereview.chromium.org/2986002 TBR=erg@chromium.org Review URL: http://codereview.chromium.org/2969006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52343 0039d316-1c4b-4281-b951-d872f2087c98
* More header cleanup:erg@chromium.org2010-07-141-0/+1
| | | | | | | | | | | | | - Some cleanup to url_request.h - Remove task.h from headers that don't need it. - Remove histogram.h from message_loop.h BUG=none TEST=none Review URL: http://codereview.chromium.org/2986002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52336 0039d316-1c4b-4281-b951-d872f2087c98
* This is the last part of changing the buffered() function prototype: getting ↵vrk@google.com2010-06-301-4/+0
| | | | | | | | | | | rid of the old, unused buffered() const prototype. BUG=none TEST=media_unittests Review URL: http://codereview.chromium.org/2858022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51269 0039d316-1c4b-4281-b951-d872f2087c98
* Make MediaFilter::Stop() asynchronous.boliu@chromium.org2010-06-111-0/+8
| | | | | | | | | | | | | | This is the second issue regarding making Stop() asynchronous. All Stop() in subclasses of MediaFilter is made to accept a callback and runs the callback at the end of its stop. BUG=16059 TEST=media_unittest, unit_tests, test_shell_tests still passes Review URL: http://codereview.chromium.org/2541003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49548 0039d316-1c4b-4281-b951-d872f2087c98
* Reporting a more accurate buffered time for the video taghclam@chromium.org2010-05-251-0/+4
| | | | | | | | | | | | | Instead of showing that the entire file is buffered when the video first loads, this uses current time, current bytes, and buffered bytes to estimate buffered time. Reviewed: http://codereview.chromium.org/2085012/ Submitted for: vrk@chromium.org BUG=42285 TEST=NONE Review URL: http://codereview.chromium.org/2192001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48199 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/gfx contents to gfx/ben@chromium.org2010-03-141-2/+2
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41559 0039d316-1c4b-4281-b951-d872f2087c98
* More dependency breaking. webkit shouldn't depend on chrome or ipc.tony@chromium.org2010-03-101-1/+0
| | | | | | | | The GPU code will still cause problems, but this is a step in the right direction. Review URL: http://codereview.chromium.org/707002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41115 0039d316-1c4b-4281-b951-d872f2087c98
* Initial work for cross-process video rendering using layers.scherkus@chromium.org2010-02-261-11/+43
| | | | | | | | | | | Introduces VideoLayer, which is similar to BackingStore except handles YUV surfaces and conversion to RGB. BUG=33329 TEST=N/A Review URL: http://codereview.chromium.org/597066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40137 0039d316-1c4b-4281-b951-d872f2087c98
* Upstreaming WebKit.gypyaar@chromium.org2009-11-121-2/+2
| | | | | | | | | | | | This mega patch contains a few simple but tightly dependent changes: 1. Deletion of webkit/api/WebKit.gyp. The file now lives in webkit.org. 2. Rename of webkit/webkit.gyp to webkit/webkit_glue.gyp. Having two webkit.gyp was a source of developer confusion. 3. Gyp dependencies are updated across chromium to point at the upstream WebKit.gyp and the renamed webkit_glue.gyp. 4. Some 200+ files include paths fixed to point to third_party/WebKit/WebKit/chromium instead of webkit/api. The later will be deleted in a subsequent patch. Review URL: http://codereview.chromium.org/387020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31749 0039d316-1c4b-4281-b951-d872f2087c98
* Third patch in making destructors of refcounted objects private.jam@chromium.org2009-11-051-1/+4
| | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/363023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31169 0039d316-1c4b-4281-b951-d872f2087c98
* Use a saved copy of the time when pausing media elements.scherkus@chromium.org2009-10-231-0/+7
| | | | | | | | | | | | | | Since our internal pause is asynchronous and we don't want to hang the render thread, it's possible to have our clock creep ahead. This produces unexpected behaviour when pausing media elements, such as seeing currentTime attribute nudge a little ahead after calling pause(). This so happens to also address layout test flakiness. BUG=13907 TEST=layout tests, especially video-pause-immediately.html -- a new layout test I wrote and am upstreaming Review URL: http://codereview.chromium.org/334002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29851 0039d316-1c4b-4281-b951-d872f2087c98
* Report stalled event correctly for <video>hclam@chromium.org2009-10-161-0/+6
| | | | | | | | | | | | | | | | | | | | | BUG=20127 BUG=13568 TEST=Opens a web page, stalled event should be fire only if network is actuall stalled. What this patch does: 1. Report Loading / Idle according to whether we are actively receiving data in the BuffereResourceLoader. This is done by signaling the network events to BufferedDataSource and then to the media playback pipeline. 2. Report byteLoaded() as the last byte position buffered. This will enable an actual ticking progress for the progress event. With this value actually ticking, stalled event is suppressed. Review URL: http://codereview.chromium.org/269002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29235 0039d316-1c4b-4281-b951-d872f2087c98
* Reimplement video painting for mac using CGContext.ajwong@chromium.org2009-09-211-0/+4
| | | | | | | | | | | | | This is still a bit hacky. We need to avoid doing the double copy of the bits by making the skia::PlatformCanvas take in a CGContext and use that as its backing store. BUG=19536 TEST=watched at video with it :) Review URL: http://codereview.chromium.org/208039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26683 0039d316-1c4b-4281-b951-d872f2087c98
* Buffered time ranges for <video>hclam@chromium.org2009-09-101-1/+4
| | | | | | | | | | | | API change and related changes to support multiple buffered time ranges. This change doesn't change any behavior. BUG=21305 TEST=Open a video or audio file, you see the full bar of buffered ranges. Review URL: http://codereview.chromium.org/199037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25932 0039d316-1c4b-4281-b951-d872f2087c98
* Finished implementation of hasAudio() to detect media without playback audio ↵scherkus@chromium.org2009-08-181-1/+1
| | | | | | | | | | | | | | tracks. There is a WebKit side to this patch out for review as well: https://bugs.webkit.org/show_bug.cgi?id=28310 BUG=18970 TEST=play a video without audio (i.e., trek0.ogv), the UI should display a disabled audio icon Review URL: http://codereview.chromium.org/171091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23671 0039d316-1c4b-4281-b951-d872f2087c98
* Framework to display disabled mute button when audio fails.kylep@chromium.org2009-08-141-0/+1
| | | | | | | | 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
* Implemented end-of-stream callback for media::PipelineImpl.scherkus@chromium.org2009-08-121-0/+6
| | | | | | | | | | | | | | | 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
* Pipeline will execute a callback whenever an run-time error has happened.kylep@chromium.org2009-07-301-0/+6
| | | | | | | | BUG=16738 TEST=pipeline_impl_unittest.cc Review URL: http://codereview.chromium.org/160298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22075 0039d316-1c4b-4281-b951-d872f2087c98
* BufferedDataSource to support server without range request supporthclam@chromium.org2009-07-291-0/+3
| | | | | | | | | | | | | | | This patch will enable BufferedDataSource to support servers with no range request support. It will start a probe request of 1 byte size besides the regular request. If the server does not support range request, we will turn on the is_streamed flag of FFmpeg and will not do any seeking. BUG=17628 TEST=test_shell_tests --gtest_filter=BufferedDataSource.* Review URL: http://codereview.chromium.org/160076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21999 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Pipeline will execute a callback whenever an run-time error has ↵scherkus@chromium.org2009-07-281-6/+0
| | | | | | | | | | happened." TBR=kylep Review URL: http://codereview.chromium.org/160287 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21885 0039d316-1c4b-4281-b951-d872f2087c98
* Pipeline will execute a callback whenever an run-time error has happened.kylep@chromium.org2009-07-281-0/+6
| | | | | | | | BUG=16738 TEST=pipeline_impl_unittest.cc Review URL: http://codereview.chromium.org/159373 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21877 0039d316-1c4b-4281-b951-d872f2087c98
* Changing the include from "base/gfx/platform_canvas.h" to ↵ajwong@chromium.org2009-07-221-1/+1
| | | | | | | | | | | | "skia/ext/platform_canvas.h" BUG=None TEST=None Review URL: http://codereview.chromium.org/159057 Patch from Thiago Farina <thiago.farina@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21258 0039d316-1c4b-4281-b951-d872f2087c98
* Added reference counting to the Pipeline interface.scherkus@chromium.org2009-07-181-1/+1
| | | | | | | | | BUG=17107 TEST=none Review URL: http://codereview.chromium.org/155713 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21044 0039d316-1c4b-4281-b951-d872f2087c98
* Begin implementation of the context menu for Video and Audio tags.ajwong@chromium.org2009-07-171-0/+2
| | | | | | | | | | | This code should enable the creation of a basic context menu for the Video and Audio tags. The actions for fullscreen, save screenshot, loop, and set playback rate are not yet implemented. BUG=15686 TEST=None Review URL: http://codereview.chromium.org/149604 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20931 0039d316-1c4b-4281-b951-d872f2087c98
* Removed the bool parameter from PipelineCallback and cleaned up ↵scherkus@chromium.org2009-07-151-34/+20
| | | | | | | | | | | | | WebMediaPlayerImpl::Proxy. This forces clients to check Pipeline::GetError() instead of using a simple true/false check for success. Also the bool parameter wasn't being used for Seek() and Stop() callbacks, further hinting at its removal. BUG=16009 TEST=media_unittests pass, layout tests pass Review URL: http://codereview.chromium.org/149584 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20738 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bug where playbackRate wasn't being respected.scherkus@chromium.org2009-07-141-0/+9
| | | | | | | | | BUG=16502 TEST=setting defaultPlaybackRate before the media starts playing should be respected when play() is called Review URL: http://codereview.chromium.org/155404 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20652 0039d316-1c4b-4281-b951-d872f2087c98
* Unreverting "Implemented injected message loops for PipelineImpl"scherkus@chromium.org2009-07-111-3/+3
| | | | | | | | | | Guess it was a flaky layout test. TBR=hclam Review URL: http://codereview.chromium.org/155400 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20444 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Implemented injected message loops for PipelineImpl."scherkus@chromium.org2009-07-101-3/+3
| | | | | | | | | | | | I cannot repro the layout test failures, seeing if this helps. TBR=hclam BUG=none TEST=none Review URL: http://codereview.chromium.org/155396 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20439 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented injected message loops for PipelineImpl.scherkus@chromium.org2009-07-101-3/+3
| | | | | | | | | | | For now both the player and WebMediaPlayerImpl create a thread and inject its message loop into the pipeline. The end result is more-or-less the same as what we have today, but we could end up moving the pipeline onto the render thread. BUG=16008 TEST=layout tests, media_unittests should pass Review URL: http://codereview.chromium.org/155338 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20417 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring to introduce refcount to WebMediaPlayerImplhclam@chromium.org2009-07-071-70/+109
| | | | | | | | | | WebMediaPlayerImpl interacts with multiple threads that it becomes necessary to make it refcounted so we can post task on different threads' message loop. Review URL: http://codereview.chromium.org/147225 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20038 0039d316-1c4b-4281-b951-d872f2087c98
* Refactorying to create the ResourceLoaderBridge through a factory class for ↵hclam@chromium.org2009-06-251-2/+1
| | | | | | | | | | | <video> Extract the code to create a ResourceLoaderBridge to a factory class to enable testing on the data source filters. Review URL: http://codereview.chromium.org/146007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19262 0039d316-1c4b-4281-b951-d872f2087c98
* Hack to enable video on mac by creating a blank PlatformContextMac to draw on.ajwong@chromium.org2009-06-161-3/+0
| | | | | | | | This isn't a great solution, but it kinda works. Video renders, and the speed is acceptable even though we're doing an extra copy for each frame. The image shows up upside-down though. :( Review URL: http://codereview.chromium.org/126087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18503 0039d316-1c4b-4281-b951-d872f2087c98
* Enable <video> in test_shellhclam@chromium.org2009-06-111-0/+229
| | | | | | | | | | | | | | | | | | | | | This is a work in progress draft. Summary of changes: 1. Moved code shared by chrome and test_shell to webkie/glue: WebMediaPlayerImpl SimpleDataSource VideoRendererImpl 2. Since WebMediaPlayerImpl is shared, chrome specific renderers are enabled by passing the FilterFactoryCollection into WebMediaPlayerImpl, this is done in RenderView. And WebMediaPlayerImpl provides some default renderer filters, which are used by the test shell and also chrome. Review URL: http://codereview.chromium.org/119229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18182 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor media player to move away from webkit_gluehclam@chromium.org2009-05-071-71/+0
| | | | | | | | | | | | Highlights: 1. WebCore::MediaPlayerPrivate now only has one static method that constructs WebMediaPlayerClient 2. Implementation of WebCore::MediaPlayerPrivateInterface now is WebMediaPlayerClient 3. WebMediaPlayerClient does the delgation to WebMediaPlayer 4. Implemtnation of real media player will go into chrome/renderer and implements WebMediaPlayer Review URL: http://codereview.chromium.org/105007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15492 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enabling ENABLE_VIDEO since and made appropriate changes due toWebKit ↵hclam@chromium.org2009-03-311-0/+9
| | | | | | | | merge since r41907 (http://trac.webkit.org/changeset/41907).Changes include change names of state enums and adding method tosupport added state change event in WebCore::MediaPlayer. Review URL: http://codereview.chromium.org/56038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12917 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes CRLF and trailing white spaces.maruel@chromium.org2009-03-051-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
* Merged with latest media pipeline and cleaned up some style stuff.hclam@chromium.org2009-02-031-28/+8
| | | | | | | | Changed WebMediaPlayerDelegateImpl to contains a PipelineImpl object rather keeping a pointer to Pipeline interface. Also added code for task coordination between pipeline thread and main thread. Review URL: http://codereview.chromium.org/19481 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9069 0039d316-1c4b-4281-b951-d872f2087c98
* Add resource loading glue code for WebMediaPlayerDelegatehclam@chromium.org2009-01-171-1/+23
| | | | | | | | Added glue code to ResourceHandle for WebMediaPlayerDelegate. Review URL: http://codereview.chromium.org/18282 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8246 0039d316-1c4b-4281-b951-d872f2087c98
* Bridge out media player from MediaPlayerPrivate.hclam@chromium.org2008-12-181-0/+60
- Remove MediaPlayerPrivateChromium.cpp and move it to webkit/glue/media_player_private_impl.cc - Added the following classes: WebMediaPlayer WebMediaPlayerImpl WebMediaPlayerDelegate WebMediaPlayerDelegateImpl TestWebMediaPlayerDelegate VideoStackMediaPlayer (Just a forward declaration) - One include fix for webkit/glue/webframe.h - Overview of what each class is doing: WebMediaPlayer and WebMediaPlayerImpl Wrapper over the MediaPlayerPrivate, it provides methods like Repaint(), NotifyNetworkStateChange(), etc to VideoStackMediaPlayer. It also creates the ResourceHandle for VideoStackMediaPlayer for resource loading, or maybe VideoStackMediaPlayer can simply use webkit_glue::ResourceDispatcher? WebMediaPlayerDelegate, WebMediaPlayerDelegateImpl Delegate calls from webkit to the internal media player. MediaPlayerPrivate Forward calls to WebMidiaPlayerDelegate, creates WebMediaPlayerDelegate and WebMediaPlayer in the constructor. Expose some public methods to WebMediaPlayer so we can actually do repaint and notification of changes. Review URL: http://codereview.chromium.org/13762 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7256 0039d316-1c4b-4281-b951-d872f2087c98