2015-10-08 21:48:07 +00:00
|
|
|
// Copyright 2013 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.
|
|
|
|
|
2015-10-14 22:46:23 +00:00
|
|
|
#ifndef PACKAGER_MEDIA_BASE_TEXT_TRACK_CONFIG_H_
|
|
|
|
#define PACKAGER_MEDIA_BASE_TEXT_TRACK_CONFIG_H_
|
2015-10-08 21:48:07 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2015-10-08 21:48:07 +00:00
|
|
|
namespace media {
|
|
|
|
|
|
|
|
// Specifies the varieties of text tracks.
|
|
|
|
enum TextKind {
|
|
|
|
kTextSubtitles,
|
|
|
|
kTextCaptions,
|
|
|
|
kTextDescriptions,
|
|
|
|
kTextMetadata,
|
|
|
|
kTextNone
|
|
|
|
};
|
|
|
|
|
2015-10-14 22:46:23 +00:00
|
|
|
class TextTrackConfig {
|
2015-10-08 21:48:07 +00:00
|
|
|
public:
|
|
|
|
TextTrackConfig();
|
|
|
|
TextTrackConfig(TextKind kind,
|
|
|
|
const std::string& label,
|
|
|
|
const std::string& language,
|
|
|
|
const std::string& id);
|
|
|
|
|
|
|
|
// Returns true if all fields in |config| match this config.
|
|
|
|
bool Matches(const TextTrackConfig& config) const;
|
|
|
|
|
|
|
|
TextKind kind() const { return kind_; }
|
|
|
|
const std::string& label() const { return label_; }
|
|
|
|
const std::string& language() const { return language_; }
|
|
|
|
const std::string& id() const { return id_; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
TextKind kind_;
|
|
|
|
std::string label_;
|
|
|
|
std::string language_;
|
|
|
|
std::string id_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace media
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|
2015-10-08 21:48:07 +00:00
|
|
|
|
2015-10-14 22:46:23 +00:00
|
|
|
#endif // PACKAGER_MEDIA_BASE_TEXT_TRACK_H_
|