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

Side by Side Diff: media/base/android/media_url_provider.cc

Issue 2090343004: Add GetUrl to DemuxerStreamProvider interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added UTs Created 4 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/base/android/media_url_provider.h"
6
7 #include "base/memory/ptr_util.h"
8
9 namespace media {
10
11 MediaUrlProvider::MediaUrlProvider(const GURL& url) : url_(url) {}
12
13 MediaUrlProvider::~MediaUrlProvider() {}
14
15 DemuxerStream* MediaUrlProvider::GetStream(DemuxerStream::Type type) {
16 return nullptr;
17 }
18
19 GURL* MediaUrlProvider::GetUrl() {
DaleCurtis 2016/06/24 00:42:30 Don't typically return ptrs like this. I think for
tguilbert 2016/06/24 03:13:19 Yeah... I knew this would come up, and if it didn'
20 return &url_;
21 }
22
23 std::string MediaUrlProvider::GetDisplayName() const {
24 return "MediaUrlProvider";
25 }
26
27 void MediaUrlProvider::Initialize(DemuxerHost* host,
28 const PipelineStatusCB& status_cb,
29 bool enable_text_tracks) {
30 DVLOG(1) << __FUNCTION__;
31 status_cb.Run(PIPELINE_OK);
32 }
33
34 void MediaUrlProvider::StartWaitingForSeek(base::TimeDelta seek_time) {
35 DVLOG(1) << __FUNCTION__;
DaleCurtis 2016/06/24 00:42:30 DVLOG(2) at least for this type of log, or delete
tguilbert 2016/06/24 03:13:19 Done.
36 }
37
38 void MediaUrlProvider::CancelPendingSeek(base::TimeDelta seek_time) {
39 DVLOG(1) << __FUNCTION__;
40 }
41
42 void MediaUrlProvider::Seek(base::TimeDelta time,
43 const PipelineStatusCB& status_cb) {
44 DVLOG(1) << __FUNCTION__;
45 status_cb.Run(PIPELINE_OK);
46 }
47
48 void MediaUrlProvider::Stop() {
49 DVLOG(1) << __FUNCTION__;
50 }
51
52 base::TimeDelta MediaUrlProvider::GetStartTime() const {
53 DVLOG(1) << __FUNCTION__;
54 // TODO(tguilbert): Investigate if we need to fetch information from the
DaleCurtis 2016/06/24 00:42:29 I don't think this works today if it's > 0. Dunno
tguilbert 2016/06/24 03:13:19 My questioning came from the fact that, in the cur
55 // MediaPlayerRender in order to return a sensible value here.
56 return base::TimeDelta();
57 }
58 base::Time MediaUrlProvider::GetTimelineOffset() const {
DaleCurtis 2016/06/24 00:42:29 I believe this should always be zero.
tguilbert 2016/06/24 03:13:19 Acknowledged.
59 DVLOG(1) << __FUNCTION__;
60 // TODO(tguilbert): Return an appropriate value if needed.
61 return base::Time();
62 }
63
64 int64_t MediaUrlProvider::GetMemoryUsage() const {
65 // TODO(tguilbert): Verify this is an acceptable return value.
DaleCurtis 2016/06/24 00:42:30 It is acceptable :)
tguilbert 2016/06/24 03:13:19 Thank you!
66 return 0;
67 }
68
69 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698