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

Side by Side Diff: media/blink/webmediaplayer_impl.cc

Issue 2513463002: Media: Add IsStreaming UMA. (Closed)
Patch Set: Created 4 years, 1 month 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 | tools/metrics/histograms/histograms.xml » ('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 "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 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 1595
1596 chunk_demuxer_ = new ChunkDemuxer( 1596 chunk_demuxer_ = new ChunkDemuxer(
1597 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnDemuxerOpened), 1597 BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnDemuxerOpened),
1598 encrypted_media_init_data_cb, media_log_); 1598 encrypted_media_init_data_cb, media_log_);
1599 demuxer_.reset(chunk_demuxer_); 1599 demuxer_.reset(chunk_demuxer_);
1600 } 1600 }
1601 1601
1602 // TODO(sandersd): FileSystem objects may also be non-static, but due to our 1602 // TODO(sandersd): FileSystem objects may also be non-static, but due to our
1603 // caching layer such situations are broken already. http://crbug.com/593159 1603 // caching layer such situations are broken already. http://crbug.com/593159
1604 bool is_static = !chunk_demuxer_; 1604 bool is_static = !chunk_demuxer_;
1605 bool is_streaming = data_source_ && data_source_->IsStreaming();
1606 UMA_HISTOGRAM_BOOLEAN("Media.IsStreaming", is_streaming);
1605 1607
1606 // ... and we're ready to go! 1608 // ... and we're ready to go!
1609 // TODO(sandersd): On Android, defer Start() if the tab is not visible.
1607 seeking_ = true; 1610 seeking_ = true;
1608
1609 // TODO(sandersd): On Android, defer Start() if the tab is not visible.
1610 bool is_streaming = data_source_ && data_source_->IsStreaming();
1611 pipeline_controller_.Start(demuxer_.get(), this, is_streaming, is_static); 1611 pipeline_controller_.Start(demuxer_.get(), this, is_streaming, is_static);
1612 } 1612 }
1613 1613
1614 void WebMediaPlayerImpl::SetNetworkState(WebMediaPlayer::NetworkState state) { 1614 void WebMediaPlayerImpl::SetNetworkState(WebMediaPlayer::NetworkState state) {
1615 DVLOG(1) << __func__ << "(" << state << ")"; 1615 DVLOG(1) << __func__ << "(" << state << ")";
1616 DCHECK(main_task_runner_->BelongsToCurrentThread()); 1616 DCHECK(main_task_runner_->BelongsToCurrentThread());
1617 network_state_ = state; 1617 network_state_ = state;
1618 // Always notify to ensure client has the latest value. 1618 // Always notify to ensure client has the latest value.
1619 client_->networkStateChanged(); 1619 client_->networkStateChanged();
1620 } 1620 }
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1955 pipeline_metadata_.natural_size, 1955 pipeline_metadata_.natural_size,
1956 base::Bind(&GetCurrentTimeInternal, this))); 1956 base::Bind(&GetCurrentTimeInternal, this)));
1957 watch_time_reporter_->OnVolumeChange(volume_); 1957 watch_time_reporter_->OnVolumeChange(volume_);
1958 if (delegate_ && delegate_->IsHidden()) 1958 if (delegate_ && delegate_->IsHidden())
1959 watch_time_reporter_->OnHidden(); 1959 watch_time_reporter_->OnHidden();
1960 else 1960 else
1961 watch_time_reporter_->OnShown(); 1961 watch_time_reporter_->OnShown();
1962 } 1962 }
1963 1963
1964 } // namespace media 1964 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698