Shaka Packager SDK
packager
media
event
event_info.h
1
// Copyright 2018 Google LLC. 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
// Defines EventInfo structure used internally by muxer listeners for VOD.
8
9
#ifndef PACKAGER_MEDIA_EVENT_EVENT_INFO_H_
10
#define PACKAGER_MEDIA_EVENT_EVENT_INFO_H_
11
12
#include <cstdint>
13
14
namespace
shaka
{
15
namespace
media {
16
17
// This stores data passed into OnNewSegment() for VOD.
18
struct
SegmentEventInfo
{
19
int64_t start_time;
20
// The below two fields are only useful for Segment.
21
int64_t duration;
22
uint64_t segment_file_size;
23
int64_t segment_number;
24
};
25
26
struct
KeyFrameEvent
{
27
int64_t timestamp;
28
// In segment for multi-segment, in subsegment for single-segment.
29
uint64_t start_offset_in_segment;
30
uint64_t size;
31
};
32
33
// This stores data passed into OnCueEvent() for VOD.
34
struct
CueEventInfo
{
35
int64_t timestamp;
36
};
37
38
enum class
EventInfoType {
39
kSegment,
40
kKeyFrame,
41
kCue,
42
};
43
44
// This stores data for lazy event callback for VOD.
45
struct
EventInfo
{
46
EventInfoType type;
47
union
{
48
SegmentEventInfo
segment_info;
49
KeyFrameEvent
key_frame;
50
CueEventInfo
cue_event_info;
51
};
52
};
53
54
}
// namespace media
55
}
// namespace shaka
56
57
#endif
// PACKAGER_MEDIA_EVENT_EVENT_INFO_H_
shaka
All the methods that are virtual are virtual for mocking.
Definition:
crypto_flags.cc:66
shaka::media::CueEventInfo
Definition:
event_info.h:34
shaka::media::EventInfo
Definition:
event_info.h:45
shaka::media::KeyFrameEvent
Definition:
event_info.h:26
shaka::media::SegmentEventInfo
Definition:
event_info.h:18
Generated on Mon Nov 11 2024 19:07:10 for Shaka Packager SDK by
1.9.1