Re: [FFmpeg-devel] [PATCH 06/17] lavfi: add ff_inlink_process_timeline().
Le decadi 10 nivôse, an CCXXV, Michael Niedermayer a écrit : > // do some statistics, whatever > ... > if (ff_inlink_evaluate_timeline_at_frame()) { > process frame > } > pass output on > > > If we imagine a filter that processes a series of frames, lets say > for motion estimation or deinterlacing then the point at which it > becomes enabled may need some processing (or storage) to have occured > on past frames > > i find it cleaner to have the effect of a function be its return > value instead of it primarly writing a value into some structure field That makes sense. Changed. The new code looks like this: dstctx->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame); And the doxy: /** * Evaluate the timeline expression of the link for the time and properties * of the frame. * @return >0 if enabled, 0 if disabled * @note It does not update link->dst->is_disabled. */ int ff_inlink_evaluate_timeline_at_frame(AVFilterLink *link, const AVFrame *frame); > > /** > > * Mark a filter ready and schedule it for activation. > > * > > * This is automatically done when something happens to the filter (queued > > * frame, status change, request on output). > > * Filters implementing the activate callback can call it directly to > > * perform one more round of processing later. > > * It is also useful for filters reacting to external or asynchronous > > * events. > > */ > > void ff_filter_set_ready(AVFilterContext *filter, unsigned priority); > if the only use of this (from a filter) is to call it to get activate() > re-called, just an idea but > what would be your oppinion on using a return code from activate() ? > E"iam not done, call me again later" I considered this, but I decided against it for the combination of several minor reasons: - a return code is more easily lost in a refactoring; - the function is still needed for the framework (note that it already exists, this patch only makes it visible outside avfilter.c); - the function will be needed for filters that react to external or asynchronous events; - having several mechanisms to do approximatively the same thing is not the best idea; - it does not allow to set a priority (I have not yet documented the priorities, but the idea is that processing a frame is more urgent than forwarding a request). > iam tempted to suggest to call this > ff_inlink_request_frame() > > it would be the better name if ff_request_frame() didnt exist. I tried to make ff_filter_frame() work for both cases, but it proved too inconvenient. I renamed it ff_inlink_request_frame(), I do not think the confusion can cause actual problems. At worst, someone will write ff_request_frame(), get an assert failure when testing and fix it, the same could happen as well with the other name. The code changes are still minor, I will wait a bit before sending the new series in case there are remarks about patches 12, 13, 14, 16, 17 or more about the others. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/9] ffplay: use buffersink accessors.
Le septidi 7 nivôse, an CCXXV, Nicolas George a écrit : > Signed-off-by: Nicolas George > --- > ffplay.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) Ping for that patch. If there are no more remarks about them, I will eventually push patches 1-5 and 8 (rebased) in this series. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/hlsenc: default segment name and, use_localtime
2016-12-31 1:24 GMT+08:00 Bodecs Bela : > > 2016.12.30. 18:11 keltezéssel, Moritz Barsnick írta: > >> On Fri, Dec 30, 2016 at 15:38:25 +0100, Bodecs Bela wrote: >> >>> is not available on all system/environment. This patch checks %s >>> availabilty at runtine and alter the default format string if necessary. >>> >> You forgot to add the patch. >> > please, forgive me. I attached it now. > > >> Moritz >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > > Bela > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > Signed-off-by: Bela Bodecs --- libavformat/hlsenc.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index c9d8e3c..76b85e8 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -829,13 +829,22 @@ fail: return err; } +static const char * get_default_pattern_localtime_fmt(void) +{ +char b[21]; +time_t t = time(NULL); +struct tm *p, tmbuf; +p = localtime_r(&t, &tmbuf); +return (strftime(b, sizeof(b), "%s", p) > 2) ? "-%s.ts" : "-%Y%m%d%H%I%S.ts"; Why check strftime result bigger than 2,not 1 not 3? +} + static int hls_write_header(AVFormatContext *s) { HLSContext *hls = s->priv_data; int ret, i; char *p; const char *pattern = "%d.ts"; -const char *pattern_localtime_fmt = "-%s.ts"; +const char *pattern_localtime_fmt = get_default_pattern_localtime_fmt(); const char *vtt_pattern = "%d.vtt"; AVDictionary *options = NULL; int basename_size; -- 2.5.3.windows.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/hlsenc: default segment name and, use_localtime
2016.12.31. 11:48 keltezéssel, Steven Liu írta: 2016-12-31 1:24 GMT+08:00 Bodecs Bela : 2016.12.30. 18:11 keltezéssel, Moritz Barsnick írta: On Fri, Dec 30, 2016 at 15:38:25 +0100, Bodecs Bela wrote: is not available on all system/environment. This patch checks %s availabilty at runtine and alter the default format string if necessary. You forgot to add the patch. please, forgive me. I attached it now. Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel Bela ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel Signed-off-by: Bela Bodecs --- libavformat/hlsenc.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index c9d8e3c..76b85e8 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -829,13 +829,22 @@ fail: return err; } +static const char * get_default_pattern_localtime_fmt(void) +{ +char b[21]; +time_t t = time(NULL); +struct tm *p, tmbuf; +p = localtime_r(&t, &tmbuf); +return (strftime(b, sizeof(b), "%s", p) > 2) ? "-%s.ts" : "-%Y%m%d%H%I%S.ts"; Why check strftime result bigger than 2,not 1 not 3? I have faced different strftime behaviours on two different environments where unknown specifier was in format string. On one of them strftime returned 0, this was the expected return value by me. But on the other one, strftime returned 2 and put unknown specifier (%s) as is into the result buffer. So >2 will handle each cases. In normal behaviour, nowadays, length of seconds string will be always longer than 2. Should I put a comment about it into the code? +} + static int hls_write_header(AVFormatContext *s) { HLSContext *hls = s->priv_data; int ret, i; char *p; const char *pattern = "%d.ts"; -const char *pattern_localtime_fmt = "-%s.ts"; +const char *pattern_localtime_fmt = get_default_pattern_localtime_fmt(); const char *vtt_pattern = "%d.vtt"; AVDictionary *options = NULL; int basename_size; ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/3] avfilter/formats: do not allow unknown layouts in ff_parse_channel_layout if nret is not set
Le sextidi 6 nivôse, an CCXXV, Marton Balint a écrit : > Current code returned the number of channels as channel layout in that case, > and if nret is not set then unknown layouts are typically not supported. Good catch. Let me see if I got this correctly: av_get_channel_layout("2c") = stereo av_get_channel_layout("2C") = 0 av_get_channel_layout("13c") = 0 av_get_channel_layout("13C") = 0 av_get_extended_channel_layout("2c") = stereo / 2 av_get_extended_channel_layout("2C") = 0 / 2 av_get_extended_channel_layout("13c") = EINVAL av_get_extended_channel_layout("13C") = 0 / 13 ff_parse_channel_layout(): before after nret == NULL 2c stereo stereo nret == NULL 2C EINVAL EINVAL nret == NULL 13c(int64)13 = FL+FC+LFEINVAL nret == NULL 13CEINVAL EINVAL nret != NULL 2c stereo / 2 stereo / 2 nret != NULL 2C EINVAL 0 / 2 nret != NULL 13c0 / 13 EINVAL nret != NULL 13CEINVAL 0 / 13 Do we agree? > Also use the common parsing code. This breaks a very specific case, using > af_pan with an unknown channel layout such as '13c', from now on, only '13C' > will work. I think you could easily add a temporary workaround and a warning. (I suggest, from now on, we flag temporary workarounds and warnings with a standardized comment: "/* [TEMPORARY 2016-12 -> 2017-12]*/"; that way, we can find them using git grep.) > Signed-off-by: Marton Balint > --- > libavfilter/formats.c | 20 ++-- > libavfilter/tests/formats.c | 3 +++ > tests/ref/fate/filter-formats | 5 - > 3 files changed, 13 insertions(+), 15 deletions(-) > > diff --git a/libavfilter/formats.c b/libavfilter/formats.c > index 840780d..8be606f 100644 > --- a/libavfilter/formats.c > +++ b/libavfilter/formats.c > @@ -662,24 +662,16 @@ int ff_parse_sample_rate(int *ret, const char *arg, > void *log_ctx) > int ff_parse_channel_layout(int64_t *ret, int *nret, const char *arg, > void *log_ctx) > { > -char *tail; > int64_t chlayout; > +int nb_channels; > > -chlayout = av_get_channel_layout(arg); > -if (chlayout == 0) { > -chlayout = strtol(arg, &tail, 10); > -if (!(*tail == '\0' || *tail == 'c' && *(tail + 1) == '\0') || > chlayout <= 0 || chlayout > 63) { This is losing the >63 test since av_get_extended_channel_layout() tests for >64. lavfi can not deal with channel layouts with channel #63 set, because the bit serves to mark channel counts disguised as layouts; channel #63 is not defined in lavu anyway. Unknown channel layouts should work with even more than 64 channels, but that would require testing. > -av_log(log_ctx, AV_LOG_ERROR, "Invalid channel layout '%s'\n", > arg); > -return AVERROR(EINVAL); > -} > -if (nret) { > -*nret = chlayout; > -*ret = 0; > -return 0; > -} > +if (av_get_extended_channel_layout(arg, &chlayout, &nb_channels) < 0 || > (!chlayout && !nret)) { > +av_log(log_ctx, AV_LOG_ERROR, "Invalid channel layout '%s'\n", arg); Could you split the test to distinguish the warning? av_get_extended_channel_layout < 0 -> "Invalid channel layout" (!chlayout && !nret) -> "channel count without layout unsupported" (it also makes it easier to add the temporary workaround) > +return AVERROR(EINVAL); > } > *ret = chlayout; > if (nret) > -*nret = av_get_channel_layout_nb_channels(chlayout); > +*nret = nb_channels; > + > return 0; > } > diff --git a/libavfilter/tests/formats.c b/libavfilter/tests/formats.c > index 0e8ba4a..5450742 100644 > --- a/libavfilter/tests/formats.c > +++ b/libavfilter/tests/formats.c > @@ -39,6 +39,9 @@ int main(void) > "-1c", > "60c", > "65c", > +"2C", > +"60C", > +"65C", > "5.1", > "stereo", > "1+1+1+1", > diff --git a/tests/ref/fate/filter-formats b/tests/ref/fate/filter-formats > index 4c303d8..17ff5b2 100644 > --- a/tests/ref/fate/filter-formats > +++ b/tests/ref/fate/filter-formats > @@ -75,8 +75,11 @@ quad(side) > 0 = ff_parse_channel_layout(0004, 1, 1c); > 0 = ff_parse_channel_layout(0003, 2, 2c); > -1 = ff_parse_channel_layout(, -1, -1c); > -0 = ff_parse_channel_layout(, 60, 60c); > +-1 = ff_parse_channel_layout(, -1, 60c); > -1 = ff_parse_channel_layout(, -1, 65c); > +0 = ff_parse_channel_layout(, 2, 2C); > +0 = ff_parse_channel_layout(, 60, 60C); > +-1 = ff_parse_channel_layout(, -1, 65C); > 0 = ff_parse_channel_layout(003F, 6, 5.1); > 0 = ff_parse_channel_layout(0003, 2, stereo); > 0 = ff_parse_channel_layout(0001, 1, 1+1+1+1);
Re: [FFmpeg-devel] [PATCH] configure: Check build with some header not just preprocessing for testing --std=c11
On Fri, Dec 30, 2016 at 02:31:14PM -0300, James Almer wrote: > On 12/28/2016 7:41 PM, Michael Niedermayer wrote: > > Fixes build failure on FreeBSD with gcc 4.7 > > > > Signed-off-by: Michael Niedermayer > > --- > > configure | 9 + > > 1 file changed, 5 insertions(+), 4 deletions(-) > > > > diff --git a/configure b/configure > > index d723b8e2a6..706346abc9 100755 > > --- a/configure > > +++ b/configure > > @@ -1201,13 +1201,14 @@ check_cpp_condition(){ > > EOF > > } > > > > -test_cflags_cpp(){ > > -log test_cflags_cpp "$@" > > +test_cflags_cc(){ > > +log test_cflags_cc "$@" > > flags=$1 > > condition=$2 > > shift 2 > > set -- $($cflags_filter "$flags") > > -check_cpp "$@" < > +check_cc "$@" < > +#include > > Maybe make the header an argument instead of hardcoding it, same as > check_cpp_condition(). changed > > LGTM in any case. applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 10/17] lavfi: add AVFilter.activate.
On Thu, Dec 29, 2016 at 03:33:56PM +0100, Nicolas George wrote: > Signed-off-by: Nicolas George > --- > libavfilter/avfilter.c | 6 +- > libavfilter/avfilter.h | 14 ++ > 2 files changed, 19 insertions(+), 1 deletion(-) > > > Change: more documentation. LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Modern terrorism, a quick summary: Need oil, start war with country that has oil, kill hundread thousand in war. Let country fall into chaos, be surprised about raise of fundamantalists. Drop more bombs, kill more people, be surprised about them taking revenge and drop even more bombs and strip your own citizens of their rights and freedoms. to be continued signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 12/17] lavfi: move ff_update_link_current_pts() into the utility functions.
On Thu, Dec 29, 2016 at 03:33:58PM +0100, Nicolas George wrote: > Signed-off-by: Nicolas George > --- > libavfilter/avfilter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > > Unchanged. slightly off topic but ff_update_link_current_pts() has no documentation in the header also the commit message is a bit terse, why is it moved does this add or remove calls to it in some codepathes ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Never trust a computer, one day, it may think you are the virus. -- Compn signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 14/17] lavfi: disallow ff_request_frame for filters using activate.
On Thu, Dec 29, 2016 at 03:34:00PM +0100, Nicolas George wrote: > Having two different functions allows to have stricter tests > and detect errors earlier. > > Signed-off-by: Nicolas George > --- > libavfilter/avfilter.c | 1 + > libavfilter/internal.h | 3 +++ > 2 files changed, 4 insertions(+) > > > Unchanged. LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/hlsenc: default segment name and, use_localtime
2016-12-31 19:16 GMT+08:00 Bodecs Bela : > > > 2016.12.31. 11:48 keltezéssel, Steven Liu írta: > >> 2016-12-31 1:24 GMT+08:00 Bodecs Bela : >> >> 2016.12.30. 18:11 keltezéssel, Moritz Barsnick írta: >>> >>> On Fri, Dec 30, 2016 at 15:38:25 +0100, Bodecs Bela wrote: is not available on all system/environment. This patch checks %s > availabilty at runtine and alter the default format string if > necessary. > > You forgot to add the patch. please, forgive me. I attached it now. >>> >>> >>> Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel Bela >>> >>> ___ >>> ffmpeg-devel mailing list >>> ffmpeg-devel@ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >>> >>> Signed-off-by: Bela Bodecs >>> >> --- >> libavformat/hlsenc.c | 11 ++- >> 1 file changed, 10 insertions(+), 1 deletion(-) >> >> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c >> index c9d8e3c..76b85e8 100644 >> --- a/libavformat/hlsenc.c >> +++ b/libavformat/hlsenc.c >> @@ -829,13 +829,22 @@ fail: >> return err; >> } >> >> +static const char * get_default_pattern_localtime_fmt(void) >> +{ >> +char b[21]; >> +time_t t = time(NULL); >> +struct tm *p, tmbuf; >> +p = localtime_r(&t, &tmbuf); >> +return (strftime(b, sizeof(b), "%s", p) > 2) ? "-%s.ts" : >> "-%Y%m%d%H%I%S.ts"; >> Why check strftime result bigger than 2,not 1 not 3? >> > I have faced different strftime behaviours on two different environments > where unknown specifier was in format string. > On one of them strftime returned 0, this was the expected return value by > me. > But on the other one, strftime returned 2 and put unknown specifier (%s) > as is into the result buffer. > So >2 will handle each cases. In normal behaviour, nowadays, length of > seconds string will be always longer than 2. > Should I put a comment about it into the code? Maybe add a comment for the value 2 is better. > > > +} >> + >> static int hls_write_header(AVFormatContext *s) >> { >> HLSContext *hls = s->priv_data; >> int ret, i; >> char *p; >> const char *pattern = "%d.ts"; >> -const char *pattern_localtime_fmt = "-%s.ts"; >> +const char *pattern_localtime_fmt = >> get_default_pattern_localtime_fmt(); >> const char *vtt_pattern = "%d.vtt"; >> AVDictionary *options = NULL; >> int basename_size; >> > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 12/17] lavfi: move ff_update_link_current_pts() into the utility functions.
Le primidi 11 nivôse, an CCXXV, Michael Niedermayer a écrit : > slightly off topic but ff_update_link_current_pts() has no > documentation in the header I also noticed it. Also, it is now only used in avfilter.c, so it could be made static. I will have to address it when I get to maintaining a priority queue of filters that are ready and deprecating avfilter_graph_request_oldest(), since they are related (ff_update_link_current_pts() maintains a heap of sink links by timestamp). > also the commit message is a bit terse, why is it moved > does this add or remove calls to it in some codepathes ? I reworded it as: lavfi: move ff_update_link_current_pts() into the utility functions. It does not change anything for the existing filters and makes better code fatrorization when future code will use the utility functions. My reason to have it in a separate commit is to be able to run FATE before and after the change to check it did not break anything. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] patch for Sricam, Floureon, etc. IP cameras
On Fri, 30 Dec 2016 14:32:06 -0800 John Comeau wrote: > diff --git a/TODO.txt b/TODO.txt > new file mode 100644 > index 00..1b0c64c186 > --- /dev/null > +++ b/TODO.txt > @@ -0,0 +1 @@ > +2016-12-06: Fix assembly for NASM. See > http://stackoverflow.com/questions/36854583/compiling-ffmpeg-for-kali-linux-2 this change looks unrelated. -compn ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/3] avutil/channel_layout: add av_get_extended_channel_layout
On Mon, Dec 26, 2016 at 06:14:33PM +0100, Marton Balint wrote: > Return a channel layout and the number of channels based on the specified > name. > > This function is similar to av_get_channel_layout(), but can also parse > unknown > channel layout specifications. > > Unknown channel layout specifications are a decimal number and a capital 'C' > suffix, in order to not break compatibility with the lowercase 'c' suffix, > which is used for a guessed channel layout with the specified number of > channels. > > Signed-off-by: Marton Balint > --- > doc/APIchanges | 3 +++ > doc/utils.texi | 7 ++- > libavutil/channel_layout.c | 22 ++ > libavutil/channel_layout.h | 14 ++ > libavutil/version.h| 2 +- > 5 files changed, 46 insertions(+), 2 deletions(-) > > diff --git a/doc/APIchanges b/doc/APIchanges > index fbeae7a..4c8123e 100644 > --- a/doc/APIchanges > +++ b/doc/APIchanges > @@ -15,6 +15,9 @@ libavutil: 2015-08-28 > > API changes, most recent first: > > +2016-xx-xx - xxx - lavu xx.xx.100 - channel_layout.h > + Add av_get_extended_channel_layout() > + > 2016-12-10 - xxx - lavu xx.xx.100- imgutils.h >Add av_image_check_size2() > > diff --git a/doc/utils.texi b/doc/utils.texi > index df887c7..a66532a 100644 > --- a/doc/utils.texi > +++ b/doc/utils.texi > @@ -725,13 +725,18 @@ layout for that number of channels (see the function > default layout. > > @item > +a number of channels, in decimal, followed by 'C', yielding an unkown channel "unkown" common typo also what do people think about checking for common typos in fate-src ? i suggested this previously and response was not to positive IIRC but really it should be less work for all if fate straight tells about common typos instead of wasting using review for this [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No human being will ever know the Truth, for even if they happen to say it by chance, they would not even known they had done so. -- Xenophanes signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 12/17] lavfi: move ff_update_link_current_pts() into the utility functions.
On Sat, Dec 31, 2016 at 02:29:45PM +0100, Nicolas George wrote: > Le primidi 11 nivôse, an CCXXV, Michael Niedermayer a écrit : > > slightly off topic but ff_update_link_current_pts() has no > > documentation in the header > > I also noticed it. Also, it is now only used in avfilter.c, so it could > be made static. I will have to address it when I get to maintaining a > priority queue of filters that are ready and deprecating > avfilter_graph_request_oldest(), since they are related > (ff_update_link_current_pts() maintains a heap of sink links by > timestamp). > > > also the commit message is a bit terse, why is it moved > > does this add or remove calls to it in some codepathes ? > > I reworded it as: > > lavfi: move ff_update_link_current_pts() into the utility functions. > > It does not change anything for the existing filters and makes > better code fatrorization when future code will use the utility > functions. > > My reason to have it in a separate commit is to be able to run FATE > before and after the change to check it did not break anything. LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB There will always be a question for which you do not know the correct answer. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavutil/random_seed: Ensure that get_generic_seed() spends at least 1/32 sec gathering entropy
On Thu, Dec 29, 2016 at 12:34:57AM +0100, Michael Niedermayer wrote: > This may fix the failures on windows > > Signed-off-by: Michael Niedermayer > --- > libavutil/random_seed.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) as noone seems to say if it fixes the issue or not ill apply it to see if the fate failures disappear afterwards or not [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 0/2] document cutoff option properly, and add support to libmp3lame
On Fri, Dec 30, 2016 at 06:08:12PM +0100, Moritz Barsnick wrote: > Hi, this pair of commits adds cutoff support to libmp3lame, and documents > the option "global" to lavc such that it is clear that it is *not* generally > available. > > Noted and requested in this thread: > http://ffmpeg.org/pipermail/ffmpeg-user/2016-December/034703.html > > Testing: > Encoded an MP3 without the patch, with the patch, and with the patch and a > meaningful low cutoff value. Checked the spectrum using the showspectrum > filter, and noted a significant cutoff. No proper frequency analysis done, > just assuming libmp3lame does its thing correctly. > > Moritz Barsnick (2): > lavc/libmp3lame: add support for cutoff > doc: document cutoff option to ac3 and adjust the option's global > documentation patchset applied [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Rewriting code that is poorly written but fully understood is good. Rewriting code that one doesnt understand is a sign that one is less smart then the original author, trying to rewrite it will not make it better. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] patch for Sricam, Floureon, etc. IP cameras
right, you can ignore that, I meant to snip it from the patch. sorry about that. On Sat, Dec 31, 2016 at 6:05 AM, compn wrote: > On Fri, 30 Dec 2016 14:32:06 -0800 > John Comeau wrote: > >> diff --git a/TODO.txt b/TODO.txt >> new file mode 100644 >> index 00..1b0c64c186 >> --- /dev/null >> +++ b/TODO.txt >> @@ -0,0 +1 @@ >> +2016-12-06: Fix assembly for NASM. See >> http://stackoverflow.com/questions/36854583/compiling-ffmpeg-for-kali-linux-2 > > > this change looks unrelated. > > -compn > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- John Comeau KE5TFZ j...@unternet.net http://jc.unternet.net/ "A place for everything, and everything all over the place" ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] avutil/tests/audio_fifo.c: use av_malloc() family of functions
On Tue, Dec 27, 2016 at 06:43:18PM -0800, Thomas Turner wrote: > Signed-off-by: James Almer not sure were that comes from, not really important but applied without that thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/3] avutil/tests/audio_fifo.c: Memory leak and tab space fixes
On Tue, Dec 27, 2016 at 06:43:19PM -0800, Thomas Turner wrote: > Prevents memory leak when read_samples_from_audio_fifo() is > called more than once by deallocating before reallocating > more memory. > > Fixes space indentation for contents in ERROR(). > > Signed-off-by: Thomas Turner > --- > libavutil/tests/audio_fifo.c | 20 ++-- > 1 file changed, 14 insertions(+), 6 deletions(-) applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 2 "100% positive feedback" - "All either got their money back or didnt complain" "Best seller ever, very honest" - "Seller refunded buyer after failed scam" signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/hlsenc: default segment name and, use_localtime
2016.12.31. 14:19 keltezéssel, Steven Liu írta: 2016-12-31 19:16 GMT+08:00 Bodecs Bela : 2016.12.31. 11:48 keltezéssel, Steven Liu írta: 2016-12-31 1:24 GMT+08:00 Bodecs Bela : 2016.12.30. 18:11 keltezéssel, Moritz Barsnick írta: On Fri, Dec 30, 2016 at 15:38:25 +0100, Bodecs Bela wrote: is not available on all system/environment. This patch checks %s availabilty at runtine and alter the default format string if necessary. You forgot to add the patch. please, forgive me. I attached it now. Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel Bela ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel Signed-off-by: Bela Bodecs --- libavformat/hlsenc.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index c9d8e3c..76b85e8 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -829,13 +829,22 @@ fail: return err; } +static const char * get_default_pattern_localtime_fmt(void) +{ +char b[21]; +time_t t = time(NULL); +struct tm *p, tmbuf; +p = localtime_r(&t, &tmbuf); +return (strftime(b, sizeof(b), "%s", p) > 2) ? "-%s.ts" : "-%Y%m%d%H%I%S.ts"; Why check strftime result bigger than 2,not 1 not 3? I have faced different strftime behaviours on two different environments where unknown specifier was in format string. On one of them strftime returned 0, this was the expected return value by me. But on the other one, strftime returned 2 and put unknown specifier (%s) as is into the result buffer. So >2 will handle each cases. In normal behaviour, nowadays, length of seconds string will be always longer than 2. Should I put a comment about it into the code? Maybe add a comment for the value 2 is better. you are right. I have changed the testing line to be more self-explanatory. I have attached the new patch. +} + static int hls_write_header(AVFormatContext *s) { HLSContext *hls = s->priv_data; int ret, i; char *p; const char *pattern = "%d.ts"; -const char *pattern_localtime_fmt = "-%s.ts"; +const char *pattern_localtime_fmt = get_default_pattern_localtime_fmt(); const char *vtt_pattern = "%d.vtt"; AVDictionary *options = NULL; int basename_size; ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >From 5f1b673d9ee48139ebe5f3d26bae9c2195e92678 Mon Sep 17 00:00:00 2001 From: Bela Bodecs Date: Fri, 31 Dec 2016 17:54:39 +0100 Subject: [PATCH] libavformat/hlsenc: default segment name and use_localtime in hlcenc.c, in the hls_write_header() function the default format string for strftime() function contains %s specifier when use_localtime is true. This %s specifier will insert the seconds since EPOCH. But %s is not available on all system/environment. This patch check %s availabilty at runtine and alter the default format string if necessary. Signed-off-by: Bela Bodecs --- libavformat/hlsenc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index c9d8e3c..57fc9c1 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -829,13 +829,23 @@ fail: return err; } +static const char * get_default_pattern_localtime_fmt(void) +{ +char b[21]; +time_t t = time(NULL); +struct tm *p, tmbuf; +p = localtime_r(&t, &tmbuf); +// no %s support when strftime returned error or left format string unchanged +return (!strftime(b, sizeof(b), "%s", p) || !strcmp(b, "%s")) ? "-%Y%m%d%H%I%S.ts" : "-%s.ts"; +} + static int hls_write_header(AVFormatContext *s) { HLSContext *hls = s->priv_data; int ret, i; char *p; const char *pattern = "%d.ts"; -const char *pattern_localtime_fmt = "-%s.ts"; +const char *pattern_localtime_fmt = get_default_pattern_localtime_fmt(); const char *vtt_pattern = "%d.vtt"; AVDictionary *options = NULL; int basename_size; -- 2.5.3.windows.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avformat/hls: Add subtitle support
On Fri, Dec 30, 2016 at 08:10:05PM +, Franklin Phillips wrote: > Each subtile segment is a WebVTT file and needs to be demuxed > separately. These segments also contain a header to synchronize their > timing with the MPEG TS stream so those timestamps are requested from > the WebVTT demuxer through an AVOption. > > Signed-off-by: Franklin Phillips this breaks fate --- ./tests/ref/fate/segment-mp4-to-ts 2016-12-30 00:31:20.420965026 +0100 +++ tests/data/fate/segment-mp4-to-ts 2017-01-01 02:49:40.011075738 +0100 @@ -24,7 +24,7 @@ 0, 54000, 72000,0, 4755, 0x2f642b58, F=0x0, S=1, 1, 0x00e000e0 0, 57600, 64800,0, 1182, 0xbe1a4847, F=0x0, S=1, 1, 0x00e000e0 0, 61200, 61200,0, 809, 0x8d948a4e, F=0x0, S=1, 1, 0x00e000e0 -0, 64800, 68400,0, 656, 0x4fa03c2b, F=0x0, S=1, 1, 0x00e000e0 +0, 64800, 68400,0, 656, 0x4fa03c2b, F=0x0 0, 68400, 86400,0,26555, 0x5629b584, S=1,1, 0x00e000e0 0, 72000, 79200,0, 1141, 0x761b31e8, F=0x0, S=1, 1, 0x00e000e0 0, 75600, 75600,0, 717, 0x57746351, F=0x0, S=1, 1, 0x00e000e0 @@ -48,7 +48,7 @@ 0, 140400, 158400, 3600, 5328, 0xd2c55ac6, F=0x0, S=1, 1, 0x00e000e0 0, 144000, 151200, 3600, 1271, 0x46006870, F=0x0, S=1, 1, 0x00e000e0 0, 147600, 147600, 3600, 849, 0x94dc99c7, F=0x0, S=1, 1, 0x00e000e0 -0, 151200, 154800, 3600, 753, 0xf4236cab, F=0x0, S=1, 1, 0x00e000e0 +0, 151200, 154800, 3600, 753, 0xf4236cab, F=0x0 0, 154800, 172800, 3600,25825, 0xd5464dee, S=1,1, 0x00e000e0 0, 158400, 165600, 3600, 1206, 0x8ce84344, F=0x0, S=1, 1, 0x00e000e0 0, 162000, 162000, 3600, 867, 0x312fa07d, F=0x0, S=1, 1, 0x00e000e0 @@ -96,7 +96,7 @@ 0, 313200, 331200, 3600, 5352, 0x59997996, F=0x0, S=1, 1, 0x00e000e0 0, 316800, 324000, 3600, 1501, 0xb3b8f001, F=0x0, S=1, 1, 0x00e000e0 0, 320400, 320400, 3600, 941, 0x92b0cb18, F=0x0, S=1, 1, 0x00e000e0 -0, 324000, 327600, 3600, 823, 0x3d548355, F=0x0, S=1, 1, 0x00e000e0 +0, 324000, 327600, 3600, 823, 0x3d548355, F=0x0 0, 327600, 345600, 3600,24042, 0x441e94fb, S=1,1, 0x00e000e0 0, 331200, 338400, 3600, 1582, 0x4f5d1049, F=0x0, S=1, 1, 0x00e000e0 0, 334800, 334800, 3600, 945, 0x4f3cc9e8, F=0x0, S=1, 1, 0x00e000e0 @@ -120,7 +120,7 @@ 0, 399600, 417600, 3600, 1862, 0x22a2a06c, F=0x0, S=1, 1, 0x00e000e0 0, 403200, 410400, 3600, 359, 0x11bdae52, F=0x0, S=1, 1, 0x00e000e0 0, 406800, 406800, 3600, 235, 0xbec26964, F=0x0, S=1, 1, 0x00e000e0 -0, 410400, 414000, 3600, 221, 0x8380682c, F=0x0, S=1, 1, 0x00e000e0 +0, 410400, 414000, 3600, 221, 0x8380682c, F=0x0 0, 414000, 432000, 3600,22588, 0xf0ecf072, S=1,1, 0x00e000e0 0, 417600, 424800, 3600, 383, 0x4f3bb571, F=0x0, S=1, 1, 0x00e000e0 0, 421200, 421200, 3600, 257, 0x22e87802, F=0x0, S=1, 1, 0x00e000e0 Test segment-mp4-to-ts failed. Look at tests/data/fate/segment-mp4-to-ts.err for details. make: *** [fate-segment-mp4-to-ts] Error 1 TESTsegment-adts-to-mkv --- ./tests/ref/fate/segment-adts-to-mkv-header-all 2016-12-30 00:31:20.420965026 +0100 +++ tests/data/fate/segment-adts-to-mkv 2017-01-01 02:49:40.047075739 +0100 @@ -21,21 +21,3 @@ 0,832,832, 64, 147, 0x226043d7 0,896,896, 64, 119, 0x8ad931ed 0,960,960, 64, 153, 0xbb6e432f -0, 1024, 1024, 64, 185, 0xa01f4ff3 -0, 1088, 1088, 64, 126, 0x85503ce6 -0, 1152, 1152, 64, 246, 0x652c7b59 -0, 1216, 1216, 64, 162, 0xc9f04da0 -0, 1280, 1280, 64, 135, 0x71fa3be0 -0, 1344, 1344, 64, 246, 0x7a6f7788 -0, 1408, 1408, 64, 262, 0xd3097781 -0, 1472, 1472, 64, 60, 0x09a118f5 -0, 1536, 1536, 64, 255, 0xbab5793c -0, 1600, 1600, 64, 153, 0x6b6a44fb -0, 1664, 1664, 64, 160, 0x550e4530 -0, 1728, 1728, 64, 215, 0x7fe66144 -0, 1792, 1792, 64, 144, 0xcd723f7d -0, 1856, 1856, 64, 187, 0x2a0b5c1b -0, 1920, 1920, 64, 177, 0xb8c355d5 -0, 1984, 1984, 64, 156, 0x867d4f3a -0, 2048, 2048, 64, 201, 0x62745ff9
Re: [FFmpeg-devel] [PATCH] libavformat/hlsenc: default segment name and, use_localtime
2017-01-01 0:56 GMT+08:00 Bodecs Bela : > > > 2016.12.31. 14:19 keltezéssel, Steven Liu írta: > >> 2016-12-31 19:16 GMT+08:00 Bodecs Bela : >> >> >>> 2016.12.31. 11:48 keltezéssel, Steven Liu írta: >>> >>> 2016-12-31 1:24 GMT+08:00 Bodecs Bela : 2016.12.30. 18:11 keltezéssel, Moritz Barsnick írta: > On Fri, Dec 30, 2016 at 15:38:25 +0100, Bodecs Bela wrote: > >> is not available on all system/environment. This patch checks %s >> >>> availabilty at runtine and alter the default format string if >>> necessary. >>> >>> You forgot to add the patch. >>> >> please, forgive me. I attached it now. >> > > Moritz > >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> Bela >> > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > Signed-off-by: Bela Bodecs > > --- libavformat/hlsenc.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index c9d8e3c..76b85e8 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -829,13 +829,22 @@ fail: return err; } +static const char * get_default_pattern_localtime_fmt(void) +{ +char b[21]; +time_t t = time(NULL); +struct tm *p, tmbuf; +p = localtime_r(&t, &tmbuf); +return (strftime(b, sizeof(b), "%s", p) > 2) ? "-%s.ts" : "-%Y%m%d%H%I%S.ts"; Why check strftime result bigger than 2,not 1 not 3? I have faced different strftime behaviours on two different environments >>> where unknown specifier was in format string. >>> On one of them strftime returned 0, this was the expected return value by >>> me. >>> But on the other one, strftime returned 2 and put unknown specifier (%s) >>> as is into the result buffer. >>> So >2 will handle each cases. In normal behaviour, nowadays, length of >>> seconds string will be always longer than 2. >>> Should I put a comment about it into the code? >>> >> Maybe add a comment for the value 2 is better. >> > you are right. I have changed the testing line to be more self-explanatory. > I have attached the new patch. > >> >>> +} >>> + static int hls_write_header(AVFormatContext *s) { HLSContext *hls = s->priv_data; int ret, i; char *p; const char *pattern = "%d.ts"; -const char *pattern_localtime_fmt = "-%s.ts"; +const char *pattern_localtime_fmt = get_default_pattern_localtime_fmt(); const char *vtt_pattern = "%d.vtt"; AVDictionary *options = NULL; int basename_size; ___ >>> ffmpeg-devel mailing list >>> ffmpeg-devel@ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >>> >>> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > --- libavformat/hlsenc.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index c9d8e3c..57fc9c1 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -829,13 +829,23 @@ fail: return err; } +static const char * get_default_pattern_localtime_fmt(void) +{ +char b[21]; +time_t t = time(NULL); +struct tm *p, tmbuf; +p = localtime_r(&t, &tmbuf); +// no %s support when strftime returned error or left format string unchanged +return (!strftime(b, sizeof(b), "%s", p) || !strcmp(b, "%s")) ? "-%Y%m%d%H%I%S.ts" : "-%s.ts"; +} + static int hls_write_header(AVFormatContext *s) { HLSContext *hls = s->priv_data; int ret, i; char *p; const char *pattern = "%d.ts"; -const char *pattern_localtime_fmt = "-%s.ts"; +const char *pattern_localtime_fmt = get_default_pattern_localtime_fmt(); const char *vtt_pattern = "%d.vtt"; AVDictionary *options = NULL; int basename_size; -- 2.10.1.382.ga23ca1b.dirty applied! Thanks ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avutil/tests: improved code coverage for atomic
Signed-off-by: Thomas Turner --- libavutil/tests/atomic.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavutil/tests/atomic.c b/libavutil/tests/atomic.c index c92f220..e41bf5a 100644 --- a/libavutil/tests/atomic.c +++ b/libavutil/tests/atomic.c @@ -21,7 +21,9 @@ int main(void) { -volatile int val = 1; +volatile int val = 1; +void *tmp1= (int *)&val; +void * volatile *tmp2 = &tmp1; int res; res = avpriv_atomic_int_add_and_fetch(&val, 1); @@ -29,6 +31,8 @@ int main(void) avpriv_atomic_int_set(&val, 3); res = avpriv_atomic_int_get(&val); av_assert0(res == 3); +avpriv_atomic_ptr_cas(tmp2, tmp1, &res); +av_assert0(*tmp2 == &res); return 0; } -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] PATCH for building with nasm
fixes `operation size not specified` errors as described here: http://stackoverflow.com/questions/36854583/compiling-ffmpeg-for-kali-linux-2 I rebuilt again with yasm and made sure it didn't break that. -- John Comeau KE5TFZ j...@unternet.net http://jc.unternet.net/ "A place for everything, and everything all over the place" diff --git a/libavcodec/x86/imdct36.asm b/libavcodec/x86/imdct36.asm index 409b2c5796..960eabdda5 100644 --- a/libavcodec/x86/imdct36.asm +++ b/libavcodec/x86/imdct36.asm @@ -145,9 +145,9 @@ SECTION .text %macro STORE 4 %if cpuflag(sse4) movss [%3 ], %1 -extractps [%3 + %4], %1, 1 -extractps [%3 + 2*%4], %1, 2 -extractps [%3 + 3*%4], %1, 3 +extractps dword [%3 + %4], %1, 1 +extractps dword [%3 + 2*%4], %1, 2 +extractps dword [%3 + 3*%4], %1, 3 %else movhlps %2, %1 movss [%3 ], %1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel