1 // Copyright 2013 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.
5 #ifndef MEDIA_BASE_TEXT_CUE_H_
6 #define MEDIA_BASE_TEXT_CUE_H_
10 #include "base/memory/ref_counted.h"
11 #include "base/time/time.h"
12 #include "media/base/media_export.h"
16 // A text buffer to carry the components of a text track cue.
17 class MEDIA_EXPORT TextCue
18 : public base::RefCountedThreadSafe
<TextCue
> {
20 TextCue(const base::TimeDelta
& timestamp
,
21 const base::TimeDelta
& duration
,
22 const std::string
& id
,
23 const std::string
& settings
,
24 const std::string
& text
);
26 // Access to constructor parameters.
27 base::TimeDelta
timestamp() const { return timestamp_
; }
28 base::TimeDelta
duration() const { return duration_
; }
29 const std::string
& id() const { return id_
; }
30 const std::string
& settings() const { return settings_
; }
31 const std::string
& text() const { return text_
; }
34 friend class base::RefCountedThreadSafe
<TextCue
>;
37 base::TimeDelta timestamp_
;
38 base::TimeDelta duration_
;
40 std::string settings_
;
43 DISALLOW_IMPLICIT_CONSTRUCTORS(TextCue
);
48 #endif // MEDIA_BASE_TEXT_CUE_H_