Shaka Packager SDK
packager
media
base
text_sample.h
1
// Copyright 2017 Google Inc. All rights reserved.
2
//
3
// Use of this source code is governed by a BSD-style
4
// license that can be found in the LICENSE file or at
5
// https://developers.google.com/open-source/licenses/bsd
6
7
#ifndef PACKAGER_MEDIA_BASE_TEXT_SAMPLE_H_
8
#define PACKAGER_MEDIA_BASE_TEXT_SAMPLE_H_
9
10
#include <stdint.h>
11
12
#include <string>
13
14
namespace
shaka
{
15
namespace
media {
16
17
class
TextSample
{
18
public
:
19
TextSample
() =
default
;
20
21
const
std::string& id()
const
{
return
id_; }
22
int64_t start_time()
const
{
return
start_time_; }
23
int64_t duration()
const
{
return
duration_; }
24
const
std::string& settings()
const
{
return
settings_; }
25
const
std::string& payload()
const
{
return
payload_; }
26
int64_t EndTime()
const
;
27
28
void
set_id(
const
std::string&
id
) { id_ = id; }
29
void
SetTime(int64_t start_time, int64_t end_time);
30
void
AppendStyle(
const
std::string& style);
31
void
AppendPayload(
const
std::string& payload);
32
33
private
:
34
// Allow the compiler generated copy constructor and assignment operator
35
// intentionally. Since the text data is typically small, the performance
36
// impact is minimal.
37
38
std::string id_;
39
int64_t start_time_ = 0;
40
int64_t duration_ = 0;
41
std::string settings_;
42
std::string payload_;
43
};
44
45
}
// namespace media
46
}
// namespace shaka
47
48
#endif // PACKAGER_MEDIA_BASE_TEXT_SAMPLE_H_
shaka
All the methods that are virtual are virtual for mocking.
Definition:
gflags_hex_bytes.cc:11
shaka::media::TextSample
Definition:
text_sample.h:17
Generated on Wed Aug 15 2018 17:34:14 for Shaka Packager SDK by
1.8.13