Re: [FFmpeg-devel] [PATCH 4/4] lavf/mov: Add support for edit list parsing.
On Thu, Sep 15, 2016 at 01:08:40PM -0700, Sasi Inguva wrote: > On Wed, Sep 14, 2016 at 1:57 PM, Michael Niedermayer> wrote: > > > On Wed, Sep 14, 2016 at 12:20:52AM -0700, Sasi Inguva wrote: > > > On Tue, Sep 13, 2016 at 4:39 PM, Sasi Inguva wrote: > > > > > > > Sorry for the very late reply. I was busy with other things. > > > > > > > > On Sat, Sep 3, 2016 at 4:48 PM, Michael Niedermayer < > > > > mich...@niedermayer.cc> wrote: > > > > > > > >> On Sat, Sep 03, 2016 at 12:06:39PM -0700, Sasi Inguva wrote: > > > >> > Hi Michael, > > > >> > > > > >> > In fact from audacity I see that out-ingu.wav out-mp3.wav are almost > > > >> > equivalent, > > > >> > > > >> They do not match. (and that is alot more vissible if you scale the > > > >> time axis up a bit) > > > >> > > > >> You also dont use the existing API for handling initial padding/skip > > > >> And you didnt reply to this concern > > > >> its probably not that hard to fix that ... > > > >> instead of droping just at packet granularity you would set the stuff > > > >> for droping at sample granularity (too) > > > >> > > > > > > > > Yes. Looking at it more closely now, they don't matrch exactly and > > this is > > > > because as you said, number of samples to drop is not exactly multiple > > of > > > > number of packets. In that case we need to partially discard some > > samples > > > > of a packet. This can be done by using AV_PKT_SIDE_DATA_SKIP_SAMPLES. > > I > > > > can change the code to use this packet side data instead of discard > > packet > > > > flag, if it is ok. > > > > ok > > > > I have put my foot in my mouth here. There is no way I can add > AV_PKT_SIDE_DATA_SKIP_SAMPLES to each packet, unless I add a new field > "skip_samples" in AVIndexEntry and populate it in mov_fix_index function. > Adding another entry to AVIndexEntry seems contentious because we want to > keep the AVIndexEntry as compact as possible, I presume. So what I wil do > for now is just set st->skip_samples field in mov_fix_index function for > the first audio edit list. So at least single edit list audio cases ,will > be correct. In multiple edit list case, the the first edit will be > correctly output but the second audio edit might have some samples extra. > Also note that, there is no mechanism for doing "discard_padding" too, in > MOV demuxer. If we have skip_samples and discard_padding fields in > AVIndexEntry, then we can implement both of them correctly. > > With the attached patch the test that you have showed, comparing > out-ingu.wav and out-mp3.wav - are exactly equivalent. yes, the patch also improves some audio sync cases that where bad but it breaks audio sync with faac ./ffmpeg-ref -f u8 -ar 16000 -ac 1 -i sync_audio.raw -acodec libfaac test-ref.mov ./ffmpeg_g -f u8 -ar 16000 -ac 1 -i sync_audio.raw -acodec libfaac test.mov ./ffmpeg-ref -i test-ref.mov test-ref.mov.wav ./ffmpeg_g -i test.mov test.mov.wav [...] > @@ -2756,6 +2757,343 @@ static int mov_read_sbgp(MOVContext *c, AVIOContext > *pb, MOVAtom atom) > return pb->eof_reached ? AVERROR_EOF : 0; > } > > +/** > + * Get ith edit list entry (media time, duration). > + */ > +static int get_edit_list_entry(const MOVStreamContext *msc, > + unsigned int edit_list_index, > + int64_t *edit_list_media_time, > + int64_t *edit_list_duration, > + int64_t global_timescale) > +{ > +if (edit_list_index == msc->elst_count) { > +return 0; > +} > +*edit_list_media_time = msc->elst_data[edit_list_index].time; > +*edit_list_duration = msc->elst_data[edit_list_index].duration; > +/* duration is in global timescale units;convert to msc timescale */ > +*edit_list_duration = av_rescale(*edit_list_duration, msc->time_scale, > + global_timescale); global_timescale can be 0 here leading to division by 0 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User questions about the command line tools should be sent to the ffmpeg-user ML. And questions about how to use libav* should be sent to the libav-user ML. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
2016-09-16 1:08 GMT+08:00 Clément Bœsch: > On Fri, Sep 16, 2016 at 12:41:41AM +0800, Steven Liu wrote: > [...] > > update: > > > > Please attach a git-format-patch or use git-send-email. > Also, your mailer is mangling the inlined patch. > > > > > add a FF_OPT_FLAG_DEPRECATED define for compile. > > add a new variable for user_agent to give a deprecated warning message > > --- > > doc/protocols.texi| 4 +++- > > libavformat/http.c| 14 -- > > libavformat/version.h | 3 +++ > > 3 files changed, 18 insertions(+), 3 deletions(-) > > > > diff --git a/doc/protocols.texi b/doc/protocols.texi > > index 470c99c..3acdc78 100644 > > --- a/doc/protocols.texi > > +++ b/doc/protocols.texi > > @@ -292,10 +292,12 @@ Use persistent connections if set to 1, default is > 0. > > Set custom HTTP post data. > > > > @item user-agent > > -@item user_agent > > Override the User-Agent header. If not specified the protocol will use a > > string describing the libavformat build. ("Lavf/") > > > > +@item user_agent > > +This is a deprecated option, you can use user-agent instead it. > > + > > Again, you don't want to deprecate "user_agent", that's the one you want > to keep (because it's consistent with the other options). > > > @item timeout > > Set timeout in microseconds of socket I/O operations used by the > > underlying low level > > operation. By default it is set to -1, which means that the timeout is > > diff --git a/libavformat/http.c b/libavformat/http.c > > index adb3d92..0b8a86c 100644 > > --- a/libavformat/http.c > > +++ b/libavformat/http.c > > @@ -71,6 +71,9 @@ typedef struct HTTPContext { > > char *headers; > > char *mime_type; > > char *user_agent; > > > +#ifdef FF_OPT_FLAG_DEPRECATED > > The FF_OPT_FLAG_DEPRECATED name is related to a generic approach for > deprecating AVOption (by adding an AVOption flag, and patching > lavu/opt.c). In your case, you want to use FF_API_HTTP_USER_AGENT. > > > +attribute_deprecated char *user_agent_deprecated; > > again, you don't want to use attribute_deprecated. > > > +#endif > > char *content_type; > > /* Set if the server correctly handles Connection: close and will > close > > * the connection after feeding us the content. */ > > @@ -130,7 +133,9 @@ static const AVOption options[] = { > > { "http_proxy", "set HTTP proxy to tunnel through", > > OFFSET(http_proxy), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, > > { "headers", "set custom HTTP headers, can override built in default > > headers", OFFSET(headers), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D > | E > > }, > > { "content_type", "set a specific content type for the POST > messages", > > OFFSET(content_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, > > -{ "user_agent", "override User-Agent header", OFFSET(user_agent), > > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, > > +#ifdef FF_OPT_FLAG_DEPRECATED > > +{ "user_agent", "override User-Agent header", > > OFFSET(user_agent_deprecated), AV_OPT_TYPE_STRING, { .str = > > DEFAULT_USER_AGENT }, 0, 0, D }, > > +#endif > > { "user-agent", "override User-Agent header", OFFSET(user_agent), > > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, > > { "multiple_requests", "use persistent connections", > > OFFSET(multiple_requests), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, D | E }, > > { "post_data", "set custom HTTP post data", OFFSET(post_data), > > AV_OPT_TYPE_BINARY, .flags = D | E }, > > @@ -1036,7 +1041,12 @@ static int http_connect(URLContext *h, const char > > *path, const char *local_path, > > s->http_code != 401) > > send_expect_100 = 1; > > } > > > - > > You should keep that empty line > > [...] > > -- > Clément B. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > 0001-avformat-http-will-remove-option-user_agent.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avutil/softfloat_ieee754: make all functions inline
Removes "defined but not used" warnings Signed-off-by: James Almer--- libavutil/softfloat_ieee754.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavutil/softfloat_ieee754.h b/libavutil/softfloat_ieee754.h index f82397b..b8957fb 100644 --- a/libavutil/softfloat_ieee754.h +++ b/libavutil/softfloat_ieee754.h @@ -38,7 +38,7 @@ static const SoftFloat_IEEE754 FLOAT_1 = {0, 0,0}; /** Normalize the softfloat as defined by IEEE 754 single-recision floating * point specification */ -static SoftFloat_IEEE754 av_normalize_sf_ieee754(SoftFloat_IEEE754 sf) { +static inline SoftFloat_IEEE754 av_normalize_sf_ieee754(SoftFloat_IEEE754 sf) { while( sf.mant >= 0x100UL ) { sf.exp++; sf.mant >>= 1; @@ -50,7 +50,7 @@ static SoftFloat_IEEE754 av_normalize_sf_ieee754(SoftFloat_IEEE754 sf) { /** Convert integer to softfloat. * @return softfloat with value n * 2^e */ -static SoftFloat_IEEE754 av_int2sf_ieee754(int64_t n, int e) { +static inline SoftFloat_IEEE754 av_int2sf_ieee754(int64_t n, int e) { int sign = 0; if (n < 0) { @@ -63,13 +63,13 @@ static SoftFloat_IEEE754 av_int2sf_ieee754(int64_t n, int e) { /** Make a softfloat out of the bitstream. Assumes the bits are in the form as defined * by the IEEE 754 spec. */ -static SoftFloat_IEEE754 av_bits2sf_ieee754(uint32_t n) { +static inline SoftFloat_IEEE754 av_bits2sf_ieee754(uint32_t n) { return ((SoftFloat_IEEE754) { (n & 0x8000UL), (n & 0x7FUL), (n & 0x7F80UL) }); } /** Convert the softfloat to integer */ -static int av_sf2int_ieee754(SoftFloat_IEEE754 a) { +static inline int av_sf2int_ieee754(SoftFloat_IEEE754 a) { if(a.exp >= 0) return a.mant << a.exp ; else return a.mant >>(-a.exp); } @@ -77,7 +77,7 @@ static int av_sf2int_ieee754(SoftFloat_IEEE754 a) { /** Divide a by b. b should not be zero. * @return normalized result */ -static SoftFloat_IEEE754 av_div_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) { +static inline SoftFloat_IEEE754 av_div_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) { int32_t mant, exp, sign; a= av_normalize_sf_ieee754(a); b= av_normalize_sf_ieee754(b); @@ -90,7 +90,7 @@ static SoftFloat_IEEE754 av_div_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE75 /** Multiply a with b * #return normalized result */ -static SoftFloat_IEEE754 av_mul_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) { +static inline SoftFloat_IEEE754 av_mul_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) { int32_t sign, mant, exp; a= av_normalize_sf_ieee754(a); b= av_normalize_sf_ieee754(b); @@ -103,7 +103,7 @@ static SoftFloat_IEEE754 av_mul_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE75 /** Compare a with b strictly * @returns 1 if the a and b are equal, 0 otherwise. */ -static int av_cmp_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) { +static inline int av_cmp_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) { a = av_normalize_sf_ieee754(a); b = av_normalize_sf_ieee754(b); if (a.sign != b.sign) return 0; -- 2.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] doc/developer: Add patchwork mentioning to "patch submission checklist"
On Wed, 7 Sep 2016 14:27:07 +0200, Michael Niedermayer wrote: > yes one can ignore it but its alot more usefull if people keep in > mind that theres patchwork. The patch submission checklist is lengthy. I'm fine with an addition somewhere in doc/developer pointing out that it exists and how to use it if the patch submitter wants to, but I don't think it needs to be in the checklist. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] doc/muxers: add flv muxer document into doc/muxers
2016-09-16 3:11 GMT+08:00 Lou Logan: > On Thu, 15 Sep 2016 12:02:15 +0800, Steven Liu wrote: > > > From 0a62f9cb55df317c7c3df47d31e345cb9ad593d0 Mon Sep 17 00:00:00 2001 > > From: Steven Liu > > Date: Thu, 15 Sep 2016 11:59:35 +0800 > > Subject: [PATCH] doc/muxers: add flv muxer document into doc/muxers > > > > add flvflags aac_seq_header_detect and flvflags no_sequence_end document > > into doc/muxers > > > > Signed-off-by: Steven Liu > > --- > > doc/muxers.texi | 18 ++ > > 1 file changed, 18 insertions(+) > > > > diff --git a/doc/muxers.texi b/doc/muxers.texi > > index ccf8ea1..8d94136 100644 > > --- a/doc/muxers.texi > > +++ b/doc/muxers.texi > > @@ -1047,6 +1047,24 @@ ffmpeg -i file.mpg -c copy \ > > -y out.ts > > @end example > > > > +@section flv > > Your documentation is in the wrong location: it should be in > alphabetical order, so place it between the crc and framecrc sections. > > > +Adobe Flash Video Format muxer. > > +This muxer accepts the following options: > > Please add a blank line between the two sentences above. > > > +@table @option > > +@item flvflags @var{flags} > > +This flag currently supports the following flags: > > I prefer: > "Possible values:" > > Optionally, you can add a short description of flvflags if it makes > sense to do so. See the other flag type options for examples. > > > +@table @samp > > +@item aac_seq_header_detect > > +If this flag is set, the muxer will put AAC sequence header based on > audio stream data. > > Can be shortened to: > "Place AAC sequence header based on audio stream data." > > > +@item no_sequence_end > > +If this flag is set, the muxer will have no sequence end tag at the end > of flv. > > Can be shortened to: > "Disable sequence end tag." > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > 0001-doc-muxers-add-flv-muxer-document-into-doc-muxers.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/webm_chunk: Option to specify HTTP header
On Thu, Sep 15, 2016 at 02:29:24PM -0700, Vignesh Venkatasubramanian wrote: > Add an option to specify HTTP header in the WebM Chunk Muxer (this > works the same way as the 'method' parameter in the HLS muxer). > > Signed-off-by: Vignesh Venkatasubramanian> --- > libavformat/webm_chunk.c | 14 -- > 1 file changed, 12 insertions(+), 2 deletions(-) applied do you think this could be extended to support all http options ? possibly through AVClass.child_next ? (thugh this would be the first muxer to do this i think ...) thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Republics decline into democracies and democracies degenerate into despotisms. -- Aristotle signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/movenc: Make the packet check more tolerant
Depends-on "avformat/movenc: Check packet in mov_write_single_packet() too" Signed-off-by: Michael Niedermayer--- libavformat/movenc.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index b704f49..aa4a076 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -4666,25 +4666,26 @@ static int check_pkt(AVFormatContext *s, AVPacket *pkt) { MOVMuxContext *mov = s->priv_data; MOVTrack *trk = >tracks[pkt->stream_index]; +int64_t ref; +uint64_t duration; if (trk->entry) { -int64_t duration = pkt->dts - trk->cluster[trk->entry - 1].dts; -if (duration < 0 || duration > INT_MAX) { -av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" / timestamp: %"PRId64" is out of range for mov/mp4 format\n", -duration, pkt->dts -); - -pkt->dts = trk->cluster[trk->entry - 1].dts + 1; -pkt->pts = AV_NOPTS_VALUE; -} -} else if (pkt->dts <= INT_MIN || pkt->dts >= INT_MAX) { -av_log(s, AV_LOG_ERROR, "Application provided initial timestamp: %"PRId64" is out of range for mov/mp4 format\n", -pkt->dts -); +ref = trk->cluster[trk->entry - 1].dts; +} else if (trk->start_dts != AV_NOPTS_VALUE) { +ref = trk->start_dts + trk->track_duration; +} else +ref = pkt->dts; // Skip tests for the first packet -pkt->dts = 0; -pkt->pts = AV_NOPTS_VALUE; +duration = pkt->dts - ref; +if (pkt->dts < ref || duration >= INT_MAX) { +av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" / timestamp: %"PRId64" is out of range for mov/mp4 format\n", +duration, pkt->dts +); + +pkt->dts = ref + 1; +pkt->pts = AV_NOPTS_VALUE; } + if (pkt->duration < 0 || pkt->duration > INT_MAX) { av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" is invalid\n", pkt->duration); return AVERROR(EINVAL); -- 2.9.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] avformat/movenc: Check packet in mov_write_single_packet() too
Fixes assertion failure Found-by: durandal117 Signed-off-by: Michael Niedermayer--- libavformat/movenc.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 2d8fc48..b704f49 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -4971,6 +4971,10 @@ static int mov_write_single_packet(AVFormatContext *s, AVPacket *pkt) int64_t frag_duration = 0; int size = pkt->size; +int ret = check_pkt(s, pkt); +if (ret < 0) +return ret; + if (mov->flags & FF_MOV_FLAG_FRAG_DISCONT) { int i; for (i = 0; i < s->nb_streams; i++) -- 2.9.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] avformat/movenc: Factor check_pkt() out
Signed-off-by: Michael Niedermayer--- libavformat/movenc.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 319ff57..2d8fc48 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -4662,15 +4662,10 @@ static int mov_auto_flush_fragment(AVFormatContext *s, int force) return ret; } -int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) +static int check_pkt(AVFormatContext *s, AVPacket *pkt) { MOVMuxContext *mov = s->priv_data; -AVIOContext *pb = s->pb; MOVTrack *trk = >tracks[pkt->stream_index]; -AVCodecParameters *par = trk->par; -unsigned int samples_in_chunk = 0; -int size = pkt->size, ret = 0; -uint8_t *reformatted_data = NULL; if (trk->entry) { int64_t duration = pkt->dts - trk->cluster[trk->entry - 1].dts; @@ -4694,6 +4689,23 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) av_log(s, AV_LOG_ERROR, "Application provided duration: %"PRId64" is invalid\n", pkt->duration); return AVERROR(EINVAL); } +return 0; +} + +int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) +{ +MOVMuxContext *mov = s->priv_data; +AVIOContext *pb = s->pb; +MOVTrack *trk = >tracks[pkt->stream_index]; +AVCodecParameters *par = trk->par; +unsigned int samples_in_chunk = 0; +int size = pkt->size, ret = 0; +uint8_t *reformatted_data = NULL; + +ret = check_pkt(s, pkt); +if (ret < 0) +return ret; + if (mov->flags & FF_MOV_FLAG_FRAGMENT) { int ret; if (mov->moov_written || mov->flags & FF_MOV_FLAG_EMPTY_MOOV) { -- 2.9.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Dropping SDL1 support [VOTE]
On 15.09.2016 23:36, Josh de Kock wrote: On 15/09/2016 22:28, Lukasz Marek wrote: On 15.09.2016 23:19, Moritz Barsnick wrote: On Thu, Sep 15, 2016 at 14:36:32 -0300, James Almer wrote: * SDL1 is old and effectively unmaintained. I understand this verbatim, but what is it supposed to mean? Has SDL1 gotten rotten? Or more precisely: - Has technology evolved, and the library not kept up? - Is a long list of bugs (somehow effecting ffmpeg) piling up and never being fixed? - Something else? It doesn't compile on Mac OS I've been testing it just fine on Mac OS. I don't remember now everything, I worked with it like 2 years ago, but I got the same issue as here https://forums.libsdl.org/viewtopic.php?p=45264=ae0efc2e82d373067c5112bfba70cd11 Other example is that SDL is trying to use X11 on Mac which is dropped (since 10.8?). You can ignore my answer as it doesn't stand for anything. It won't stop introducing SDL 2.0 nor force 1.2 drop, but asked question if SDL 1.2 is getting rotten then asnwer is yes IMHO. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Dropping SDL1 support [VOTE]
On Thu, Sep 15, 2016 at 11:19 PM, Moritz Barsnickwrote: > On Thu, Sep 15, 2016 at 14:36:32 -0300, James Almer wrote: >> * SDL1 is old and effectively unmaintained. > > I understand this verbatim, but what is it supposed to mean? Has SDL1 > gotten rotten? Or more precisely: > > - Has technology evolved, and the library not kept up? > - Is a long list of bugs (somehow effecting ffmpeg) piling up and never > being fixed? > - Something else? > > If so, please argument as such, that makes it easier to get the point. > Being old an unmaintained, it *might* just as well work fine. > A summary of advantages was posted quite a while ago, and re-linked in the thread that started this topic a few days ago: https://ffmpeg.org/pipermail/ffmpeg-devel/2016-January/186299.html Primarly, it adds more features that allow using more flexible output paths, and improves performance. There really is no question that we want SDL2 going forward, the only question this vote is supposed to answer is what to do with SDL1. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Dropping SDL1 support [VOTE]
On Thu, Sep 15, 2016 at 7:36 PM, James Almerwrote: > There have been some complains from developers about keeping both > SDL1 and SDL2 support at the same time even after all SDL1 code > has been already ported, and especially since it makes maintaining > ffplay more complex, so seeing the waters are divided I think the > best solution will be to vote. > > Arguments in favor of keeping SDL1: > * Debian Old-Stable and Ubuntu 12.04 don't ship an usable SDL2 > by default, meaning a few extra steps for anyone wanting to > compile ffmpeg git would be needed to keep ffplay and the sdl > outdev working on them. > * We have a dev willing to maintain the SDL1 version of ffplay > until the above two distros are EOLed. > > Arguments in favor of dropping SDL1: > * SDL1 is old and effectively unmaintained. > * The above distros will never upgrade their ffmpeg packages. > * Anyone compiling ffmpeg git from source on any of the above > distros most likely already has to deal with other missing > deps, like any recent x264, be it from unnofficial PPAs or > manually compiling from source. SDL2 would not be any > different in that regard. > * Even though we have a dev willing to maintain the deprecated > SDL1 code, he'd rather not have to deal with it. > > Other arguments in favor or against are welcome. > > The vote will end 1 week from now, simple majority wins, and > it's open only to those in the voting committee[1]. > Marton Balint, while not in the committee, should IMO also > have the chance to vote or at least comment since he's the > main ffplay maintainer. > > Regards. > I vote for dropping SDL1 if adequate replacements based on SDL2 are made available before. I don't think its too much to ask developers of ffmpeg to either use at least half-recent distributions, or be aware that its their responsibility to gather external dependencies. We typically ask much more of the users (ie. run ffmpeg git before reporting issues), independent of availability in their distributions. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavc/mpeg12dec.c: Read cc words field-wise, limit to cc_count and support extra field.
2016-09-15 21:52 GMT+02:00 Jonathan Campbell: > Do you need me to upload a small 20-second clip of the VOB where > the garbled captions are visible? I believe it would be useful. Thank you, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/webm_chunk: Option to specify HTTP header
On Wed, Sep 14, 2016 at 8:46 AM, Carl Eugen Hoyoswrote: > > 2016-09-13 22:12 GMT+02:00 Vignesh Venkatasubramanian > : > > Add an option to specify HTTP header in the WebM Chunk Muxer > > > (this works the same way as the 'method' parameter in the HLS muxer). > > If it is the same option, why does it have another name? > (If the new name is better, maybe update the hls muxer.) > I just realized that this option is FFmpeg-wide and not specific to the HLS muxer. So i've renamed it to 'method'. > Carl Eugen > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- Vignesh ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Dropping SDL1 support [VOTE]
On 15/09/2016 22:28, Lukasz Marek wrote: On 15.09.2016 23:19, Moritz Barsnick wrote: On Thu, Sep 15, 2016 at 14:36:32 -0300, James Almer wrote: * SDL1 is old and effectively unmaintained. I understand this verbatim, but what is it supposed to mean? Has SDL1 gotten rotten? Or more precisely: - Has technology evolved, and the library not kept up? - Is a long list of bugs (somehow effecting ffmpeg) piling up and never being fixed? - Something else? It doesn't compile on Mac OS I've been testing it just fine on Mac OS. -- Josh ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] libavformat/webm_chunk: Option to specify HTTP header
Add an option to specify HTTP header in the WebM Chunk Muxer (this works the same way as the 'method' parameter in the HLS muxer). Signed-off-by: Vignesh Venkatasubramanian--- libavformat/webm_chunk.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c index bfcde78..f8dbaa3 100644 --- a/libavformat/webm_chunk.c +++ b/libavformat/webm_chunk.c @@ -50,6 +50,7 @@ typedef struct WebMChunkContext { char *header_filename; int chunk_duration; int chunk_index; +char *http_method; uint64_t duration_written; int prev_pts; AVOutputFormat *oformat; @@ -112,6 +113,7 @@ static int webm_chunk_write_header(AVFormatContext *s) AVFormatContext *oc = NULL; int ret; int i; +AVDictionary *options = NULL; // DASH Streams can only have either one track per file. if (s->nb_streams != 1) { return AVERROR_INVALIDDATA; } @@ -128,7 +130,10 @@ static int webm_chunk_write_header(AVFormatContext *s) ret = get_chunk_filename(s, 1, oc->filename); if (ret < 0) return ret; -ret = s->io_open(s, >pb, oc->filename, AVIO_FLAG_WRITE, NULL); +if (wc->http_method) +av_dict_set(, "method", wc->http_method, 0); +ret = s->io_open(s, >pb, oc->filename, AVIO_FLAG_WRITE, ); +av_dict_free(); if (ret < 0) return ret; @@ -166,6 +171,7 @@ static int chunk_end(AVFormatContext *s) uint8_t *buffer; AVIOContext *pb; char filename[MAX_FILENAME_SIZE]; +AVDictionary *options = NULL; if (wc->chunk_start_index == wc->chunk_index) return 0; @@ -175,13 +181,16 @@ static int chunk_end(AVFormatContext *s) ret = get_chunk_filename(s, 0, filename); if (ret < 0) goto fail; -ret = s->io_open(s, , filename, AVIO_FLAG_WRITE, NULL); +if (wc->http_method) +av_dict_set(, "method", wc->http_method, 0); +ret = s->io_open(s, , filename, AVIO_FLAG_WRITE, ); if (ret < 0) goto fail; avio_write(pb, buffer, buffer_size); ff_format_io_close(s, ); oc->pb = NULL; fail: +av_dict_free(); av_free(buffer); return (ret < 0) ? ret : 0; } @@ -243,6 +252,7 @@ static const AVOption options[] = { { "chunk_start_index", "start index of the chunk", OFFSET(chunk_start_index), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, { "header", "filename of the header where the initialization data will be written", OFFSET(header_filename), AV_OPT_TYPE_STRING, { 0 }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, { "audio_chunk_duration", "duration of each chunk in milliseconds", OFFSET(chunk_duration), AV_OPT_TYPE_INT, {.i64 = 5000}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, +{ "method", "set the HTTP method", OFFSET(http_method), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, { NULL }, }; -- 2.8.0.rc3.226.g39d4020 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Dropping SDL1 support [VOTE]
On 15.09.2016 23:19, Moritz Barsnick wrote: On Thu, Sep 15, 2016 at 14:36:32 -0300, James Almer wrote: * SDL1 is old and effectively unmaintained. I understand this verbatim, but what is it supposed to mean? Has SDL1 gotten rotten? Or more precisely: - Has technology evolved, and the library not kept up? - Is a long list of bugs (somehow effecting ffmpeg) piling up and never being fixed? - Something else? It doesn't compile on Mac OS ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v3 3/3] lavd: deprecate opengl outdev
On 15/09/2016 21:56, Lukasz Marek wrote: On 14.09.2016 19:53, Nicolas George wrote: Le sextidi 26 fructidor, an CCXXIV, Josh de Kock a écrit : This device depends on SDL which is deprecated. Signed-off-by: Josh de KockIf I understand correctly, SDL is only used in this device to set up a window and a context in a cross-platform way. I even notice that the code can be used without SDL altogether if the applications handles the context and window itself. You are correct. SDL is used just to created default window with opengl context. Probably the only use case of this is to test this device with following command: ffmpeg -i video -f opengl aaa. The relevant implementation is depending on opengl API only and has nothing to do with SDL. Removing it just because of switching to SDL 2.0 is misunderstanding. I can port SDL part to use 2.0 API, just figure out how this will be handled. I mean if you want to support both or just 2.0. Yes, I did misunderstand, sorry. As for supporting SDL2 or both, wait a week to see the outcome of the SDL vote. -- Josh ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Dropping SDL1 support [VOTE]
On Thu, Sep 15, 2016 at 14:36:32 -0300, James Almer wrote: > * SDL1 is old and effectively unmaintained. I understand this verbatim, but what is it supposed to mean? Has SDL1 gotten rotten? Or more precisely: - Has technology evolved, and the library not kept up? - Is a long list of bugs (somehow effecting ffmpeg) piling up and never being fixed? - Something else? If so, please argument as such, that makes it easier to get the point. Being old an unmaintained, it *might* just as well work fine. Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v3 3/3] lavd: deprecate opengl outdev
On 14.09.2016 19:53, Nicolas George wrote: Le sextidi 26 fructidor, an CCXXIV, Josh de Kock a écrit : This device depends on SDL which is deprecated. Signed-off-by: Josh de KockIf I understand correctly, SDL is only used in this device to set up a window and a context in a cross-platform way. I even notice that the code can be used without SDL altogether if the applications handles the context and window itself. You are correct. SDL is used just to created default window with opengl context. Probably the only use case of this is to test this device with following command: ffmpeg -i video -f opengl aaa. The relevant implementation is depending on opengl API only and has nothing to do with SDL. Removing it just because of switching to SDL 2.0 is misunderstanding. I can port SDL part to use 2.0 API, just figure out how this will be handled. I mean if you want to support both or just 2.0. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 3/6] lavc: Add a flag in AVPacket to discard packet after decoding. Discard frames after decoding based on the flag.
Signed-off-by: Sasi Inguva--- libavcodec/avcodec.h | 6 ++ libavcodec/utils.c | 15 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 01f9b29..db1061d 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1621,6 +1621,12 @@ typedef struct AVPacket { } AVPacket; #define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe #define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted +/** + * Flag is used to discard packets which are required to maintain valid + * decoder state but are not required for output and should be dropped + * after decoding. + **/ +#define AV_PKT_FLAG_DISCARD 0x0004 enum AVSideDataParamChangeFlags { AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001, diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 0f6d0e7..4734a70 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -784,6 +784,12 @@ int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame) } } add_metadata_from_side_data(pkt, frame); + +if (pkt->flags & AV_PKT_FLAG_DISCARD) { +frame->flags |= AV_FRAME_FLAG_DISCARD; +} else { +frame->flags = (frame->flags & ~AV_FRAME_FLAG_DISCARD); +} } else { frame->pkt_pts = AV_NOPTS_VALUE; av_frame_set_pkt_pos (frame, -1); @@ -2247,7 +2253,9 @@ fail: if(ret == tmp.size) ret = avpkt->size; } - +if (picture->flags & AV_FRAME_FLAG_DISCARD) { +*got_picture_ptr = 0; +} if (*got_picture_ptr) { if (!avctx->refcounted_frames) { int err = unrefcount_frame(avci, picture); @@ -2343,6 +2351,11 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, frame->sample_rate = avctx->sample_rate; } + +if (frame->flags & AV_FRAME_FLAG_DISCARD) { +*got_frame_ptr = 0; +} + side= av_packet_get_side_data(avctx->internal->pkt, AV_PKT_DATA_SKIP_SAMPLES, _size); if(side && side_size>=10) { avctx->internal->skip_samples = AV_RL32(side); -- 2.8.0.rc3.226.g39d4020 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 5/6] lavf/utils: Support av_index_search_timestamp in case of AVIndexEntry with discarded packets.
Signed-off-by: Sasi Inguva--- libavformat/utils.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index d605a96..f043bae 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1937,6 +1937,16 @@ int ff_index_search_timestamp(const AVIndexEntry *entries, int nb_entries, while (b - a > 1) { m = (a + b) >> 1; + +// Search for the next non-discarded packet. +while ((entries[m].flags & AVINDEX_DISCARD_FRAME) && m < b) { +m++; +if (m == b && entries[m].timestamp >= wanted_timestamp) { +m = b - 1; +break; +} +} + timestamp = entries[m].timestamp; if (timestamp >= wanted_timestamp) b = m; -- 2.8.0.rc3.226.g39d4020 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 6/6] ffprobe.c: Indicate decode-but-discard packets when doing -show_packets.
Signed-off-by: Sasi Inguva--- ffprobe.c | 3 +- tests/ref/fate/concat-demuxer-extended-lavf-mxf| 2 +- .../ref/fate/concat-demuxer-extended-lavf-mxf_d10 | 2 +- tests/ref/fate/concat-demuxer-simple1-lavf-mxf | 242 - tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 | 140 +- tests/ref/fate/concat-demuxer-simple2-lavf-ts | 298 ++--- tests/ref/fate/ffprobe_compact | 28 +- tests/ref/fate/ffprobe_csv | 28 +- tests/ref/fate/ffprobe_default | 28 +- tests/ref/fate/ffprobe_flat| 28 +- tests/ref/fate/ffprobe_ini | 28 +- tests/ref/fate/ffprobe_json| 28 +- tests/ref/fate/ffprobe_xml | 28 +- 13 files changed, 442 insertions(+), 441 deletions(-) diff --git a/ffprobe.c b/ffprobe.c index 657867d..e64c66e 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -1815,7 +1815,8 @@ static void show_packet(WriterContext *w, InputFile *ifile, AVPacket *pkt, int p print_val("size", pkt->size, unit_byte_str); if (pkt->pos != -1) print_fmt("pos", "%"PRId64, pkt->pos); elseprint_str_opt("pos", "N/A"); -print_fmt("flags", "%c", pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_'); +print_fmt("flags", "%c%c", pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_', + pkt->flags & AV_PKT_FLAG_DISCARD ? 'D' : '_'); if (pkt->side_data_elems) { int size; diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf b/tests/ref/fate/concat-demuxer-extended-lavf-mxf index b894938..f7905aa 100644 --- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf +++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf @@ -1 +1 @@ -0aa1ca6ff6e2e5aa926454d22fdaecd5 *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe +21eb3a629ff504b55c93a66879a31362 *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 index b378a2d..0c49f1f 100644 --- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 +++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 @@ -1 +1 @@ -14c2b8d8f82f261c9627b33c481c0e8c *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe +67a03ad49f1bd17131f751313639b61e *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf index 3fc7957..6bba76a 100644 --- a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf +++ b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf @@ -1,124 +1,124 @@ -video|0|0|0.00|-1|-0.04|1|0.04|N/A|N/A|24801|6144|K -audio|1|0|0.00|0|0.00|1920|0.04|N/A|N/A|3840|31232|K -video|0|3|0.12|0|0.00|1|0.04|N/A|N/A|16743|35840|_ -audio|1|1920|0.04|1920|0.04|1920|0.04|N/A|N/A|3840|52736|K -video|0|1|0.04|1|0.04|1|0.04|N/A|N/A|13812|57344|_ -audio|1|3840|0.08|3840|0.08|1920|0.04|N/A|N/A|3840|71680|K -video|0|2|0.08|2|0.08|1|0.04|N/A|N/A|13607|76288|_ -audio|1|5760|0.12|5760|0.12|1920|0.04|N/A|N/A|3840|90112|K -video|0|6|0.24|3|0.12|1|0.04|N/A|N/A|16158|94720|_ -audio|1|7680|0.16|7680|0.16|1920|0.04|N/A|N/A|3840|04|K -video|0|4|0.16|4|0.16|1|0.04|N/A|N/A|13943|115712|_ -audio|1|9600|0.20|9600|0.20|1920|0.04|N/A|N/A|3840|130048|K -video|0|5|0.20|5|0.20|1|0.04|N/A|N/A|11223|134656|_ -audio|1|11520|0.24|11520|0.24|1920|0.04|N/A|N/A|3840|145920|K -video|0|9|0.36|6|0.24|1|0.04|N/A|N/A|20298|150528|_ -audio|1|13440|0.28|13440|0.28|1920|0.04|N/A|N/A|3840|171008|K -video|0|7|0.28|7|0.28|1|0.04|N/A|N/A|13341|175616|_ -audio|1|15360|0.32|15360|0.32|1920|0.04|N/A|N/A|3840|189440|K -video|0|8|0.32|8|0.32|1|0.04|N/A|N/A|12362|194048|_ -audio|1|17280|0.36|17280|0.36|1920|0.04|N/A|N/A|3840|206848|K -video|0|12|0.48|9|0.36|1|0.04|N/A|N/A|24786|211456|K -audio|1|19200|0.40|19200|0.40|1920|0.04|N/A|N/A|3840|236544|K -video|0|10|0.40|10|0.40|1|0.04|N/A|N/A|13377|241152|_ -audio|1|21120|0.44|21120|0.44|1920|0.04|N/A|N/A|3840|254976|K -video|0|11|0.44|11|0.44|1|0.04|N/A|N/A|15624|259584|_ -audio|1|23040|0.48|23040|0.48|1920|0.04|N/A|N/A|3840|275456|K -video|0|15|0.60|12|0.48|1|0.04|N/A|N/A|22597|280064|_ -audio|1|24960|0.52|24960|0.52|1920|0.04|N/A|N/A|3840|303104|K -video|0|13|0.52|13|0.52|1|0.04|N/A|N/A|15028|307712|_ -audio|1|26880|0.56|26880|0.56|1920|0.04|N/A|N/A|3840|323072|K -video|0|14|0.56|14|0.56|1|0.04|N/A|N/A|14014|327680|_
[FFmpeg-devel] [PATCH 2/6] avformat/avframe.h: Add a flag in AVIndexEntry to discard frame after decoding.
Signed-off-by: Sasi Inguva--- libavformat/avformat.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 21e505d..ae70cc8 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -814,6 +814,9 @@ typedef struct AVIndexEntry { * is known */ #define AVINDEX_KEYFRAME 0x0001 +#define AVINDEX_DISCARD_FRAME 0x0002/** + * Flag is used to indicate which frame should be discarded after decoding. + */ int flags:2; int size:30; //Yeah, trying to keep the size of this small to reduce memory requirements (it is 24 vs. 32 bytes due to possible 8-byte alignment). int min_distance; /**< Minimum distance between this and the previous keyframe, used to avoid unneeded searching. */ -- 2.8.0.rc3.226.g39d4020 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/6] avutil/frame: Add a flag to discard frame after decode.
Signed-off-by: Sasi Inguva--- libavutil/frame.c | 1 + libavutil/frame.h | 4 libavutil/version.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libavutil/frame.c b/libavutil/frame.c index 662c20d..3c74931 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -114,6 +114,7 @@ static void get_frame_defaults(AVFrame *frame) frame->colorspace = AVCOL_SPC_UNSPECIFIED; frame->color_range = AVCOL_RANGE_UNSPECIFIED; frame->chroma_location = AVCHROMA_LOC_UNSPECIFIED; +frame->flags = 0; } static void free_side_data(AVFrameSideData **ptr_sd) diff --git a/libavutil/frame.h b/libavutil/frame.h index 8a41a86..1e2691e 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -396,6 +396,10 @@ typedef struct AVFrame { */ #define AV_FRAME_FLAG_CORRUPT (1 << 0) /** + * A flag to mark the frames which need to be decoded, but shouldn't be output. + */ +#define AV_FRAME_FLAG_DISCARD (1 << 2) +/** * @} */ diff --git a/libavutil/version.h b/libavutil/version.h index 7d32c7b..60b58eb 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 55 -#define LIBAVUTIL_VERSION_MINOR 29 +#define LIBAVUTIL_VERSION_MINOR 30 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ -- 2.8.0.rc3.226.g39d4020 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] lavc: add hevc mediacodec decoder
On Thu, Sep 15, 2016 at 04:57:42PM +0200, Matthieu Bouron wrote: > On Fri, Sep 09, 2016 at 04:46:25PM +0200, Matthieu Bouron wrote: > [...] > > Updated patch attached. It now checks if the hevc decoder supports the > > stream profile before using it. > > The patch depends on the following patch on the ml to work properly on > > android < 24: > > lavc/ffjni: do not error out if the last non-mandatory field/method cannot > > be found > > I'll wait a few hours and I will push the patch if there is no objection. Pushed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavc/mpeg12dec.c: Read cc words field-wise, limit to cc_count and support extra field.
On 09/15/2016 12:31 PM, Carl Eugen Hoyos wrote: > 2016-09-15 20:49 GMT+02:00 Jonathan Campbell: > >> This updates the mpeg12dec.c DVD caption decoding to decode >> field-wise and handle caption packets with an extra field. It obeys >> the cc_count field, though still validates the count like the prior code. > > Is there a sample that shows the difference? > The DVD release of "Big Hero 6" has CC data packets in the VOB that frequently encode one extra field then start on the opposite field in the next packet. Assuming that the caption data comes in pairs per frame means that you miss out on the last caption word and captions get slightly garbled. That problem is also visible when playing the same VOB in VLC player with the captions (under "subtitles") enabled. My patch decodes the caption data field-wise so the extra field is not missed which then fixes the slightly garbled captions. Do you need me to upload a small 20-second clip of the VOB where the garbled captions are visible? >> I will start on a patch to mpeg12enc.c to encode A53 captions >> from the side data. > > That's great! Yes! > > Carl Eugen > ___ > 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] lavc/mpeg12dec.c: Read cc words field-wise, limit to cc_count and support extra field.
2016-09-15 20:49 GMT+02:00 Jonathan Campbell: > This updates the mpeg12dec.c DVD caption decoding to decode > field-wise and handle caption packets with an extra field. It obeys > the cc_count field, though still validates the count like the prior code. Is there a sample that shows the difference? > I will start on a patch to mpeg12enc.c to encode A53 captions > from the side data. That's great! Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] doc/muxers: add flv muxer document into doc/muxers
On Thu, 15 Sep 2016 12:02:15 +0800, Steven Liu wrote: > From 0a62f9cb55df317c7c3df47d31e345cb9ad593d0 Mon Sep 17 00:00:00 2001 > From: Steven Liu> Date: Thu, 15 Sep 2016 11:59:35 +0800 > Subject: [PATCH] doc/muxers: add flv muxer document into doc/muxers > > add flvflags aac_seq_header_detect and flvflags no_sequence_end document > into doc/muxers > > Signed-off-by: Steven Liu > --- > doc/muxers.texi | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/doc/muxers.texi b/doc/muxers.texi > index ccf8ea1..8d94136 100644 > --- a/doc/muxers.texi > +++ b/doc/muxers.texi > @@ -1047,6 +1047,24 @@ ffmpeg -i file.mpg -c copy \ > -y out.ts > @end example > > +@section flv Your documentation is in the wrong location: it should be in alphabetical order, so place it between the crc and framecrc sections. > +Adobe Flash Video Format muxer. > +This muxer accepts the following options: Please add a blank line between the two sentences above. > +@table @option > +@item flvflags @var{flags} > +This flag currently supports the following flags: I prefer: "Possible values:" Optionally, you can add a short description of flvflags if it makes sense to do so. See the other flag type options for examples. > +@table @samp > +@item aac_seq_header_detect > +If this flag is set, the muxer will put AAC sequence header based on audio > stream data. Can be shortened to: "Place AAC sequence header based on audio stream data." > +@item no_sequence_end > +If this flag is set, the muxer will have no sequence end tag at the end of > flv. Can be shortened to: "Disable sequence end tag." ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]lavf/riff: Do not use a rogue twocc for adpcm_swf
On Thu, Sep 15, 2016 at 03:47:49PM +0200, Carl Eugen Hoyos wrote: > 2016-09-15 15:42 GMT+02:00 Michael Niedermayer: > >> -{ AV_CODEC_ID_ADPCM_SWF, ('S' << 8) + 'F' }, > >> /* HACK/FIXME: Does Vorbis in WAV/AVI have an (in)official ID? */ > >> { AV_CODEC_ID_VORBIS, ('V' << 8) + 'o' }, > >> { AV_CODEC_ID_NONE, 0 }, > > > > does this affect adpcm_swf in nut ? > > Yes, indeed. > > Is it possible to fix adpcm_swf in wav? maybe if block_align is set (and is constant) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is what and why we do it that matters, not just one of them. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] lavc/mpeg12dec.c: Read cc words field-wise, limit to cc_count and support extra field.
I'm sorry if the previous posting was not recognized as a patch. This updates the mpeg12dec.c DVD caption decoding to decode field-wise and handle caption packets with an extra field. It obeys the cc_count field, though still validates the count like the prior code. I will start on a patch to mpeg12enc.c to encode A53 captions from the side data. Jonathan Campbell >From 8d64027573588a62728faebba55d67c00a3d4e3f Mon Sep 17 00:00:00 2001 From: Jonathan CampbellDate: Wed, 14 Sep 2016 10:57:04 -0700 Subject: [PATCH] Read cc words field-wise, limit to cc_count and support extra field. This code validates the cc words the same as the prior code this replaced in case cc_count is too large. Field counting is used in case caption source does not use the LSB to signal even/odd field. --- libavcodec/mpeg12dec.c | 45 - 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index ca51c97..7c65f77 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -2265,6 +2265,7 @@ static int mpeg_decode_a53_cc(AVCodecContext *avctx, /* extract DVD CC data * * uint32_t user_data_start_code0x01B2(big endian) + * p[0] starts here - * uint16_t user_identifier 0x4343 "CC" * uint8_tuser_data_type_code 0x01 * uint8_tcaption_block_size 0xF8 @@ -2273,7 +2274,7 @@ static int mpeg_decode_a53_cc(AVCodecContext *avctx, * bit 6caption_filler 0 * bit 5:1 caption_block_count number of caption blocks (pairs of caption words = frames). Most DVDs use 15 per start of GOP. * bit 0caption_extra_field_added 1=one additional caption word - * + * p[5] starts here - * struct caption_field_block { * uint8_t * bit 7:1 caption_filler 0x7F (all 1s) @@ -2287,30 +2288,48 @@ static int mpeg_decode_a53_cc(AVCodecContext *avctx, * Don't assume that the first caption word is the odd field. There do exist MPEG files in the wild that start * on the even field. There also exist DVDs in the wild that encode an odd field count and the * caption_extra_field_added/caption_odd_field_first bits change per packet to allow that. */ -int cc_count = 0; +int caption_block_count = p[4] & 0x3F; /* you can treat bits 5:0 as number of fields */ +int cc_count = 0; /* number of caption fields */ int i; -// There is a caption count field in the data, but it is often -// incorrect. So count the number of captions present. -for (i = 5; i + 6 <= buf_size && ((p[i] & 0xfe) == 0xfe); i += 6) + +for (i = 5; cc_count < caption_block_count && (i + 3) <= buf_size; i += 3) { +if ((p[i] & 0xfe) != 0xfe) { +av_log(avctx, AV_LOG_DEBUG, "cc_count is too large (%d > %d) or junk data in DVD caption packet\n",caption_block_count,cc_count); +break; +} + cc_count++; +} + // Transform the DVD format into A53 Part 4 format if (cc_count > 0) { av_freep(>a53_caption); -s1->a53_caption_size = cc_count * 6; +s1->a53_caption_size = cc_count * 3; s1->a53_caption = av_malloc(s1->a53_caption_size); if (s1->a53_caption) { -uint8_t field1 = !!(p[4] & 0x80); +uint8_t field1 = (p[4] >> 7) & 1; /* caption_odd_field_first */ +uint8_t pfield = 0xFF; /* DVDs that don't use the caption_field_odd bit always seem to leave it on */ uint8_t *cap = s1->a53_caption; + p += 5; for (i = 0; i < cc_count; i++) { -cap[0] = (p[0] == 0xff && field1) ? 0xfc : 0xfd; +/* If the source actually uses the caption_odd_field bit, then use that to determine the field. + * Else, toggle between fields to keep track for DVDs where p[0] == 0xFF at all times. */ +if (p[0] != pfield) +field1 = p[0] & 1; /* caption_field_odd */ + +/* in A53 part 4, 0xFC = odd field, 0xFD = even field */ +cap[0] = field1 ? 0xFC : 0xFD; cap[1] = p[1]; cap[2] = p[2]; -cap[3] = (p[3] == 0xff && !field1) ? 0xfc : 0xfd; -cap[4] = p[4]; -cap[5] = p[5]; -cap += 6; -p += 6; + +av_log(avctx, AV_LOG_DEBUG, "DVD CC field1=%u(%s) 0x%02x%02x prev=0x%02x cur=0x%02x\n", +field1,field1?"odd":"even",cap[1],cap[2],pfield,p[0]);
Re: [FFmpeg-devel] Dropping SDL1 support [VOTE]
On 9/15/2016 2:51 PM, Carl Eugen Hoyos wrote: > 2016-09-15 19:36 GMT+02:00 James Almer: >> There have been some complains from developers about keeping both >> SDL1 and SDL2 support at the same time even after all SDL1 code >> has been already ported, > > Didn't we all agree yesterday that this makes the transition less painful? Not all. Several mentioned on IRC that they didn't like it. That's why i started this vote, to see how many devs are effectively in favor or against and make the final decision official. > >> and especially since it makes maintaining >> ffplay more complex > > How? Having two separate codepaths, and needing to fix potential bugs in both. > > Carl Eugen > ___ > 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] Dropping SDL1 support [VOTE]
2016-09-15 19:36 GMT+02:00 James Almer: > There have been some complains from developers about keeping both > SDL1 and SDL2 support at the same time even after all SDL1 code > has been already ported, Didn't we all agree yesterday that this makes the transition less painful? > and especially since it makes maintaining > ffplay more complex How? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Dropping SDL1 support [VOTE]
On Thu, Sep 15, 2016 at 02:36:32PM -0300, James Almer wrote: > There have been some complains from developers about keeping both > SDL1 and SDL2 support at the same time even after all SDL1 code > has been already ported, and especially since it makes maintaining > ffplay more complex, so seeing the waters are divided I think the > best solution will be to vote. > > Arguments in favor of keeping SDL1: > * Debian Old-Stable and Ubuntu 12.04 don't ship an usable SDL2 > by default, meaning a few extra steps for anyone wanting to > compile ffmpeg git would be needed to keep ffplay and the sdl > outdev working on them. > * We have a dev willing to maintain the SDL1 version of ffplay > until the above two distros are EOLed. > > Arguments in favor of dropping SDL1: > * SDL1 is old and effectively unmaintained. > * The above distros will never upgrade their ffmpeg packages. > * Anyone compiling ffmpeg git from source on any of the above > distros most likely already has to deal with other missing > deps, like any recent x264, be it from unnofficial PPAs or > manually compiling from source. SDL2 would not be any > different in that regard. > * Even though we have a dev willing to maintain the deprecated > SDL1 code, he'd rather not have to deal with it. > > Other arguments in favor or against are welcome. > > The vote will end 1 week from now, simple majority wins, and > it's open only to those in the voting committee[1]. > Marton Balint, while not in the committee, should IMO also > have the chance to vote or at least comment since he's the > main ffplay maintainer. I'm all for dropping SDL1 if and only all the SDL1 code is ported to SDL2. I absolutely want to avoid a duplicated copy of the ffplay code in our source tree (and I don't want to consider #ifdery in ffplay either). [...] -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Dropping SDL1 support [VOTE]
There have been some complains from developers about keeping both SDL1 and SDL2 support at the same time even after all SDL1 code has been already ported, and especially since it makes maintaining ffplay more complex, so seeing the waters are divided I think the best solution will be to vote. Arguments in favor of keeping SDL1: * Debian Old-Stable and Ubuntu 12.04 don't ship an usable SDL2 by default, meaning a few extra steps for anyone wanting to compile ffmpeg git would be needed to keep ffplay and the sdl outdev working on them. * We have a dev willing to maintain the SDL1 version of ffplay until the above two distros are EOLed. Arguments in favor of dropping SDL1: * SDL1 is old and effectively unmaintained. * The above distros will never upgrade their ffmpeg packages. * Anyone compiling ffmpeg git from source on any of the above distros most likely already has to deal with other missing deps, like any recent x264, be it from unnofficial PPAs or manually compiling from source. SDL2 would not be any different in that regard. * Even though we have a dev willing to maintain the deprecated SDL1 code, he'd rather not have to deal with it. Other arguments in favor or against are welcome. The vote will end 1 week from now, simple majority wins, and it's open only to those in the voting committee[1]. Marton Balint, while not in the committee, should IMO also have the chance to vote or at least comment since he's the main ffplay maintainer. Regards. [1] https://ffmpeg.org/pipermail/ffmpeg-devel/2015-October/182207.html ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
On Fri, Sep 16, 2016 at 12:41:41AM +0800, Steven Liu wrote: [...] > update: > Please attach a git-format-patch or use git-send-email. Also, your mailer is mangling the inlined patch. > > add a FF_OPT_FLAG_DEPRECATED define for compile. > add a new variable for user_agent to give a deprecated warning message > --- > doc/protocols.texi| 4 +++- > libavformat/http.c| 14 -- > libavformat/version.h | 3 +++ > 3 files changed, 18 insertions(+), 3 deletions(-) > > diff --git a/doc/protocols.texi b/doc/protocols.texi > index 470c99c..3acdc78 100644 > --- a/doc/protocols.texi > +++ b/doc/protocols.texi > @@ -292,10 +292,12 @@ Use persistent connections if set to 1, default is 0. > Set custom HTTP post data. > > @item user-agent > -@item user_agent > Override the User-Agent header. If not specified the protocol will use a > string describing the libavformat build. ("Lavf/") > > +@item user_agent > +This is a deprecated option, you can use user-agent instead it. > + Again, you don't want to deprecate "user_agent", that's the one you want to keep (because it's consistent with the other options). > @item timeout > Set timeout in microseconds of socket I/O operations used by the > underlying low level > operation. By default it is set to -1, which means that the timeout is > diff --git a/libavformat/http.c b/libavformat/http.c > index adb3d92..0b8a86c 100644 > --- a/libavformat/http.c > +++ b/libavformat/http.c > @@ -71,6 +71,9 @@ typedef struct HTTPContext { > char *headers; > char *mime_type; > char *user_agent; > +#ifdef FF_OPT_FLAG_DEPRECATED The FF_OPT_FLAG_DEPRECATED name is related to a generic approach for deprecating AVOption (by adding an AVOption flag, and patching lavu/opt.c). In your case, you want to use FF_API_HTTP_USER_AGENT. > +attribute_deprecated char *user_agent_deprecated; again, you don't want to use attribute_deprecated. > +#endif > char *content_type; > /* Set if the server correctly handles Connection: close and will close > * the connection after feeding us the content. */ > @@ -130,7 +133,9 @@ static const AVOption options[] = { > { "http_proxy", "set HTTP proxy to tunnel through", > OFFSET(http_proxy), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, > { "headers", "set custom HTTP headers, can override built in default > headers", OFFSET(headers), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E > }, > { "content_type", "set a specific content type for the POST messages", > OFFSET(content_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, > -{ "user_agent", "override User-Agent header", OFFSET(user_agent), > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, > +#ifdef FF_OPT_FLAG_DEPRECATED > +{ "user_agent", "override User-Agent header", > OFFSET(user_agent_deprecated), AV_OPT_TYPE_STRING, { .str = > DEFAULT_USER_AGENT }, 0, 0, D }, > +#endif > { "user-agent", "override User-Agent header", OFFSET(user_agent), > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, > { "multiple_requests", "use persistent connections", > OFFSET(multiple_requests), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, D | E }, > { "post_data", "set custom HTTP post data", OFFSET(post_data), > AV_OPT_TYPE_BINARY, .flags = D | E }, > @@ -1036,7 +1041,12 @@ static int http_connect(URLContext *h, const char > *path, const char *local_path, > s->http_code != 401) > send_expect_100 = 1; > } > - You should keep that empty line [...] -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
2016-09-16 0:35 GMT+08:00 Steven Liu: > ignore it please, i will fix some problem > > 2016-09-16 0:30 GMT+08:00 Steven Liu : > >> >> >> 2016-09-16 0:21 GMT+08:00 Clément Bœsch : >> >>> On Fri, Sep 16, 2016 at 12:04:34AM +0800, Steven Liu wrote: >>> > 2016-09-15 23:42 GMT+08:00 Clément Bœsch : >>> > >>> > > On Thu, Sep 15, 2016 at 05:39:25PM +0200, Nicolas George wrote: >>> > > > Le decadi 30 fructidor, an CCXXIV, Clement Boesch a écrit : >>> > > > > Yes, surrounded by the #ifdefery so it will go away with the >>> option. >>> > > > > >>> > > > > Note: use av_strdup() to transfer from one field to the other >>> > > > >>> > > > Another possibility would be to implement AV_OPT_FLAG_DEPRECATED >>> and let >>> > > the >>> > > > options system itself print the warning. >>> > > > >>> > > >>> > > That's not a bad idea; you might need to add a field to redirect to >>> > > the new option though. >>> > > >>> > > -- >>> > > Clément B. >>> > > ___ >>> > > >>> > >>> > >>> > Hi guys, >>> > >>> > are you mean like this? >>> > >>> > localhost:xxx StevenLiu$ make >>> > CC libavformat/http.o >>> > src/libavformat/http.c:1041:27: warning: 'user_agent_deprecated' is >>> > deprecated [-Wdeprecated-declarations] >>> > if (av_strncasecmp(s->user_agent_deprecated, DEFAULT_USER_AGENT, >>> > strlen(DEFAULT_USER_AGENT))) { >>> > ^ >>> > src/libavformat/http.c:74:32: note: 'user_agent_deprecated' has been >>> > explicitly marked deprecated here >>> > attribute_deprecated char *user_agent_deprecated; >>> >^ >>> > src/libavformat/http.c:1043:38: warning: 'user_agent_deprecated' is >>> > deprecated [-Wdeprecated-declarations] >>> > s->user_agent = av_strdup(s->user_agent_deprecated); >>> > ^ >>> > src/libavformat/http.c:74:32: note: 'user_agent_deprecated' has been >>> > explicitly marked deprecated here >>> > attribute_deprecated char *user_agent_deprecated; >>> >^ >>> > 2 warnings generated. >>> > AR libavformat/libavformat.a >>> > >>> > >>> > and the modify like this? >>> > >>> > >>> > localhost:xxx StevenLiu$ git diff >>> > diff --git a/libavformat/http.c b/libavformat/http.c >>> > index adb3d92..df9cf1a 100644 >>> > --- a/libavformat/http.c >>> > +++ b/libavformat/http.c >>> > @@ -71,6 +71,7 @@ typedef struct HTTPContext { >>> > char *headers; >>> > char *mime_type; >>> > char *user_agent; >>> > +attribute_deprecated char *user_agent_deprecated; >>> >>> not attribute_deprecated >>> >>> #if FF_API_HTTP_USER_AGENT >>> char *user_agent_deprecated; >>> #endif >>> >>> > char *content_type; >>> > /* Set if the server correctly handles Connection: close and will >>> close >>> > * the connection after feeding us the content. */ >>> > @@ -130,7 +131,7 @@ static const AVOption options[] = { >>> > { "http_proxy", "set HTTP proxy to tunnel through", >>> > OFFSET(http_proxy), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, >>> > { "headers", "set custom HTTP headers, can override built in >>> default >>> > headers", OFFSET(headers), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, >>> D | E >>> > }, >>> > { "content_type", "set a specific content type for the POST >>> messages", >>> > OFFSET(content_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E >>> }, >>> > -{ "user_agent", "override User-Agent header", OFFSET(user_agent), >>> > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, >>> > +{ "user_agent", "override User-Agent header", >>> >>> You want to deprecate user-agent, not user_agent. >>> >>> #if FF_API_HTTP_USER_AGENT >>> { "user-agent", "override User-Agent header", ... >>> #endif >>> >>> > OFFSET(user_agent_deprecated), AV_OPT_TYPE_STRING, { .str = >>> > DEFAULT_USER_AGENT }, 0, 0, D }, >>> > { "user-agent", "override User-Agent header", OFFSET(user_agent), >>> > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, >>> > { "multiple_requests", "use persistent connections", >>> > OFFSET(multiple_requests), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, D | E >>> }, >>> > { "post_data", "set custom HTTP post data", OFFSET(post_data), >>> > AV_OPT_TYPE_BINARY, .flags = D | E }, >>> > @@ -1037,6 +1038,10 @@ static int http_connect(URLContext *h, const >>> char >>> > *path, const char *local_path, >>> > send_expect_100 = 1; >>> > } >>> > >>> > +if (av_strncasecmp(s->user_agent_deprecated, DEFAULT_USER_AGENT, >>> > strlen(DEFAULT_USER_AGENT))) { >>> >>> - you need to check s->user_agent, not s->user_agent_deprecated >>> - strcmp() is enough >>> >>> > +av_log(s, AV_LOG_WARNING, "the user_agent option is >>> deprecated, >>> > please use user-agent option\n"); >>> >>> the other way around >>> >>> > +s->user_agent =
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
ignore it please, i will fix some problem 2016-09-16 0:30 GMT+08:00 Steven Liu: > > > 2016-09-16 0:21 GMT+08:00 Clément Bœsch : > >> On Fri, Sep 16, 2016 at 12:04:34AM +0800, Steven Liu wrote: >> > 2016-09-15 23:42 GMT+08:00 Clément Bœsch : >> > >> > > On Thu, Sep 15, 2016 at 05:39:25PM +0200, Nicolas George wrote: >> > > > Le decadi 30 fructidor, an CCXXIV, Clement Boesch a écrit : >> > > > > Yes, surrounded by the #ifdefery so it will go away with the >> option. >> > > > > >> > > > > Note: use av_strdup() to transfer from one field to the other >> > > > >> > > > Another possibility would be to implement AV_OPT_FLAG_DEPRECATED >> and let >> > > the >> > > > options system itself print the warning. >> > > > >> > > >> > > That's not a bad idea; you might need to add a field to redirect to >> > > the new option though. >> > > >> > > -- >> > > Clément B. >> > > ___ >> > > >> > >> > >> > Hi guys, >> > >> > are you mean like this? >> > >> > localhost:xxx StevenLiu$ make >> > CC libavformat/http.o >> > src/libavformat/http.c:1041:27: warning: 'user_agent_deprecated' is >> > deprecated [-Wdeprecated-declarations] >> > if (av_strncasecmp(s->user_agent_deprecated, DEFAULT_USER_AGENT, >> > strlen(DEFAULT_USER_AGENT))) { >> > ^ >> > src/libavformat/http.c:74:32: note: 'user_agent_deprecated' has been >> > explicitly marked deprecated here >> > attribute_deprecated char *user_agent_deprecated; >> >^ >> > src/libavformat/http.c:1043:38: warning: 'user_agent_deprecated' is >> > deprecated [-Wdeprecated-declarations] >> > s->user_agent = av_strdup(s->user_agent_deprecated); >> > ^ >> > src/libavformat/http.c:74:32: note: 'user_agent_deprecated' has been >> > explicitly marked deprecated here >> > attribute_deprecated char *user_agent_deprecated; >> >^ >> > 2 warnings generated. >> > AR libavformat/libavformat.a >> > >> > >> > and the modify like this? >> > >> > >> > localhost:xxx StevenLiu$ git diff >> > diff --git a/libavformat/http.c b/libavformat/http.c >> > index adb3d92..df9cf1a 100644 >> > --- a/libavformat/http.c >> > +++ b/libavformat/http.c >> > @@ -71,6 +71,7 @@ typedef struct HTTPContext { >> > char *headers; >> > char *mime_type; >> > char *user_agent; >> > +attribute_deprecated char *user_agent_deprecated; >> >> not attribute_deprecated >> >> #if FF_API_HTTP_USER_AGENT >> char *user_agent_deprecated; >> #endif >> >> > char *content_type; >> > /* Set if the server correctly handles Connection: close and will >> close >> > * the connection after feeding us the content. */ >> > @@ -130,7 +131,7 @@ static const AVOption options[] = { >> > { "http_proxy", "set HTTP proxy to tunnel through", >> > OFFSET(http_proxy), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, >> > { "headers", "set custom HTTP headers, can override built in >> default >> > headers", OFFSET(headers), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D >> | E >> > }, >> > { "content_type", "set a specific content type for the POST >> messages", >> > OFFSET(content_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E >> }, >> > -{ "user_agent", "override User-Agent header", OFFSET(user_agent), >> > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, >> > +{ "user_agent", "override User-Agent header", >> >> You want to deprecate user-agent, not user_agent. >> >> #if FF_API_HTTP_USER_AGENT >> { "user-agent", "override User-Agent header", ... >> #endif >> >> > OFFSET(user_agent_deprecated), AV_OPT_TYPE_STRING, { .str = >> > DEFAULT_USER_AGENT }, 0, 0, D }, >> > { "user-agent", "override User-Agent header", OFFSET(user_agent), >> > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, >> > { "multiple_requests", "use persistent connections", >> > OFFSET(multiple_requests), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, D | E >> }, >> > { "post_data", "set custom HTTP post data", OFFSET(post_data), >> > AV_OPT_TYPE_BINARY, .flags = D | E }, >> > @@ -1037,6 +1038,10 @@ static int http_connect(URLContext *h, const char >> > *path, const char *local_path, >> > send_expect_100 = 1; >> > } >> > >> > +if (av_strncasecmp(s->user_agent_deprecated, DEFAULT_USER_AGENT, >> > strlen(DEFAULT_USER_AGENT))) { >> >> - you need to check s->user_agent, not s->user_agent_deprecated >> - strcmp() is enough >> >> > +av_log(s, AV_LOG_WARNING, "the user_agent option is deprecated, >> > please use user-agent option\n"); >> >> the other way around >> >> > +s->user_agent = av_strdup(s->user_agent_deprecated); >> > +} >> >> -- >> Clément B. >> ___ >> > > > > > > patch update > > > > > add a FF_OPT_FLAG_DEPRECATED define for compile. > add a new variable for
[FFmpeg-devel] exposing public API for chromium ffmpeg_demuxer.cc code
I've been working on making chromium work with system (unmodified and installed) ffmpeg, and there is some code currently using internal-only API, which is not available in that case: https://chromium.googlesource.com/chromium/src/+/a6912725c190eebf472d78a44d8fd247751e9a07/media/filters/ffmpeg_demuxer.cc#1188 Do you have suggestions what could be done to do what above code is doing without need to access the internal parts? For convenience, I'm also pasting the snippet of code below: const AVFormatInternal* internal = format_context->internal; if (internal && internal->packet_buffer && format_context->start_time != static_cast(AV_NOPTS_VALUE)) { struct AVPacketList* packet_buffer = internal->packet_buffer; while (packet_buffer != internal->packet_buffer_end) { DCHECK_LT(static_cast(packet_buffer->pkt.stream_index), start_time_estimates.size()); const AVStream* stream = format_context->streams[packet_buffer->pkt.stream_index]; if (packet_buffer->pkt.pts != static_cast(AV_NOPTS_VALUE)) { const base::TimeDelta packet_pts = ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts); if (packet_pts < start_time_estimates[stream->index]) start_time_estimates[stream->index] = packet_pts; } packet_buffer = packet_buffer->next; } } Paweł -- Paweł Hajdan, Jr. | Software Engineer | phaj...@google.com Google Poland sp. z o.o. ul. Emilii Plater 53, 00-113 Warszawa Sąd Rejonowy dla m. st. Warszawy w Warszawie, XII Wydział Gospodarczy Krajowego Rejestru Sądowego, KRS 240611. NIP: 525-23-44-078, Kapitał zakładowy Spółki 400 000, 00 zł. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
2016-09-16 0:21 GMT+08:00 Clément Bœsch: > On Fri, Sep 16, 2016 at 12:04:34AM +0800, Steven Liu wrote: > > 2016-09-15 23:42 GMT+08:00 Clément Bœsch : > > > > > On Thu, Sep 15, 2016 at 05:39:25PM +0200, Nicolas George wrote: > > > > Le decadi 30 fructidor, an CCXXIV, Clement Boesch a écrit : > > > > > Yes, surrounded by the #ifdefery so it will go away with the > option. > > > > > > > > > > Note: use av_strdup() to transfer from one field to the other > > > > > > > > Another possibility would be to implement AV_OPT_FLAG_DEPRECATED and > let > > > the > > > > options system itself print the warning. > > > > > > > > > > That's not a bad idea; you might need to add a field to redirect to > > > the new option though. > > > > > > -- > > > Clément B. > > > ___ > > > > > > > > > Hi guys, > > > > are you mean like this? > > > > localhost:xxx StevenLiu$ make > > CC libavformat/http.o > > src/libavformat/http.c:1041:27: warning: 'user_agent_deprecated' is > > deprecated [-Wdeprecated-declarations] > > if (av_strncasecmp(s->user_agent_deprecated, DEFAULT_USER_AGENT, > > strlen(DEFAULT_USER_AGENT))) { > > ^ > > src/libavformat/http.c:74:32: note: 'user_agent_deprecated' has been > > explicitly marked deprecated here > > attribute_deprecated char *user_agent_deprecated; > >^ > > src/libavformat/http.c:1043:38: warning: 'user_agent_deprecated' is > > deprecated [-Wdeprecated-declarations] > > s->user_agent = av_strdup(s->user_agent_deprecated); > > ^ > > src/libavformat/http.c:74:32: note: 'user_agent_deprecated' has been > > explicitly marked deprecated here > > attribute_deprecated char *user_agent_deprecated; > >^ > > 2 warnings generated. > > AR libavformat/libavformat.a > > > > > > and the modify like this? > > > > > > localhost:xxx StevenLiu$ git diff > > diff --git a/libavformat/http.c b/libavformat/http.c > > index adb3d92..df9cf1a 100644 > > --- a/libavformat/http.c > > +++ b/libavformat/http.c > > @@ -71,6 +71,7 @@ typedef struct HTTPContext { > > char *headers; > > char *mime_type; > > char *user_agent; > > +attribute_deprecated char *user_agent_deprecated; > > not attribute_deprecated > > #if FF_API_HTTP_USER_AGENT > char *user_agent_deprecated; > #endif > > > char *content_type; > > /* Set if the server correctly handles Connection: close and will > close > > * the connection after feeding us the content. */ > > @@ -130,7 +131,7 @@ static const AVOption options[] = { > > { "http_proxy", "set HTTP proxy to tunnel through", > > OFFSET(http_proxy), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, > > { "headers", "set custom HTTP headers, can override built in default > > headers", OFFSET(headers), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D > | E > > }, > > { "content_type", "set a specific content type for the POST > messages", > > OFFSET(content_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, > > -{ "user_agent", "override User-Agent header", OFFSET(user_agent), > > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, > > +{ "user_agent", "override User-Agent header", > > You want to deprecate user-agent, not user_agent. > > #if FF_API_HTTP_USER_AGENT > { "user-agent", "override User-Agent header", ... > #endif > > > OFFSET(user_agent_deprecated), AV_OPT_TYPE_STRING, { .str = > > DEFAULT_USER_AGENT }, 0, 0, D }, > > { "user-agent", "override User-Agent header", OFFSET(user_agent), > > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, > > { "multiple_requests", "use persistent connections", > > OFFSET(multiple_requests), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, D | E }, > > { "post_data", "set custom HTTP post data", OFFSET(post_data), > > AV_OPT_TYPE_BINARY, .flags = D | E }, > > @@ -1037,6 +1038,10 @@ static int http_connect(URLContext *h, const char > > *path, const char *local_path, > > send_expect_100 = 1; > > } > > > > +if (av_strncasecmp(s->user_agent_deprecated, DEFAULT_USER_AGENT, > > strlen(DEFAULT_USER_AGENT))) { > > - you need to check s->user_agent, not s->user_agent_deprecated > - strcmp() is enough > > > +av_log(s, AV_LOG_WARNING, "the user_agent option is deprecated, > > please use user-agent option\n"); > > the other way around > > > +s->user_agent = av_strdup(s->user_agent_deprecated); > > +} > > -- > Clément B. > ___ > patch update add a FF_OPT_FLAG_DEPRECATED define for compile. add a new variable for user_agent to give a deprecated warning message --- doc/protocols.texi| 4 +++- libavformat/http.c| 14 -- libavformat/version.h | 3 +++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
On Fri, Sep 16, 2016 at 12:04:34AM +0800, Steven Liu wrote: > 2016-09-15 23:42 GMT+08:00 Clément Bœsch: > > > On Thu, Sep 15, 2016 at 05:39:25PM +0200, Nicolas George wrote: > > > Le decadi 30 fructidor, an CCXXIV, Clement Boesch a écrit : > > > > Yes, surrounded by the #ifdefery so it will go away with the option. > > > > > > > > Note: use av_strdup() to transfer from one field to the other > > > > > > Another possibility would be to implement AV_OPT_FLAG_DEPRECATED and let > > the > > > options system itself print the warning. > > > > > > > That's not a bad idea; you might need to add a field to redirect to > > the new option though. > > > > -- > > Clément B. > > ___ > > > > > Hi guys, > > are you mean like this? > > localhost:xxx StevenLiu$ make > CC libavformat/http.o > src/libavformat/http.c:1041:27: warning: 'user_agent_deprecated' is > deprecated [-Wdeprecated-declarations] > if (av_strncasecmp(s->user_agent_deprecated, DEFAULT_USER_AGENT, > strlen(DEFAULT_USER_AGENT))) { > ^ > src/libavformat/http.c:74:32: note: 'user_agent_deprecated' has been > explicitly marked deprecated here > attribute_deprecated char *user_agent_deprecated; >^ > src/libavformat/http.c:1043:38: warning: 'user_agent_deprecated' is > deprecated [-Wdeprecated-declarations] > s->user_agent = av_strdup(s->user_agent_deprecated); > ^ > src/libavformat/http.c:74:32: note: 'user_agent_deprecated' has been > explicitly marked deprecated here > attribute_deprecated char *user_agent_deprecated; >^ > 2 warnings generated. > AR libavformat/libavformat.a > > > and the modify like this? > > > localhost:xxx StevenLiu$ git diff > diff --git a/libavformat/http.c b/libavformat/http.c > index adb3d92..df9cf1a 100644 > --- a/libavformat/http.c > +++ b/libavformat/http.c > @@ -71,6 +71,7 @@ typedef struct HTTPContext { > char *headers; > char *mime_type; > char *user_agent; > +attribute_deprecated char *user_agent_deprecated; not attribute_deprecated #if FF_API_HTTP_USER_AGENT char *user_agent_deprecated; #endif > char *content_type; > /* Set if the server correctly handles Connection: close and will close > * the connection after feeding us the content. */ > @@ -130,7 +131,7 @@ static const AVOption options[] = { > { "http_proxy", "set HTTP proxy to tunnel through", > OFFSET(http_proxy), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, > { "headers", "set custom HTTP headers, can override built in default > headers", OFFSET(headers), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E > }, > { "content_type", "set a specific content type for the POST messages", > OFFSET(content_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, > -{ "user_agent", "override User-Agent header", OFFSET(user_agent), > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, > +{ "user_agent", "override User-Agent header", You want to deprecate user-agent, not user_agent. #if FF_API_HTTP_USER_AGENT { "user-agent", "override User-Agent header", ... #endif > OFFSET(user_agent_deprecated), AV_OPT_TYPE_STRING, { .str = > DEFAULT_USER_AGENT }, 0, 0, D }, > { "user-agent", "override User-Agent header", OFFSET(user_agent), > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, > { "multiple_requests", "use persistent connections", > OFFSET(multiple_requests), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, D | E }, > { "post_data", "set custom HTTP post data", OFFSET(post_data), > AV_OPT_TYPE_BINARY, .flags = D | E }, > @@ -1037,6 +1038,10 @@ static int http_connect(URLContext *h, const char > *path, const char *local_path, > send_expect_100 = 1; > } > > +if (av_strncasecmp(s->user_agent_deprecated, DEFAULT_USER_AGENT, > strlen(DEFAULT_USER_AGENT))) { - you need to check s->user_agent, not s->user_agent_deprecated - strcmp() is enough > +av_log(s, AV_LOG_WARNING, "the user_agent option is deprecated, > please use user-agent option\n"); the other way around > +s->user_agent = av_strdup(s->user_agent_deprecated); > +} -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
2016-09-15 18:04 GMT+02:00 Steven Liu: > are you mean like this? Imo, this is missing the (only relevant) change to doc/protocols.texi. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
2016-09-15 23:42 GMT+08:00 Clément Bœsch: > On Thu, Sep 15, 2016 at 05:39:25PM +0200, Nicolas George wrote: > > Le decadi 30 fructidor, an CCXXIV, Clement Boesch a écrit : > > > Yes, surrounded by the #ifdefery so it will go away with the option. > > > > > > Note: use av_strdup() to transfer from one field to the other > > > > Another possibility would be to implement AV_OPT_FLAG_DEPRECATED and let > the > > options system itself print the warning. > > > > That's not a bad idea; you might need to add a field to redirect to > the new option though. > > -- > Clément B. > ___ > Hi guys, are you mean like this? localhost:xxx StevenLiu$ make CC libavformat/http.o src/libavformat/http.c:1041:27: warning: 'user_agent_deprecated' is deprecated [-Wdeprecated-declarations] if (av_strncasecmp(s->user_agent_deprecated, DEFAULT_USER_AGENT, strlen(DEFAULT_USER_AGENT))) { ^ src/libavformat/http.c:74:32: note: 'user_agent_deprecated' has been explicitly marked deprecated here attribute_deprecated char *user_agent_deprecated; ^ src/libavformat/http.c:1043:38: warning: 'user_agent_deprecated' is deprecated [-Wdeprecated-declarations] s->user_agent = av_strdup(s->user_agent_deprecated); ^ src/libavformat/http.c:74:32: note: 'user_agent_deprecated' has been explicitly marked deprecated here attribute_deprecated char *user_agent_deprecated; ^ 2 warnings generated. AR libavformat/libavformat.a and the modify like this? localhost:xxx StevenLiu$ git diff diff --git a/libavformat/http.c b/libavformat/http.c index adb3d92..df9cf1a 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -71,6 +71,7 @@ typedef struct HTTPContext { char *headers; char *mime_type; char *user_agent; +attribute_deprecated char *user_agent_deprecated; char *content_type; /* Set if the server correctly handles Connection: close and will close * the connection after feeding us the content. */ @@ -130,7 +131,7 @@ static const AVOption options[] = { { "http_proxy", "set HTTP proxy to tunnel through", OFFSET(http_proxy), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, { "headers", "set custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, { "content_type", "set a specific content type for the POST messages", OFFSET(content_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, -{ "user_agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, +{ "user_agent", "override User-Agent header", OFFSET(user_agent_deprecated), AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, { "user-agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, { "multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, D | E }, { "post_data", "set custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D | E }, @@ -1037,6 +1038,10 @@ static int http_connect(URLContext *h, const char *path, const char *local_path, send_expect_100 = 1; } +if (av_strncasecmp(s->user_agent_deprecated, DEFAULT_USER_AGENT, strlen(DEFAULT_USER_AGENT))) { +av_log(s, AV_LOG_WARNING, "the user_agent option is deprecated, please use user-agent option\n"); +s->user_agent = av_strdup(s->user_agent_deprecated); +} /* set default headers if needed */ if (!has_header(s->headers, "\r\nUser-Agent: ")) len += av_strlcatf(headers + len, sizeof(headers) - len, ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2 2/4] ffplay: make copy for SDL1
On 9/15/2016 11:54 AM, James Almer wrote: > On 9/15/2016 7:23 AM, Carl Eugen Hoyos wrote: >> 2016-09-15 12:19 GMT+02:00 Josh de Kock: >>> On 15/09/2016 10:58, Carl Eugen Hoyos wrote: 2016-09-15 10:39 GMT+02:00 Josh de Kock : >> > #include "config.h" > + > +#if HAVE_SDL2 Sorry if this should be obvious: What is the effect of this #if? >>> Don't worry, it's not really that obvious. If HAVE_SDL2 is false but >>> HAVE_SDL is true, then ffplay.c will get macro'd out, and ffplay_sdl1.c will >>> get added to the ffplay sources (see the Makefile change). If you can think >>> of a better way to do it, feel free to suggest. >> >> Thank you for explaining! >> >> Am I correct that with this patch only, sdl2 compilation of ffplay fails? > > Technically speaking, with this patch only there's no ffplay SDL2 > just yet. It's still SDL1, but you're right that compilation would > probably fail since it's SDL1 code in a configure setting where > SDL2 was selected (even if SDL1 headers were available and the > object sucessfully built, gcc would not link with SDL1 libraries). > > I guess the sanest thing to do would be to squash patches two and > three. Nevermind, disregard this. ffplay still depends on SDL1 at this point, so configure with SDL2 would not even try to build it until next patch. > >> >> Carl Eugen >> ___ >> 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] avformat/http: remove duplicate user-agent option
On Thu, Sep 15, 2016 at 05:39:25PM +0200, Nicolas George wrote: > Le decadi 30 fructidor, an CCXXIV, Clement Boesch a écrit : > > Yes, surrounded by the #ifdefery so it will go away with the option. > > > > Note: use av_strdup() to transfer from one field to the other > > Another possibility would be to implement AV_OPT_FLAG_DEPRECATED and let the > options system itself print the warning. > That's not a bad idea; you might need to add a field to redirect to the new option though. -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
Le decadi 30 fructidor, an CCXXIV, Clement Boesch a écrit : > Yes, surrounded by the #ifdefery so it will go away with the option. > > Note: use av_strdup() to transfer from one field to the other Another possibility would be to implement AV_OPT_FLAG_DEPRECATED and let the options system itself print the warning. 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] avformat/http: remove duplicate user-agent option
On Thu, Sep 15, 2016 at 11:27:02PM +0800, Steven Liu wrote: > 2016-09-15 23:03 GMT+08:00 Carl Eugen Hoyos: > > > 2016-09-15 16:40 GMT+02:00 Clément Bœsch : > > > > >> Carl Eugen's mean is apply this patch after the next release? > > > > > > You need to deprecate the option with at least the classic #ifdefery > > dance > > > (git grep FF_API for examples), and ideally by also printing a warning > > > when using the wrong option. > > > > Imo, it is completely sufficient to add a line to the filter documentation > > (and print a warning if this is easily possible). > > > > Carl Eugen > > > > > user_agent and user-agent use the same variable 'user_agent', if print a > warning, maybe add a user variable for user_agent option is a good way? Yes, surrounded by the #ifdefery so it will go away with the option. Note: use av_strdup() to transfer from one field to the other -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
2016-09-15 23:03 GMT+08:00 Carl Eugen Hoyos: > 2016-09-15 16:40 GMT+02:00 Clément Bœsch : > > >> Carl Eugen's mean is apply this patch after the next release? > > > > You need to deprecate the option with at least the classic #ifdefery > dance > > (git grep FF_API for examples), and ideally by also printing a warning > > when using the wrong option. > > Imo, it is completely sufficient to add a line to the filter documentation > (and print a warning if this is easily possible). > > Carl Eugen > > user_agent and user-agent use the same variable 'user_agent', if print a warning, maybe add a user variable for user_agent option is a good way? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
2016-09-15 16:40 GMT+02:00 Clément Bœsch: >> Carl Eugen's mean is apply this patch after the next release? > > You need to deprecate the option with at least the classic #ifdefery dance > (git grep FF_API for examples), and ideally by also printing a warning > when using the wrong option. Imo, it is completely sufficient to add a line to the filter documentation (and print a warning if this is easily possible). Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] lavc: add hevc mediacodec decoder
On Fri, Sep 09, 2016 at 04:46:25PM +0200, Matthieu Bouron wrote: [...] > Updated patch attached. It now checks if the hevc decoder supports the > stream profile before using it. > The patch depends on the following patch on the ml to work properly on > android < 24: > lavc/ffjni: do not error out if the last non-mandatory field/method cannot > be found I'll wait a few hours and I will push the patch if there is no objection. Matthieu [...] ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/4] MAINTAINERS: update my entries
On 9/15/2016 11:49 AM, Moritz Barsnick wrote: > On Wed, Sep 14, 2016 at 23:27:33 +0100, Josh de Kock wrote: >> - ffplay.c Marton Balint >> + ffplay.c Marton Balint, Josh de Kock >> + ffplay_sdl1.c Josh de Kock > > Since ffplay_sdl1.c was created as a copy (or basically a move) of > ffplay.c, wouldn't Marton Balint's maintainership also copy (or even > move) over? If he wants to then sure. In any case, the SDL1 version is kept for the sake of people using old distros and will be removed early next year. Josh accepted maintaining it until then, but aside from that it's considered deprecated and afaik further development will continue on the SDL2 version only. > > Moritz > ___ > 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 4/4] MAINTAINERS: update my entries
On Wed, Sep 14, 2016 at 23:27:33 +0100, Josh de Kock wrote: > - ffplay.c Marton Balint > + ffplay.c Marton Balint, Josh de Kock > + ffplay_sdl1.c Josh de Kock Since ffplay_sdl1.c was created as a copy (or basically a move) of ffplay.c, wouldn't Marton Balint's maintainership also copy (or even move) over? Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2 2/4] ffplay: make copy for SDL1
On 9/15/2016 7:23 AM, Carl Eugen Hoyos wrote: > 2016-09-15 12:19 GMT+02:00 Josh de Kock: >> On 15/09/2016 10:58, Carl Eugen Hoyos wrote: >>> >>> 2016-09-15 10:39 GMT+02:00 Josh de Kock : > #include "config.h" + +#if HAVE_SDL2 >>> >>> >>> Sorry if this should be obvious: >>> What is the effect of this #if? >>> >> Don't worry, it's not really that obvious. If HAVE_SDL2 is false but >> HAVE_SDL is true, then ffplay.c will get macro'd out, and ffplay_sdl1.c will >> get added to the ffplay sources (see the Makefile change). If you can think >> of a better way to do it, feel free to suggest. > > Thank you for explaining! > > Am I correct that with this patch only, sdl2 compilation of ffplay fails? Technically speaking, with this patch only there's no ffplay SDL2 just yet. It's still SDL1, but you're right that compilation would probably fail since it's SDL1 code in a configure setting where SDL2 was selected (even if SDL1 headers were available and the object sucessfully built, gcc would not link with SDL1 libraries). I guess the sanest thing to do would be to squash patches two and three. > > Carl Eugen > ___ > 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] avformat/http: remove duplicate user-agent option
On Thu, Sep 15, 2016 at 10:34:37PM +0800, Steven Liu wrote: > 2016-09-15 22:22 GMT+08:00 Carl Eugen Hoyos: > > > 2016-09-15 16:04 GMT+02:00 Steven Liu : > > > double user-agent option, same option, remove one. > > > > Looking at the documentation, the patch is not ok as-is. > > > > I suggest to deprecate the option now, and to remove it after > > the next release. > > > > Carl Eugen > > > > > Carl Eugen's mean is apply this patch after the next release? You need to deprecate the option with at least the classic #ifdefery dance (git grep FF_API for examples), and ideally by also printing a warning when using the wrong option. -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
2016-09-15 22:22 GMT+08:00 Carl Eugen Hoyos: > 2016-09-15 16:04 GMT+02:00 Steven Liu : > > double user-agent option, same option, remove one. > > Looking at the documentation, the patch is not ok as-is. > > I suggest to deprecate the option now, and to remove it after > the next release. > > Carl Eugen > > Carl Eugen's mean is apply this patch after the next release? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
2016-09-15 16:04 GMT+02:00 Steven Liu: > double user-agent option, same option, remove one. Looking at the documentation, the patch is not ok as-is. I suggest to deprecate the option now, and to remove it after the next release. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
On Thu, Sep 15, 2016 at 10:04:48PM +0800, Steven Liu wrote: > double user-agent option, same option, remove one. > > Signed-off-by: Steven Liu> --- > libavformat/http.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/libavformat/http.c b/libavformat/http.c > index adb3d92..f2bfb17 100644 > --- a/libavformat/http.c > +++ b/libavformat/http.c > @@ -131,7 +131,6 @@ static const AVOption options[] = { > { "headers", "set custom HTTP headers, can override built in default > headers", OFFSET(headers), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E > }, > { "content_type", "set a specific content type for the POST messages", > OFFSET(content_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, > { "user_agent", "override User-Agent header", OFFSET(user_agent), > AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, > -{ "user-agent", "override User-Agent header", OFFSET(user_agent), one has '_', the other '-' -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/http: remove duplicate user-agent option
double user-agent option, same option, remove one. Signed-off-by: Steven Liu--- libavformat/http.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/http.c b/libavformat/http.c index adb3d92..f2bfb17 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -131,7 +131,6 @@ static const AVOption options[] = { { "headers", "set custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, { "content_type", "set a specific content type for the POST messages", OFFSET(content_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, { "user_agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, -{ "user-agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, { .str = DEFAULT_USER_AGENT }, 0, 0, D }, { "multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, D | E }, { "post_data", "set custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D | E }, { "mime_type", "export the MIME type", OFFSET(mime_type), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY }, -- 2.7.4 (Apple Git-66) 0001-avformat-http-remove-duplicate-user-agent-option.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/af_amerge: add reorder_inputs option to be able to turn off reordering
2016-09-15 15:46 GMT+02:00 Nicolas George: > Le decadi 30 fructidor, an CCXXIV, Carl Eugen Hoyos a écrit : >> Why not? >> Afair, I had tested it extensively before it was broken. > > Because "providing a value that is not available" and > "overriding a value" are two very different tasks. But are we doing this differentiation for any FFmpeg option? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/qsvdec_h2645.c: drop executable permission
2016-09-15 15:49 GMT+02:00 Moritz Barsnick: > Accidentally set in b93e2233155e6c1f0a074cad4135a70d9d2934d3. > > Signed-off-by: Moritz Barsnick > --- > libavcodec/qsvdec_h2645.c | 0 > 1 file changed, 0 insertions(+), 0 deletions(-) > mode change 100755 => 100644 libavcodec/qsvdec_h2645.c > > diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c > old mode 100755 > new mode 100644 Patch applied. Thank you, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] libavcodec/qsvdec_h2645.c: drop executable permission
Accidentally set in b93e2233155e6c1f0a074cad4135a70d9d2934d3. Signed-off-by: Moritz Barsnick--- libavcodec/qsvdec_h2645.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 libavcodec/qsvdec_h2645.c diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c old mode 100755 new mode 100644 -- 2.7.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]lavf/riff: Do not use a rogue twocc for adpcm_swf
2016-09-15 15:42 GMT+02:00 Michael Niedermayer: >> -{ AV_CODEC_ID_ADPCM_SWF, ('S' << 8) + 'F' }, >> /* HACK/FIXME: Does Vorbis in WAV/AVI have an (in)official ID? */ >> { AV_CODEC_ID_VORBIS, ('V' << 8) + 'o' }, >> { AV_CODEC_ID_NONE, 0 }, > > does this affect adpcm_swf in nut ? Yes, indeed. Is it possible to fix adpcm_swf in wav? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/af_amerge: add reorder_inputs option to be able to turn off reordering
Le decadi 30 fructidor, an CCXXIV, Carl Eugen Hoyos a écrit : > Why not? > Afair, I had tested it extensively before it was broken. Because "providing a value that is not available" and "overriding a value" are two very different tasks. Sometimes you have to specify the channel layout because the format does not provide the information, for example raw PCM. What we are discussing here is overriding information provided by the format but supposed wrong. I would like to avoid people doing the second when they think they are doing the first one, or just have no clue about what they are doing exactly. 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]lavf/riff: Do not use a rogue twocc for adpcm_swf
On Mon, Sep 12, 2016 at 12:52:49PM +0200, Carl Eugen Hoyos wrote: > Hi! > > Attached patch "fixes" ticket #5829, I am happy if a better > solution can be found. > > Please comment, Carl Eugen > riff.c |1 - > 1 file changed, 1 deletion(-) > 6113805920f6fb418635029f2f600fcfe1c3fa88 > 0001-lavf-riff-Do-not-use-a-rogue-twocc-for-adpcm_swf.patch > From 69d62cac34908fb2a37e37ef1b03b565f2b4ae78 Mon Sep 17 00:00:00 2001 > From: Carl Eugen Hoyos> Date: Mon, 12 Sep 2016 12:42:33 +0200 > Subject: [PATCH] lavf/riff: Do not use a rogue twocc for adpcm_swf. > > Fixes ticket #5829. > --- > libavformat/riff.c |1 - > 1 file changed, 1 deletion(-) > > diff --git a/libavformat/riff.c b/libavformat/riff.c > index 72ad5d9..06f2996 100644 > --- a/libavformat/riff.c > +++ b/libavformat/riff.c > @@ -510,7 +510,6 @@ const AVCodecTag ff_codec_wav_tags[] = { > { AV_CODEC_ID_AAC, 0xA106 }, > { AV_CODEC_ID_SPEEX, 0xA109 }, > { AV_CODEC_ID_FLAC,0xF1AC }, > -{ AV_CODEC_ID_ADPCM_SWF, ('S' << 8) + 'F' }, > /* HACK/FIXME: Does Vorbis in WAV/AVI have an (in)official ID? */ > { AV_CODEC_ID_VORBIS, ('V' << 8) + 'o' }, > { AV_CODEC_ID_NONE, 0 }, does this affect adpcm_swf in nut ? just guessing didnt try aka should this maybe be moved into a nut specific table ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] vf_colorspace: Interpret unspecified color range as limited range
Hi, On Thu, Sep 15, 2016 at 9:32 AM, Vittorio Giovara < vittorio.giov...@gmail.com> wrote: > > On Sep 15, 2016, at 2:45 PM, Ronald S. Bultjewrote: > > Hi Vittorio, > > On Thu, Sep 15, 2016 at 8:33 AM, Vittorio Giovara < > vittorio.giov...@gmail.com> wrote: > >> I agree we should always be very very careful about automatic >> assignments, although this one seems pretty safe. >> >> I don't think it's necessary, but if you prefer I can add a warning >> whenever range is not specified (even though it might trigger a few false >> positives). > > > Which false positive are you afraid of? > > > By "false positive" I mean only the fact that it might needlessly print a > warning, and the user might be confused by it. > Right, but only because the range was not set. I'd like to get to the ideal end situation where we encourage everyone (users, decoders, etc.) to always explicitly set the range. Aside, is it correct that if the pix_fmt was set to a YUVJ4xx variant, range is automatically set to _JPEG? Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] vf_colorspace: Interpret unspecified color range as limited range
> On Sep 15, 2016, at 2:45 PM, Ronald S. Bultjewrote: > > Hi Vittorio, > >> On Thu, Sep 15, 2016 at 8:33 AM, Vittorio Giovara >> wrote: >> I agree we should always be very very careful about automatic assignments, >> although this one seems pretty safe. >> >> I don't think it's necessary, but if you prefer I can add a warning whenever >> range is not specified (even though it might trigger a few false positives). > > Which false positive are you afraid of? By "false positive" I mean only the fact that it might needlessly print a warning, and the user might be confused by it. Vittorio ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] vf_colorspace: Interpret unspecified color range as limited range
Hi Vittorio, On Thu, Sep 15, 2016 at 8:33 AM, Vittorio Giovara < vittorio.giov...@gmail.com> wrote: > I agree we should always be very very careful about automatic assignments, > although this one seems pretty safe. > > I don't think it's necessary, but if you prefer I can add a warning > whenever range is not specified (even though it might trigger a few false > positives). Which false positive are you afraid of? Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] vf_colorspace: Interpret unspecified color range as limited range
> Hi, On Wed, Sep 14, 2016 at 5:09 PM, Vittorio Giovara < vittorio.giovara at > gmail.com> wrote: > This is the assumption that is made in pixel format > conversion do > throughout the code (in particular swscale and > vf_colormatrix). > > Signed-off-by: Vittorio Giovara gmail.com> > --- > libavfilter/vf_colorspace.c | 1 + > 1 file changed, 1 > insertion(+) > > diff --git a/libavfilter/vf_colorspace.c > b/libavfilter/vf_colorspace.c > index b9ecb5f..7e87cd8 100644 > --- > a/libavfilter/vf_colorspace.c > +++ b/libavfilter/vf_colorspace.c > @@ -522,6 > +522,7 @@ static int get_range_off(int *off, int *y_rng, int > *uv_rng, > > enum AVColorRange rng, int depth) > { > switch (rng) { > + case > AVCOL_RANGE_UNSPECIFIED: > case AVCOL_RANGE_MPEG: > *off = 16 << (depth > - 8); > *y_rng = 219 << (depth - 8); > -- > 2.9.3 I'm open to this, but let > me explain why I didn't follow the convention here: the convention is wrong, > or rather, the convention is outdated. Classically, for low-resolution video, > this is indeed true. But for modern video (bt2020 etc., probably even smpte*) > at larger resolutions, I feel the default should be pc/jpeg range, not > tv/mpeg range, because that's usually what it is. Hi Ronald, I am not sure about this point, unless I am missing something. I've checked on the bt2020 spec and the nominal range described in table 5 shows 64-960 for 10bit which would match the limited representation. Also bt2100 says that "full range" is "newly introduced" and should not be used unless "all parties agree", meaning range needs of be explicitly marked as full. > I was somewhat tempted to not make automatic decisions that could have a > fairly substantial negative effect on the end result (without informing the > end user about it!). Asking the user to explicitly specify the pixel range is > one way of informing. (You could also add a av_log(.., WARNING, ..) if the > rng is UNSPECIFIED.) But if others think this is the best solution, I'm OK > with it. Ronald I agree we should always be very very careful about automatic assignments, although this one seems pretty safe. I don't think it's necessary, but if you prefer I can add a warning whenever range is not specified (even though it might trigger a few false positives). Cheers, Vittorio ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: refine EXT-X-BYTERANGE support for segments
2016-09-14 6:51 GMT+08:00 Steven Liu: > > > 2016-09-14 2:53 GMT+08:00 Moritz Barsnick : > >> On Tue, Sep 13, 2016 at 11:25:39 +0800, Steven Liu wrote: >> > +int byterange_mode = hls->flags & (HLS_SINGLE_FILE) || >> hls->max_seg_size > 0; >> ^ ^ >> Why the bracket? >> >> > +av_log(oc, AV_LOG_ERROR, "Invalid segment filename >> template '%s' you can try use -use_localtime 1 with it\n", c->basename); >> Rather: >>av_log(oc, AV_LOG_ERROR, "Invalid segment filename >> template '%s', you can try to use -use_localtime 1 with it\n", c->basename); >> >> > +{"hls_segment_size", "set maximum size per segment file, (Byte)", >> OFFSET(max_seg_size),AV_OPT_TYPE_INT,{.i64 = 0}, 0, INT_MAX, E}, >>{"hls_segment_size", "set maximum size per segment file (in >> bytes)", OFFSET(max_seg_size),AV_OPT_TYPE_INT,{.i64 = 0}, 0, >> INT_MAX, E}, >> >> This isn't a flag, right? Perhaps you shouldn't be putting the option >> between the flags' lines (but probably still as the final option). >> > I shall update patch :-) > >> >> The value of 0 seems to have a special meaning. Is this documented >> > I cannot understand "The value of 0 seems to have a special meaning" , > it will not set value when unuse hls_segment_size, so give it value of 0. > is that a problem? > >> anywhere? In other words: You should also update doc/muxers.texi. (I >> can help with the grammar of the wording.) >> > patch will come soon :-D > >> >> patch update 0001-avformat-hlsenc-refine-EXT-X-BYTERANGE-support-for-s.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] vf_colorspace: Interpret unspecified color range as limited range
Hi, On Wed, Sep 14, 2016 at 5:09 PM, Vittorio Giovara < vittorio.giov...@gmail.com> wrote: > This is the assumption that is made in pixel format conversion do > throughout the code (in particular swscale and vf_colormatrix). > > Signed-off-by: Vittorio Giovara> --- > libavfilter/vf_colorspace.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c > index b9ecb5f..7e87cd8 100644 > --- a/libavfilter/vf_colorspace.c > +++ b/libavfilter/vf_colorspace.c > @@ -522,6 +522,7 @@ static int get_range_off(int *off, int *y_rng, int > *uv_rng, > enum AVColorRange rng, int depth) > { > switch (rng) { > +case AVCOL_RANGE_UNSPECIFIED: > case AVCOL_RANGE_MPEG: > *off = 16 << (depth - 8); > *y_rng = 219 << (depth - 8); > -- > 2.9.3 I'm open to this, but let me explain why I didn't follow the convention here: the convention is wrong, or rather, the convention is outdated. Classically, for low-resolution video, this is indeed true. But for modern video (bt2020 etc., probably even smpte*) at larger resolutions, I feel the default should be pc/jpeg range, not tv/mpeg range, because that's usually what it is. I was somewhat tempted to not make automatic decisions that could have a fairly substantial negative effect on the end result (without informing the end user about it!). Asking the user to explicitly specify the pixel range is one way of informing. (You could also add a av_log(.., WARNING, ..) if the rng is UNSPECIFIED.) But if others think this is the best solution, I'm OK with it. Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/af_amerge: add reorder_inputs option to be able to turn off reordering
2016-09-10 11:58 GMT+02:00 Nicolas George: > In other words, I strongly support an option to override the > channel layout detected from inputs, including to set it to > unknown whenever it makes sense. > > I do not know if "-channel_layout" is the right option for the job. Why not? Afair, I had tested it extensively before it was broken. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]lavf/riff: Do not use a rogue twocc for adpcm_swf
Hi! 2016-09-14 22:50 GMT+02:00 Ronald S. Bultje: > > On Wed, Sep 14, 2016 at 1:46 PM, Carl Eugen Hoyos wrote: > >> 2016-09-14 19:21 GMT+02:00 Ronald S. Bultje : >> >> I wondered if somebody can easily fix muxing / demuxing which >> >> could be considered a nicer solution. >> > >> > You mean remuxing (with -c:a copy) of swf files? >> >> There (also) is an encoder... > > I have literally no idea what you're trying to tell me. Current FFmpeg supports decoding and encoding adpcm_swf. It also supports demuxing and muxing adpcm_swf from and to swf. If muxing / demuxing adpcm_swf to and from wav could be (easily) fixed, this may be a better patch than the one I provided. (As in: More useful) Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 0/4] ffplay and lavd SDL2 set
On 15/09/2016 11:11, Thomas Volkert wrote: [...] Yes, it is quite a bit of unnecessary overhead, but it's much cleaner than #ifdeffery in a single source file. In general, I don't like the idea of having 2 source files with almost the same content. This usually indicates to me that the code structure could be improved. But ...you said you take over the maintenance which is needed. So, I am fine with this step as long as the old file gets dropped soon (in terms of months instead of years). (And I also don't like a flood of #ifdefs. ;) ) Yes, ffplay_sdl1.c will get dropped as soon as support for Debian old-stable is dropped. Also, to change ffplay.c for most fixes as you'd have to reflect the change on either side of the #ifdefs, so you don't gain anything from not splitting the sources. I agree for SDL related patches. This apparently has to be done for SDL1 as well as SDL2. However, for other patches you have to do copy+paste to get them in both ffplay source files. But see above .. I am fine if you compensate this. That's fine then -- Josh ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2 2/4] ffplay: make copy for SDL1
2016-09-15 12:19 GMT+02:00 Josh de Kock: > On 15/09/2016 10:58, Carl Eugen Hoyos wrote: >> >> 2016-09-15 10:39 GMT+02:00 Josh de Kock : >>> #include "config.h" >>> + >>> +#if HAVE_SDL2 >> >> >> Sorry if this should be obvious: >> What is the effect of this #if? >> > Don't worry, it's not really that obvious. If HAVE_SDL2 is false but > HAVE_SDL is true, then ffplay.c will get macro'd out, and ffplay_sdl1.c will > get added to the ffplay sources (see the Makefile change). If you can think > of a better way to do it, feel free to suggest. Thank you for explaining! Am I correct that with this patch only, sdl2 compilation of ffplay fails? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] added expr evaluation to drawtext - fontsize
On Fri, Sep 09, 2016 at 05:26:03PM -0700, Brett Harrison wrote: > Here are the changes requested [...] > +static av_cold int parse_fontsize(AVFilterContext *ctx) > +{ > +DrawTextContext *s = ctx->priv; > +int err; > + > +if (s->fontsize_expr == NULL) > +return AVERROR(EINVAL); > + > +av_expr_free(s->fontsize_pexpr); > +s->fontsize_pexpr = NULL; > + > +if ((err = av_expr_parse(>fontsize_pexpr, s->fontsize_expr, var_names, > + NULL, NULL, fun2_names, fun2, 0, ctx)) < 0) > +return err; > + > +return 0; > +} why is av_expr_parse() not executed where the other av_expr_parse() are ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- 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 v2 2/4] ffplay: make copy for SDL1
On 15/09/2016 10:58, Carl Eugen Hoyos wrote: 2016-09-15 10:39 GMT+02:00 Josh de Kock: Signed-off-by: Josh de Kock --- Makefile | 1 + ffplay.c | 5 + ffplay.c => ffplay_sdl1.c | 0 3 files changed, 6 insertions(+) copy ffplay.c => ffplay_sdl1.c (100%) diff --git a/ffplay.c b/ffplay.c index adbe9cb..67a17e0 100644 --- a/ffplay.c +++ b/ffplay.c @@ -24,6 +24,9 @@ */ #include "config.h" + +#if HAVE_SDL2 Sorry if this should be obvious: What is the effect of this #if? Don't worry, it's not really that obvious. If HAVE_SDL2 is false but HAVE_SDL is true, then ffplay.c will get macro'd out, and ffplay_sdl1.c will get added to the ffplay sources (see the Makefile change). If you can think of a better way to do it, feel free to suggest. -- Josh ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 0/4] ffplay and lavd SDL2 set
On 15.09.2016 08:55, Josh de Kock wrote: On 14/09/2016 23:44, Thomas Volkert wrote: On 15.09.2016 00:27, Josh de Kock wrote: Hi, Resending this set with ffplay now having two versions, a SDL2 and a SDL1 version. I've integrated all comments up until now (hopefully). Josh Josh de Kock (3): lavd: Add SDL2 output device ffplay: make copy for SDL1 MAINTAINERS: update my entries Marton Balint (1): ffplay: add SDL2 support MAINTAINERS | 4 +- Makefile | 1 + configure | 35 ++- ffplay.c | 599 +++--- ffplay.c => ffplay_sdl1.c | 1 - Maintaining two versions of ffplay sounds as too much overhead to me. Is it not possible to add some more code abstraction or even some simple #ifdef constructs to support SDL1 as well as SDL2 in only one ffplay version in parallel? So, the actually used SDL version could be selected during the configure step. After some months, the (hopefully) deprecated SDL1 code could be dropped... Yes, it is quite a bit of unnecessary overhead, but it's much cleaner than #ifdeffery in a single source file. In general, I don't like the idea of having 2 source files with almost the same content. This usually indicates to me that the code structure could be improved. But ...you said you take over the maintenance which is needed. So, I am fine with this step as long as the old file gets dropped soon (in terms of months instead of years). (And I also don't like a flood of #ifdefs. ;) ) Also, to change ffplay.c for most fixes as you'd have to reflect the change on either side of the #ifdefs, so you don't gain anything from not splitting the sources. I agree for SDL related patches. This apparently has to be done for SDL1 as well as SDL2. However, for other patches you have to do copy+paste to get them in both ffplay source files. But see above .. I am fine if you compensate this. Best regards, Thomas. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Fix target_level for EAC3.
On Fri, Sep 09, 2016 at 12:48:52PM -0700, Nikolas Bowe wrote: > Currently when using target_level with EAC3 it produces silence. This small > patch fixes target_level for decoding EAC3. > > Example: > ffmpeg -y -i /tmp/test.wav -acodec eac3 -dialnorm -14 -ac 6 -b:a 384000 > /tmp/test.m2ts > ffmpeg -y -target_level -24 -i /tmp/test.m2ts -acodec pcm_s16le -f matroska > /tmp/out.mkv > ffplay /tmp/out.mkv > --- > libavcodec/ac3.h | 2 +- > libavcodec/ac3dec.c | 9 ++--- > libavcodec/ac3dec.h | 4 > libavcodec/eac3dec.c | 14 +++--- > 4 files changed, 22 insertions(+), 7 deletions(-) applied can you add a fate test for this ? also if you can reduce the number of #if, that would be welcome too Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The worst form of inequality is to try to make unequal things equal. -- Aristotle signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2 2/4] ffplay: make copy for SDL1
2016-09-15 10:39 GMT+02:00 Josh de Kock: > Signed-off-by: Josh de Kock > --- > Makefile | 1 + > ffplay.c | 5 + > ffplay.c => ffplay_sdl1.c | 0 > 3 files changed, 6 insertions(+) > copy ffplay.c => ffplay_sdl1.c (100%) > diff --git a/ffplay.c b/ffplay.c > index adbe9cb..67a17e0 100644 > --- a/ffplay.c > +++ b/ffplay.c > @@ -24,6 +24,9 @@ > */ > > #include "config.h" > + > +#if HAVE_SDL2 Sorry if this should be obvious: What is the effect of this #if? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/4] MAINTAINERS: update my entries
On Wed, Sep 14, 2016 at 11:27:33PM +0100, Josh de Kock wrote: > Signed-off-by: Josh de Kock> --- > MAINTAINERS | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Acked-by: Michael [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Old school: Use the lowest level language in which you can solve the problem conveniently. New school: Use the highest level language in which the latest supercomputer can solve the problem without the user falling asleep waiting. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v2 1/4] lavd: Add SDL2 output device
Acked-by: Michael Niedermayer Signed-off-by: Josh de Kock--- Changelog| 1 + configure| 28 +++- libavdevice/Makefile | 1 + libavdevice/alldevices.c | 1 + libavdevice/sdl2.c | 377 +++ 5 files changed, 407 insertions(+), 1 deletion(-) create mode 100644 libavdevice/sdl2.c diff --git a/Changelog b/Changelog index c5cdada..ea08c9d 100644 --- a/Changelog +++ b/Changelog @@ -28,6 +28,7 @@ version : - gblur filter - avgblur filter - sobel and prewitt filter +- sdl2 output device version 3.1: diff --git a/configure b/configure index b11ca7f..9a0b92c 100755 --- a/configure +++ b/configure @@ -292,6 +292,7 @@ External library support: --disable-schannel disable SChannel SSP, needed for TLS support on Windows if openssl and gnutls are not used [autodetect] --disable-sdldisable sdl [autodetect] + --disable-sdl2 disable sdl2 [autodetect] --disable-securetransport disable Secure Transport, needed for TLS support on OSX if openssl and gnutls are not used [autodetect] --enable-x11grab enable X11 grabbing (legacy) [no] @@ -1548,6 +1549,7 @@ EXTERNAL_LIBRARY_LIST=" openssl schannel sdl +sdl2 securetransport videotoolbox x11grab @@ -2022,6 +2024,7 @@ HAVE_LIST=" perl pod2man sdl +sdl2 section_data_rel_ro texi2html threads @@ -2945,6 +2948,7 @@ pulse_outdev_deps="libpulse" qtkit_indev_extralibs="-framework QTKit -framework Foundation -framework QuartzCore" qtkit_indev_select="qtkit" sdl_outdev_deps="sdl" +sdl2_outdev_deps="sdl2" sndio_indev_deps="sndio_h" sndio_outdev_deps="sndio_h" v4l_indev_deps="linux_videodev_h" @@ -5850,7 +5854,28 @@ if enabled gcrypt; then fi fi -if ! disabled sdl; then +if ! disabled sdl2 && ! enabled sdl; then +SDL2_CONFIG="${cross_prefix}sdl2-config" +if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 +else + if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then +sdl2_cflags=$("${SDL2_CONFIG}" --cflags) +sdl2_libs=$("${SDL2_CONFIG}" --libs) +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && +check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags && +enable sdl2 + fi +fi +if test $target_os = "mingw32"; then +sdl2_libs="$sdl2_libs -mconsole" +fi +fi +enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs + +if ! disabled sdl && ! enabled sdl2; then SDL_CONFIG="${cross_prefix}sdl-config" if check_pkg_config sdl SDL_events.h SDL_PollEvent; then check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && @@ -6480,6 +6505,7 @@ echo "network support ${network-no}" echo "threading support ${thread_type-no}" echo "safe bitstream reader ${safe_bitstream_reader-no}" echo "SDL support ${sdl-no}" +echo "SDL2 support ${sdl2-no}" echo "opencl enabled${opencl-no}" echo "JNI support ${jni-no}" echo "texi2html enabled ${texi2html-no}" diff --git a/libavdevice/Makefile b/libavdevice/Makefile index 585827b..1c4b4d3 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -41,6 +41,7 @@ OBJS-$(CONFIG_PULSE_OUTDEV) += pulse_audio_enc.o \ pulse_audio_common.o OBJS-$(CONFIG_QTKIT_INDEV) += qtkit.o OBJS-$(CONFIG_SDL_OUTDEV)+= sdl.o +OBJS-$(CONFIG_SDL2_OUTDEV) += sdl2.o OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o OBJS-$(CONFIG_V4L2_INDEV)+= v4l2.o v4l2-common.o timefilter.o diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index 26aecf2..c0a9d9a 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -64,6 +64,7 @@ void avdevice_register_all(void) REGISTER_INOUTDEV(PULSE,pulse); REGISTER_INDEV (QTKIT,qtkit); REGISTER_OUTDEV (SDL, sdl); +REGISTER_OUTDEV (SDL2, sdl2); REGISTER_INOUTDEV(SNDIO,sndio); REGISTER_INOUTDEV(V4L2, v4l2); //REGISTER_INDEV (V4L, v4l diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c new file mode 100644 index 000..bce3c00 --- /dev/null +++
[FFmpeg-devel] [PATCH v2 2/4] ffplay: make copy for SDL1
Signed-off-by: Josh de Kock--- Makefile | 1 + ffplay.c | 5 + ffplay.c => ffplay_sdl1.c | 0 3 files changed, 6 insertions(+) copy ffplay.c => ffplay_sdl1.c (100%) diff --git a/Makefile b/Makefile index 8aa72fd..15ba3df 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF)) $(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog) += cmdutils.o)) $(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog)-$(CONFIG_OPENCL) += cmdutils_opencl.o)) +OBJS-ffplay-$(HAVE_SDL) += ffplay_sdl1.o OBJS-ffmpeg += ffmpeg_opt.o ffmpeg_filter.o OBJS-ffmpeg-$(CONFIG_VIDEOTOOLBOX) += ffmpeg_videotoolbox.o OBJS-ffmpeg-$(CONFIG_LIBMFX) += ffmpeg_qsv.o diff --git a/ffplay.c b/ffplay.c index adbe9cb..67a17e0 100644 --- a/ffplay.c +++ b/ffplay.c @@ -24,6 +24,9 @@ */ #include "config.h" + +#if HAVE_SDL2 + #include #include #include @@ -3863,3 +3866,5 @@ int main(int argc, char **argv) return 0; } + +#endif diff --git a/ffplay.c b/ffplay_sdl1.c similarity index 100% copy from ffplay.c copy to ffplay_sdl1.c -- 2.7.4 (Apple Git-66) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v2 3/4] ffplay: add SDL2 support
From: Marton BalintTested-by: James Almer (Windows, mingw-w64) Signed-off-by: Josh de Kock --- Changelog | 1 + configure | 7 +- ffplay.c | 594 ++ 3 files changed, 251 insertions(+), 351 deletions(-) diff --git a/Changelog b/Changelog index ea08c9d..b909468 100644 --- a/Changelog +++ b/Changelog @@ -29,6 +29,7 @@ version : - avgblur filter - sobel and prewitt filter - sdl2 output device +- sdl2 support for ffplay version 3.1: diff --git a/configure b/configure index 9a0b92c..e40f45f 100755 --- a/configure +++ b/configure @@ -3138,8 +3138,9 @@ ffmpeg_deps="avcodec avfilter avformat swresample" ffmpeg_select="aformat_filter anull_filter atrim_filter format_filter null_filter setpts_filter trim_filter" -ffplay_deps="avcodec avformat swscale swresample sdl" -ffplay_libs='$sdl_libs' +ffplay_deps="avcodec avformat swscale swresample" +ffplay_deps_any="sdl sdl2" +ffplay_libs='$sdl_libs $sdl2_libs' ffplay_select="rdft crop_filter transpose_filter hflip_filter vflip_filter rotate_filter" ffprobe_deps="avcodec avformat" ffserver_deps="avformat fork sarestart" @@ -6665,7 +,7 @@ HOSTLD_O=$HOSTLD_O TARGET_EXEC=$target_exec $target_exec_args TARGET_PATH=$target_path TARGET_SAMPLES=${target_samples:-\$(SAMPLES)} -CFLAGS-ffplay=$sdl_cflags +CFLAGS-ffplay=${sdl_cflags:-\$(sdl2_cflags)} ZLIB=$($ldflags_filter -lz) LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD EXTRALIBS=$extralibs diff --git a/ffplay.c b/ffplay.c index 67a17e0..f923a24 100644 --- a/ffplay.c +++ b/ffplay.c @@ -108,6 +108,8 @@ const int program_birth_year = 2003; #define CURSOR_HIDE_DELAY 100 +#define USE_ONEPASS_SUBTITLE_RENDER 1 + static unsigned sws_flags = SWS_BICUBIC; typedef struct MyAVPacketList { @@ -155,17 +157,17 @@ typedef struct Clock { typedef struct Frame { AVFrame *frame; AVSubtitle sub; -AVSubtitleRect **subrects; /* rescaled subtitle rectangles in yuva */ int serial; double pts; /* presentation timestamp for the frame */ double duration; /* estimated duration of the frame */ int64_t pos; /* byte position of the frame in the input file */ -SDL_Overlay *bmp; +SDL_Texture *bmp; int allocated; -int reallocate; int width; int height; +int format; AVRational sar; +int uploaded; } Frame; typedef struct FrameQueue { @@ -275,6 +277,8 @@ typedef struct VideoState { FFTSample *rdft_data; int xpos; double last_vis_time; +SDL_Texture *vis_texture; +SDL_Texture *sub_texture; int subtitle_stream; AVStream *subtitle_st; @@ -287,11 +291,8 @@ typedef struct VideoState { AVStream *video_st; PacketQueue videoq; double max_frame_duration; // maximum duration of a frame - above this, we consider the jump a timestamp discontinuity -#if !CONFIG_AVFILTER struct SwsContext *img_convert_ctx; -#endif struct SwsContext *sub_convert_ctx; -SDL_Rect last_display_rect; int eof; char *filename; @@ -316,8 +317,6 @@ typedef struct VideoState { static AVInputFormat *file_iformat; static const char *input_filename; static const char *window_title; -static int fs_screen_width; -static int fs_screen_height; static int default_width = 640; static int default_height = 480; static int screen_width = 0; @@ -365,7 +364,8 @@ static AVPacket flush_pkt; #define FF_ALLOC_EVENT (SDL_USEREVENT) #define FF_QUIT_EVENT(SDL_USEREVENT + 2) -static SDL_Surface *screen; +static SDL_Window *window; +static SDL_Renderer *renderer; #if CONFIG_AVFILTER static int opt_add_vfilter(void *optctx, const char *opt, const char *arg) @@ -653,12 +653,6 @@ static void decoder_destroy(Decoder *d) { static void frame_queue_unref_item(Frame *vp) { -int i; -for (i = 0; i < vp->sub.num_rects; i++) { -av_freep(>subrects[i]->data[0]); -av_freep(>subrects[i]); -} -av_freep(>subrects); av_frame_unref(vp->frame); avsubtitle_free(>sub); } @@ -801,113 +795,47 @@ static void decoder_abort(Decoder *d, FrameQueue *fq) packet_queue_flush(d->queue); } -static inline void fill_rectangle(SDL_Surface *screen, - int x, int y, int w, int h, int color, int update) +static inline void fill_rectangle(int x, int y, int w, int h) { SDL_Rect rect; rect.x = x; rect.y = y; rect.w = w; rect.h = h; -SDL_FillRect(screen, , color); -if (update && w > 0 && h > 0) -SDL_UpdateRect(screen, x, y, w, h); -} - -/* draw only the border of a rectangle */ -static void fill_border(int xleft, int ytop, int width, int height, int x, int y, int w, int h, int color, int update) -{ -int w1, w2, h1, h2; - -/* fill the background */ -w1 = x; -if (w1 < 0) -w1 = 0; -w2 = width - (x + w); -if (w2 < 0) -
Re: [FFmpeg-devel] [PATCH 0/4] ffplay and lavd SDL2 set
On 14/09/2016 23:44, Thomas Volkert wrote: On 15.09.2016 00:27, Josh de Kock wrote: Hi, Resending this set with ffplay now having two versions, a SDL2 and a SDL1 version. I've integrated all comments up until now (hopefully). Josh Josh de Kock (3): lavd: Add SDL2 output device ffplay: make copy for SDL1 MAINTAINERS: update my entries Marton Balint (1): ffplay: add SDL2 support MAINTAINERS | 4 +- Makefile | 1 + configure | 35 ++- ffplay.c | 599 +++--- ffplay.c => ffplay_sdl1.c | 1 - Maintaining two versions of ffplay sounds as too much overhead to me. Is it not possible to add some more code abstraction or even some simple #ifdef constructs to support SDL1 as well as SDL2 in only one ffplay version in parallel? So, the actually used SDL version could be selected during the configure step. After some months, the (hopefully) deprecated SDL1 code could be dropped... Yes, it is quite a bit of unnecessary overhead, but it's much cleaner than #ifdeffery in a single source file. Also, to change ffplay.c for most fixes as you'd have to reflect the change on either side of the #ifdefs, so you don't gain anything from not splitting the sources. -- Josh ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel