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 D81D245A8B for ; Tue, 14 Mar 2023 15:59:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 16CC568BDA5; Tue, 14 Mar 2023 17:58:58 +0200 (EET) Received: from smtp.tiscali.it (santino-notr.mail.tiscali.it [213.205.33.215]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 145E468AC74 for ; Tue, 14 Mar 2023 17:58:51 +0200 (EET) Received: from [192.168.20.100] ([95.243.137.154]) by santino.mail.tiscali.it with id YFyC2901H3L3PKz01FyGhn; Tue, 14 Mar 2023 15:58:20 +0000 X-Spam-Final-Verdict: clean X-Spam-State: 0 X-Spam-Score: 0 X-Spam-Verdict: clean x-auth-user: klimklim@tiscali.it Message-ID: <6f929b3a-78c3-8998-d6dc-69edd850297a@tiscali.it> Date: Tue, 14 Mar 2023 16:58:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: it To: ffmpeg-devel@ffmpeg.org References: <8d713a21-f2f0-5c8d-fa93-0278965509e5@tiscali.it> <47ee718c-bce0-cffa-9c6a-2889a6547017@tiscali.it> <9ae25c06-73ce-f3b6-7a29-3dd8e3e530c3@tiscali.it> From: Francesco Carusi In-Reply-To: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tiscali.it; s=smtp; t=1678809501; bh=O2u6ulElYHtqWm7XTIOkUdW/hmhWjZMOeglT3OvaxI8=; h=Date:Subject:To:References:From:In-Reply-To; b=C+hS7Cy2PX8tkJg/bB+cilu+w7UAJ53YujCe5VmbU2ekw5IxpCzivrdQFhuaUNiTU 2PP7O6VA6NnhwMe1bh5c+ill5n4+zZPtquz4pe/VnQ1dBJiDnISNKh9eQdfYncuUc0 50JVa8tgVxx6DK0VW6g1PhVGzBP2zzvwbBhb22BU= Subject: Re: [FFmpeg-devel] drawtext filter 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: Can I help in any way in advancing this patch? On 03/02/2023 15:18, Francesco Carusi wrote: > > > On 30/01/2023 13:19, Paul B Mahol wrote: >> On 1/30/23, Francesco Carusi wrote: >>> On 28/01/2023 16:32, Paul B Mahol wrote: >>>> On 1/28/23, Francesco Carusi wrote: >>>>> On 27/01/2023 18:31, Paul B Mahol wrote: >>>>>> On 1/27/23, Francesco Carusi wrote: >>>>>>> On 26/01/2023 17:37, Paul B Mahol wrote: >>>>>>>> On 1/26/23, Francesco Carusi wrote: >>>>>>>>> On 26/01/2023 14:21, Paul B Mahol wrote: >>>>>>>>>> On 1/26/23, Francesco Carusi wrote: >>>>>>>>>>> The drawtext reinit command is also used in the docs as an >>>>>>>>>>> example >>>>>>>>>>> for >>>>>>>>>>> the sendcmd filter, so I thought it was fine to use commands in >>>>>>>>>>> that >>>>>>>>>>> way. In my opinion it is also a convenient way to modify >>>>>>>>>>> multiple >>>>>>>>>>> options at the same time. >>>>>>>>>>> Should the command match the name of a filter option instead? >>>>>>>>>>> >>>>>>>>>> Please do not top post. >>>>>>>>>> >>>>>>>>>> It is much better to use already existing options for >>>>>>>>>> commands that >>>>>>>>>> is >>>>>>>>>> more intuitive to users. Also multiple options can be set at >>>>>>>>>> runtime, >>>>>>>>>> there is no such limitation. >>>>>>>>> ok, I'm going to remove the "change" command and add commands >>>>>>>>> that >>>>>>>>> match >>>>>>>>> the options that it included. >>>>>>>> Thanks, feel free to ask questions on #ffmpeg-devel irc channel. >>>>>>> I'm attaching the updated patch, I also updated the document at >>>>>>> https://github.com/yethie/FFmpeg/blob/master/drawtext/CHANGES.md >>>>>>> Thanks >>>>>> Amazing, I like demos! >>>>>> >>>>>> Could improve code style of newly added/changed lines? >>>>>> For example opening { put on separate line. So code style is in sync >>>>>> with rest of codebase. >>>>> Sure, I'll put opening { on a new line for functions, not for control >>>>> statements, like in the rest of the code. Is it fine? >>>> Yes. Thanks. >>>> >>>>>> The commands stuff does not need to use strcmp to detect if option >>>>>> value have been changed, you could avoid strcmp by just caching old >>>>>> value prior to calling function the picks new values, and after that >>>>>> just compare old with new and then if it differs call needed code. >>>>> I'll cache the numeric values. I think that caching string values >>>>> is not >>>>> the preferred solution because in addition to the strcmp needed to >>>>> check >>>>> the value, it would also need a strdup to cache the previous >>>>> value, even >>>>> when the command does not involve those options. Does it sound >>>>> reasonable? >>>> Yes. >>> I'm attaching the patch that includes the changes we discussed. >> space between 'for' and '(' >> >> Do not keep old code in comments if its no longer relevant or working. > > Ok I added spaces between control statements (if, for, while) and '(', > and also cleaned up comments. > Following Anton Khirnov suggestion I tried to split the changes into > multiple commits. However the first one is quite bit since it contains > a major change in how the filter works and cannot be split further. > Patches attached. > >>>>>>>>>>> On 26/01/2023 11:50, Paul B Mahol wrote: >>>>>>>>>>>> On 1/26/23, Francesco Carusi wrote: >>>>>>>>>>>>> Hi, I'm new to contributing to ffmpeg! >>>>>>>>>>>>> >>>>>>>>>>>>> I modified the drawtext filter to improve text rendering >>>>>>>>>>>>> and add >>>>>>>>>>>>> some >>>>>>>>>>>>> features. You can find a high level description of the >>>>>>>>>>>>> changes >>>>>>>>>>>>> at >>>>>>>>>>>>> this >>>>>>>>>>>>> link: >>>>>>>>>>>>> >>>>>>>>>>>>> https://github.com/yethie/FFmpeg/blob/master/drawtext/CHANGES.md >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> I'm also attaching the patch file. >>>>>>>>>>>>> I looked for the filter maintainer to discuss about the >>>>>>>>>>>>> changes >>>>>>>>>>>>> I >>>>>>>>>>>>> made >>>>>>>>>>>>> but it looks like there isn't any, am I correct? >>>>>>>>>>>>> >>>>>>>>>>>>> Please let me know if this is the right way to submit my >>>>>>>>>>>>> contribution. >>>>>>>>>>>> Why filter can not support normal commands for options? Like >>>>>>>>>>>> most/all >>>>>>>>>>>> other filters that have support for changing options values at >>>>>>>>>>>> runtime. >>>>>>>>>>>> >>>>>>>>>>>> The reinit and yours added change option(s) are very >>>>>>>>>>>> strange/inconvenient things to do. >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> 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". >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> 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". >>>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> 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". >>>>>>>>> _______________________________________________ >>>>>>>>> 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". >>>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> 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". >>>>>> _______________________________________________ >>>>>> 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". >>>>> _______________________________________________ >>>>> 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". >>>>> >>>> _______________________________________________ >>>> 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". >> _______________________________________________ >> 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". > > _______________________________________________ > 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". _______________________________________________ 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".