Samples - adding a sample to illustrate StreamProvider for demuxer (#99)

* mem sample

* changes to match c++ style

* ffmpeg log

* readme update

* readme clean up
This commit is contained in:
Lakshmi Kumar
2023-11-29 08:22:21 -08:00
کامیت شده توسط GitHub
والد ad54bd5258
کامیت 22de4fbc6f
4فایلهای تغییر یافته به همراه332 افزوده شده و 1 حذف شده
+1 -1
مشاهده پرونده
@@ -152,6 +152,7 @@ bool VideoDemuxer::Demux(uint8_t **video, int *video_size, int64_t *pts) {
}
VideoDemuxer::VideoDemuxer(AVFormatContext *av_fmt_input_ctx) : av_fmt_input_ctx_(av_fmt_input_ctx) {
av_log_set_level(AV_LOG_QUIET);
if (!av_fmt_input_ctx_) {
std::cerr << "ERROR: av_fmt_input_ctx_ is not vaild!" << std::endl;
return;
@@ -255,7 +256,6 @@ AVFormatContext *VideoDemuxer::CreateFmtContextUtil(StreamProvider *stream_provi
AVFormatContext *VideoDemuxer::CreateFmtContextUtil(const char *input_file_path) {
avformat_network_init();
av_log_set_level(AV_LOG_QUIET);
AVFormatContext *ctx = nullptr;
if (avformat_open_input(&ctx, input_file_path, nullptr, nullptr) != 0 ) {
std::cerr << "ERROR: avformat_open_input failed!" << std::endl;