From 1210ebacea247dbe1b49a9a3c2c4a0b0878b8998 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 2 Oct 2012 16:40:31 +0000 Subject: [PATCH] Remove support for HTML5 audio & video tags (issue #530). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@829 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef1/cef.gyp | 8 ------- cef1/libcef/browser_webkit_init.cc | 7 ------ cef1/libcef/browser_webview_delegate.cc | 31 ------------------------- cef1/libcef/browser_webview_delegate.h | 2 -- cef1/tests/cefclient/cefclient.cpp | 5 ---- cef1/tests/cefclient/cefclient.h | 1 - cef1/tests/cefclient/cefclient.rc | 1 - cef1/tests/cefclient/cefclient_win.cpp | 4 ---- cef1/tests/cefclient/resource.h | 1 - cef1/tools/distrib/cefclient.gyp | 1 - cef1/tools/distrib/mac/README.txt | 4 ---- cef1/tools/distrib/win/README.txt | 6 ----- cef1/tools/make_distrib.py | 12 ++++++---- 13 files changed, 8 insertions(+), 75 deletions(-) diff --git a/cef1/cef.gyp b/cef1/cef.gyp index d9e87f810..1fbf1f688 100644 --- a/cef1/cef.gyp +++ b/cef1/cef.gyp @@ -184,7 +184,6 @@ 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/MacOS/', 'files': [ '<(PRODUCT_DIR)/libcef.dylib', - '<(PRODUCT_DIR)/ffmpegsumo.so', ], }, { @@ -398,7 +397,6 @@ 'destination': '<(PRODUCT_DIR)/cef_unittests.app/Contents/MacOS/', 'files': [ '<(PRODUCT_DIR)/libcef.dylib', - '<(PRODUCT_DIR)/ffmpegsumo.so', ], }, ], @@ -421,14 +419,12 @@ '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/base.gyp:base_i18n', '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', - '<(DEPTH)/media/media.gyp:media', '<(DEPTH)/net/net.gyp:net', '<(DEPTH)/net/net.gyp:net_resources', '<(DEPTH)/printing/printing.gyp:printing', '<(DEPTH)/sdch/sdch.gyp:sdch', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/third_party/bzip2/bzip2.gyp:bzip2', - '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg', '<(DEPTH)/third_party/icu/icu.gyp:icui18n', '<(DEPTH)/third_party/icu/icu.gyp:icuuc', '<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase', @@ -450,7 +446,6 @@ '<(DEPTH)/webkit/support/webkit_support.gyp:glue', '<(DEPTH)/webkit/support/webkit_support.gyp:quota', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_gpu', - '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_media', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_user_agent', @@ -608,14 +603,12 @@ '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/base.gyp:base_i18n', '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', - '<(DEPTH)/media/media.gyp:media', '<(DEPTH)/net/net.gyp:net', '<(DEPTH)/net/net.gyp:net_resources', '<(DEPTH)/printing/printing.gyp:printing', '<(DEPTH)/sdch/sdch.gyp:sdch', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/third_party/bzip2/bzip2.gyp:bzip2', - '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg', '<(DEPTH)/third_party/icu/icu.gyp:icui18n', '<(DEPTH)/third_party/icu/icu.gyp:icuuc', '<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase', @@ -638,7 +631,6 @@ '<(DEPTH)/webkit/support/webkit_support.gyp:glue', '<(DEPTH)/webkit/support/webkit_support.gyp:quota', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_gpu', - '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_media', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings', '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_user_agent', diff --git a/cef1/libcef/browser_webkit_init.cc b/cef1/libcef/browser_webkit_init.cc index 96f92248b..f3d476629 100644 --- a/cef1/libcef/browser_webkit_init.cc +++ b/cef1/libcef/browser_webkit_init.cc @@ -12,7 +12,6 @@ #include "base/metrics/stats_counters.h" #include "base/path_service.h" #include "base/utf_string_conversions.h" -#include "media/base/media.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebPrerenderingSupport.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" @@ -58,12 +57,6 @@ BrowserWebKitInit::BrowserWebKitInit() prerendering_support_.reset(new BrowserPrerenderingSupport); WebKit::WebPrerenderingSupport::initialize(prerendering_support_.get()); - // Load libraries for media and enable the media player. - FilePath module_path; - WebKit::WebRuntimeFeatures::enableMediaPlayer( - PathService::Get(base::DIR_MODULE, &module_path) && - media::InitializeMediaLibrary(module_path)); - FilePath appcache_path; FilePath cache_path = _Context->cache_path(); if (!cache_path.empty()) { diff --git a/cef1/libcef/browser_webview_delegate.cc b/cef1/libcef/browser_webview_delegate.cc index b09046a86..92af88f93 100644 --- a/cef1/libcef/browser_webview_delegate.cc +++ b/cef1/libcef/browser_webview_delegate.cc @@ -30,11 +30,6 @@ #include "base/process_util.h" #include "base/string_util.h" #include "base/stringprintf.h" -#include "media/audio/null_audio_sink.h" -#include "media/base/filter_collection.h" -#include "media/base/media_log.h" -#include "media/base/message_loop_factory.h" -#include "media/filters/audio_renderer_impl.h" #include "net/base/net_errors.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" @@ -70,7 +65,6 @@ #include "webkit/glue/weburlrequest_extradata_impl.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/window_open_disposition.h" -#include "webkit/media/webmediaplayer_impl.h" #include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h" #include "webkit/plugins/npapi/webplugin_impl.h" @@ -691,31 +685,6 @@ WebPlugin* BrowserWebViewDelegate::createPlugin( frame, params, plugins.front().path, AsWeakPtr()); } -WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer( - WebFrame* frame, const WebKit::WebURL&, WebMediaPlayerClient* client) { - scoped_ptr message_loop_factory( - new media::MessageLoopFactory()); - - scoped_ptr collection( - new media::FilterCollection()); - - // Add the audio renderer. - // TODO(vrk): Re-enable audio. (crbug.com/112159) - collection->AddAudioRenderer( - new media::AudioRendererImpl(new media::NullAudioSink())); - - return new webkit_media::WebMediaPlayerImpl( - frame, - client, - base::WeakPtr(), - collection.release(), - NULL, - NULL, - message_loop_factory.release(), - NULL, - new media::MediaLog()); -} - WebApplicationCacheHost* BrowserWebViewDelegate::createApplicationCacheHost( WebFrame* frame, WebApplicationCacheHostClient* client) { return BrowserAppCacheSystem::CreateApplicationCacheHost(client); diff --git a/cef1/libcef/browser_webview_delegate.h b/cef1/libcef/browser_webview_delegate.h index 6f2021515..53cb37204 100644 --- a/cef1/libcef/browser_webview_delegate.h +++ b/cef1/libcef/browser_webview_delegate.h @@ -156,8 +156,6 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient, // WebKit::WebFrameClient virtual WebKit::WebPlugin* createPlugin( WebKit::WebFrame*, const WebKit::WebPluginParams&) OVERRIDE; - virtual WebKit::WebMediaPlayer* createMediaPlayer( - WebKit::WebFrame*, const WebKit::WebURL&, WebKit::WebMediaPlayerClient*) OVERRIDE; virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost( WebKit::WebFrame* frame, WebKit::WebApplicationCacheHostClient* client) OVERRIDE; diff --git a/cef1/tests/cefclient/cefclient.cpp b/cef1/tests/cefclient/cefclient.cpp index 44f38b113..40396c53c 100644 --- a/cef1/tests/cefclient/cefclient.cpp +++ b/cef1/tests/cefclient/cefclient.cpp @@ -480,11 +480,6 @@ void RunWebGLTest(CefRefPtr browser) { "http://webglsamples.googlecode.com/hg/field/field.html"); } -void RunHTML5VideoTest(CefRefPtr browser) { - browser->GetMainFrame()->LoadURL( - "http://www.youtube.com/watch?v=siOHh0uzcuY&html5=True"); -} - void RunXMLHTTPRequestTest(CefRefPtr browser) { browser->GetMainFrame()->LoadURL("http://tests/xmlhttprequest"); } diff --git a/cef1/tests/cefclient/cefclient.h b/cef1/tests/cefclient/cefclient.h index aa4a8a1e4..c5ecd9423 100644 --- a/cef1/tests/cefclient/cefclient.h +++ b/cef1/tests/cefclient/cefclient.h @@ -45,7 +45,6 @@ void RunLocalStorageTest(CefRefPtr browser); void RunAccelerated2DCanvasTest(CefRefPtr browser); void RunAcceleratedLayersTest(CefRefPtr browser); void RunWebGLTest(CefRefPtr browser); -void RunHTML5VideoTest(CefRefPtr browser); void RunXMLHTTPRequestTest(CefRefPtr browser); void RunWebURLRequestTest(CefRefPtr browser); void RunDOMAccessTest(CefRefPtr browser); diff --git a/cef1/tests/cefclient/cefclient.rc b/cef1/tests/cefclient/cefclient.rc index e53b14b3c..94e39b995 100644 --- a/cef1/tests/cefclient/cefclient.rc +++ b/cef1/tests/cefclient/cefclient.rc @@ -94,7 +94,6 @@ BEGIN MENUITEM "Accelerated 2D Canvas", ID_TESTS_ACCELERATED2DCANVAS MENUITEM "Accelerated Layers", ID_TESTS_ACCELERATEDLAYERS MENUITEM "WebGL", ID_TESTS_WEBGL - MENUITEM "HTML5 Video", ID_TESTS_HTML5VIDEO MENUITEM "Drag && Drop", ID_TESTS_DRAGDROP MENUITEM "Geolocation", ID_TESTS_GEOLOCATION MENUITEM "Zoom In", ID_TESTS_ZOOM_IN diff --git a/cef1/tests/cefclient/cefclient_win.cpp b/cef1/tests/cefclient/cefclient_win.cpp index 7e5685445..0d0220530 100644 --- a/cef1/tests/cefclient/cefclient_win.cpp +++ b/cef1/tests/cefclient/cefclient_win.cpp @@ -516,10 +516,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, if (browser.get()) RunWebGLTest(browser); return 0; - case ID_TESTS_HTML5VIDEO: // Test HTML5 video - if (browser.get()) - RunHTML5VideoTest(browser); - return 0; case ID_TESTS_DRAGDROP: // Test drag & drop if (browser.get()) RunDragDropTest(browser); diff --git a/cef1/tests/cefclient/resource.h b/cef1/tests/cefclient/resource.h index 1ea8f3da8..756a02c33 100644 --- a/cef1/tests/cefclient/resource.h +++ b/cef1/tests/cefclient/resource.h @@ -40,7 +40,6 @@ #define ID_TESTS_ACCELERATED2DCANVAS 32780 #define ID_TESTS_ACCELERATEDLAYERS 32781 #define ID_TESTS_WEBGL 32782 -#define ID_TESTS_HTML5VIDEO 32783 #define ID_TESTS_XMLHTTPREQUEST 32784 #define ID_TESTS_ZOOM_IN 32785 #define ID_TESTS_ZOOM_OUT 32786 diff --git a/cef1/tools/distrib/cefclient.gyp b/cef1/tools/distrib/cefclient.gyp index d948b3e83..7c2b05395 100644 --- a/cef1/tools/distrib/cefclient.gyp +++ b/cef1/tools/distrib/cefclient.gyp @@ -82,7 +82,6 @@ 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/MacOS/', 'files': [ '$(CONFIGURATION)/libcef.dylib', - '$(CONFIGURATION)/ffmpegsumo.so', ], }, { diff --git a/cef1/tools/distrib/mac/README.txt b/cef1/tools/distrib/mac/README.txt index 844c40715..ad312c524 100644 --- a/cef1/tools/distrib/mac/README.txt +++ b/cef1/tools/distrib/mac/README.txt @@ -91,10 +91,6 @@ Optional components: disabled completely using CefSettings.pack_loading_disabled. The resources directory path can be customized using CefSettings.resources_dir_path. -* FFmpeg audio and video support - ffmpegsumo.so - Note: Without this component HTML5 audio and video will not function. - LICENSING --------- diff --git a/cef1/tools/distrib/win/README.txt b/cef1/tools/distrib/win/README.txt index 2d492386c..08d5b7a41 100644 --- a/cef1/tools/distrib/win/README.txt +++ b/cef1/tools/distrib/win/README.txt @@ -89,12 +89,6 @@ Optional components: disabled completely using CefSettings.pack_loading_disabled. The resources directory path can be customized using CefSettings.resources_dir_path. -* FFmpeg audio and video support - avcodec-54.dll - avformat-54.dll - avutil-51.dll - Note: Without these components HTML5 audio and video will not function. - * Angle and Direct3D support d3dcompiler_43.dll d3dx9_43.dll diff --git a/cef1/tools/make_distrib.py b/cef1/tools/make_distrib.py index e2e29bb45..95f49a977 100644 --- a/cef1/tools/make_distrib.py +++ b/cef1/tools/make_distrib.py @@ -276,9 +276,12 @@ if platform == 'windows': dst_dir = os.path.join(output_dir, 'Debug') make_dir(dst_dir, options.quiet) copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet) - copy_files(os.path.join(cef_dir, 'Debug/*.dll'), dst_dir, options.quiet) copy_file(os.path.join(cef_dir, 'Debug/cefclient.exe'), dst_dir, options.quiet) copy_file(os.path.join(cef_dir, 'Debug/devtools_resources.pak'), dst_dir, options.quiet) + copy_file(os.path.join(cef_dir, 'Debug/icudt.dll'), dst_dir, options.quiet) + copy_file(os.path.join(cef_dir, 'Debug/libcef.dll'), dst_dir, options.quiet) + copy_file(os.path.join(cef_dir, 'Debug/libEGL.dll'), dst_dir, options.quiet) + copy_file(os.path.join(cef_dir, 'Debug/libGLESv2.dll'), dst_dir, options.quiet) copy_dir(os.path.join(cef_dir, 'Debug/locales'), os.path.join(dst_dir, 'locales'), \ options.quiet) @@ -294,9 +297,12 @@ if platform == 'windows': dst_dir = os.path.join(output_dir, 'Release') make_dir(dst_dir, options.quiet) copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet) - copy_files(os.path.join(cef_dir, 'Release/*.dll'), dst_dir, options.quiet) copy_file(os.path.join(cef_dir, 'Release/cefclient.exe'), dst_dir, options.quiet) copy_file(os.path.join(cef_dir, 'Release/devtools_resources.pak'), dst_dir, options.quiet) + copy_file(os.path.join(cef_dir, 'Release/icudt.dll'), dst_dir, options.quiet) + copy_file(os.path.join(cef_dir, 'Release/libcef.dll'), dst_dir, options.quiet) + copy_file(os.path.join(cef_dir, 'Release/libEGL.dll'), dst_dir, options.quiet) + copy_file(os.path.join(cef_dir, 'Release/libGLESv2.dll'), dst_dir, options.quiet) copy_dir(os.path.join(cef_dir, 'Release/locales'), os.path.join(dst_dir, 'locales'), \ options.quiet) @@ -350,14 +356,12 @@ elif platform == 'macosx': if not options.allowpartial or path_exists(os.path.join(cef_dir, '../xcodebuild/Debug')): dst_dir = os.path.join(output_dir, 'Debug') make_dir(dst_dir, options.quiet) - copy_file(os.path.join(cef_dir, '../xcodebuild/Debug/ffmpegsumo.so'), dst_dir, options.quiet) copy_file(os.path.join(cef_dir, '../xcodebuild/Debug/libcef.dylib'), dst_dir, options.quiet) # transfer xcodebuild/Release files if not options.allowpartial or path_exists(os.path.join(cef_dir, '../xcodebuild/Release')): dst_dir = os.path.join(output_dir, 'Release') make_dir(dst_dir, options.quiet) - copy_file(os.path.join(cef_dir, '../xcodebuild/Release/ffmpegsumo.so'), dst_dir, options.quiet) copy_file(os.path.join(cef_dir, '../xcodebuild/Release/libcef.dylib'), dst_dir, options.quiet) # create the real dSYM file from the "fake" dSYM file