[FFmpeg-devel] configure: If vfwcap_indev disabled, don't do vfw32 checks; if enabled, require vfw32

Submitted by Aaron Levinson on May 16, 2017, 10:38 p.m.

Details

Message ID 04b6a4eb-e236-c272-e029-4941046a9be2@aracnet.com
State New
Headers show

Commit Message

Aaron Levinson May 16, 2017, 10:38 p.m.
Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Steven Liu May 16, 2017, 11:23 p.m.
2017-05-17 6:38 GMT+08:00 Aaron Levinson <alevinsn@aracnet.com>:

> Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
> ---
>  configure | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 7980d92..49f91ac 100755
> --- a/configure
> +++ b/configure
> @@ -6013,10 +6013,10 @@ check_header sys/videoio.h
>  check_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse;
> vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
>
>  check_lib user32 "windows.h winuser.h" GetShellWindow -luser32
> -check_lib vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
> +disabled vfwcap_indev || { require vfw32 "windows.h vfw.h"
> capCreateCaptureWindow -lvfw32 &&
>  # check that WM_CAP_DRIVER_CONNECT is defined to the proper value
>  # w32api 3.12 had it defined wrong
> -check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable
> vfwcap_defines
> +                           check_cpp_condition vfw.h
> "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines; }
>

indent problem?

>
>  check_type "dshow.h" IBaseFilter
>
> --
> 2.10.1.windows.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
Aaron Levinson May 16, 2017, 11:32 p.m.
On 5/16/2017 4:23 PM, Steven Liu wrote:
> 2017-05-17 6:38 GMT+08:00 Aaron Levinson <alevinsn@aracnet.com>:
>
>> Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
>> ---
>>  configure | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 7980d92..49f91ac 100755
>> --- a/configure
>> +++ b/configure
>> @@ -6013,10 +6013,10 @@ check_header sys/videoio.h
>>  check_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse;
>> vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
>>
>>  check_lib user32 "windows.h winuser.h" GetShellWindow -luser32
>> -check_lib vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
>> +disabled vfwcap_indev || { require vfw32 "windows.h vfw.h"
>> capCreateCaptureWindow -lvfw32 &&
>>  # check that WM_CAP_DRIVER_CONNECT is defined to the proper value
>>  # w32api 3.12 had it defined wrong
>> -check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable
>> vfwcap_defines
>> +                           check_cpp_condition vfw.h
>> "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines; }
>>
>
> indent problem?

It's not--it is aligned with "require" on the earlier line, and that 
alignment is consistent with similar things in other parts of the file. 
I decided to leave the comment alone though, but I could indent the 
comment with the other lines if that makes more sense.

Aaron
Michael Niedermayer May 18, 2017, 1:18 p.m.
On Tue, May 16, 2017 at 03:38:32PM -0700, Aaron Levinson wrote:
> Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
> ---
>  configure | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 7980d92..49f91ac 100755
> --- a/configure
> +++ b/configure
> @@ -6013,10 +6013,10 @@ check_header sys/videoio.h
>  check_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
>  
>  check_lib user32 "windows.h winuser.h" GetShellWindow -luser32
> -check_lib vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
> +disabled vfwcap_indev || { require vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32 &&
>  # check that WM_CAP_DRIVER_CONNECT is defined to the proper value
>  # w32api 3.12 had it defined wrong
> -check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines
> +                           check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines; }
>  

this breaks build on linux
ERROR: vfw32 not found

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

[...]
Hendrik Leppkes May 18, 2017, 4:21 p.m.
On Thu, May 18, 2017 at 3:18 PM, Michael Niedermayer
<michael@niedermayer.cc> wrote:
> On Tue, May 16, 2017 at 03:38:32PM -0700, Aaron Levinson wrote:
>> Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
>> ---
>>  configure | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 7980d92..49f91ac 100755
>> --- a/configure
>> +++ b/configure
>> @@ -6013,10 +6013,10 @@ check_header sys/videoio.h
>>  check_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
>>
>>  check_lib user32 "windows.h winuser.h" GetShellWindow -luser32
>> -check_lib vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
>> +disabled vfwcap_indev || { require vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32 &&
>>  # check that WM_CAP_DRIVER_CONNECT is defined to the proper value
>>  # w32api 3.12 had it defined wrong
>> -check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines
>> +                           check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines; }
>>
>
> this breaks build on linux
> ERROR: vfw32 not found
>

As discussed on IRC, other then the error on linux, overall I'm not
sure what exactly this change improves? vfw detection seems to work
just fine as is.

- Hendrik
Aaron Levinson May 18, 2017, 5:23 p.m.
On 5/18/2017 9:21 AM, Hendrik Leppkes wrote:
> On Thu, May 18, 2017 at 3:18 PM, Michael Niedermayer
> <michael@niedermayer.cc> wrote:
>> On Tue, May 16, 2017 at 03:38:32PM -0700, Aaron Levinson wrote:
>>> Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
>>> ---
>>>   configure | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configure b/configure
>>> index 7980d92..49f91ac 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -6013,10 +6013,10 @@ check_header sys/videoio.h
>>>   check_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
>>>
>>>   check_lib user32 "windows.h winuser.h" GetShellWindow -luser32
>>> -check_lib vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
>>> +disabled vfwcap_indev || { require vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32 &&
>>>   # check that WM_CAP_DRIVER_CONNECT is defined to the proper value
>>>   # w32api 3.12 had it defined wrong
>>> -check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines
>>> +                           check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines; }
>>>
>>
>> this breaks build on linux
>> ERROR: vfw32 not found
>>
> 
> As discussed on IRC, other then the error on linux, overall I'm not
> sure what exactly this change improves? vfw detection seems to work
> just fine as is.

Agree--thanks for looking at this.  Please disregard this patch--it is 
incorrect in a couple of different ways.

Aaron Levinson

Patch hide | download patch | download mbox

diff --git a/configure b/configure
index 7980d92..49f91ac 100755
--- a/configure
+++ b/configure
@@ -6013,10 +6013,10 @@  check_header sys/videoio.h
 check_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
 
 check_lib user32 "windows.h winuser.h" GetShellWindow -luser32
-check_lib vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
+disabled vfwcap_indev || { require vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32 &&
 # check that WM_CAP_DRIVER_CONNECT is defined to the proper value
 # w32api 3.12 had it defined wrong
-check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines
+                           check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines; }
 
 check_type "dshow.h" IBaseFilter