| OLD | NEW |
| 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 "media/blink/webmediaplayer_impl.h" | 5 #include "media/blink/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 is_encrypted_(false), | 242 is_encrypted_(false), |
| 243 preroll_attempt_pending_(false), | 243 preroll_attempt_pending_(false), |
| 244 observer_(params->media_observer()), | 244 observer_(params->media_observer()), |
| 245 max_keyframe_distance_to_disable_background_video_( | 245 max_keyframe_distance_to_disable_background_video_( |
| 246 params->max_keyframe_distance_to_disable_background_video()), | 246 params->max_keyframe_distance_to_disable_background_video()), |
| 247 max_keyframe_distance_to_disable_background_video_mse_( | 247 max_keyframe_distance_to_disable_background_video_mse_( |
| 248 params->max_keyframe_distance_to_disable_background_video_mse()), | 248 params->max_keyframe_distance_to_disable_background_video_mse()), |
| 249 enable_instant_source_buffer_gc_( | 249 enable_instant_source_buffer_gc_( |
| 250 params->enable_instant_source_buffer_gc()), | 250 params->enable_instant_source_buffer_gc()), |
| 251 embedded_media_experience_enabled_( | 251 embedded_media_experience_enabled_( |
| 252 params->embedded_media_experience_enabled()) { | 252 params->embedded_media_experience_enabled()), |
| 253 request_routing_token_cb_(params->request_routing_token_cb()), |
| 254 overlay_routing_token_(base::UnguessableToken()) { |
| 253 DVLOG(1) << __func__; | 255 DVLOG(1) << __func__; |
| 254 DCHECK(!adjust_allocated_memory_cb_.is_null()); | 256 DCHECK(!adjust_allocated_memory_cb_.is_null()); |
| 255 DCHECK(renderer_factory_selector_); | 257 DCHECK(renderer_factory_selector_); |
| 256 DCHECK(client_); | 258 DCHECK(client_); |
| 257 DCHECK(delegate_); | 259 DCHECK(delegate_); |
| 258 | 260 |
| 259 force_video_overlays_ = base::CommandLine::ForCurrentProcess()->HasSwitch( | 261 force_video_overlays_ = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 260 switches::kForceVideoOverlays); | 262 switches::kForceVideoOverlays); |
| 261 | 263 |
| 262 enable_fullscreen_video_overlays_ = | 264 if (base::FeatureList::IsEnabled(media::kOverlayFullscreenVideo)) { |
| 263 base::FeatureList::IsEnabled(media::kOverlayFullscreenVideo); | 265 bool use_android_overlay = |
| 266 base::FeatureList::IsEnabled(media::kUseAndroidOverlay); |
| 267 overlay_mode_ = use_android_overlay ? OverlayMode::kUseAndroidOverlay |
| 268 : OverlayMode::kUseContentVideoView; |
| 269 } else { |
| 270 overlay_mode_ = OverlayMode::kNoOverlays; |
| 271 } |
| 264 | 272 |
| 265 delegate_id_ = delegate_->AddObserver(this); | 273 delegate_id_ = delegate_->AddObserver(this); |
| 266 delegate_->SetIdle(delegate_id_, true); | 274 delegate_->SetIdle(delegate_id_, true); |
| 267 | 275 |
| 268 media_log_->AddEvent( | 276 media_log_->AddEvent( |
| 269 media_log_->CreateEvent(MediaLogEvent::WEBMEDIAPLAYER_CREATED)); | 277 media_log_->CreateEvent(MediaLogEvent::WEBMEDIAPLAYER_CREATED)); |
| 270 | 278 |
| 271 if (params->initial_cdm()) | 279 if (params->initial_cdm()) |
| 272 SetCdm(params->initial_cdm()); | 280 SetCdm(params->initial_cdm()); |
| 273 | 281 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 bool WebMediaPlayerImpl::SupportsOverlayFullscreenVideo() { | 342 bool WebMediaPlayerImpl::SupportsOverlayFullscreenVideo() { |
| 335 #if defined(OS_ANDROID) | 343 #if defined(OS_ANDROID) |
| 336 return !using_media_player_renderer_; | 344 return !using_media_player_renderer_; |
| 337 #else | 345 #else |
| 338 return false; | 346 return false; |
| 339 #endif | 347 #endif |
| 340 } | 348 } |
| 341 | 349 |
| 342 void WebMediaPlayerImpl::EnableOverlay() { | 350 void WebMediaPlayerImpl::EnableOverlay() { |
| 343 overlay_enabled_ = true; | 351 overlay_enabled_ = true; |
| 344 if (surface_manager_) { | 352 if (surface_manager_ && overlay_mode_ == OverlayMode::kUseContentVideoView) { |
| 345 overlay_surface_id_.reset(); | 353 overlay_surface_id_.reset(); |
| 346 surface_created_cb_.Reset( | 354 surface_created_cb_.Reset( |
| 347 base::Bind(&WebMediaPlayerImpl::OnSurfaceCreated, AsWeakPtr())); | 355 base::Bind(&WebMediaPlayerImpl::OnSurfaceCreated, AsWeakPtr())); |
| 348 surface_manager_->CreateFullscreenSurface(pipeline_metadata_.natural_size, | 356 surface_manager_->CreateFullscreenSurface(pipeline_metadata_.natural_size, |
| 349 surface_created_cb_.callback()); | 357 surface_created_cb_.callback()); |
| 358 } else if (request_routing_token_cb_ && |
| 359 overlay_mode_ == OverlayMode::kUseAndroidOverlay) { |
| 360 overlay_routing_token_.reset(); |
| 361 token_available_cb_.Reset( |
| 362 base::Bind(&WebMediaPlayerImpl::OnOverlayRoutingToken, AsWeakPtr())); |
| 363 request_routing_token_cb_.Run(token_available_cb_.callback()); |
| 350 } | 364 } |
| 351 | 365 |
| 366 // We have requested (and maybe already have) overlay information. If the |
| 367 // restarted decoder requests overlay information, then we'll defer providing |
| 368 // it if it hasn't arrived yet. Otherwise, this would be a race, since we |
| 369 // don't know if the request for overlay info or restart will complete first. |
| 352 if (decoder_requires_restart_for_overlay_) | 370 if (decoder_requires_restart_for_overlay_) |
| 353 ScheduleRestart(); | 371 ScheduleRestart(); |
| 354 } | 372 } |
| 355 | 373 |
| 356 void WebMediaPlayerImpl::DisableOverlay() { | 374 void WebMediaPlayerImpl::DisableOverlay() { |
| 357 overlay_enabled_ = false; | 375 overlay_enabled_ = false; |
| 358 surface_created_cb_.Cancel(); | 376 if (overlay_mode_ == OverlayMode::kUseContentVideoView) { |
| 359 overlay_surface_id_ = SurfaceManager::kNoSurfaceID; | 377 surface_created_cb_.Cancel(); |
| 378 overlay_surface_id_ = SurfaceManager::kNoSurfaceID; |
| 379 } else if (overlay_mode_ == OverlayMode::kUseAndroidOverlay) { |
| 380 token_available_cb_.Cancel(); |
| 381 overlay_routing_token_ = base::UnguessableToken(); |
| 382 } |
| 360 | 383 |
| 361 if (decoder_requires_restart_for_overlay_) | 384 if (decoder_requires_restart_for_overlay_) |
| 362 ScheduleRestart(); | 385 ScheduleRestart(); |
| 363 else if (!set_surface_cb_.is_null()) | 386 else |
| 364 set_surface_cb_.Run(*overlay_surface_id_); | 387 MaybeSendOverlayInfoToDecoder(); |
| 365 } | 388 } |
| 366 | 389 |
| 367 void WebMediaPlayerImpl::EnteredFullscreen() { | 390 void WebMediaPlayerImpl::EnteredFullscreen() { |
| 368 // |force_video_overlays_| implies that we're already in overlay mode, so take | 391 // |force_video_overlays_| implies that we're already in overlay mode, so take |
| 369 // no action here. Otherwise, switch to an overlay if it's allowed and if | 392 // no action here. Otherwise, switch to an overlay if it's allowed and if |
| 370 // it will display properly. | 393 // it will display properly. |
| 371 if (!force_video_overlays_ && enable_fullscreen_video_overlays_ && | 394 if (!force_video_overlays_ && overlay_mode_ != OverlayMode::kNoOverlays && |
| 372 DoesOverlaySupportMetadata()) { | 395 DoesOverlaySupportMetadata()) { |
| 373 EnableOverlay(); | 396 EnableOverlay(); |
| 374 } | 397 } |
| 375 if (observer_) | 398 if (observer_) |
| 376 observer_->OnEnteredFullscreen(); | 399 observer_->OnEnteredFullscreen(); |
| 400 |
| 401 // TODO(liberato): if the decoder provided a callback for fullscreen state, |
| 402 // then notify it now. |
| 377 } | 403 } |
| 378 | 404 |
| 379 void WebMediaPlayerImpl::ExitedFullscreen() { | 405 void WebMediaPlayerImpl::ExitedFullscreen() { |
| 380 // If we're in overlay mode, then exit it unless we're supposed to be in | 406 // If we're in overlay mode, then exit it unless we're supposed to be in |
| 381 // overlay mode all the time. | 407 // overlay mode all the time. |
| 382 if (!force_video_overlays_ && overlay_enabled_) | 408 if (!force_video_overlays_ && overlay_enabled_) |
| 383 DisableOverlay(); | 409 DisableOverlay(); |
| 384 if (observer_) | 410 if (observer_) |
| 385 observer_->OnExitedFullscreen(); | 411 observer_->OnExitedFullscreen(); |
| 412 |
| 413 // TODO(liberato): if the decoder provided a callback for fullscreen state, |
| 414 // then notify it now. |
| 386 } | 415 } |
| 387 | 416 |
| 388 void WebMediaPlayerImpl::BecameDominantVisibleContent(bool isDominant) { | 417 void WebMediaPlayerImpl::BecameDominantVisibleContent(bool isDominant) { |
| 389 if (observer_) | 418 if (observer_) |
| 390 observer_->OnBecameDominantVisibleContent(isDominant); | 419 observer_->OnBecameDominantVisibleContent(isDominant); |
| 391 } | 420 } |
| 392 | 421 |
| 393 void WebMediaPlayerImpl::SetIsEffectivelyFullscreen( | 422 void WebMediaPlayerImpl::SetIsEffectivelyFullscreen( |
| 394 bool isEffectivelyFullscreen) { | 423 bool isEffectivelyFullscreen) { |
| 395 delegate_->SetIsEffectivelyFullscreen(delegate_id_, isEffectivelyFullscreen); | 424 delegate_->SetIsEffectivelyFullscreen(delegate_id_, isEffectivelyFullscreen); |
| (...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1437 if (rotated_size == old_size) | 1466 if (rotated_size == old_size) |
| 1438 return; | 1467 return; |
| 1439 | 1468 |
| 1440 pipeline_metadata_.natural_size = rotated_size; | 1469 pipeline_metadata_.natural_size = rotated_size; |
| 1441 | 1470 |
| 1442 // Re-create |watch_time_reporter_| if we didn't originally know the video | 1471 // Re-create |watch_time_reporter_| if we didn't originally know the video |
| 1443 // size or the previous size was too small for reporting. | 1472 // size or the previous size was too small for reporting. |
| 1444 if (!watch_time_reporter_->IsSizeLargeEnoughToReportWatchTime()) | 1473 if (!watch_time_reporter_->IsSizeLargeEnoughToReportWatchTime()) |
| 1445 CreateWatchTimeReporter(); | 1474 CreateWatchTimeReporter(); |
| 1446 | 1475 |
| 1447 if (overlay_enabled_ && surface_manager_) | 1476 if (overlay_enabled_ && surface_manager_ && |
| 1477 overlay_mode_ == OverlayMode::kUseContentVideoView) { |
| 1448 surface_manager_->NaturalSizeChanged(rotated_size); | 1478 surface_manager_->NaturalSizeChanged(rotated_size); |
| 1479 } |
| 1449 | 1480 |
| 1450 client_->SizeChanged(); | 1481 client_->SizeChanged(); |
| 1451 | 1482 |
| 1452 if (observer_) | 1483 if (observer_) |
| 1453 observer_->OnMetadataChanged(pipeline_metadata_); | 1484 observer_->OnMetadataChanged(pipeline_metadata_); |
| 1454 } | 1485 } |
| 1455 | 1486 |
| 1456 void WebMediaPlayerImpl::OnVideoOpacityChange(bool opaque) { | 1487 void WebMediaPlayerImpl::OnVideoOpacityChange(bool opaque) { |
| 1457 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 1488 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 1458 DCHECK_NE(ready_state_, WebMediaPlayer::kReadyStateHaveNothing); | 1489 DCHECK_NE(ready_state_, WebMediaPlayer::kReadyStateHaveNothing); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1678 network_state_ == WebMediaPlayer::kNetworkStateIdle) | 1709 network_state_ == WebMediaPlayer::kNetworkStateIdle) |
| 1679 SetNetworkState(WebMediaPlayer::kNetworkStateLoading); | 1710 SetNetworkState(WebMediaPlayer::kNetworkStateLoading); |
| 1680 if (ready_state_ == ReadyState::kReadyStateHaveFutureData && !is_downloading) | 1711 if (ready_state_ == ReadyState::kReadyStateHaveFutureData && !is_downloading) |
| 1681 SetReadyState(WebMediaPlayer::kReadyStateHaveEnoughData); | 1712 SetReadyState(WebMediaPlayer::kReadyStateHaveEnoughData); |
| 1682 media_log_->AddEvent( | 1713 media_log_->AddEvent( |
| 1683 media_log_->CreateBooleanEvent(MediaLogEvent::NETWORK_ACTIVITY_SET, | 1714 media_log_->CreateBooleanEvent(MediaLogEvent::NETWORK_ACTIVITY_SET, |
| 1684 "is_downloading_data", is_downloading)); | 1715 "is_downloading_data", is_downloading)); |
| 1685 } | 1716 } |
| 1686 | 1717 |
| 1687 void WebMediaPlayerImpl::OnSurfaceCreated(int surface_id) { | 1718 void WebMediaPlayerImpl::OnSurfaceCreated(int surface_id) { |
| 1719 DCHECK(overlay_mode_ == OverlayMode::kUseContentVideoView); |
| 1688 overlay_surface_id_ = surface_id; | 1720 overlay_surface_id_ = surface_id; |
| 1689 if (!set_surface_cb_.is_null()) { | 1721 MaybeSendOverlayInfoToDecoder(); |
| 1690 // If restart is required, the callback is one-shot only. | |
| 1691 if (decoder_requires_restart_for_overlay_) | |
| 1692 base::ResetAndReturn(&set_surface_cb_).Run(surface_id); | |
| 1693 else | |
| 1694 set_surface_cb_.Run(surface_id); | |
| 1695 } | |
| 1696 } | 1722 } |
| 1697 | 1723 |
| 1698 void WebMediaPlayerImpl::OnSurfaceRequested( | 1724 void WebMediaPlayerImpl::OnOverlayRoutingToken( |
| 1725 const base::UnguessableToken& token) { |
| 1726 DCHECK(overlay_mode_ == OverlayMode::kUseAndroidOverlay); |
| 1727 overlay_routing_token_ = token; |
| 1728 MaybeSendOverlayInfoToDecoder(); |
| 1729 } |
| 1730 |
| 1731 void WebMediaPlayerImpl::OnOverlayInfoRequested( |
| 1699 bool decoder_requires_restart_for_overlay, | 1732 bool decoder_requires_restart_for_overlay, |
| 1700 const SurfaceCreatedCB& set_surface_cb) { | 1733 const ProvideOverlayInfoCB& provide_overlay_info_cb) { |
| 1701 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 1734 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 1702 DCHECK(surface_manager_); | 1735 DCHECK(surface_manager_); |
| 1703 | 1736 |
| 1704 // A null callback indicates that the decoder is going away. | 1737 // A null callback indicates that the decoder is going away. |
| 1705 if (set_surface_cb.is_null()) { | 1738 if (provide_overlay_info_cb.is_null()) { |
| 1706 decoder_requires_restart_for_overlay_ = false; | 1739 decoder_requires_restart_for_overlay_ = false; |
| 1707 set_surface_cb_.Reset(); | 1740 provide_overlay_info_cb_.Reset(); |
| 1708 return; | 1741 return; |
| 1709 } | 1742 } |
| 1710 | 1743 |
| 1711 // If we get a surface request it means GpuVideoDecoder is initializing, so | 1744 // If we get a surface request it means GpuVideoDecoder is initializing, so |
| 1712 // until we get a null surface request, GVD is the active decoder. | 1745 // until we get a null surface request, GVD is the active decoder. |
| 1713 // | 1746 // |
| 1714 // If |decoder_requires_restart_for_overlay| is true, we must restart the | 1747 // If |decoder_requires_restart_for_overlay| is true, we must restart the |
| 1715 // pipeline for fullscreen transitions. The decoder is unable to switch | 1748 // pipeline for fullscreen transitions. The decoder is unable to switch |
| 1716 // surfaces otherwise. If false, we simply need to tell the decoder about the | 1749 // surfaces otherwise. If false, we simply need to tell the decoder about the |
| 1717 // new surface and it will handle things seamlessly. | 1750 // new surface and it will handle things seamlessly. |
| 1718 decoder_requires_restart_for_overlay_ = decoder_requires_restart_for_overlay; | 1751 decoder_requires_restart_for_overlay_ = decoder_requires_restart_for_overlay; |
| 1719 set_surface_cb_ = set_surface_cb; | 1752 provide_overlay_info_cb_ = provide_overlay_info_cb; |
| 1720 | 1753 |
| 1721 // If we're waiting for the surface to arrive, OnSurfaceCreated() will be | 1754 // If we're waiting for the surface to arrive, OnSurfaceCreated() will be |
| 1722 // called later when it arrives; so do nothing for now. | 1755 // called later when it arrives; so do nothing for now. For AndroidOverlay, |
| 1723 if (!overlay_surface_id_) | 1756 // if we're waiting for the token then... OnOverlayRoutingToken()... |
| 1757 // We do this so that a request for a surface will block if we're in the |
| 1758 // process of getting one. Otherwise, on pre-M, the decoder would be stuck |
| 1759 // without an overlay if the restart that happens on entering fullscreen |
| 1760 // succeeds before we have the overlay info. Post-M, we could send what we |
| 1761 // have unconditionally. When the info arrives, it will be sent. |
| 1762 MaybeSendOverlayInfoToDecoder(); |
| 1763 } |
| 1764 |
| 1765 void WebMediaPlayerImpl::MaybeSendOverlayInfoToDecoder() { |
| 1766 // If the decoder didn't request overlay info, then don't send it. |
| 1767 if (!provide_overlay_info_cb_) |
| 1724 return; | 1768 return; |
| 1725 | 1769 |
| 1726 OnSurfaceCreated(*overlay_surface_id_); | 1770 // We should send the overlay info as long as we know it. This includes the |
| 1771 // case where |!overlay_enabled_|, since we want to tell the decoder to avoid |
| 1772 // using overlays. Assuming that the decoder has requested info, the only |
| 1773 // case in which we don't want to send something is if we've requested the |
| 1774 // info but not received it yet. Then, we should wait until we do. |
| 1775 if (overlay_mode_ == OverlayMode::kUseContentVideoView) { |
| 1776 if (!overlay_surface_id_.has_value()) |
| 1777 return; |
| 1778 } else if (overlay_mode_ == OverlayMode::kUseAndroidOverlay) { |
| 1779 if (!overlay_routing_token_.has_value()) |
| 1780 return; |
| 1781 } |
| 1782 |
| 1783 // Note that we're guaranteed that both |overlay_surface_id_| and |
| 1784 // |overlay_routing_token_| have values, since both have values unless there |
| 1785 // is a request pending. Nobody calls us if a request is pending. |
| 1786 |
| 1787 int surface_id = SurfaceManager::kNoSurfaceID; |
| 1788 if (overlay_surface_id_) |
| 1789 surface_id = *overlay_surface_id_; |
| 1790 |
| 1791 // Since we represent "no token" as a null UnguessableToken, we translate it |
| 1792 // into an optional here. Alternatively, we could represent it as a |
| 1793 // base::Optional in |overlay_routing_token_|, but then we'd have a |
| 1794 // base::Optional<base::Optional<base::UnguessableToken> >. We don't do that |
| 1795 // because... just because. |
| 1796 base::Optional<base::UnguessableToken> routing_token; |
| 1797 if (overlay_routing_token_.has_value() && !overlay_routing_token_->is_empty()) |
| 1798 routing_token = *overlay_routing_token_; |
| 1799 |
| 1800 // If restart is required, the callback is one-shot only. |
| 1801 if (decoder_requires_restart_for_overlay_) { |
| 1802 base::ResetAndReturn(&provide_overlay_info_cb_) |
| 1803 .Run(surface_id, routing_token); |
| 1804 } else { |
| 1805 provide_overlay_info_cb_.Run(surface_id, routing_token); |
| 1806 } |
| 1727 } | 1807 } |
| 1728 | 1808 |
| 1729 std::unique_ptr<Renderer> WebMediaPlayerImpl::CreateRenderer() { | 1809 std::unique_ptr<Renderer> WebMediaPlayerImpl::CreateRenderer() { |
| 1730 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 1810 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 1731 | 1811 |
| 1812 // TODO(liberato): Re-evaluate this as AndroidVideoSurfaceChooser gets smarter |
| 1813 // about turning off overlays. Either we should verify that it is not |
| 1814 // breaking this use-case if it does so, or we should notify it that using |
| 1815 // the overlay is required. |
| 1732 if (force_video_overlays_) | 1816 if (force_video_overlays_) |
| 1733 EnableOverlay(); | 1817 EnableOverlay(); |
| 1734 | 1818 |
| 1735 RequestSurfaceCB request_surface_cb; | 1819 RequestOverlayInfoCB request_overlay_info_cb; |
| 1736 #if defined(OS_ANDROID) | 1820 #if defined(OS_ANDROID) |
| 1737 request_surface_cb = BindToCurrentLoop( | 1821 request_overlay_info_cb = BindToCurrentLoop( |
| 1738 base::Bind(&WebMediaPlayerImpl::OnSurfaceRequested, AsWeakPtr())); | 1822 base::Bind(&WebMediaPlayerImpl::OnOverlayInfoRequested, AsWeakPtr())); |
| 1739 #endif | 1823 #endif |
| 1740 return renderer_factory_selector_->GetCurrentFactory()->CreateRenderer( | 1824 return renderer_factory_selector_->GetCurrentFactory()->CreateRenderer( |
| 1741 media_task_runner_, worker_task_runner_, audio_source_provider_.get(), | 1825 media_task_runner_, worker_task_runner_, audio_source_provider_.get(), |
| 1742 compositor_, request_surface_cb); | 1826 compositor_, request_overlay_info_cb); |
| 1743 } | 1827 } |
| 1744 | 1828 |
| 1745 void WebMediaPlayerImpl::StartPipeline() { | 1829 void WebMediaPlayerImpl::StartPipeline() { |
| 1746 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 1830 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 1747 | 1831 |
| 1748 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb = | 1832 Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb = |
| 1749 BindToCurrentLoop(base::Bind( | 1833 BindToCurrentLoop(base::Bind( |
| 1750 &WebMediaPlayerImpl::OnEncryptedMediaInitData, AsWeakPtr())); | 1834 &WebMediaPlayerImpl::OnEncryptedMediaInitData, AsWeakPtr())); |
| 1751 | 1835 |
| 1752 if (renderer_factory_selector_->GetCurrentFactory() | 1836 if (renderer_factory_selector_->GetCurrentFactory() |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2423 } | 2507 } |
| 2424 | 2508 |
| 2425 #undef UMA_HISTOGRAM_VIDEO_HEIGHT | 2509 #undef UMA_HISTOGRAM_VIDEO_HEIGHT |
| 2426 | 2510 |
| 2427 void WebMediaPlayerImpl::SetTickClockForTest(base::TickClock* tick_clock) { | 2511 void WebMediaPlayerImpl::SetTickClockForTest(base::TickClock* tick_clock) { |
| 2428 tick_clock_.reset(tick_clock); | 2512 tick_clock_.reset(tick_clock); |
| 2429 buffered_data_source_host_.SetTickClockForTest(tick_clock); | 2513 buffered_data_source_host_.SetTickClockForTest(tick_clock); |
| 2430 } | 2514 } |
| 2431 | 2515 |
| 2432 } // namespace media | 2516 } // namespace media |
| OLD | NEW |