blob: 6c6e8e9f5e5c209a1f0335c2b8e3329ba02ca4f2 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cobalt/media/base/media_track.h"
namespace cobalt {
namespace media {
MediaTrack::MediaTrack(Type type, StreamParser::TrackId bytestream_track_id,
const std::string& kind, const std::string& label,
const std::string& lang)
: type_(type),
bytestream_track_id_(bytestream_track_id),
kind_(kind),
label_(label),
language_(lang) {}
MediaTrack::~MediaTrack() {}
const char* TrackTypeToStr(MediaTrack::Type type) {
switch (type) {
case MediaTrack::Audio:
return "audio";
case MediaTrack::Text:
return "text";
case MediaTrack::Video:
return "video";
}
NOTREACHED();
return "INVALID";
}
} // namespace media
} // namespace cobalt