From: Pierre-Anthony Lemieux <pal@sandflow.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] Refactoring UUID functionality
Date: Thu, 20 Jan 2022 09:45:20 -0800
Message-ID: <CAF_7JxBaDwiSnuUOjjNq_4kqn=L79u5UUr8OJT=-QjGpg5d=ZA@mail.gmail.com> (raw)
Hi all,
It was recently suggested that UUID functionality in the codebase
could be refactored into a single library.
Below is short explainer.
I would appreciate your review/feedback before I/we start writing code.
Best,
-- Pierre
# Common UUID library
## Why
In the course of the IMF demuxer code review [^1], it was suggested
that UUID handling should be delegated to `libuuid` [^2].
It was further pointed out that:
* `libuuid`, as-is, is not a great fit for the IMF demuxer [^3]
* other parts of FFmpeg use UUIDs, e.g. `libavformat/mov.c` and
`libavcodec/cbs_sei.h`
* `libuuid` does not build on Windows
[^1] https://patchwork.ffmpeg.org/project/ffmpeg/patch/20211206031853.21739-1-pal@sandflow.com/#68513
[^2]
https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/libuuid [^3]
https://ffmpeg.org/pipermail/ffmpeg-devel/2021-December/290365.html
## Proposal
The proposal is to develop a single UUID library for use across
FFmpeg. The library would reuse (by copying) existing code whenever
possible, e.g. from libuuid. It would be implemented as
`libavutil/uuid.h` and `libavutil/uuid.c` and expose a public API,
e.g.
`int av_uuid_parse(...)`.
## Goals
The library would refactor into a single library the UUID
functionality currently in use by FFmpeg.
## Non-goals
The library is not intended to be a generic UUID library.
## Affected files
Below is an initial list of files that will probably require modifications:
* `libavcodec/cbs_sei.h`
* `libavcodec/cbs_sei_syntax_template.c`
* `libavcodec/h264_metadata_bsf.c`
* `libavcodec/vaapi_encode_h264.c`
* `libavfilter/vf_showinfo.c`
* `libavformat/imf_cpl.c`
* `libavformat/imf.h`
* `libavformat/imfdec.c`
* `libavformat/tests/imf.c`
* `libavformat/mov.c`
* `libavformat/movenc.c`
* `libavformat/smoothstreamingenc.c`
* `libavutil/hwcontext_cuda.c`
* `libavutil/hwcontext_vulkan.c`
`libavforamt/mxfenc.c` defines `mxf_write_uuid()` but it looks like
this is used to write hardcoded instance UIDs, and thus is not
really about generic UUIDs. Perhaps that function should be renamed
`mxf_write_uid()`.
## Pluses
* reduces code duplication
## Minuses
* requires touching stable FFmpeg code
_______________________________________________
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 reply other threads:[~2022-01-20 17:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 17:45 Pierre-Anthony Lemieux [this message]
2022-02-05 3:16 ` Zane van Iperen
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='CAF_7JxBaDwiSnuUOjjNq_4kqn=L79u5UUr8OJT=-QjGpg5d=ZA@mail.gmail.com' \
--to=pal@sandflow.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