Shaka Player Embedded
track_list.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/track_list.h"
16 
18 #include "shaka/media/text_track.h"
19 #include "src/js/mse/media_track.h"
20 #include "src/js/mse/text_track.h"
21 
22 namespace shaka {
23 namespace js {
24 namespace mse {
25 
26 // \cond Doxygen_Skip
27 AudioTrackList::~AudioTrackList() {}
28 // \endcond Doxygen_Skip
29 
30 void AudioTrackList::OnAddAudioTrack(std::shared_ptr<media::MediaTrack> track) {
31  AddTrack(track);
32 }
33 
34 void AudioTrackList::OnRemoveAudioTrack(
35  std::shared_ptr<media::MediaTrack> track) {
36  RemoveTrack(track);
37 }
38 
39 
40 // \cond Doxygen_Skip
41 VideoTrackList::~VideoTrackList() {}
42 // \endcond Doxygen_Skip
43 
44 void VideoTrackList::OnAddVideoTrack(std::shared_ptr<media::MediaTrack> track) {
45  AddTrack(track);
46 }
47 
48 void VideoTrackList::OnRemoveVideoTrack(
49  std::shared_ptr<media::MediaTrack> track) {
50  RemoveTrack(track);
51 }
52 
53 
54 // \cond Doxygen_Skip
55 TextTrackList::~TextTrackList() {}
56 // \endcond Doxygen_Skip
57 
58 void TextTrackList::OnAddTextTrack(std::shared_ptr<media::TextTrack> track) {
59  AddTrack(track);
60 }
61 
62 void TextTrackList::OnRemoveTextTrack(std::shared_ptr<media::TextTrack> track) {
63  RemoveTrack(track);
64 }
65 
66 } // namespace mse
67 } // namespace js
68 } // namespace shaka
void RemoveTrack(std::shared_ptr< media::MediaTrack > pub_track)
Definition: track_list.h:110
void AddTrack(std::shared_ptr< media::MediaTrack > pub_track)
Definition: track_list.h:104