54struct AVFormatContext;
115 if (streams_.size() <= stream)
116 streams_.resize(stream + 1);
117 streams_[stream] = std::move(
cb);
128 if (stream >= inputCtx_->nb_streams) {
129 JAMI_ERR(
"Stream index is out of range: %u", stream);
132 return inputCtx_->streams[stream];
144 bool streamInfoFound_ {
false};
146 std::vector<StreamCallback> streams_;
148 int64_t lastReadPacketTime_ {};
149 DeviceParams inputParams_;
152 std::mutex audioBufferMutex_ {};
153 std::mutex videoBufferMutex_ {};
156 std::function<
void()> needFrameCb_;
157 std::function<
void(
bool)> fileFinishedCb_;
211 resolutionChangedCallback_ = std::move(
cb);
214 void setFEC(
bool enable) { fecEnabled_ = enable; }
218 firstDecode_.exchange(
true);
219 contextCallback_ =
cb;
229 std::shared_ptr<MediaDemuxer> demuxer_;
231 const AVCodec* inputDecoder_ =
nullptr;
234 bool emulateRate_ =
false;
238 DeviceParams inputParams_;
243 bool fallback_ =
false;
247 std::unique_ptr<video::HardwareAccel>
accel_;
251 int prepareDecoderContext();
253 void resetSeekTime() { seekTime_ = -1; }
254 std::function<
void(
int,
int)> resolutionChangedCallback_;
259 bool fecEnabled_ {
false};
261 std::function<
void()> contextCallback_;
262 std::atomic_bool firstDecode_ {
true};
Naive implementation of the boost::rational interface, described here: http://www....
void emitSignal(Args... args)
libjami::VideoFrame VideoFrame
std::function< void(std::shared_ptr< MediaFrame > &&)> MediaObserver
libjami::AudioFrame AudioFrame
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.