Shaka Packager SDK
text_track.h
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef PACKAGER_MEDIA_BASE_TEXT_TRACK_H_
6 #define PACKAGER_MEDIA_BASE_TEXT_TRACK_H_
7 
8 #include <memory>
9 #include <string>
10 
11 namespace shaka {
12 namespace media {
13 
15 enum TextKind {
16  kTextSubtitles,
17  kTextCaptions,
18  kTextDescriptions,
19  kTextMetadata,
20  kTextNone
21 };
22 
23 class TextTrack {
24  public:
25  ~TextTrack() override {}
26  virtual void addWebVTTCue(const base::TimeDelta& start,
27  const base::TimeDelta& end,
28  const std::string& id,
29  const std::string& content,
30  const std::string& settings) = 0;
31 };
32 
33 typedef std::function<std::unique_ptr<TextTrack>(TextKind kind,
34  const std::string& label,
35  const std::string& language)>
36  AddTextTrackCB;
37 
38 } // namespace media
39 } // namespace shaka
40 
41 #endif // PACKAGER_MEDIA_BASE_TEXT_TRACK_H_
All the methods that are virtual are virtual for mocking.
Definition: crypto_flags.cc:66