diff mbox

[FFmpeg-devel] configure: Allow users to disable all hwaccel libraries

Message ID 84af1ea3-5444-fad8-75ae-6fea4b3e6163@gmail.com
State Superseded
Headers show

Commit Message

Gyan Nov. 30, 2017, 10:28 a.m. UTC
I added --disable-hwaccels during configure and noticed that all 
autodetected hwaccel libs were still being linked - 6 in my case, which 
makes for a more bloated binary than warranted.

Turns out the option only disables native components which make use of 
the hwaccel libs. The reporter of ticket #3906 had a similar concern.

Added option to disable all autodetected hwaccel libs.

Regards,
Gyan
From e89ed9ec2f476457552290315171bd2ef89490a5 Mon Sep 17 00:00:00 2001
From: Gyan Doshi <gyandoshi@gmail.com>
Date: Thu, 30 Nov 2017 13:48:57 +0530
Subject: [PATCH] configure: Allow users to disable all autodetected libraries
 providing hardware acceleration.

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

Comments

Clément Bœsch Nov. 30, 2017, 10:49 a.m. UTC | #1
On Thu, Nov 30, 2017 at 03:58:21PM +0530, Gyan Doshi wrote:
> I added --disable-hwaccels during configure and noticed that all
> autodetected hwaccel libs were still being linked - 6 in my case, which
> makes for a more bloated binary than warranted.
> 
> Turns out the option only disables native components which make use of the
> hwaccel libs. The reporter of ticket #3906 had a similar concern.
> 
> Added option to disable all autodetected hwaccel libs.
> 

Is --disable-autodetect broken/not complete for you?

The autodetect handling in the configure is rather sensible as it needs to
work properly in combination with other options (see for instance around
lines 3720-3740), which makes me believe that the patch you're proposing
may not be enough.

Regards,
Gyan Nov. 30, 2017, 10:58 a.m. UTC | #2
On 11/30/2017 4:19 PM, Clément Bœsch wrote:

> Is --disable-autodetect broken/not complete for you?

This disables more than just the hwaccel libs. I've tested my patch 
locally and configure lists no entries under External Libraries 
Providing Hardware Acceleration, unlike with --disable-hwaccels.

It builds without error (on Win7-64 / MinGW64).

Regards,
Gyan
Gyan Dec. 4, 2017, 4:17 a.m. UTC | #3
On 11/30/2017 3:58 PM, Gyan Doshi wrote:
> I added --disable-hwaccels during configure and noticed that all 
> autodetected hwaccel libs were still being linked - 6 in my case, which 
> makes for a more bloated binary than warranted.
> 
> Turns out the option only disables native components which make use of 
> the hwaccel libs. The reporter of ticket #3906 had a similar concern.
> 
> Added option to disable all autodetected hwaccel libs.
> 
> Regards,
> Gyan

Ping.
Gyan Dec. 7, 2017, 7:09 a.m. UTC | #4
On 12/4/2017 9:47 AM, Gyan Doshi wrote:
> 
> On 11/30/2017 3:58 PM, Gyan Doshi wrote:
>> I added --disable-hwaccels during configure and noticed that all 
>> autodetected hwaccel libs were still being linked - 6 in my case, 
>> which makes for a more bloated binary than warranted.
>>
>> Turns out the option only disables native components which make use of 
>> the hwaccel libs. The reporter of ticket #3906 had a similar concern.
>>
>> Added option to disable all autodetected hwaccel libs.
>>
>> Regards,
>> Gyan
> 
> Ping.

Ping. x2.
Tobias Rapp Dec. 7, 2017, 7:29 a.m. UTC | #5
On 30.11.2017 11:58, Gyan Doshi wrote:
> On 11/30/2017 4:19 PM, Clément Bœsch wrote:
> 
>> Is --disable-autodetect broken/not complete for you?
> 
> This disables more than just the hwaccel libs. I've tested my patch 
> locally and configure lists no entries under External Libraries 
> Providing Hardware Acceleration, unlike with --disable-hwaccels.

Why not add the HWACCEL_AUTODETECT_LIBRARY_LIST to --disable-hwaccels?

Regards,
Tobias
diff mbox

Patch

diff --git a/configure b/configure
index 1fa16e9dba..e5b390c955 100755
--- a/configure
+++ b/configure
@@ -304,6 +304,7 @@  External library support:
   --disable-zlib           disable zlib [autodetect]
 
   The following libraries provide various hardware acceleration features:
+  --disable-hwaccel-libs   disable all autodetected hwaccel libraries
   --disable-amf            disable AMF video encoding code [autodetect]
   --disable-audiotoolbox   disable Apple AudioToolbox code [autodetect]
   --disable-cuda           disable dynamically linked Nvidia CUDA code [autodetect]
@@ -3629,6 +3630,9 @@  for opt do
         --extra-libs=*)
             add_extralibs $optval
         ;;
+        --disable-hwaccel-libs)
+            disable $HWACCEL_AUTODETECT_LIBRARY_LIST
+        ;;
         --disable-devices)
             disable $INDEV_LIST $OUTDEV_LIST
         ;;