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 391504023E for ; Thu, 20 Jan 2022 17:45:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 429C968B1D9; Thu, 20 Jan 2022 19:45:42 +0200 (EET) Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 85A4A68B101 for ; Thu, 20 Jan 2022 19:45:35 +0200 (EET) Received: by mail-io1-f51.google.com with SMTP id w7so7871503ioj.5 for ; Thu, 20 Jan 2022 09:45:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandflow-com.20210112.gappssmtp.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=hDffasjQJvhIMiAcIbUss2MFoXjuKHHArL71w9pykOs=; b=L3gZRNfpTh4+ARgXsr4feUjS+KDaKKzllOLQBoxgqQs/3eaOJ2RISaMvfzjrag/x6J JZT4SAnoy1eW6FhMPzFb1Zzzi8NZKKqLpW9PHR7iXkEmIHertczKdXbEe/ZK0pjzY/ZW fjRqEPB9ib1W9uaoiOcIv68lJC/MTWo8gGyZ+n8BjhdmElkmPs3m40z1ZRn7nOMfKQ7X kgqMlh0WSs2jGnbMy9kbobPo0BmNbqJidynasRkPGammjM9dYKn7DJHrS1gu+kwg/YAR ENYHeCaYZpiYBze3Xt4vzFRWpqID9lOPW03HG4+rGeM8hWj9olhbrgGNFgKp0mp0Fg3x HtqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=hDffasjQJvhIMiAcIbUss2MFoXjuKHHArL71w9pykOs=; b=wKa7EKgxfj6Vl8ZcZXwcY7RTwLb8/k8ZUNL0/GGIbFmC2FNfs+aV1G2URLyk9sD3lQ 872+vh8gRJ+ldcuNU8H9V3OcHrHNxPjX6N2pLEBzc1UwTCn0EVA6WKkzwOVlRHW2Kg1G ibWAnURVJkO9udEmEXSU1utGn9hjaWCJodtciYTMl+yPvOpv+5hQJbc4tmnJtBxAgbww FlOeXvy3rvBbX/CCgqC+b6cb9rFX1fHRpr25yvpKq3Ng4zU1VWEruVKWvl7KptZQIG1z IiuYpqWplBQAAD6AEqBR+iBJ07YnWLac5jF6/SYalFX+mdOYwJkgm0rsTisfbt1cqnu1 cxSg== X-Gm-Message-State: AOAM530scKB3axnYVUvWhJu8Ut8zdb+A7YWQeXd7O1CcfujhmMe39JrB n7j2vDguHSqt9eABmWlbtR5eqa4vgpM73A== X-Google-Smtp-Source: ABdhPJxGFgtu31ehxZ/hNc8HXV6VD8NzyhDKwL4q9HdTse3Ta4j+vBEsjX4A5GVRVScLTncD3pQumw== X-Received: by 2002:a05:6602:3d1:: with SMTP id g17mr1338216iov.209.1642700733572; Thu, 20 Jan 2022 09:45:33 -0800 (PST) Received: from mail-io1-f46.google.com (mail-io1-f46.google.com. [209.85.166.46]) by smtp.gmail.com with ESMTPSA id r15sm1630940ilo.25.2022.01.20.09.45.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Jan 2022 09:45:33 -0800 (PST) Received: by mail-io1-f46.google.com with SMTP id o9so7891368iob.3 for ; Thu, 20 Jan 2022 09:45:33 -0800 (PST) X-Received: by 2002:a5d:9306:: with SMTP id l6mr4288500ion.154.1642700732613; Thu, 20 Jan 2022 09:45:32 -0800 (PST) MIME-Version: 1.0 From: Pierre-Anthony Lemieux Date: Thu, 20 Jan 2022 09:45:20 -0800 X-Gmail-Original-Message-ID: Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] Refactoring UUID functionality 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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".