Twitch SDK (Internal)
ingestsampledata.h
Go to the documentation of this file.
1 /********************************************************************************************
2 * Twitch Broadcasting SDK
3 *
4 * This software is supplied under the terms of a license agreement with Twitch Interactive, Inc. and
5 * may not be copied or used except in accordance with the terms of that agreement
6 * Copyright (c) 2012-2017 Twitch Interactive, Inc.
7 *********************************************************************************************/
8 
9 #pragma once
10 
12 
13 #include <vector>
14 
15 namespace ttv
16 {
17  namespace broadcast
18  {
20  {
21  struct Frame
22  {
24  : keyFrame(false) {}
25 
26  std::vector<uint8_t> data;
27  bool keyFrame;
28  };
29 
30  TTV_ErrorCode Parse(const uint8_t* buffer, size_t length);
31 
32  std::vector<uint8_t> spsData;
33  std::vector<uint8_t> ppsData;
34  std::vector<Frame> frames;
35 
36  private:
37  TTV_ErrorCode TryParse(const uint8_t* buffer, size_t length);
38  void Clear();
39  };
40  }
41 }
bool keyFrame
Definition: ingestsampledata.h:27
Frame()
Definition: ingestsampledata.h:23
TTV_ErrorCode TryParse(const uint8_t *buffer, size_t length)
Definition: ingestsampledata.h:21
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
std::vector< uint8_t > ppsData
Definition: ingestsampledata.h:33
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
TTV_ErrorCode Parse(const uint8_t *buffer, size_t length)
std::vector< uint8_t > data
Definition: ingestsampledata.h:26
std::vector< Frame > frames
Definition: ingestsampledata.h:34
Definition: ingestsampledata.h:19
std::vector< uint8_t > spsData
Definition: ingestsampledata.h:32