Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(735)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2818823002: [Media] Add a finch trial param for background MediaSource videos (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2862 matching lines...) Expand 10 before | Expand all | Expand 10 after
2873 base::WeakPtr<media::MediaObserver> media_observer = 2873 base::WeakPtr<media::MediaObserver> media_observer =
2874 remoting_controller->GetWeakPtr(); 2874 remoting_controller->GetWeakPtr();
2875 #else 2875 #else
2876 base::WeakPtr<media::MediaObserver> media_observer = nullptr; 2876 base::WeakPtr<media::MediaObserver> media_observer = nullptr;
2877 #endif 2877 #endif
2878 2878
2879 base::TimeDelta max_keyframe_distance_to_disable_background_video = 2879 base::TimeDelta max_keyframe_distance_to_disable_background_video =
2880 base::TimeDelta::FromMilliseconds(base::GetFieldTrialParamByFeatureAsInt( 2880 base::TimeDelta::FromMilliseconds(base::GetFieldTrialParamByFeatureAsInt(
2881 media::kBackgroundVideoTrackOptimization, "max_keyframe_distance_ms", 2881 media::kBackgroundVideoTrackOptimization, "max_keyframe_distance_ms",
2882 base::TimeDelta::FromSeconds(10).InMilliseconds())); 2882 base::TimeDelta::FromSeconds(10).InMilliseconds()));
2883 base::TimeDelta max_keyframe_distance_to_disable_background_video_mse =
2884 base::TimeDelta::FromMilliseconds(base::GetFieldTrialParamByFeatureAsInt(
2885 media::kBackgroundVideoTrackOptimization,
2886 "max_keyframe_distance_media_source_ms",
2887 base::TimeDelta::FromSeconds(10).InMilliseconds()));
2883 2888
2884 media::WebMediaPlayerParams params( 2889 media::WebMediaPlayerParams params(
2885 base::Bind(&ContentRendererClient::DeferMediaLoad, 2890 base::Bind(&ContentRendererClient::DeferMediaLoad,
2886 base::Unretained(GetContentClient()->renderer()), 2891 base::Unretained(GetContentClient()->renderer()),
2887 static_cast<RenderFrame*>(this), 2892 static_cast<RenderFrame*>(this),
2888 GetWebMediaPlayerDelegate()->has_played_media()), 2893 GetWebMediaPlayerDelegate()->has_played_media()),
2889 audio_renderer_sink, GetMediaLog(), 2894 audio_renderer_sink, GetMediaLog(),
2890 render_thread->GetMediaThreadTaskRunner(), 2895 render_thread->GetMediaThreadTaskRunner(),
2891 render_thread->GetWorkerTaskRunner(), 2896 render_thread->GetWorkerTaskRunner(),
2892 render_thread->compositor_task_runner(), context_3d_cb, 2897 render_thread->compositor_task_runner(), context_3d_cb,
2893 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, 2898 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory,
2894 base::Unretained(blink::MainThreadIsolate())), 2899 base::Unretained(blink::MainThreadIsolate())),
2895 initial_cdm, media_surface_manager_, media_observer, 2900 initial_cdm, media_surface_manager_, media_observer,
2896 max_keyframe_distance_to_disable_background_video, 2901 max_keyframe_distance_to_disable_background_video,
2902 max_keyframe_distance_to_disable_background_video_mse,
2897 GetWebkitPreferences().enable_instant_source_buffer_gc, 2903 GetWebkitPreferences().enable_instant_source_buffer_gc,
2898 GetContentClient()->renderer()->AllowMediaSuspend(), 2904 GetContentClient()->renderer()->AllowMediaSuspend(),
2899 embedded_media_experience_enabled); 2905 embedded_media_experience_enabled);
2900 2906
2901 bool use_fallback_path = false; 2907 bool use_fallback_path = false;
2902 #if defined(OS_ANDROID) 2908 #if defined(OS_ANDROID)
2903 use_fallback_path = UseMediaPlayerRenderer(url); 2909 use_fallback_path = UseMediaPlayerRenderer(url);
2904 #endif // defined(OS_ANDROID) 2910 #endif // defined(OS_ANDROID)
2905 2911
2906 std::unique_ptr<media::RendererFactory> media_renderer_factory; 2912 std::unique_ptr<media::RendererFactory> media_renderer_factory;
(...skipping 4070 matching lines...) Expand 10 before | Expand all | Expand 10 after
6977 policy(info.default_policy), 6983 policy(info.default_policy),
6978 replaces_current_history_item(info.replaces_current_history_item), 6984 replaces_current_history_item(info.replaces_current_history_item),
6979 history_navigation_in_new_child_frame( 6985 history_navigation_in_new_child_frame(
6980 info.is_history_navigation_in_new_child_frame), 6986 info.is_history_navigation_in_new_child_frame),
6981 client_redirect(info.is_client_redirect), 6987 client_redirect(info.is_client_redirect),
6982 cache_disabled(info.is_cache_disabled), 6988 cache_disabled(info.is_cache_disabled),
6983 form(info.form), 6989 form(info.form),
6984 source_location(info.source_location) {} 6990 source_location(info.source_location) {}
6985 6991
6986 } // namespace content 6992 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698