X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Favformat.h;h=4c72a617c39f2290cb40f96e5d53774549525e38;hb=1d5fab9b33d30ba34e986fcf64e696e8fc1acc87;hp=a58200c3120acc6d37856b508e5d362b5a54a4c7;hpb=bf4a1f17ee9237b6efd4250cf894e274afc31a5f;p=ffmpeg diff --git a/libavformat/avformat.h b/libavformat/avformat.h index a58200c3120..4c72a617c39 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVFORMAT_H -#define AVFORMAT_H +#ifndef FFMPEG_AVFORMAT_H +#define FFMPEG_AVFORMAT_H -#define LIBAVFORMAT_VERSION_INT ((51<<16)+(13<<8)+3) -#define LIBAVFORMAT_VERSION 51.13.3 +#define LIBAVFORMAT_VERSION_INT ((51<<16)+(17<<8)+0) +#define LIBAVFORMAT_VERSION 51.17.0 #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) @@ -345,6 +345,18 @@ typedef struct AVStream { int64_t pts_buffer[MAX_REORDER_DELAY+1]; } AVStream; +#define AV_PROGRAM_RUNNING 1 + +typedef struct AVProgram { + int id; + char *provider_name; ///< Network name for DVB streams + char *name; ///< Service name for DVB streams + int flags; + enum AVDiscard discard; ///< selects which program to discard and which to feed to the caller + unsigned int *stream_index; + unsigned int nb_stream_indexes; +} AVProgram; + #define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present (streams are added dynamically) */ @@ -430,6 +442,9 @@ typedef struct AVFormatContext { const uint8_t *key; int keylen; + + unsigned int nb_programs; + AVProgram **programs; } AVFormatContext; typedef struct AVPacketList { @@ -445,10 +460,6 @@ enum CodecID av_guess_image2_codec(const char *filename); /* XXX: use automatic init with either ELF sections or C file parser */ /* modules */ -#include "rtp.h" - -#include "rtsp.h" - /* utils.c */ void av_register_input_format(AVInputFormat *format); void av_register_output_format(AVOutputFormat *format); @@ -647,6 +658,7 @@ void av_close_input_file(AVFormatContext *s); * @param id file format dependent stream id */ AVStream *av_new_stream(AVFormatContext *s, int id); +AVProgram *av_new_program(AVFormatContext *s, int id); /** * Set the pts for a given stream. @@ -794,19 +806,30 @@ attribute_deprecated int parse_image_size(int *width_ptr, int *height_ptr, const attribute_deprecated int parse_frame_rate(int *frame_rate, int *frame_rate_base, const char *arg); /** - * Converts date string to number of seconds since Jan 1st, 1970. - * + * Parses \p datestr and returns a corresponding number of microseconds. + * @param datestr String representing a date or a duration. + * - If a date the syntax is: * @code - * Syntax: - * - If not a duration: * [{YYYY-MM-DD|YYYYMMDD}]{T| }{HH[:MM[:SS[.m...]]][Z]|HH[MM[SS[.m...]]][Z]} - * Time is localtime unless Z is suffixed to the end. In this case GMT - * Return the date in micro seconds since 1970 - * - * - If a duration: - * HH[:MM[:SS[.m...]]] - * S+[.m...] * @endcode + * Time is localtime unless Z is appended, in which case it is + * interpreted as UTC. + * If the year-month-day part isn't specified it takes the current + * year-month-day. + * Returns the number of microseconds since 1st of January, 1970 up to + * the time of the parsed date or INT64_MIN if \p datestr cannot be + * successfully parsed. + * - If a duration the syntax is: + * @code + * [-]HH[:MM[:SS[.m...]]] + * [-]S+[.m...] + * @endcode + * Returns the number of microseconds contained in a time interval + * with the specified duration or INT64_MIN if \p datestr cannot be + * succesfully parsed. + * @param duration Flag which tells how to interpret \p datestr, if + * not zero \p datestr is interpreted as a duration, otherwise as a + * date. */ int64_t parse_date(const char *datestr, int duration); @@ -905,5 +928,4 @@ int match_ext(const char *filename, const char *extensions); #endif /* HAVE_AV_CONFIG_H */ -#endif /* AVFORMAT_H */ - +#endif /* FFMPEG_AVFORMAT_H */