init_put_byte is deprecated now, I suppose you should use ffio_init_context instead
2011/3/6 Kulti <[email protected]>: > Hope, my experience can help > > AVInputFormat* fmt = av_find_input_format( format.c_str() ); > if( fmt == NULL ) > { > logger << "ERROR: could not open format " << format << endl; > status = InitFailure; > } > else > { > fmt->flags |= AVFMT_NOFILE; > > io = new ByteIOContext(); > io->is_streamed = 1; > > const int bufSize = 10240; > avProbeDataBuf = new unsigned char[bufSize]; > AVProbeData pd; > pd.buf = avProbeDataBuf; > memset(pd.buf, bufSize, 0); > pd.buf_size = bufSize; > pd.filename = ""; > if( 0 != init_put_byte(io, pd.buf, pd.buf_size, 0, > reinterpret_cast<void*>(this), ffmpegIOContextReadWritePacket, NULL, NULL) ) > { > logger << "ERROR: init_put_byte error" << endl; > status = InitFailure; > } > else if( 0 != av_open_input_stream(&pFormatCtx, io, "", fmt, NULL) ) > { > logger << "ERROR: failed to open input stream." << endl; > status = InitFailure; > } > } > } > > > On Sun, Mar 6, 2011 at 2:55 AM, Jonathan Baldwin > <[email protected]>wrote: > >> How would I go about creating a AVIOContext/ByteIOContext structure >> instance >> that wraps custom read/write routines? >> >> Many thanks, >> Jonathan Baldwin >> _______________________________________________ >> libav-user mailing list >> [email protected] >> https://lists.mplayerhq.hu/mailman/listinfo/libav-user >> > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
