From: Shiqi Zhu <hiccupzhu@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avfilter: add sdlvsink for video display
Date: Tue, 11 Jun 2024 21:13:48 +0800
Message-ID: <CACW1+SZGD=yE-d3u4ToWDCHZLU8S3+nc_pguBvLDUWWYb3wAkQ@mail.gmail.com> (raw)
In-Reply-To: <05E9959A-9743-4C57-AAEB-186EACE9F161@remlab.net>
On Fri, 7 Jun 2024 at 19:55, Rémi Denis-Courmont <remi@remlab.net> wrote:
>
>
>
> Le 7 juin 2024 12:53:51 GMT+03:00, Michael Niedermayer <michael@niedermayer.cc> a écrit :
> >We can require anything from an API that we are able to change and extend
> >Of course we can decide not to allow such requirment even if optional
> >but we surely _could_ add such a feature if we choose to do so
>
> Sure. You can also require infinite memory or an oracle be provided. That's just not going to happen though. And having libraries depend on the main thread is a well-documented malpractice.
>
> I don't think we should add maintenance burden with code that can't be used safely.
Thank you all for your attention to this patch; I greatly appreciate it.
I'd like to provide a brief recap of the issue we've been discussing,
with the following points:
1. Addition of sink type in the filter:
This enhancement is primarily based on the existing avfilter mechanism
and serves as a strengthening module. Using SDL as the sink doesn't
seem to be a good fit, as I'll attempt to rectify in the following
patch.
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240611130310.1131755-1-hiccupzhu@gmail.com/
2. Utilizing SDL as an implementation for the sink:
Before submitting the patch, I hadn't considered many aspects. During
the intense discussions, I retested the patch on different operating
systems, with the following results, hoping it may assist those
interested in this issue:
Command: ./ffmpeg -lavfi
"testsrc2=size=300x200:rate=25:duration=500,format=yuv420p,sdlvsink"
-f null /dev/null
Test1 Ubuntu 22.04 32GB test result: SUCCESS
Test2 Win11 16GB test result: SUCCESS
Test3 MacOS 14.4 16GB test result: FAILED
Additional notes:
In Test2, slight block occurred when resizing the window, possibly due
to the lack of Windows message handling mechanism, solely compensated
by SDL_PollEvent. I haven't delved deeper into this; if anyone knows
the exact reason, please feel free to add.
In Test3, direct crash occurred, indicating a segmentation fault.
In conclusion:
Due to differences in how graphical interfaces are implemented on
different platforms, the usage of SDL varies (such as init and render
must be on the main thread). Handling such differences at the
application level might be more flexible and less suitable for
inclusion in general-purpose libraries like ffmpeg.
Finally, I'd like to extend my gratitude to everyone for their
valuable contributions and insights.
> _______________________________________________
> 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".
next prev parent reply other threads:[~2024-06-11 13:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 11:51 Shiqi Zhu
2024-06-06 12:20 ` Zhao Zhili
2024-06-07 2:12 ` Hiccup Zhu
2024-06-07 2:32 ` Zhao Zhili
2024-06-07 3:33 ` Shiqi Zhu
2024-06-07 6:45 ` Rémi Denis-Courmont
2024-06-07 9:53 ` Michael Niedermayer
2024-06-07 10:46 ` Anton Khirnov
2024-06-07 11:54 ` Rémi Denis-Courmont
2024-06-11 13:13 ` Shiqi Zhu [this message]
2024-06-12 19:52 ` Stefano Sabatini
2024-06-12 20:14 ` Paul B Mahol
2024-06-13 1:49 ` Shiqi Zhu
2024-06-13 1:54 ` Shiqi Zhu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACW1+SZGD=yE-d3u4ToWDCHZLU8S3+nc_pguBvLDUWWYb3wAkQ@mail.gmail.com' \
--to=hiccupzhu@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git