24 std::string R5_SDK_CORE_EXPORT GetVersion();
30 enum class StatusType {
52 ConnectionRejectedError,
58 enum class RecordType {
66 enum class ProtocolType {
75 enum class NetworkTransport {
82 enum class AudioFormat {
91 typedef std::pair<std::string, std::string> MetadataRecord;
117 virtual int GetNumberMediaDescs() = 0;
142 typedef std::shared_ptr<IMediaDescEnumerator> IMediaDescEnumeratorPtr;
160 virtual int SinkSample(
const MediaSample &outSample) = 0;
162 typedef std::shared_ptr<IMediaSink> IMediaSinkPtr;
191 virtual int Release() = 0;
193 typedef std::shared_ptr<ISingleSource> ISingleSourcePtr;
208 virtual int Init(std::vector<MediaDesc> &descs) = 0;
216 virtual int GetData(
int idx,
MediaSample &outSample) = 0;
222 virtual int Release() = 0;
224 typedef std::shared_ptr<IDemuxingSource> IDemuxingSourcePtr;
259 virtual int Release() = 0;
261 typedef std::shared_ptr<ITransform> ITransformPtr;
285 virtual int PutData(
const MediaSample &inSample) = 0;
291 virtual int Release() = 0;
293 typedef std::shared_ptr<ISingleRenderer> ISingleRendererPtr;
308 virtual int Init(std::vector<MediaDesc> &descs) = 0;
316 virtual int PutData(
int idx,
const MediaSample &inSample) = 0;
322 virtual int Release() = 0;
325 typedef std::shared_ptr<IMuxingRenderer> IMuxingRendererPtr;
339 virtual DataType GetType() = 0;
355 virtual int AddTransform(ITransformPtr tfm) = 0;
362 virtual int AddSink(IMediaSinkPtr sink) = 0;
365 typedef std::shared_ptr<IMediaStream> IMediaStreamPtr;
379 virtual int InitHandler() = 0;
387 virtual int OnStatus(StatusType statusType,
const std::string &statusMessage) = 0;
394 virtual int OnReceiveMetadata(
Metadata &metadata) = 0;
400 virtual int ReleaseHandler() = 0;
402 typedef std::shared_ptr<ICallbackHandler> ICallbackHandlerPtr;
417 virtual std::vector<IMediaStreamPtr> AddStreams(IDemuxingSourcePtr src) = 0;
424 virtual IMediaStreamPtr AddStream(ISingleSourcePtr src) = 0;
432 virtual IMediaStreamPtr AddStream(ISingleRendererPtr rdr) = 0;
438 virtual int SetCallbackHandler(ICallbackHandlerPtr handler) = 0;
444 virtual int SetLogger(std::shared_ptr<ILogger>) = 0;
450 virtual int Connect() = 0;
456 virtual int Disconnect() = 0;
463 virtual bool IsRunning() = 0;
470 virtual int SendMetadata(
const Metadata &metadata) = 0;
477 virtual uint64_t GetBytesSent(DataType type) = 0;
484 virtual uint64_t GetBytesReceived(DataType type) = 0;
486 typedef std::shared_ptr<IClient> IClientPtr;
497 NetworkTransport transport = NetworkTransport::Tcp;
498 ProtocolType protocolType = ProtocolType::Rtsp;
499 RecordType recordType = RecordType::Live;
517 static void SetLicenseKey(
const std::string &licenseKey);
523 static ILoggerPtr GetDefaultLogger();
530 static int SetDefaultLogger(ILoggerPtr logger);
536 static void SetDefaultLogLevel(LogLevel level);
542 static void SetPreferredAudioFormat(AudioFormat fmt);
551 static ITransformPtr CreateEncoderForCodec(CodecPtr codec,
EncoderSettings set);
558 static ITransformPtr CreateDecoderForCodec(CodecPtr codec);
567 static IDemuxingSourcePtr OpenMediaFile(std::string fname,
int numberOfRepeat, ILoggerPtr logger =
nullptr);
Interface for single media renderer This interface can be used to implement different media renderers...
Definition: red5pro.h:268
std::string contextName
name of context of the stream (e.g. "live")
Definition: red5pro.h:495
Interface for single media source objects This interface can be used to implement different media sou...
Definition: red5pro.h:169
Service structure that describes Red5Pro server connection parameters.
Definition: red5pro.h:491
Main interface for object that handle Red5Pro server connection This interface can be used to configu...
Definition: red5pro.h:408
Set of encoder settings.
Definition: r5codec.h:62
std::string host
IP or DNS address of Red5Pro server to connect.
Definition: red5pro.h:493
Interface for source object that can provide multiple media types at same time This interface can be ...
Definition: red5pro.h:199
Interface to get status notifications and receive metadata This interface can be implemented by user ...
Definition: red5pro.h:371
std::string streamName
name of the stream
Definition: red5pro.h:496
Interface for renderer object that can handle multiple media types at same time This interface can be...
Definition: red5pro.h:299
Definition: r5stream_manager.h:12
std::string username
optional user name, used if server has enabled authentication
Definition: red5pro.h:501
int port
port on server side to connect (Note: make sure that server can handle selected protocol on this port...
Definition: red5pro.h:494
std::string password
optional password, used if server has enabled authentication
Definition: red5pro.h:502
Main Red5Pro CoreSDK object This object is used to specify default and common settings for applicatio...
Definition: red5pro.h:509