CoreSDK  v1.0.0.b1304
r5source.h
1 /*
2  * Copyright (c) 2022 Infrared5, Inc.
3  * License information: https://account.red5.net/assets/LICENSE.txt
4  *
5  */
6 
7 #pragma once
8 
9 #include "r5common.h"
10 
11 namespace r5::common {
16 enum class StreamDataType { Video = 0, Audio = 1 };
17 /***
18  * Class for handling sources that can provide data for multiple media streams
19  */
20 class Source
21 {
22 public:
29  virtual int32_t Init(std::vector<MediaDesc> &descs) = 0;
39  virtual int32_t GetNextData(int32_t &streamIndex, std::unique_ptr<uint8_t[]> &outputBuffer, uint32_t &outputBufferSize,
40  uint32_t &outputTimestamp) = 0;
46  virtual int32_t Release() = 0;
47 };
52 typedef std::shared_ptr<Source> SourcePtr;
53 }
Definition: r5source.h:20
Definition: r5codec.h:12