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

Side by Side Diff: media/filters/ffmpeg_demuxer.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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/filters/ffmpeg_demuxer.h" 5 #include "media/filters/ffmpeg_demuxer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 927
928 base::Time FFmpegDemuxer::GetTimelineOffset() const { 928 base::Time FFmpegDemuxer::GetTimelineOffset() const {
929 return timeline_offset_; 929 return timeline_offset_;
930 } 930 }
931 931
932 DemuxerStream* FFmpegDemuxer::GetStream(DemuxerStream::Type type) { 932 DemuxerStream* FFmpegDemuxer::GetStream(DemuxerStream::Type type) {
933 DCHECK(task_runner_->BelongsToCurrentThread()); 933 DCHECK(task_runner_->BelongsToCurrentThread());
934 return GetFFmpegStream(type); 934 return GetFFmpegStream(type);
935 } 935 }
936 936
937 GURL* FFmpegDemuxer::GetUrl() {
938 // Should never return anything else than nullptr (see DemuxerStreamProvider).
939 return nullptr;
940 }
941
937 FFmpegDemuxerStream* FFmpegDemuxer::GetFFmpegStream( 942 FFmpegDemuxerStream* FFmpegDemuxer::GetFFmpegStream(
938 DemuxerStream::Type type) const { 943 DemuxerStream::Type type) const {
939 StreamVector::const_iterator iter; 944 StreamVector::const_iterator iter;
940 for (iter = streams_.begin(); iter != streams_.end(); ++iter) { 945 for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
941 if (*iter && (*iter)->type() == type) { 946 if (*iter && (*iter)->type() == type) {
942 return *iter; 947 return *iter;
943 } 948 }
944 } 949 }
945 return NULL; 950 return NULL;
946 } 951 }
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 1609
1605 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) { 1610 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) {
1606 DCHECK(task_runner_->BelongsToCurrentThread()); 1611 DCHECK(task_runner_->BelongsToCurrentThread());
1607 for (const auto& stream : streams_) { // |stream| is a ref to a pointer. 1612 for (const auto& stream : streams_) { // |stream| is a ref to a pointer.
1608 if (stream) 1613 if (stream)
1609 stream->SetLiveness(liveness); 1614 stream->SetLiveness(liveness);
1610 } 1615 }
1611 } 1616 }
1612 1617
1613 } // namespace media 1618 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698