18#ifndef _VIDEO_RECEIVE_THREAD_H_
19#define _VIDEO_RECEIVE_THREAD_H_
60 keyFrameRequestCallback_ = std::move(
cb);
64 std::shared_ptr<SinkClient>&
getSink() {
return sink_; }
81 onSuccessfulSetup_ =
cb;
95 std::unique_ptr<MediaDecoder> videoDecoder_;
98 const std::string id_;
100 std::istringstream stream_;
101 MediaIOHandle sdpContext_;
102 std::unique_ptr<MediaIOHandle> demuxContext_;
103 std::shared_ptr<SinkClient> sink_;
104 bool isVideoConfigured_ {
false};
108 std::mutex rotationMtx_;
111 static int interruptCb(
void* ctx);
113 bool configureVideoOutput();
122 std::function<
void(
void)> keyFrameRequestCallback_;
124 std::function<
void(
const MediaStream& ms)> recorderCallback_;
MediaStream getInfo() const
void setSuccessfulSetupCb(const std::function< void(MediaType, bool)> &cb)
AVPixelFormat getPixelFormat() const
std::shared_ptr< SinkClient > & getSink()
void setRotation(int angle)
Set angle of rotation to apply to the video by the decoder.
void setRecorderCallback(const std::function< void(const MediaStream &ms)> &cb)
void addIOContext(SocketPair &socketPair)
void setRequestKeyFrameCallback(std::function< void(void)> cb)
std::unique_ptr< AVBufferRef, AVBufferRef_deleter > AVBufferPtr
void emitSignal(Args... args)
Simple macro to hide class' copy constructor and assignment operator.
#define NON_COPYABLE(ClassName)
DeviceParams Parameters used by MediaDecoder and MediaEncoder to open a LibAV device/stream.