From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id C1F5642A1B for ; Sun, 12 Jun 2022 02:15:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C5D0D68B36E; Sun, 12 Jun 2022 05:15:17 +0300 (EEST) Received: from mail-vk1-f172.google.com (mail-vk1-f172.google.com [209.85.221.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E705E68AAC1 for ; Sun, 12 Jun 2022 05:15:10 +0300 (EEST) Received: by mail-vk1-f172.google.com with SMTP id z17so1180343vkb.13 for ; Sat, 11 Jun 2022 19:15:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=yJo354c/TIvjDMd8j1S2mhx2f7jrgb4lBzr0rodM7gA=; b=exG0nK/aIwSHb512HD7s1aKW3CpWT/H5/z2uPYvQjhzVnUsIZal25rmHDHkwbaZMWd R+JEYVcPFEf6X5YVh++dIdf91LmA3Zr+WM7mwH8l/53fcVVVi/1BiaofgnirGHx20DgG Rm6OdFYxViO46XOauE3ciThKafbWdREyd7yGOz21W+ImGBoe5aPNLFif3Py7ee5crTyJ xhgXBP0Ed2951r9GsgpeqDlxP5iL4Og7HKJTfnRSEYTAKy8Y9v+LYhinQ70bQVXfP5Pn ayPQe5zsASpTB1kRgy5Zu1pBfn5Pa4EbJkjuE5XgJEAQLbC2KCAN06N4CMwAqxxxjzk4 Rnbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=yJo354c/TIvjDMd8j1S2mhx2f7jrgb4lBzr0rodM7gA=; b=ZR80cIPsbJhEFUv/ryR0lWvhq1vNGWS5KVj+Dkn7qkkNWS+SOlxymCOdjP2xUWBBFC 4ZtCmJYhCVJN8k5ngrdoyiBVVdI/8Tt6yuBD8IdPjY1MNn96yxXvHOwxox67nPys8y5w m+ylnTcdPTeRUbS7W+ZmQJyYKI+wd9JCPUo4ZDoAxa6Tg+V+qBZIsVwD4xPiOXg2dmJ+ dtfjS86o/P1/4wTGMH6k/z4MKIrb4BiSOIG29cL+WMAoaoC2l+O+WBvpkvOP0f6Va590 +llet8Kpfb1lMSR/GOFcuDguN2dmAiL9zmc98+X89SQH7m2RgzsHEQ1iVMnELG4Reqet ZIUg== X-Gm-Message-State: AOAM533YdP3ebZ4ANGV8ENWN6EiOJwMBH0RSeF0VDba1IrB26S2N203V wKWrdgBvu7KItzaPzLss72z6/45OnHM= X-Google-Smtp-Source: ABdhPJwIpG3v3w+1nACUA6uxXcvqIEuvKWgqr1h0p/cM6Qn5EXEbJGWPSgzDGdVOGKrxP/VEHnHZQw== X-Received: by 2002:a05:6122:2386:b0:352:5a79:5a43 with SMTP id bu6-20020a056122238600b003525a795a43mr44704776vkb.23.1655000108958; Sat, 11 Jun 2022 19:15:08 -0700 (PDT) Received: from [192.168.1.11] (075-115-109-114.inf.spectrum.com. [75.115.109.114]) by smtp.gmail.com with ESMTPSA id m17-20020a67f711000000b0034b911d6fa8sm386435vso.4.2022.06.11.19.15.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jun 2022 19:15:08 -0700 (PDT) Message-ID: <47f70332-09d2-91a2-87f2-e2bea69275e3@gmail.com> Date: Sat, 11 Jun 2022 22:15:07 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: From: Stephen Hutchinson In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v13 2/4] libavformat/avisynth.c: Remove MAX_PATH limit X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 6/11/22 1:01 PM, nil-admirari@mailo.com wrote: >> Why not use the AviSynth mechanism that allows to supply a UTF-8 string? >> >> https://github.com/AviSynth/AviSynthPlus/blob/c377916aa4146d2f4386852d91dc177d49103c16/avs_core/core/parser/script.cpp#L477-L481 > > Was not aware such a mechanism exists. > > Commit dates back to 10 April 2017, first release supporting it is, apparently, Avisynth+ r2487-MT: https://github.com/pinterf/AviSynthPlus/releases/tag/r2489-MT. > > A remark in https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avisynth.c#L844 says: > > /* On Windows, FFmpeg supports AviSynth interface version 6 or higher. > * This includes AviSynth 2.6 RC1 or higher, and AviSynth+ r1718 or higher, > * and excludes 2.5 and the 2.6 alphas. */ > > Support for plain AviSynth will have to be dropped. Presumably, the original manifest idea, parsed down to only using it to force FFmpeg into UTF-8, would be sufficient for this, right? As long as AviSynth inherits that from FFmpeg, UTF-8 strings would be pervasive and both A) the utf8 parameter would not need to be used and B) 2.6 would work just fine with it, transparently. The Windows API does have a SetConsoleCP function. If that accomplishes the same effect as the manifest idea, that would be simpler, but it probably would need to be located somewhere *other* than the AviSynth demuxer. And while it might work for the fftools themselves, does it also work for usage of the libraries directly in applications that may not be console apps? Barring that, if/else checks to ensure that A) IsWindowsVersionOrGreater is at least 1903 A1) If yes, go to B A2) If no, use the existing logic B) If yes, GetACP to check that it's UTF8 B1) If yes, the Import call stays the same as it is now, no utf8 parameter B2) If no, that's where things get complicated: C1) Use the no result to tell it to then force UTF-8 mode with SetConsoleCP, if that actually works for what we need it to do. Then don't use the utf8 parameter. C2) Use avs_get_version to detect an incompatible version of AviSynth and gracefully exit with a message about upgrading to a supported version of AviSynth+, before then using the utf8 parameter for real. C3) Use avs_get_version, but if it's not a new enough version, just fall back to the logic that exists now, where 2.6 may or may not work just because the system may or may not be already set to UTF-8. C2 should really be considered a last resort IMO, because it's an artificial limit and doesn't actually have anything to do with the AviSynth API. The reason is that the utf8 parameter being discussed here is not part of the AviSynth API, it's an option handed to one of the script-level functions that avs_invoke (which is the actual API call there) is using. > On the other hand, configure checks for https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/avisynth.c#L844 > >> die "ERROR: AviSynth+ header version must be >= 3.7.1" > > so probably plain AviSynth and AviSynth+ below r2489-MT are already unsupported. > The header version check there isn't because of old versions of AviSynth(+) being unsupported (as far as the demuxer is concerned, anyway). 3.7.1 is still API compatible with 2.6 in all the functions the demuxer uses that are shared between them. The additional Plus-specific functionality is enabled with runtime checks, so if you don't use the newer header, it will fail to build, but you can run 2.6 without problems even when using the newer header to compile the demuxer. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".