Re: [FFmpeg-devel] is there a trick to building ffmpeg with sdl2 2.0.14 ? (2.0.12 works)

2021-01-31 Thread Reino Wijnsma
On 2021-01-31T16:45:08+0100, Timo Rothenpieler  wrote:
> Not sure what to make of that attachment to your mail. Is that supposed to be 
> a log?
hydra, please have a look at http://support.microsoft.com/kb/278061/en.

-- 
Reino

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] avfilter: add afwtdn filter

2020-05-31 Thread Reino Wijnsma
On 2020-05-31T22:37:20+0200, Paul B Mahol  wrote:
> On 5/31/20, Nicolas George  wrote:
>> Paul B Mahol (12020-05-31):
>>> Signed-off-by: Paul B Mahol 
>>> ---
>>>  libavfilter/Makefile |   1 +
>>>  libavfilter/af_afwtdn.c  | 619 +++
>>>  libavfilter/allfilters.c |   1 +
>>>  3 files changed, 621 insertions(+)
>>>  create mode 100644 libavfilter/af_afwtdn.c
>> No doc, name completely impossible to understand. Unacceptable.
> Go away!

Can you please act as a grown-up for once?!
Nicolas is right. How would anyone be able to understand what your patch does. 
No name, no discription, no documentation. Nothing!
I would immediately reject this patch if this would be my project.

Whatever issue you have with Nicolas, I suggest you two have a serious 
conversation about this, preferably face-to-face if possible, and talk this 
out! I've been around here long enough to see that it's polluting this 
mailinglist.

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/midivid: Check dimensions to be the multiple assumed by the implementation

2020-02-12 Thread Reino Wijnsma
On 2020-02-12T23:17:09+0100, Paul B Mahol  wrote:
> This is incorrect.
>
> On 2/12/20, Michael Niedermayer  wrote:
>> Fixes: out of array access
>> Fixes:
>> 20626/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVDV_fuzzer-6279905350516736
>>
>> Found-by: continuous fuzzing process
>> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
>> Signed-off-by: Michael Niedermayer 
>> [...]

Wow! What a wonderful nicely bottom-posted expressed opinion 
! That 
certainly must have been very helpful for Michael.

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/2] avfilter: add thistogram video filter

2019-12-27 Thread Reino Wijnsma
On 2019-12-27T16:48:22+0100, Paul B Mahol  wrote:
> On 12/27/19, James Almer  wrote:
>> On 12/27/2019 12:29 PM, Paul B Mahol wrote:
>>> On 12/27/19, Nicolas George  wrote:
 Paul B Mahol (12019-12-27):
> I disagree.
>
> And yet in the meantime somebody found a bug. This is a big patch, and
> we have a policy.
>
>>> I will not follow such policy.
>> Paul, you got a positive review. All you have to do is wait a day or so
>> before pushing. Why are you blowing this so hard?
> I'm not going to wait a day or so, I gonna push this immediately.
Why are you always such a deliberate troubleseeker?!
Every single developer here treats the other with respect AND has respect for
the mailinglist rules here. It's as if you think they don't apply to you at all.
If I'm correct the official rule is to wait for at least 1 week before pushing
a patch, yet you want to push it after hardly 1 day!
Top-posting is not allowed on this list, yet of all the core developers here
you're the only one I see doing this very thing quite often. And somehow you're
getting away with it.
I really don't understand how the other developers keep up with you and your
childish behaviour.

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] avfilter: add anlms filter

2019-10-05 Thread Reino Wijnsma
On 2019-10-04T10:04:46+0200, Paul B Mahol  wrote:

> +Apply Normalized Least-Mean-Squares algorithm to first audio stream using 
> second audio stream.

Apply Normalized Least-Mean-Squares algorithm to [the] first audio stream using 
[the] second audio stream.

> +This is adaptive filter used to mimic a desired filter by finding the filter 
> coefficients that

This [-] adaptive filter [is] used to mimic a desired filter by finding the 
filter coefficients that

> +relate to producing the least mean square of the error signal (difference 
> between the desired,
> +2nd input audio stream and the actual signal, 1st input audio stream).

2nd input audio stream and the actual signal, [the] 1st input audio stream).

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Adding a flag to give user the option to have ffmpeg fail instead of warn when mismatches are found in rtmp url stream or application names.

2019-09-28 Thread Reino Wijnsma
On 2019-09-27T19:37:40+0200, William Martin  
wrote:
> On Wed, Sep 25, 2019 at 2:36 PM Reino Wijnsma  wrote:
>> On 2019-09-25T20:57:08+0200, William Martin 
>> wrote:
>>> +av_log(s, AV_LOG_ERROR, "App field don't match up: %s <-> %s. "
>> Although I'm not a native English speaker, since "field" isn't plural, I'm 
>> pretty confident "don't" should be "doesn't".
>>
>> -- Reino
>
> Hi Reino - good point. Though, that was an existing log message that I did
> not modify. Should the old typo be addressed in a separate patch, or should
> I update it here?
>
I believe that's good practise here, yes. However, I'm not a FFmpeg coder, so 
someone else would to correct me otherwise.

Please don't top-post on this mailinglist!

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] Adding a flag to give user the option to have ffmpeg fail instead of warn when mismatches are found in rtmp url stream or application names.

2019-09-25 Thread Reino Wijnsma
On 2019-09-25T20:57:08+0200, William Martin  
wrote:
> +av_log(s, AV_LOG_ERROR, "App field don't match up: %s <-> %s. "
Although I'm not a native English speaker, since "field" isn't plural, I'm 
pretty confident "don't" should be "doesn't".

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/7] lavf: add cue sheet demuxer

2019-08-23 Thread Reino Wijnsma
Hello ffmpeg-devel,

I've read through https://patchwork.ffmpeg.org/patch/4587/, 
https://ffmpeg.org/pipermail/ffmpeg-devel/2017-August/214360.html and all its 
replies. The discussion suddenly just stops, the path dropped and I can't seem 
to find the reason why. Can anyone tell me why this patch hasn't been applied? 
I was just wondering.

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] ffplay: properly detect all window size changes

2019-08-14 Thread Reino Wijnsma
On 2019-08-13T23:20:08+0200, Marton Balint  wrote:
> SDL_WINDOWEVENT_SIZE_CHANGED should be used instead of SDL_WINDOWEVENT_RESIZED
> because SDL_WINDOWEVENT_RESIZED is only emitted if the resize happened due to
> an external event.
>
> Fixes ticket #8072.
>
> Additional references:
> https://bugzilla.libsdl.org/show_bug.cgi?id=4760
> https://wiki.libsdl.org/SDL_WindowEventID
>
> Signed-off-by: Marton Balint 
> ---
>  fftools/ffplay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fftools/ffplay.c b/fftools/ffplay.c
> index 8fb8faeb06..fee0619f7c 100644
> --- a/fftools/ffplay.c
> +++ b/fftools/ffplay.c
> @@ -3436,7 +3436,7 @@ static void event_loop(VideoState *cur_stream)
>  break;
>  case SDL_WINDOWEVENT:
>  switch (event.window.event) {
> -case SDL_WINDOWEVENT_RESIZED:
> +case SDL_WINDOWEVENT_SIZE_CHANGED:
>  screen_width  = cur_stream->width  = event.window.data1;
>  screen_height = cur_stream->height = event.window.data2;
>  if (cur_stream->vis_texture) {

Applied patch and compiled ffplay locally. I can confirm this patch fixes 
ticket #8072.

-- Reino

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] GCC 8.2.0 compiler-warnings on ffmpeg-N-92765-g2744d6b

2018-12-22 Thread Reino Wijnsma
Hello ffmpeg-devel,

I can't code in C, so to still contribute to this project I'd like to report 
the warnings I got while compiling ffmpeg-N-92765-g2744d6b on Windows using 
Cygwin, MinGW 6.0.0 and GCC 8.2.0.

configure options:
> Configuring ffmpeg_git as ./configure --arch=x86 --target-os=mingw32 
> --cross-prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-
>  --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Reino 
> --enable-gray --enable-version3 --disable-debug --disable-doc 
> --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages 
> --disable-w32threads --enable-avisynth --enable-frei0r --enable-filter=frei0r 
> --enable-gmp --enable-gpl --enable-libaom --enable-libass --enable-libbluray 
> --enable-libbs2b --enable-libcaca --extra-cflags=-DCACA_STATIC 
> --enable-libfdk-aac --enable-libflite --enable-libfontconfig 
> --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm 
> --enable-libilbc --enable-libmp3lame --enable-libmysofa 
> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 
> --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libsnappy
> --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame 
> --extra-cflags=-DLIBTWOLAME_STATIC --enable-libvidstab 
> --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp 
> --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxml2 
> --enable-libxvid --enable-libzimg --enable-libzvbi --enable-mbedtls 
> --extra-cflags=-march=pentium3 --extra-cflags=-mtune=athlon-xp 
> --extra-cflags=-O2 --extra-cflags=-mfpmath=sse --extra-cflags=-msse 
> --enable-static --disable-shared 
> --prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32.

Warnings (other than [-Wdeprecated-declarations]):
> CClibavformat/aadec.o
> libavformat/aadec.c: In function 'aa_read_header':
> libavformat/aadec.c:115:13: warning: 'strncpy' output may be truncated 
> copying 63 bytes from a string of length 127 [-Wstringop-truncation]
>  strncpy(codec_name, val, sizeof(codec_name) - 1);
>  ^~~~
> CClibavformat/dashdec.o
> In function 'parse_manifest_representation',
> inlined from 'parse_manifest_adaptationset' at 
> libavformat/dashdec.c:1144:19,
> inlined from 'parse_manifest' at libavformat/dashdec.c:1331:17:
> libavformat/dashdec.c:1059:13: warning: 'strncpy' specified bound 20 equals 
> destination size [-Wstringop-truncation]
>  strncpy(rep->id, rep_id_val ? rep_id_val : "", sizeof(rep->id));
>  ^~~
> CClibavformat/hls.o
> In function 'new_rendition',
> inlined from 'parse_playlist' at libavformat/hls.c:787:13:
> libavformat/hls.c:515:13: warning: 'strncpy' output may be truncated copying 
> between 2 and 62 bytes from a string of length 63 [-Wstringop-truncation]
>  strncpy(rend->language + langlen + 1, info->assoc_language,
>  ^~~
>  sizeof(rend->language) - langlen - 2);
>  ~
> CClibavformat/hlsenc.o
> libavformat/hlsenc.c: In function 'get_default_pattern_localtime_fmt':
> libavformat/hlsenc.c:1678:63: warning: unknown conversion type character 's' 
> in format [-Wformat=]
>  return (HAVE_LIBC_MSVCRT || !strftime(b, sizeof(b), "%s", p) || 
> !strcmp(b, "%s")) ? "-%Y%m%d%H%M%S.m4s" : "-%s.m4s";
>^
> libavformat/hlsenc.c:1680:59: warning: unknown conversion type character 's' 
> in format [-Wformat=]
>  return (HAVE_LIBC_MSVCRT || !strftime(b, sizeof(b), "%s", p) || 
> !strcmp(b, "%s")) ? "-%Y%m%d%H%M%S.ts" : "-%s.ts";
>^
> CClibavformat/os_support.o
> libavformat/os_support.c: In function 'ff_poll':
> libavformat/os_support.c:248:23: warning: comparison of unsigned expression < 
> 0 is always false [-Wtype-limits]
>  if (fds[i].fd < 0)
>^
> CClibavformat/protocols.o
> libavformat/protocols.c: In function 'avio_enum_protocols':
> libavformat/protocols.c:98:7: warning: assignment discards 'const' qualifier 
> from pointer target type [-Wdiscarded-qualifiers]
>  p = p ? p + 1 : url_protocols;
>^
> X86ASMlibavcodec/x86/proresdsp.o
> STRIPlibavcodec/x86/proresdsp.o
> /cygdrive/m/ffmpeg-windows-build-helpers-master/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-strip:
>  error: the input file 'libavcodec/x86/proresdsp.o' has no sections
> make: [ffbuild/common.mak:83: libavcodec/x86/proresdsp.o] Error 1 (ignored)
> X86ASM

Re: [FFmpeg-devel] [PATCH 3/3] configure: speedup x2-x8

2018-08-26 Thread Reino Wijnsma
On 26-8-2018 22:27, Dave Yeo  wrote:
> On 08/25/18 11:11 AM, avih wrote:
>> After the previous speedups, configure spent 20-60% of its runtime
>> at check_deps(). It's particularly slow with bash. After some local
>> optimizations - mainly avoid pushvar/popvar and abort early in one
>> notable case (empty deps), it's now x4-x25 faster.
>
> Works great on OS/2, from 700 seconds to 144 seconds
> Dave

I've gone from 857s to 268s on my old WinXP pc. That's really impressive!

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v3] doc/filters: Add double-pass example for loudnorm

2018-08-23 Thread Reino Wijnsma
On 22-8-2018 12:52, Gyan Doshi  wrote:
> On 22-08-2018 04:01 PM, Marvin Scholz wrote:
>> [Parsed_aresample_1 @ 0x7fb7c540d500] Cannot select channel layout for the 
>> link between filters Parsed_aresample_1 and format_out_0_1.
> For this file,
>
> aresample=48000:ocl=stereo
>
>
> Gyan
Related and still unresolved: https://trac.ffmpeg.org/ticket/6638.

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] libavformat: add mbedTLS based TLS

2018-05-27 Thread Reino Wijnsma
On 27-5-2018 21:23, James Almer  wrote:
> Pushed the check_lib() change only, after confirming it's needed for static 
> builds of mbedtls. 
Thank you, James.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] libavformat: add mbedTLS based TLS

2018-05-26 Thread Reino Wijnsma
On 23-5-2018 2:11, Reino Wijnsma <rwijn...@xs4all.nl> wrote:
> On 22-4-2018 14:47, Thomas Volkert <si...@gmx.net> wrote:
>> +enabled mbedtls   && { check_pkg_config mbedtls mbedtls 
>> mbedtls/x509_crt.h mbedtls_x509_crt_init ||
>> +   check_pkg_config mbedtls mbedtls 
>> mbedtls/ssl.h mbedtls_ssl_init ||
>> +   check_lib mbedtls mbedtls/ssl.h 
>> mbedtls_ssl_init -lmbedtls ||
>> +   die "ERROR: mbedTLS not found"; }
> Now that James Almer has pushed this patch I decided to have a look as well. 
> I wanted to see if mbedtls would work for me too.
> I haven't made a FFmpeg build yet to test, because the excerpt above (in 
> 'configure') doesn't look right and configuring FFmpeg returns lots of 
> undefined references.
>
> First of all, there's no pkg-config file at all. Almost 3 years ago someone 
> requested it (https://github.com/ARMmbed/mbedtls/issues/228), but as far as I 
> can see it hasn't been implemented yet. So, I really don't understand why you 
> added the 2 check_pkg_config lines.
> Secondly, the check_lib line also needs -lmbedx509 and -lmbedcrypto!
>
> -lmbedtls, the most important one obviously, prevents a "undefined reference 
> to `mbedtls_ssl_init'", but...
> -lmbedx509 is also needed, because otherwise you'd get "undefined reference 
> to `mbedtls_x509_crt_init'" and several "undefined reference to 
> `mbedtls_x509_crt_[...]'".
> -lmbedcrypto is also needed, because otherwise you'd get LOTS of "undefined 
> reference to `mbedtls_[...]'"; from "undefined reference to 
> `mbedtls_sha256_init'" to "undefined reference to `mbedtls_pem_init'"!
>
> The following patch works for me:
>
> diff --git a/configure b/configure
> index 09ff0c5..6014e03 100755
> --- a/configure
> +++ b/configure
> @@ -6111,9 +6111,7 @@ enabled libzvbi   && require_pkg_config libzvbi 
> zvbi-0.2 libzvbi.h vbi_d
>   { test_cpp_condition libzvbi.h 
> "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && 
> VBI_VERSION_MICRO >= 28" ||
> enabled gpl || die "ERROR: libzvbi requires 
> version 0.2.28 or --enable-gpl."; }
>  enabled libxml2   && require_pkg_config libxml2 libxml-2.0 
> libxml2/libxml/xmlversion.h xmlCheckVersion
> -enabled mbedtls   && { check_pkg_config mbedtls mbedtls 
> mbedtls/x509_crt.h mbedtls_x509_crt_init ||
> -   check_pkg_config mbedtls mbedtls 
> mbedtls/ssl.h mbedtls_ssl_init ||
> -   check_lib mbedtls mbedtls/ssl.h 
> mbedtls_ssl_init -lmbedtls ||
> +enabled mbedtls   && { check_lib mbedtls mbedtls/ssl.h 
> mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||
> die "ERROR: mbedTLS not found"; }
>  enabled mediacodec&& { enabled jni || die "ERROR: mediacodec 
> requires --enable-jni"; }
>  enabled mmal  && { check_lib mmal interface/mmal/mmal.h 
> mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
>
> Also note that the order is important, because with -lmbedtls -lmbedcrypto 
> -lmbedx509 you'd get: "undefined reference to `mbedtls_pk_parse_subpubkey'" 
> and "undefined reference to `mbedtls_pk_load_file'".
>
> (If it matters, I'm cross-compiling on Windows using Cygwin, MinGW and GCC).
>
> -- Reino
*Ping* at Thomas Volkert, or anyone else responsible for this.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] libavformat: add mbedTLS based TLS

2018-05-22 Thread Reino Wijnsma
On 22-4-2018 14:47, Thomas Volkert  wrote:
> +enabled mbedtls   && { check_pkg_config mbedtls mbedtls 
> mbedtls/x509_crt.h mbedtls_x509_crt_init ||
> +   check_pkg_config mbedtls mbedtls 
> mbedtls/ssl.h mbedtls_ssl_init ||
> +   check_lib mbedtls mbedtls/ssl.h 
> mbedtls_ssl_init -lmbedtls ||
> +   die "ERROR: mbedTLS not found"; }
Now that James Almer has pushed this patch I decided to have a look as well. I 
wanted to see if mbedtls would work for me too.
I haven't made a FFmpeg build yet to test, because the excerpt above (in 
'configure') doesn't look right and configuring FFmpeg returns lots of 
undefined references.

First of all, there's no pkg-config file at all. Almost 3 years ago someone 
requested it (https://github.com/ARMmbed/mbedtls/issues/228), but as far as I 
can see it hasn't been implemented yet. So, I really don't understand why you 
added the 2 check_pkg_config lines.
Secondly, the check_lib line also needs -lmbedx509 and -lmbedcrypto!

-lmbedtls, the most important one obviously, prevents a "undefined reference to 
`mbedtls_ssl_init'", but...
-lmbedx509 is also needed, because otherwise you'd get "undefined reference to 
`mbedtls_x509_crt_init'" and several "undefined reference to 
`mbedtls_x509_crt_[...]'".
-lmbedcrypto is also needed, because otherwise you'd get LOTS of "undefined 
reference to `mbedtls_[...]'"; from "undefined reference to 
`mbedtls_sha256_init'" to "undefined reference to `mbedtls_pem_init'"!

The following patch works for me:

diff --git a/configure b/configure
index 09ff0c5..6014e03 100755
--- a/configure
+++ b/configure
@@ -6111,9 +6111,7 @@ enabled libzvbi   && require_pkg_config libzvbi 
zvbi-0.2 libzvbi.h vbi_d
  { test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR 
> 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 
28" ||
enabled gpl || die "ERROR: libzvbi requires 
version 0.2.28 or --enable-gpl."; }
 enabled libxml2   && require_pkg_config libxml2 libxml-2.0 
libxml2/libxml/xmlversion.h xmlCheckVersion
-enabled mbedtls   && { check_pkg_config mbedtls mbedtls 
mbedtls/x509_crt.h mbedtls_x509_crt_init ||
-   check_pkg_config mbedtls mbedtls mbedtls/ssl.h 
mbedtls_ssl_init ||
-   check_lib mbedtls mbedtls/ssl.h 
mbedtls_ssl_init -lmbedtls ||
+enabled mbedtls   && { check_lib mbedtls mbedtls/ssl.h 
mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||
die "ERROR: mbedTLS not found"; }
 enabled mediacodec&& { enabled jni || die "ERROR: mediacodec requires 
--enable-jni"; }
 enabled mmal  && { check_lib mmal interface/mmal/mmal.h 
mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||

Also note that the order is important, because with -lmbedtls -lmbedcrypto 
-lmbedx509 you'd get: "undefined reference to `mbedtls_pk_parse_subpubkey'" and 
"undefined reference to `mbedtls_pk_load_file'".

(If it matters, I'm cross-compiling on Windows using Cygwin, MinGW and GCC).

-- Reino

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/1] configure: add pkg-config check for libmysofa

2018-05-13 Thread Reino Wijnsma
On 13-5-2018 18:11, Paul B Mahol  wrote:
> Could you wait for new libmysofa release?
I'm not a FFmpeg coder/developer, so if you believe that's the best thing to 
do, then that's fine by me. The current non-pkg-config-file method works fine 
afterall.

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/1] configure: add pkg-config check for libmysofa

2018-05-13 Thread Reino Wijnsma
On 7-5-2018 17:59, Reino Wijnsma <rwijn...@xs4all.nl> wrote:
> From 8082ba451d089790f0719c4ec6788796b2079e9d Mon Sep 17 00:00:00 2001
> From: Reino17 <rwijn...@xs4all.nl>
> Date: Mon, 7 May 2018 17:28:10 +0200
> Subject: [PATCH] configure: add pkg-config check for libmysofa
>
> This does require libmysofa with today's latest commit 
> (https://github.com/hoene/libmysofa/commit/08f243d1ec35f6f794aedeb4b187d9f9353bdbc1).
> They already had a pkg-config file, but the dependencies weren't setup right. 
> Until now.
> ---
>  configure | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 7c14323..2d61731 100755
> --- a/configure
> +++ b/configure
> @@ -6007,7 +6007,8 @@ enabled libmfx&& { check_pkg_config libmfx 
> libmfx "mfx/mfxvideo.h" M
> { require libmfx "mfx/mfxvideo.h" MFXInit 
> "-llibmfx $advapi32_extralibs" && warn "using libmfx without pkg-config"; } }
>  enabled libmodplug&& require_pkg_config libmodplug libmodplug 
> libmodplug/modplug.h ModPlug_Load
>  enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h 
> lame_set_VBR_quality -lmp3lame $libm_extralibs
> -enabled libmysofa && require libmysofa "mysofa.h" mysofa_load 
> -lmysofa $zlib_extralibs
> +enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h 
> mysofa_load ||
> +   require libmysofa mysofa.h mysofa_load 
> -lmysofa $zlib_extralibs; }
>  enabled libnpp&& { check_lib libnpp npp.h nppGetLibVersion 
> -lnppig -lnppicc -lnppc ||
> check_lib libnpp npp.h nppGetLibVersion 
> -lnppi -lnppc ||
> die "ERROR: libnpp not found"; }
*ping*
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/1] configure: add pkg-config check for libmysofa

2018-05-07 Thread Reino Wijnsma
From 8082ba451d089790f0719c4ec6788796b2079e9d Mon Sep 17 00:00:00 2001
From: Reino17 
Date: Mon, 7 May 2018 17:28:10 +0200
Subject: [PATCH] configure: add pkg-config check for libmysofa

This does require libmysofa with today's latest commit 
(https://github.com/hoene/libmysofa/commit/08f243d1ec35f6f794aedeb4b187d9f9353bdbc1).
They already had a pkg-config file, but the dependencies weren't setup right. 
Until now.
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 7c14323..2d61731 100755
--- a/configure
+++ b/configure
@@ -6007,7 +6007,8 @@ enabled libmfx&& { check_pkg_config libmfx 
libmfx "mfx/mfxvideo.h" M
{ require libmfx "mfx/mfxvideo.h" MFXInit 
"-llibmfx $advapi32_extralibs" && warn "using libmfx without pkg-config"; } }
 enabled libmodplug&& require_pkg_config libmodplug libmodplug 
libmodplug/modplug.h ModPlug_Load
 enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h 
lame_set_VBR_quality -lmp3lame $libm_extralibs
-enabled libmysofa && require libmysofa "mysofa.h" mysofa_load -lmysofa 
$zlib_extralibs
+enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h 
mysofa_load ||
+   require libmysofa mysofa.h mysofa_load -lmysofa 
$zlib_extralibs; }
 enabled libnpp&& { check_lib libnpp npp.h nppGetLibVersion -lnppig 
-lnppicc -lnppc ||
check_lib libnpp npp.h nppGetLibVersion -lnppi 
-lnppc ||
die "ERROR: libnpp not found"; }
-- 
2.8.3


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]lavf/rtmpcrypt: Add a cast to silence a warning

2018-04-26 Thread Reino Wijnsma
On 22-4-2018 0:52, Reino Wijnsma <rwijn...@xs4all.nl> wrote:
> On 16-4-2018 0:19, Carl Eugen Hoyos <ceffm...@gmail.com> wrote:
>> rtmpe_write() exploits knowledge about av_rc4_crypt() internals and
>> passes the same
>> pointer as src and dst. I assume this is intentional for performance
>> reasons, the only
>> way to silence the resulting warning is a cast afaict.
>>
>> Please comment, Carl Eugen
> $ make libavformat/rtmpcrypt.o
> CC  libavformat/rtmpcrypt.o
>
> No more warning.
Hello Carl,

Are you going to push this patch as well?

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]configure: Assume MSVCRT when compiling with MingW

2018-04-21 Thread Reino Wijnsma
On 21-4-2018 22:43, Carl Eugen Hoyos  wrote:
> Attached patch is supposed to fix an old issue with debug messages and
> a currently reported compilation warning that I believe also indicates
> a possible abort() on Windows:
> libavformat/hlsenc.c:1676:63: warning: unknown conversion type
> character 's' in format
> Patch untested.
>
> Please review, Carl Eugen
I'm hardly an expert, but I'm not sure this is a good idea.
After configuring FFmpeg summarizes:
[...]
C library msvcrt
[...]
This has always been "mingw64" before. And next:

$ make libavformat/hlsenc.o
CC  libavformat/hlsenc.o
In file included from ./libavutil/common.h:491:0,
 from ./libavutil/avutil.h:296,
 from ./libavutil/avassert.h:31,
 from libavformat/hlsenc.c:36:
./libavutil/internal.h:250:10: fatal error: crtversion.h: No such file or 
directory
 #include 
  ^~
compilation terminated.
make: *** [ffbuild/common.mak:60: libavformat/hlsenc.o] Error 1

Also when I use the makefile it errors out right from the start:

CC  libavdevice/alldevices.o
In file included from ./libavutil/common.h:491:0,
 from ./libavutil/avutil.h:296,
 from ./libavutil/samplefmt.h:24,
 from ./libavcodec/avcodec.h:31,
 from ./libavformat/avformat.h:319,
 from ./libavformat/internal.h:27,
 from libavdevice/alldevices.c:23:
./libavutil/internal.h:250:10: fatal error: crtversion.h: No such file or 
directory
 #include 
  ^~
compilation terminated.
make: *** [ffbuild/common.mak:60: libavdevice/alldevices.o] Error 1

-- Reino

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]lavf/rtmpcrypt: Add a cast to silence a warning

2018-04-21 Thread Reino Wijnsma
On 16-4-2018 0:19, Carl Eugen Hoyos  wrote:
> rtmpe_write() exploits knowledge about av_rc4_crypt() internals and
> passes the same
> pointer as src and dst. I assume this is intentional for performance
> reasons, the only
> way to silence the resulting warning is a cast afaict.
>
> Please comment, Carl Eugen
$ make libavformat/rtmpcrypt.o
CC  libavformat/rtmpcrypt.o

No more warning.

-- Reino

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] lavf/os_support: Only compile inet_aton() if getaddrinfo() is needed

2018-04-21 Thread Reino Wijnsma
On 16-4-2018 1:33, Carl Eugen Hoyos  wrote:
> Attached patch is supposed to silence a user-reported warning when
> inet_aton() is missing but getaddrinfo() is supported.
> Untested.
>
> Please review, Carl Eugen
$ make libavformat/os_support.o
CC  libavformat/os_support.o
libavformat/os_support.c: In function 'ff_poll':
libavformat/os_support.c:248:23: warning: comparison of unsigned expression < 0 
is always false [-Wtype-limits]
 if (fds[i].fd < 0)
   ^

The warning this patch is for is gone now. Thanks.

-- Reino

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [RFC] [Vote] Drop Windows XP support

2017-12-14 Thread Reino Wijnsma
On 14-12-2017 20:51, Lou Logan  wrote:
> Also, I believe Zeranoe stopped providing XP builds in 2016 so it will
> be no issue downstream.
I still am . But 
hey, it's your call in the end.

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Reino Wijnsma
On 19-10-2017 0:22, James Almer  wrote:
> It think the following should be enough:
>> enabled libopenjpeg   && { use_pkg_config libopenjpeg "libopenjp2 >= 
>> 2.1.0" openjpeg.h opj_version ||
>>{ require_pkg_config libopenjpeg "libopenjp2 
>> >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; 
>> } }
> To make sure -DOPJ_STATIC is not used unless strictly necessary.

Works overhere. No errors.

A bit off-topic, but can you explain to me why you (FFmpeg developers)
/have/ added -DOPJ_STATIC to libopenjpeg in the past, but /haven't/
added -DCACA_STATIC, -DMODPLUG_STATIC and -DLIBTWOLAME_STATIC to
libcaca, libmodplug and libtwolame?

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Reino Wijnsma
On 18-10-2017 21:46, Michael Bradshaw 
wrote:
> From fb8334d0cecc889ebce3af968c56a3afbd2f6047 Mon Sep 17 00:00:00 2001
> From: Michael Bradshaw 
> Date: Wed, 18 Oct 2017 11:34:06 -0700
> Subject: [PATCH] lavc: drop support for OpenJPEG 1.3-2.0
>
> We now require 2.1+ with pkg-config.
>
> Signed-off-by: Michael Bradshaw 
> ---
>  Changelog   |   2 +
>  configure   |  16 +
>  libavcodec/libopenjpegdec.c | 103 ++---
>  libavcodec/libopenjpegenc.c | 156 
> +++-
>  4 files changed, 34 insertions(+), 243 deletions(-)
> [...]
> -enabled libopenjpeg   && { { check_lib libopenjpeg 
> openjpeg-2.3/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   check_lib libopenjpeg openjpeg-2.3/openjpeg.h 
> opj_version -lopenjp2 ||
> -   { check_lib libopenjpeg 
> openjpeg-2.2/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   check_lib libopenjpeg openjpeg-2.2/openjpeg.h 
> opj_version -lopenjp2 ||
> -   { check_lib libopenjpeg 
> openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
> opj_version -lopenjp2 ||
> -   { check_lib libopenjpeg 
> openjpeg-2.0/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   { check_lib libopenjpeg 
> openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   { check_lib libopenjpeg openjpeg.h 
> opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
> -   die "ERROR: libopenjpeg not found"; }
> +enabled libopenjpeg   && require_pkg_config libopenjpeg "libopenjp2 >= 
> 2.1.0" openjpeg.h opj_version
Is there a reason you left out -DOPJ_STATIC?
'openjpeg_git/src/lib/openjp2/libopenjp2.pc.cmake.in' doesn't put it in.
With this patch ./configure therefor fails over here with:
"test.o:test.c:(.text+0x1): undefined reference to `_imp__opj_version@0'".

enabled libopenjpeg   && require_pkg_config libopenjpeg "libopenjp2
>= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC

This line fixes that.

-- Reino
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/libopenmpt: Query duration and metadata after selecting subsong

2017-09-17 Thread Reino Wijnsma
On 17-9-2017 15:35, Jörn Heusipp  wrote:
> Duration depends on the selected subsong and thus must be queried after
> selecting the subsong. There is no compelling reason to query other
> metadata earlier either.
>
> Signed-off-by: Jörn Heusipp 
> ---
>  libavformat/libopenmpt.c | 17 +
>  1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c
> index a7e3859..af6eb1a 100644
> --- a/libavformat/libopenmpt.c
> +++ b/libavformat/libopenmpt.c
> @@ -93,14 +93,7 @@ static int read_header_openmpt(AVFormatContext *s)
>  if (!openmpt->module)
>  return AVERROR_INVALIDDATA;
>  
> -openmpt->channels   = av_get_channel_layout_nb_channels(openmpt->layout);
> -openmpt->duration   = 
> openmpt_module_get_duration_seconds(openmpt->module);
> -
> -add_meta(s, "artist",  openmpt_module_get_metadata(openmpt->module, 
> "artist"));
> -add_meta(s, "title",   openmpt_module_get_metadata(openmpt->module, 
> "title"));
> -add_meta(s, "encoder", openmpt_module_get_metadata(openmpt->module, 
> "tracker"));
> -add_meta(s, "comment", openmpt_module_get_metadata(openmpt->module, 
> "message"));
> -add_meta(s, "date",openmpt_module_get_metadata(openmpt->module, 
> "date"));
> +openmpt->channels = av_get_channel_layout_nb_channels(openmpt->layout);
>  
>  if (openmpt->subsong >= 
> openmpt_module_get_num_subsongs(openmpt->module)) {
>  openmpt_module_destroy(openmpt->module);
> @@ -120,6 +113,14 @@ static int read_header_openmpt(AVFormatContext *s)
>  }
>  }
>  
> +openmpt->duration = openmpt_module_get_duration_seconds(openmpt->module);
> +
> +add_meta(s, "artist",  openmpt_module_get_metadata(openmpt->module, 
> "artist"));
> +add_meta(s, "title",   openmpt_module_get_metadata(openmpt->module, 
> "title"));
> +add_meta(s, "encoder", openmpt_module_get_metadata(openmpt->module, 
> "tracker"));
> +add_meta(s, "comment", openmpt_module_get_metadata(openmpt->module, 
> "message"));
> +add_meta(s, "date",openmpt_module_get_metadata(openmpt->module, 
> "date"));
> +
>  st = avformat_new_stream(s, NULL);
>  if (!st) {
>  openmpt_module_destroy(openmpt->module);
I've tested your patch and I can confirm FFmpeg now correctly shows the
subsong duration.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] Demuxer libopenmpt doesn't show subsong duration

2017-09-10 Thread Reino Wijnsma
Hello,

Today I've compiled FFmpeg with libopenmpt (N-87255-gcbe181c) for the
first time and I must say I'm very pleased with it. Especially with the
subsong option.

ffmpeg -i "K_vision.umx"
Input #0, libopenmpt, from 'K_vision.umx':
  Metadata:
title   : Nightvision - Sandman/KFM
encoder : Impulse Tracker 2.14p2
[...]
  Duration: 00:02:53.98, bitrate: 31 kb/s
Stream #0:0: Audio: pcm_f32le, 48000 Hz, 2 channels, flt, 3072 kb/s

02:53.98 is the duration of the 1st subsong (of 3).

ffmpeg -subsong 1 -i "K_vision.umx"
Input #0, libopenmpt, from 'K_vision.umx':
  Metadata:
title   : Nightvision - Sandman/KFM
encoder : Impulse Tracker 2.14p2
[...]
track   : 2
  Duration: 00:02:53.98, bitrate: 31 kb/s
Stream #0:0: Audio: pcm_f32le, 48000 Hz, 2 channels, flt, 3072 kb/s

With -subsong 1 I expected to see Duration: 00:00:48.05, but it still
shows the 1st subsong's duration.
Is this a bug?

ffplay -subsong 1 -i "K_vision.umx" -autoexit
Input #0, libopenmpt, from 'K_vision.umx':
  Metadata:
title   : Nightvision - Sandman/KFM
encoder : Impulse Tracker 2.14p2
[...]
track   : 2
  Duration: 00:02:53.98, bitrate: 31 kb/s
Stream #0:0: Audio: pcm_f32le, 48000 Hz, 2 channels, flt, 3072 kb/s
  *48.05* M-A:  0.000 fd=   0 aq=0KB vq=0KB sq=0B f=0/0

FFplay does show me the actual duration if I let it play track 2 till
the end.

-- Reino

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] configure/libopenjpegdec.c/libopenjpegenc.c: Add support for LibOpenJPEG v2.2/git

2017-06-23 Thread Reino Wijnsma
On 22-6-2017 2:00, Michael Bradshaw 
wrote:
> Almost done! The OPJ_STATIC change that was introduced in OpenJPEG 2.1+
> means FFmepg's configure script has to do some extra work. You'll see that
> there are two check_lib calls for openjpeg-2.1. You'll need to mimic both
> of those for v2.2. That is, the configure script diff should be:
>
> ...
> +enabled libopenjpeg   && { { check_lib libopenjpeg
> openjpeg-2.2/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags
> -DOPJ_STATIC; } ||
> +   check_lib libopenjpeg
> openjpeg-2.2/openjpeg.h opj_version -lopenjp2 ||
> +   { check_lib libopenjpeg
> openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags
> -DOPJ_STATIC; } ||
> check_lib libopenjpeg
> openjpeg-2.1/openjpeg.h opj_version -lopenjp2 ||
> ...
Like this?
From ef0e462547f4894fe0c6f1e010b5d8be2169aeb2 Mon Sep 17 00:00:00 2001
From: Reino17 
Date: Fri, 23 Jun 2017 23:49:31 +0200
Subject: [PATCH] Add support for LibOpenJPEG v2.2/git

---
 configure   |  5 -
 libavcodec/libopenjpegdec.c |  8 +---
 libavcodec/libopenjpegenc.c | 10 ++
 3 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index 6da5e79..2817746 100755
--- a/configure
+++ b/configure
@@ -1868,6 +1868,7 @@ HEADERS_LIST="
 machine_ioctl_meteor_h
 malloc_h
 opencv2_core_core_c_h
+openjpeg_2_2_openjpeg_h
 openjpeg_2_1_openjpeg_h
 openjpeg_2_0_openjpeg_h
 openjpeg_1_5_openjpeg_h
@@ -5851,7 +5852,9 @@ enabled libopencv && { check_header 
opencv2/core/core_c.h &&
  require opencv opencv2/core/core_c.h 
cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
require_pkg_config opencv opencv/cxcore.h 
cvCreateImageHeader; }
 enabled libopenh264   && require_pkg_config openh264 wels/codec_api.h 
WelsGetCodecVersion
-enabled libopenjpeg   && { { check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+enabled libopenjpeg   && { { check_lib libopenjpeg openjpeg-2.2/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+   check_lib libopenjpeg openjpeg-2.2/openjpeg.h 
opj_version -lopenjp2 ||
+   { check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 ||
{ check_lib libopenjpeg openjpeg-2.0/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
{ check_lib libopenjpeg openjpeg-1.5/openjpeg.h 
opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index ce4e2b0..1210123 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -34,7 +34,9 @@
 #include "internal.h"
 #include "thread.h"
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
+#  include 
+#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
 #  include 
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  include 
@@ -44,7 +46,7 @@
 #  include 
 #endif
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || 
HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  define OPENJPEG_MAJOR_VERSION 2
 #  define OPJ(x) OPJ_##x
 #else
@@ -429,7 +431,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
 opj_stream_set_read_function(stream, stream_read);
 opj_stream_set_skip_function(stream, stream_skip);
 opj_stream_set_seek_function(stream, stream_seek);
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
 opj_stream_set_user_data(stream, , NULL);
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 opj_stream_set_user_data(stream, );
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index 4a12729..b67e533 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -32,7 +32,9 @@
 #include "avcodec.h"
 #include "internal.h"
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
+#  include 
+#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
 #  include 
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  include 
@@ -42,7 +44,7 @@
 #  include 
 #endif
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || 
HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  define OPENJPEG_MAJOR_VERSION 2
 #  define OPJ(x) OPJ_##x
 #else
@@ -305,7 +307,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext 
*avctx)
 
 opj_set_default_encoder_parameters(>enc_params);
 

Re: [FFmpeg-devel] configure/libopenjpegdec.c/libopenjpegenc.c: Add support for LibOpenJPEG v2.2/git

2017-06-21 Thread Reino Wijnsma
On 20-6-2017 19:44, Michael Bradshaw 
wrote:
> Please merge these two conditions, since both #if conditions are executing
> the same code. That is:
>
> #if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
> opj_stream_set_user_data(stream, , NULL);
> #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
> ...
New patch included. Thanks.
From c7d30df0bd08198dc7e7caf65d3606185788906d Mon Sep 17 00:00:00 2001
From: Reino17 
Date: Thu, 22 Jun 2017 00:31:42 +0200
Subject: [PATCH] Add support for LibOpenJPEG v2.2/git

---
 configure   |  4 +++-
 libavcodec/libopenjpegdec.c |  8 +---
 libavcodec/libopenjpegenc.c | 10 ++
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index dd96085..6e15e9f 100755
--- a/configure
+++ b/configure
@@ -1868,6 +1868,7 @@ HEADERS_LIST="
 machine_ioctl_meteor_h
 malloc_h
 opencv2_core_core_c_h
+openjpeg_2_2_openjpeg_h
 openjpeg_2_1_openjpeg_h
 openjpeg_2_0_openjpeg_h
 openjpeg_1_5_openjpeg_h
@@ -5851,7 +5852,8 @@ enabled libopencv && { check_header 
opencv2/core/core_c.h &&
  require opencv opencv2/core/core_c.h 
cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
require_pkg_config opencv opencv/cxcore.h 
cvCreateImageHeader; }
 enabled libopenh264   && require_pkg_config openh264 wels/codec_api.h 
WelsGetCodecVersion
-enabled libopenjpeg   && { { check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+enabled libopenjpeg   && { { check_lib libopenjpeg openjpeg-2.2/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+   { check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 ||
{ check_lib libopenjpeg openjpeg-2.0/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
{ check_lib libopenjpeg openjpeg-1.5/openjpeg.h 
opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index ce4e2b0..1210123 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -34,7 +34,9 @@
 #include "internal.h"
 #include "thread.h"
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
+#  include 
+#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
 #  include 
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  include 
@@ -44,7 +46,7 @@
 #  include 
 #endif
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || 
HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  define OPENJPEG_MAJOR_VERSION 2
 #  define OPJ(x) OPJ_##x
 #else
@@ -429,7 +431,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
 opj_stream_set_read_function(stream, stream_read);
 opj_stream_set_skip_function(stream, stream_skip);
 opj_stream_set_seek_function(stream, stream_seek);
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
 opj_stream_set_user_data(stream, , NULL);
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 opj_stream_set_user_data(stream, );
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index 4a12729..b67e533 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -32,7 +32,9 @@
 #include "avcodec.h"
 #include "internal.h"
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
+#  include 
+#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
 #  include 
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  include 
@@ -42,7 +44,7 @@
 #  include 
 #endif
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || 
HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  define OPENJPEG_MAJOR_VERSION 2
 #  define OPJ(x) OPJ_##x
 #else
@@ -305,7 +307,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext 
*avctx)
 
 opj_set_default_encoder_parameters(>enc_params);
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
 switch (ctx->cinema_mode) {
 case OPJ_CINEMA2K_24:
 ctx->enc_params.rsiz = OPJ_PROFILE_CINEMA_2K;
@@ -769,7 +771,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 opj_stream_set_write_function(stream, stream_write);
 opj_stream_set_skip_function(stream, stream_skip);
 opj_stream_set_seek_function(stream, stream_seek);
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
 opj_stream_set_user_data(stream, , NULL);
 #elif 

Re: [FFmpeg-devel] configure/libopenjpegdec.c/libopenjpegenc.c: Add support for LibOpenJPEG v2.2/git

2017-06-13 Thread Reino Wijnsma
On 13-6-2017 05:58, Michael Bradshaw  wrote:
> Are you sure you built ffmpeg using OpenJPEG v2.2? Because your patch is
> missing the openjpeg_2_2_openjpeg_h entry in HEADERS_LIST in configure, so
> you shouldn't be able to successfully build with OpenJPEG v2.2.
Whoops! In my script I'm patching 'configure' with sed
.
While turning these changes into a patch I seem to have forgotten the
HEADERS_LIST entry indeed. New patch attached.
From 70b53c1ea5a56a03cfef24d5b551b983ba2473b2 Mon Sep 17 00:00:00 2001
From: Reino17 
Date: Wed, 14 Jun 2017 00:19:12 +0200
Subject: [PATCH] Add support for LibOpenJPEG v2.2/git

---
 configure   |  4 +++-
 libavcodec/libopenjpegdec.c | 10 +++---
 libavcodec/libopenjpegenc.c | 12 
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index e3941f9..0190966 100755
--- a/configure
+++ b/configure
@@ -1868,6 +1868,7 @@ HEADERS_LIST="
 machine_ioctl_meteor_h
 malloc_h
 opencv2_core_core_c_h
+openjpeg_2_2_openjpeg_h
 openjpeg_2_1_openjpeg_h
 openjpeg_2_0_openjpeg_h
 openjpeg_1_5_openjpeg_h
@@ -5831,7 +5832,8 @@ enabled libopencv && { check_header 
opencv2/core/core_c.h &&
  require opencv opencv2/core/core_c.h 
cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
require_pkg_config opencv opencv/cxcore.h 
cvCreateImageHeader; }
 enabled libopenh264   && require_pkg_config openh264 wels/codec_api.h 
WelsGetCodecVersion
-enabled libopenjpeg   && { { check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+enabled libopenjpeg   && { { check_lib libopenjpeg openjpeg-2.2/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+   { check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 ||
{ check_lib libopenjpeg openjpeg-2.0/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
{ check_lib libopenjpeg openjpeg-1.5/openjpeg.h 
opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index ce4e2b0..5ed9ce1 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -34,7 +34,9 @@
 #include "internal.h"
 #include "thread.h"
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
+#  include 
+#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
 #  include 
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  include 
@@ -44,7 +46,7 @@
 #  include 
 #endif
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || 
HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  define OPENJPEG_MAJOR_VERSION 2
 #  define OPJ(x) OPJ_##x
 #else
@@ -429,7 +431,9 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
 opj_stream_set_read_function(stream, stream_read);
 opj_stream_set_skip_function(stream, stream_skip);
 opj_stream_set_seek_function(stream, stream_seek);
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
+opj_stream_set_user_data(stream, , NULL);
+#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
 opj_stream_set_user_data(stream, , NULL);
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 opj_stream_set_user_data(stream, );
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index 4a12729..d3b9161 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -32,7 +32,9 @@
 #include "avcodec.h"
 #include "internal.h"
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
+#  include 
+#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
 #  include 
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  include 
@@ -42,7 +44,7 @@
 #  include 
 #endif
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || 
HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  define OPENJPEG_MAJOR_VERSION 2
 #  define OPJ(x) OPJ_##x
 #else
@@ -305,7 +307,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext 
*avctx)
 
 opj_set_default_encoder_parameters(>enc_params);
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
 switch (ctx->cinema_mode) {
 case OPJ_CINEMA2K_24:
 ctx->enc_params.rsiz = OPJ_PROFILE_CINEMA_2K;
@@ -769,7 +771,9 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 opj_stream_set_write_function(stream, stream_write);
 opj_stream_set_skip_function(stream, 

Re: [FFmpeg-devel] Add libtwolame cppflags in 'configure' to prevent the use of '--extra-cflags'

2017-06-12 Thread Reino Wijnsma
I just tried to build a shared LibTwoLAME, but it gave me errors.
Building a shared LibModplug proved more successful.
FFmpeg's 'configure' didn't have any problems with it and finished
without errors.

LibOpenJPEG
 was
the reason for me to submit these patches as it already has added cppflags.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] configure: Add libcaca cppflags in 'configure' to prevent the use of '--extra-cflags'

2017-06-12 Thread Reino Wijnsma
This patch adds libcaca cppflags in 'configure' to prevent the use of
'--extra-cflags'. This is all that's needed to successfully
cross-compile FFmpeg with Libcaca.
From ba27f7d90c5c3883bd302caf977837d970d46387 Mon Sep 17 00:00:00 2001
From: Reino17 
Date: Tue, 13 Jun 2017 01:19:07 +0200
Subject: [PATCH] Add libcaca cppflags in 'configure' to prevent the use of
 '--extra-cflags'

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index e3941f9..d96dbf9 100755
--- a/configure
+++ b/configure
@@ -5795,7 +5795,7 @@ enabled libbs2b   && require_pkg_config libbs2b 
bs2b.h bs2b_open
 enabled libcelt   && require libcelt celt/celt.h celt_decode -lcelt0 &&
  { check_lib libcelt celt/celt.h 
celt_decoder_create_custom -lcelt0 ||
die "ERROR: libcelt must be installed and 
version must be >= 0.11.0."; }
-enabled libcaca   && require_pkg_config caca caca.h caca_create_canvas
+enabled libcaca   && require_pkg_config caca caca.h caca_create_canvas 
-DCACA_STATIC && add_cppflags -DCACA_STATIC
 enabled libdc1394 && require_pkg_config libdc1394-2 dc1394/dc1394.h 
dc1394_new
 enabled libfdk_aac&& { use_pkg_config fdk-aac "fdk-aac/aacenc_lib.h" 
aacEncOpen ||
{ require libfdk_aac fdk-aac/aacenc_lib.h 
aacEncOpen -lfdk-aac &&
-- 
2.8.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] configure: Add libmodplug cppflags in 'configure' to prevent the use of '--extra-cflags'

2017-06-12 Thread Reino Wijnsma
This patch adds libmodplug cppflags in 'configure' to prevent the use of
'--extra-cflags'. This is all that's needed to successfully
cross-compile FFmpeg with LibModplug.
From 7fe7113ccc79f46610b2a89f8ab17e94c348e568 Mon Sep 17 00:00:00 2001
From: Reino17 
Date: Tue, 13 Jun 2017 01:43:09 +0200
Subject: [PATCH] Add libmodplug cppflags in 'configure' to prevent the use of
 '--extra-cflags'

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index e3941f9..6df1cfaa 100755
--- a/configure
+++ b/configure
@@ -5820,7 +5820,7 @@ enabled libkvazaar&& require_pkg_config "kvazaar 
>= 0.8.1" kvazaar.h kvz
 # can find the libraries and headers through other means.
 enabled libmfx&& { use_pkg_config libmfx "mfx/mfxvideo.h" MFXInit 
||
{ require libmfx "mfx/mfxvideo.h" MFXInit 
-llibmfx && warn "using libmfx without pkg-config"; } }
-enabled libmodplug&& require_pkg_config libmodplug 
libmodplug/modplug.h ModPlug_Load
+enabled libmodplug&& require_pkg_config libmodplug 
libmodplug/modplug.h ModPlug_Load -DMODPLUG_STATIC && add_cppflags 
-DMODPLUG_STATIC
 enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h 
lame_set_VBR_quality -lmp3lame
 enabled libmysofa && require libmysofa "mysofa.h" mysofa_load -lmysofa
 enabled libnpp&& require libnpp npp.h nppGetLibVersion -lnppi 
-lnppc
-- 
2.8.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] Add libtwolame cppflags in 'configure' to prevent the use of '--extra-cflags'

2017-06-12 Thread Reino Wijnsma
This patch adds libtwolame cppflags in 'configure' to prevent the use of
'--extra-cflags'. This is all that's needed to successfully
cross-compile FFmpeg with LibTwoLAME.
From 9aacc77f0dcb67d375fd3bdf4d0a1dc8d55b1cf7 Mon Sep 17 00:00:00 2001
From: Reino17 
Date: Tue, 13 Jun 2017 01:10:53 +0200
Subject: [PATCH] Add libtwolame cppflags in 'configure' to prevent the use of
 '--extra-cflags'

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index e3941f9..e2c0cb9 100755
--- a/configure
+++ b/configure
@@ -5859,7 +5859,7 @@ enabled libssh&& require_pkg_config libssh 
libssh/sftp.h sftp_init
 enabled libspeex  && require_pkg_config speex speex/speex.h 
speex_decoder_init -lspeex
 enabled libtesseract  && require_pkg_config tesseract tesseract/capi.h 
TessBaseAPICreate
 enabled libtheora && require libtheora theora/theoraenc.h th_info_init 
-ltheoraenc -ltheoradec -logg
-enabled libtwolame&& require libtwolame twolame.h twolame_init 
-ltwolame &&
+enabled libtwolame&& require libtwolame twolame.h twolame_init 
-ltwolame -DLIBTWOLAME_STATIC && add_cppflags -DLIBTWOLAME_STATIC &&
  { check_lib libtwolame twolame.h 
twolame_encode_buffer_float32_interleaved -ltwolame ||
die "ERROR: libtwolame must be installed and 
version must be >= 0.3.10"; }
 enabled libv4l2   && require_pkg_config libv4l2 libv4l2.h v4l2_ioctl
-- 
2.8.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] configure/libopenjpegdec.c/libopenjpegenc.c: Add support for LibOpenJPEG v2.2/git

2017-06-12 Thread Reino Wijnsma
This patch adds support for LibOpenJPEG v2.2/git. At the moment v2.1 is
the highest version FFmpeg supports. I've successfully cross-compiled
FFmpeg this way.
From df61d7a295bec74c85d37042051e9dc1ef5cdbce Mon Sep 17 00:00:00 2001
From: Reino17 
Date: Tue, 13 Jun 2017 01:01:07 +0200
Subject: [PATCH] Add support for LibOpenJPEG v2.2/git

---
 configure   |  3 ++-
 libavcodec/libopenjpegdec.c | 10 +++---
 libavcodec/libopenjpegenc.c | 12 
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index e3941f9..003d359 100755
--- a/configure
+++ b/configure
@@ -5831,7 +5831,8 @@ enabled libopencv && { check_header 
opencv2/core/core_c.h &&
  require opencv opencv2/core/core_c.h 
cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
require_pkg_config opencv opencv/cxcore.h 
cvCreateImageHeader; }
 enabled libopenh264   && require_pkg_config openh264 wels/codec_api.h 
WelsGetCodecVersion
-enabled libopenjpeg   && { { check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+enabled libopenjpeg   && { { check_lib libopenjpeg openjpeg-2.2/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+   { check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
opj_version -lopenjp2 ||
{ check_lib libopenjpeg openjpeg-2.0/openjpeg.h 
opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
{ check_lib libopenjpeg openjpeg-1.5/openjpeg.h 
opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index ce4e2b0..5ed9ce1 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -34,7 +34,9 @@
 #include "internal.h"
 #include "thread.h"
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
+#  include 
+#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
 #  include 
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  include 
@@ -44,7 +46,7 @@
 #  include 
 #endif
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || 
HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  define OPENJPEG_MAJOR_VERSION 2
 #  define OPJ(x) OPJ_##x
 #else
@@ -429,7 +431,9 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
 opj_stream_set_read_function(stream, stream_read);
 opj_stream_set_skip_function(stream, stream_skip);
 opj_stream_set_seek_function(stream, stream_seek);
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
+opj_stream_set_user_data(stream, , NULL);
+#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
 opj_stream_set_user_data(stream, , NULL);
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 opj_stream_set_user_data(stream, );
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index 4a12729..d3b9161 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -32,7 +32,9 @@
 #include "avcodec.h"
 #include "internal.h"
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
+#  include 
+#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
 #  include 
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  include 
@@ -42,7 +44,7 @@
 #  include 
 #endif
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || 
HAVE_OPENJPEG_2_0_OPENJPEG_H
 #  define OPENJPEG_MAJOR_VERSION 2
 #  define OPJ(x) OPJ_##x
 #else
@@ -305,7 +307,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext 
*avctx)
 
 opj_set_default_encoder_parameters(>enc_params);
 
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
 switch (ctx->cinema_mode) {
 case OPJ_CINEMA2K_24:
 ctx->enc_params.rsiz = OPJ_PROFILE_CINEMA_2K;
@@ -769,7 +771,9 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
 opj_stream_set_write_function(stream, stream_write);
 opj_stream_set_skip_function(stream, stream_skip);
 opj_stream_set_seek_function(stream, stream_seek);
-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
+opj_stream_set_user_data(stream, , NULL);
+#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
 opj_stream_set_user_data(stream, , NULL);
 #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
 opj_stream_set_user_data(stream, );
-- 
2.8.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] configure - "Check 'sdl2-config' first, then 'sdl2.pc'."

2017-05-11 Thread Reino Wijnsma
See https://trac.ffmpeg.org/ticket/6377.
From 3f9c065f96815ffefaa39cda7bacd8132bfdf66c Mon Sep 17 00:00:00 2001
From: Reino Wijnsma <rwijn...@xs4all.nl>
Date: Wed, 10 May 2017 00:50:30 +0200
Subject: [PATCH] Check 'sdl2-config' first, then 'sdl2.pc'.

---
 configure | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 5ae5227..275a1c1 100755
--- a/configure
+++ b/configure
@@ -5947,14 +5947,14 @@ fi
 disabled sdl && disable sdl2
 if ! disabled sdl2; then
 SDL2_CONFIG="${cross_prefix}sdl2-config"
-if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then
+if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
+sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
+sdl2_extralibs=$("${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 &&
 check_func SDL_Init $sdl2_extralibs $sdl2_cflags && enable sdl2
 else
-  if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
-sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
-sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
+  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 &&
 check_func SDL_Init $sdl2_extralibs $sdl2_cflags && enable sdl2
-- 
2.8.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] configure: Prioritize 'sdl2-config'-check

2017-05-11 Thread Reino Wijnsma
On 11-5-2017 13:56, Stephen Hutchinson <qyo...@gmail.com> wrote:
> On 5/11/2017 7:43 AM, Reino Wijnsma wrote:
>> https://trac.ffmpeg.org/ticket/6377#comment:2:
>>> Inadequate for building FFPlay, yes. But perhaps not for other
>>> software.
>>> Are there any downsides to my proposition?
>> I could of course contact the sdl2 developers, but when 'sdl2-config'
>> already has the librarylist setup right to build FFPlay, why not just do
>> the 'sdl2-config'-check first? Is there are reason why FFMpeg's
>> 'configure' does the 'check_pkg_config sdl2'-check first?
> Those libs mentioned as 'missing' in the ticket are not
> supposed to be public, since they're MinGW-w64 system libs;
> at least here, they *are* in sdl2.pc, under Libs.private.
> And the proper way to get pkg-config to recognize that is
> to set the --static flag.
>
> IIRC, this should only be a problem when building as static,
> and as mentioned above, that means you should be setting
> --pkg-config-flags="--static" when configuring FFmpeg.
Hmm, I didn't know about --pkg-config-flags="--static". I've just done a
./configure [...] --pkg-config-flags=--static and in 'config.log' I can
see "ffplay=yes". I haven't done a make install yet, but I assume FFPlay
will be build without problems. If not, I'll report back at you.
Thanks, qyot27!

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] configure: Prioritize 'sdl2-config'-check

2017-05-11 Thread Reino Wijnsma
https://trac.ffmpeg.org/ticket/6377#comment:2:
> Inadequate for building FFPlay, yes. But perhaps not for other software.
> Are there any downsides to my proposition?

I could of course contact the sdl2 developers, but when 'sdl2-config'
already has the librarylist setup right to build FFPlay, why not just do
the 'sdl2-config'-check first? Is there are reason why FFMpeg's
'configure' does the 'check_pkg_config sdl2'-check first?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] configure: Prioritize 'sdl2-config'-check

2017-05-11 Thread Reino Wijnsma
See https://trac.ffmpeg.org/ticket/6377.
By prioritizing the 'sdl2-config'-check the librarylist that's needed to
build FFPlay is setup automatically and one doesn't have to patch
'sdl2.pc' anymore.
From 3f9c065f96815ffefaa39cda7bacd8132bfdf66c Mon Sep 17 00:00:00 2001
From: Reino Wijnsma <rwijn...@xs4all.nl>
Date: Wed, 10 May 2017 00:50:30 +0200
Subject: [PATCH] Check 'sdl2-config' first, then 'sdl2.pc'.

---
 configure | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 5ae5227..275a1c1 100755
--- a/configure
+++ b/configure
@@ -5947,14 +5947,14 @@ fi
 disabled sdl && disable sdl2
 if ! disabled sdl2; then
 SDL2_CONFIG="${cross_prefix}sdl2-config"
-if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then
+if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
+sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
+sdl2_extralibs=$("${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 &&
 check_func SDL_Init $sdl2_extralibs $sdl2_cflags && enable sdl2
 else
-  if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
-sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
-sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
+  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 &&
 check_func SDL_Init $sdl2_extralibs $sdl2_cflags && enable sdl2
-- 
2.8.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel