Shaka Player Embedded
Main Page
Exported Types
+
Tutorials
Basic Tutorial
Network Filters
Internal Docs
+
Internal Class List
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Typedefs
a
b
d
e
f
h
i
l
m
r
s
t
v
Enumerations
+
Enumerator
a
b
c
d
e
k
n
p
t
v
+
Properties
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
+
Related Functions
:
a
c
d
g
j
m
o
p
r
s
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
shaka
src
js
mse
media_track.cc
Go to the documentation of this file.
1
// Copyright 2020 Google LLC
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// https://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#include "
src/js/mse/media_track.h
"
16
17
namespace
shaka
{
18
namespace
js {
19
namespace
mse {
20
21
MediaTrack::MediaTrack
(std::shared_ptr<media::MediaTrack> track)
22
: track_(track) {}
23
24
MediaTrack::~MediaTrack
() {}
25
26
const
std::string&
MediaTrack::label
()
const
{
27
return
track_->label;
28
}
29
30
const
std::string&
MediaTrack::language
()
const
{
31
return
track_->language;
32
}
33
34
const
std::string&
MediaTrack::id
()
const
{
35
return
track_->id;
36
}
37
38
media::MediaTrackKind
MediaTrack::kind
()
const
{
39
return
track_->kind;
40
}
41
42
bool
MediaTrack::enabled
()
const
{
43
return
track_->enabled();
44
}
45
46
void
MediaTrack::SetEnabled
(
bool
enabled
) {
47
track_->SetEnabled(enabled);
48
}
49
50
51
// \cond Doxygen_Skip
52
AudioTrack::~AudioTrack() {}
53
VideoTrack::~VideoTrack() {}
54
// \endcond Doxygen_Skip
55
56
57
AudioTrackFactory::AudioTrackFactory
() {
58
AddGenericProperty<AudioTrack>(
"kind"
, &
MediaTrack::kind
);
59
AddGenericProperty<AudioTrack>(
"label"
, &
MediaTrack::label
);
60
AddGenericProperty<AudioTrack>(
"language"
, &
MediaTrack::language
);
61
AddGenericProperty<AudioTrack>(
"id"
, &
MediaTrack::id
);
62
AddGenericProperty<AudioTrack>(
"enabled"
, &
MediaTrack::enabled
,
63
&
MediaTrack::SetEnabled
);
64
}
65
66
VideoTrackFactory::VideoTrackFactory
() {
67
AddGenericProperty<VideoTrack>(
"kind"
, &
MediaTrack::kind
);
68
AddGenericProperty<VideoTrack>(
"label"
, &
MediaTrack::label
);
69
AddGenericProperty<VideoTrack>(
"language"
, &
MediaTrack::language
);
70
AddGenericProperty<VideoTrack>(
"id"
, &
MediaTrack::id
);
71
// The property is called "selected" on video tracks, but use the same fields
72
// as audio for consistency.
73
AddGenericProperty<VideoTrack>(
"selected"
, &
MediaTrack::enabled
,
74
&
MediaTrack::SetEnabled
);
75
}
76
77
}
// namespace mse
78
}
// namespace js
79
}
// namespace shaka
shaka::js::mse::MediaTrack::enabled
bool enabled() const
Definition:
media_track.cc:42
shaka::js::mse::MediaTrack::id
const std::string & id() const
Definition:
media_track.cc:34
shaka
Definition:
async_results.h:25
media_track.h
shaka::js::mse::MediaTrack::kind
media::MediaTrackKind kind() const
Definition:
media_track.cc:38
shaka::js::mse::MediaTrack::SetEnabled
void SetEnabled(bool enabled)
Definition:
media_track.cc:46
shaka::js::mse::AudioTrackFactory::AudioTrackFactory
AudioTrackFactory()
Definition:
media_track.cc:57
shaka::js::mse::MediaTrack::language
const std::string & language() const
Definition:
media_track.cc:30
shaka::js::mse::MediaTrack::MediaTrack
MediaTrack(std::shared_ptr< media::MediaTrack > track)
Definition:
media_track.cc:21
shaka::js::mse::VideoTrackFactory::VideoTrackFactory
VideoTrackFactory()
Definition:
media_track.cc:66
shaka::js::mse::MediaTrack::~MediaTrack
~MediaTrack() override
Definition:
media_track.cc:24
shaka::js::mse::MediaTrack::label
const std::string & label() const
Definition:
media_track.cc:26
shaka::media::MediaTrackKind
MediaTrackKind
Definition:
media_track.h:31
Generated by
1.8.13