OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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/base/media_track.h" | 5 #include "media/base/media_track.h" |
6 | 6 |
7 namespace media { | 7 namespace media { |
8 | 8 |
9 MediaTrack::MediaTrack(Type type, | 9 MediaTrack::MediaTrack(Type type, |
10 StreamParser::TrackId byteStreamTrackId, | 10 StreamParser::TrackId byteStreamTrackId, |
11 const std::string& kind, | 11 const std::string& kind, |
12 const std::string& label, | 12 const std::string& label, |
13 const std::string& lang) | 13 const std::string& lang) |
14 : type_(type), | 14 : type_(type), |
15 byteStreamTrackId_(byteStreamTrackId), | 15 byteStreamTrackId_(byteStreamTrackId), |
16 kind_(kind), | 16 kind_(kind), |
17 label_(label), | 17 label_(label), |
18 language_(lang) {} | 18 language_(lang), |
19 id_("") {} | |
xhwang
2016/06/09 06:06:02
nit: not necessary
servolk
2016/06/09 19:14:46
Done.
| |
19 | 20 |
20 MediaTrack::~MediaTrack() {} | 21 MediaTrack::~MediaTrack() {} |
21 | 22 |
23 MediaTrack::TrackId MediaTrack::id() const { | |
24 return id_; | |
25 } | |
26 | |
27 void MediaTrack::setId(TrackId id) { | |
28 DCHECK(id_ == ""); | |
29 DCHECK(id != ""); | |
xhwang
2016/06/09 06:06:02
nit: use empty()?
servolk
2016/06/09 19:14:46
Done.
| |
30 id_ = id; | |
31 } | |
xhwang
2016/06/09 06:06:02
nit: These two functions can be inlined in the hea
servolk
2016/06/09 19:14:46
Done.
| |
32 | |
22 } // namespace media | 33 } // namespace media |
OLD | NEW |