const char *long_name;
/** size of private data so that it can be allocated in the wrapper */
int priv_data_size;
- /** tell if a given file has a chance of being parsed by this format */
+ /**
+ * tell if a given file has a chance of being parsed by this format.
+ * The buffer provided is guranteed to be AVPROBE_PADDING_SIZE bytes big
+ * so you dont have to check for that unless you need more.
+ */
int (*read_probe)(AVProbeData *);
/** read the format header and initialize the AVFormatContext
structure. Return 0 if OK. 'ap' if non NULL contains
*/
AVRational r_frame_rate;
void *priv_data;
-#if LIBAVFORMAT_VERSION_INT < (52<<16)
+
/* internal data used in av_find_stream_info() */
- int64_t codec_info_duration;
+ int64_t first_dts;
+#if LIBAVFORMAT_VERSION_INT < (52<<16)
int codec_info_nb_frames;
#endif
/** encoding: PTS generation when outputing stream */
* multiple AVStreams (one AVStream per RTP stream). Otherwise,
* all the contexts in the array (an AVCodecContext per RTP stream)
* must contain only one AVStream
- * @param n_streams number of AVCodecContexts contained in ac
- * @return a pointer to the SDP (an array of chars which is allocated by
- * avf_sdp_create(), and must be freed by the caller), or NULL in
- * case of failure.
+ * @param n_files number of AVCodecContexts contained in ac
+ * @param buff buffer where the SDP will be stored (must be allocated by
+ * the caller
+ * @param size the size of the buffer
+ * @return 0 if OK. AVERROR_xxx if error.
*/
-char *avf_sdp_create(AVFormatContext *ac[], int n_streams);
+int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int size);
#ifdef HAVE_AV_CONFIG_H