1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
media / base / media_resource.cc [blame]
// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/base/media_resource.h"
#include "base/no_destructor.h"
#include "net/cookies/site_for_cookies.h"
#include "net/storage_access_api/status.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace media {
MediaResource::MediaResource() = default;
MediaResource::~MediaResource() = default;
const MediaUrlParams& MediaResource::GetMediaUrlParams() const {
NOTREACHED();
}
MediaResource::Type MediaResource::GetType() const {
return Type::kStream;
}
DemuxerStream* MediaResource::GetFirstStream(DemuxerStream::Type type) {
const auto& streams = GetAllStreams();
for (media::DemuxerStream* stream : streams) {
if (stream->type() == type)
return stream;
}
return nullptr;
}
void MediaResource::ForwardDurationChangeToDemuxerHost(
base::TimeDelta duration) {
// Only implemented by MediaUrlDemuxer, for the MediaPlayerRendererClient.
NOTREACHED();
}
void MediaResource::SetHeaders(
base::flat_map<std::string, std::string> headers) {
// Only implemented by MediaUrlDemuxer, for the MojoRendererService.
NOTREACHED();
}
} // namespace media