From patchwork Sun Aug 28 23:34:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37535 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1624977pzh; Sun, 28 Aug 2022 16:35:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR4pc/SyxBFhxq4P1GfvU3Glo37Et8P9wMwtBtfLZciNW8XT/7JqSOopNbBiLC73dutzZng2 X-Received: by 2002:a17:907:7601:b0:73d:9f0b:d99f with SMTP id jx1-20020a170907760100b0073d9f0bd99fmr11683720ejc.300.1661729724193; Sun, 28 Aug 2022 16:35:24 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id nc20-20020a1709071c1400b0073d67d3313dsi6725868ejc.364.2022.08.28.16.35.23; Sun, 28 Aug 2022 16:35:24 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=f6AjtrpR; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0C98A68B9C9; Mon, 29 Aug 2022 02:35:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2045.outbound.protection.outlook.com [40.92.89.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A536468B99D for ; Mon, 29 Aug 2022 02:35:11 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M7AxZpV4EBJgX84pzc6AiUDK4kbsCzvV4CLyHDpY/xJ8TzSl7iaxABP3v+Fl+zYs/bhgUrntvvEV4MzTzKwIgCcUwHfmb+L7v+CBRzrOfm8DbzgoUN4Yi8T0DcZZlr5LbKsWKYtlr6SBHBhVfC0sVz0vboQDUCdFnn6p/H4sJuNj8Y3a6zCuqwE3fbC9Yu40xz/PUF5vB9ZF/COh5JnG2F0RdXWV7oq34uDtk/4VT+en3WJYQMyK5Xfr20A1+WlZle9EHU6Kiv74nO4MeQmeojCjuHrMpN2iSnUYxdF668LIkN0sYGs6y0ICb6+JYFMNOgcVM7iqijM8qaLGbJDCTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9e71spRNzWeYceFx7yrK23HE+b+6W+U/FwFh9lspXqY=; b=TozXCAWfpNUPhXCLs3b3CtHqIC+nLDdjeR3cG3Mu/bVFB/hYae8n/ZIuxDK0q1+D2IZl427snTrtsZ9xInLur7ajbogr+qycl84nUza5H0w1RoYPjMIDCrB9wntaG1+qY1fEFxNIJLdpkOU+S7Atwx0mx0elKvAm+1VyMpV20V3iJP63Rd6eQAIehKh7PWjY29A8gQaJPQtv8PTyWVlSW3ChAqyD9BQr6ddn/iQnX4a6hf+ZfIU03TMr4/19kUxKnIEntm9sEhsM2IlFfwwxVdPT6bff/1w5qrfslJjgfu/jTaj0KoW8k3XmH+Gf/3TnO6Xz4MQQuPniz0L3hpy+qQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9e71spRNzWeYceFx7yrK23HE+b+6W+U/FwFh9lspXqY=; b=f6AjtrpRwHQz330mr5Rf6KKiYTHpf7i0k6J+eIQ+tjJi4Xo0UcItwN69nEFfrBdSDz3DeIUXdv10U1EkvUQC2moIrDWcPJS8YKHkhYq+wZIbRSBmjIHTZhO4uVN29VwrBBSRvVCmH5l3Uwinmzl/6OcGkocZ3nXNBtwRjR9ybsPtOYJfOmZrg1/kySLd6ligkFcAOD2yaZvTApXTSCfY8iDi1n1yzuX0yu2+w2SAI29ndTG2xCNeKZGxadXg4njjBT9lmi7FxjUsH8SSyh4yCJl5D2CQR4ca48u1cRVdK4tP4zSY6/uavfk5P31Zety0ZSpXsuhRDpFEoV5K8l+VIA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU0P250MB0817.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3e1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.21; Sun, 28 Aug 2022 23:35:06 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::7d2a:d9d8:f384:4cee]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::7d2a:d9d8:f384:4cee%9]) with mapi id 15.20.5566.021; Sun, 28 Aug 2022 23:35:05 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 29 Aug 2022 01:34:46 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [C81FvnjCseCX2HQ0+yoXU1EzzMTr19jP] X-ClientProxiedBy: FR3P281CA0161.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a2::20) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220828233448.490158-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f33eb6c2-2d65-480d-4b3d-08da894deff4 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmrlP0uwnDwxs8RZ0OmP5JOdQ7OPteHhJ64x7m/BfDGFMBb+dSC38cHbsaltItyif+9yKSJyUOCQh0osz03B6Q+13opGdgBxQIF+ngcuevO1u8X8vDxLKs8hKWtSZTILTsBSofhJn77ZuS8JdIaUeq47E6hzA1fyqUz23ZyPz2WKf7o2pkQzJ0dU9K9Ra5XHHMDCeBiW+FtVyi0bKNDDBtxIWfVagt9GlDbHxCisrn/sC2YhAsOFdC1yeaJM7TOs/gqygmLMRYKLoSeiVP/IbVf0zxoEMT+GIILecPMzDv/pRD033LmuUC9NEfh7NnKowcm8bJ/v1mDvOjay9nfXN8YAUI92FVv3lHzGrkQs9U1VCxSwXyKA8BaJ3OYjhJHOZCZzcxxKNzVG+5096kCVdxfiAazM0OQYe4i1sxuoMezR2cDDVYARA/+t2hhnPZ5ZPuiq8a7nXKMm1XHyUkBoJtMra6tZC8vFePDdmUUoQYWMvZ4Aq4wx4ctz+QqqRtJbc+kCMAvleoqxMaY1oX8N+kiPct4gKrqLn2Xqb4hC/HGeDqDTAFYSITM30i+HLbqOwCLTzdo50jADO91IQjpl/+wJvJaWdOK2TAKpJ8Dd8FCm1ONHQs+ncj1o8cfLx5Oyv60NCELrIOhUyqxcX2KQ/CG6pYj9a0td+WE36o1mvtvQfZJKjlnF0lyBDZE44EoKEqD5vjseLto2YZ+JM449cCmxbkYaQL+GPQ0BCEmO9fhTZyteYaw/J+f+brRO7sxsllg= X-MS-TrafficTypeDiagnostic: DU0P250MB0817:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-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Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2022 23:35:05.9317 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0P250MB0817 Subject: [FFmpeg-devel] [PATCH 14/16] avutil/dict: Move avpriv_dict_set_timestamp() to a header of its own 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tuW+o+V1oGNu It is used almost nowhere, so it needn't be auto-included almost everywhere. Signed-off-by: Andreas Rheinhardt --- libavformat/flvdec.c | 1 + libavformat/ifv.c | 1 + libavformat/matroskadec.c | 1 + libavformat/mov.c | 1 + libavformat/mux_utils.c | 1 + libavformat/mxfdec.c | 1 + libavutil/dict.c | 1 + libavutil/dict_internal.h | 37 +++++++++++++++++++++++++++++++++++++ libavutil/internal.h | 12 ------------ 9 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 libavutil/dict_internal.h diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 10f0ea7736..7f9d795044 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -28,6 +28,7 @@ #include "libavutil/avstring.h" #include "libavutil/channel_layout.h" #include "libavutil/dict.h" +#include "libavutil/dict_internal.h" #include "libavutil/opt.h" #include "libavutil/internal.h" #include "libavutil/intfloat.h" diff --git a/libavformat/ifv.c b/libavformat/ifv.c index 490608c5de..694abd951b 100644 --- a/libavformat/ifv.c +++ b/libavformat/ifv.c @@ -21,6 +21,7 @@ */ #include "libavutil/channel_layout.h" +#include "libavutil/dict_internal.h" #include "avformat.h" #include "internal.h" #include "avio_internal.h" diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index ad7ee390a2..16a3e93611 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -38,6 +38,7 @@ #include "libavutil/base64.h" #include "libavutil/bprint.h" #include "libavutil/dict.h" +#include "libavutil/dict_internal.h" #include "libavutil/display.h" #include "libavutil/intfloat.h" #include "libavutil/intreadwrite.h" diff --git a/libavformat/mov.c b/libavformat/mov.c index 35e2271b14..df45408060 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -32,6 +32,7 @@ #include "libavutil/attributes.h" #include "libavutil/bprint.h" #include "libavutil/channel_layout.h" +#include "libavutil/dict_internal.h" #include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/intfloat.h" diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c index 8b95fc5e7e..764c834fa2 100644 --- a/libavformat/mux_utils.c +++ b/libavformat/mux_utils.c @@ -20,6 +20,7 @@ */ #include "libavutil/dict.h" +#include "libavutil/dict_internal.h" #include "libavutil/internal.h" #include "libavutil/log.h" #include "libavutil/mem.h" diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index feebff67aa..e63e803aa5 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -53,6 +53,7 @@ #include "libavcodec/bytestream.h" #include "libavcodec/internal.h" #include "libavutil/channel_layout.h" +#include "libavutil/dict_internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/parseutils.h" #include "libavutil/timecode.h" diff --git a/libavutil/dict.c b/libavutil/dict.c index 9d3d96c58b..a4f638a1fc 100644 --- a/libavutil/dict.c +++ b/libavutil/dict.c @@ -22,6 +22,7 @@ #include "avstring.h" #include "dict.h" +#include "dict_internal.h" #include "internal.h" #include "mem.h" #include "time_internal.h" diff --git a/libavutil/dict_internal.h b/libavutil/dict_internal.h new file mode 100644 index 0000000000..6d5b0dc2b0 --- /dev/null +++ b/libavutil/dict_internal.h @@ -0,0 +1,37 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_DICT_INTERNAL_H +#define AVUTIL_DICT_INTERNAL_H + +#include + +#include "dict.h" + +/** + * Set a dictionary value to an ISO-8601 compliant timestamp string. + * + * @param dict pointer to a pointer to a dictionary struct. If *dict is NULL + * a dictionary struct is allocated and put in *dict. + * @param key metadata key + * @param timestamp unix timestamp in microseconds + * @return <0 on error + */ +int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp); + +#endif /* AVUTIL_DICT_INTERNAL_H */ diff --git a/libavutil/internal.h b/libavutil/internal.h index 8ee5a101c6..8bdc7b3ac8 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -41,7 +41,6 @@ #include "config.h" #include "attributes.h" #include "timer.h" -#include "dict.h" #include "macros.h" #include "pixfmt.h" @@ -230,15 +229,4 @@ static av_always_inline av_const int avpriv_mirror(int x, int w) void ff_check_pixfmt_descriptors(void); -/** - * Set a dictionary value to an ISO-8601 compliant timestamp string. - * - * @param dict pointer to a pointer to a dictionary struct. If *dict is NULL - * a dictionary struct is allocated and put in *dict. - * @param key metadata key - * @param timestamp unix timestamp in microseconds - * @return <0 on error - */ -int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp); - #endif /* AVUTIL_INTERNAL_H */