Twitch SDK (Internal)
ipreencodedaudioframereceiver.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-2016 Twitch Interactive, Inc.
7 *********************************************************************************************/
8 
9 #pragma once
10 
13 #include <memory>
14 
15 namespace ttv
16 {
17  namespace broadcast
18  {
19  class IPreEncodedAudioFrameReceiver;
20  class AudioFrame;
21  }
22 }
23 
24 
29 {
30 public:
31  using AudioPacket = std::vector<uint8_t>;
32 
33 public:
37  virtual TTV_ErrorCode PackageFrame(AudioPacket&& frameData, AudioFormat audioFormat, uint32_t numChannels, uint64_t timeStamp, std::shared_ptr<AudioFrame>& result) = 0;
38 
39  static ReceiverTypeId GetReceiverTypeId() { static int typeId = 0; return reinterpret_cast<ReceiverTypeId>(&typeId); }
40 };
Definition: iaudioframereceiver.h:25
Definition: ipreencodedaudioframereceiver.h:28
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
virtual TTV_ErrorCode PackageFrame(AudioPacket &&frameData, AudioFormat audioFormat, uint32_t numChannels, uint64_t timeStamp, std::shared_ptr< AudioFrame > &result)=0
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
size_t ReceiverTypeId
Definition: iaudioframereceiver.h:28
static ReceiverTypeId GetReceiverTypeId()
Definition: ipreencodedaudioframereceiver.h:39
std::vector< uint8_t > AudioPacket
Definition: ipreencodedaudioframereceiver.h:31
AudioFormat
Definition: broadcasttypes.h:166