History

avformat: Add av_get_frame_filename2() and AV_FRAME_FILENAME_FLAGS_MULTIPLE

This will be used to allow writing file sequences using the tee output onto multiple places in parallel

Michael Niedermayer committed 10 years ago

Commit 82a33c81 parent be63ef34 files · +18 −3Browse files

Unified · Split

4 files
  1. doc/APIchanges +3 −0
  2. libavformat/avformat.h +7 −0
  3. libavformat/utils.c +7 −2
  4. libavformat/version.h +1 −1
doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2015-08-28 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182016-08-04 - xxxxxxx - lavf 57.46.100 - avformat.h
19 Add av_get_frame_filename2()
20
182016-07-09 - xxxxxxx / 90f469a - lavc 57.50.100 / 57.20.0 - avcodec.h212016-07-09 - xxxxxxx / 90f469a - lavc 57.50.100 / 57.20.0 - avcodec.h
19 Add FF_PROFILE_H264_MULTIVIEW_HIGH and FF_PROFILE_H264_STEREO_HIGH.22 Add FF_PROFILE_H264_MULTIVIEW_HIGH and FF_PROFILE_H264_STEREO_HIGH.
20 23
libavformat/avformat.h+7−0
@@ -2720,6 +2720,9 @@ void av_dump_format(AVFormatContext *ic, · 2719 unmodified lines
2720 const char *url,2720 const char *url,
2721 int is_output);2721 int is_output);
2722 2722
2723
2724#define AV_FRAME_FILENAME_FLAGS_MULTIPLE 1 ///< Allow multiple %d
2725
2723/**2726/**
2724 * Return in 'buf' the path with '%d' replaced by a number.2727 * Return in 'buf' the path with '%d' replaced by a number.
2725 *2728 *
@@ -2730,8 +2733,12 @@ void av_dump_format(AVFormatContext *ic, · 4 unmodified lines
2730 * @param buf_size destination buffer size2733 * @param buf_size destination buffer size
2731 * @param path numbered sequence string2734 * @param path numbered sequence string
2732 * @param number frame number2735 * @param number frame number
2736 * @param flags AV_FRAME_FILENAME_FLAGS_*
2733 * @return 0 if OK, -1 on format error2737 * @return 0 if OK, -1 on format error
2734 */2738 */
2739int av_get_frame_filename2(char *buf, int buf_size,
2740 const char *path, int number, int flags);
2741
2735int av_get_frame_filename(char *buf, int buf_size,2742int av_get_frame_filename(char *buf, int buf_size,
2736 const char *path, int number);2743 const char *path, int number);
2737 2744
libavformat/utils.c+7−2
@@ -4315,7 +4315,7 @@ uint64_t ff_ntp_time(void) · 4314 unmodified lines
4315 return (av_gettime() / 1000) * 1000 + NTP_OFFSET_US;4315 return (av_gettime() / 1000) * 1000 + NTP_OFFSET_US;
4316}4316}
4317 4317
4318int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)4318int av_get_frame_filename2(char *buf, int buf_size, const char *path, int number, int flags)
4319{4319{
4320 const char *p;4320 const char *p;
4321 char *q, buf1[20], c;4321 char *q, buf1[20], c;
@@ -4340,7 +4340,7 @@ int av_get_frame_filename(char *buf, int buf_size, const char *path, int number) · 18 unmodified lines
4340 case '%':4340 case '%':
4341 goto addchar;4341 goto addchar;
4342 case 'd':4342 case 'd':
4343 if (percentd_found)4343 if (!(flags & AV_FRAME_FILENAME_FLAGS_MULTIPLE) && percentd_found)
4344 goto fail;4344 goto fail;
4345 percentd_found = 1;4345 percentd_found = 1;
4346 if (number < 0)4346 if (number < 0)
@@ -4370,6 +4370,11 @@ fail: · 23 unmodified lines
4370 return -1;4370 return -1;
4371}4371}
4372 4372
4373int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
4374{
4375 return av_get_frame_filename2(buf, buf_size, path, number, 0);
4376}
4377
4373void av_url_split(char *proto, int proto_size,4378void av_url_split(char *proto, int proto_size,
4374 char *authorization, int authorization_size,4379 char *authorization, int authorization_size,
4375 char *hostname, int hostname_size,4380 char *hostname, int hostname_size,
libavformat/version.h+1−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
32// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)32// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
33// Also please add any ticket numbers that you belive might be affected here33// Also please add any ticket numbers that you belive might be affected here
34#define LIBAVFORMAT_VERSION_MAJOR 5734#define LIBAVFORMAT_VERSION_MAJOR 57
35#define LIBAVFORMAT_VERSION_MINOR 4535#define LIBAVFORMAT_VERSION_MINOR 46
36#define LIBAVFORMAT_VERSION_MICRO 10036#define LIBAVFORMAT_VERSION_MICRO 100
37 37
38#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \38#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t