From patchwork Tue Feb 22 13:01:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 34444 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:d078:0:0:0:0 with SMTP id x24csp4327997nkx; Tue, 22 Feb 2022 05:03:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyCsR8n+ZlqSuoYSCAoFEEA8M0Q9Iv9r+oNKsYWjjGNj0Eew4Jk8ALQXseTr+7BOPrfTjmb X-Received: by 2002:a17:906:824c:b0:6b8:d8e:c44c with SMTP id f12-20020a170906824c00b006b80d8ec44cmr19315881ejx.548.1645535018813; Tue, 22 Feb 2022 05:03:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645535018; cv=none; d=google.com; s=arc-20160816; b=wPozRy+429eGvbo2v2RWjR1tUUPfzjXAuJ+19vLV+YBcb02Drxx3mBIlj8eSFRdtY4 BIVYnkRf8ZaT38Ld3y4a8VLSgvbSAq5Hx3Y4MVO7GCWXjuo664wkowO/fu4/eLAWETOX 6uESH3Lhj/2qqnhHY5ts/fEo6EXp5x01XNjfMVUI+2ExclDGCUXIbWWYhO4QfzEIAug8 +ktzv10fdr6Dcpp+xOwiBnrvh0HLg9cbE6+Tt1RErKw6nT3MnKqR2VQ1M8fH/TOEfg2i R5RfKb/mFWHYIfklLg4OC1PPiajEPCue5Ct5AtXST9GsiQzb669VDgSUTpXE05mb9Db8 SOkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=U4ybAgJ5S6JzwuNXUdhJprEJIuggyHm4etlFc0ummXc=; b=okpUGyBUwHY/eyNLZcWnH24GuMQpXtMJwQJCQOrRqnDSE4Wvi0tQjSsMtO1gja0v4c /fspxcqwhRGxwyBqDvUdyQr3RKiki3DuajT/z3qoe0sT8LzF1AV0t1HGE0RspxWPFXsk aJLT27EKVMzUaY8Yk1gBqu+4ZP0KsuOIrKzGhCsXNY/cxEdhAwcYN7J8UdNB3RsyQv7y phaLqUIB8rZxQr0oIhTg2O5wylYev+WjOPD6nlOAoBsruXsrTV1Y/5XvSor2mk948y2b W5cyxoAyjeMlH3Iv5mpO/FaRysTQrmFgnGY4v/Yvinb5N++uwQTIEgIqRifCCNCcwO61 0v/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@zanevaniperen.com header.s=key1 header.b=gqB3jqDA; 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=NONE dis=NONE) header.from=zanevaniperen.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j6si13562058eda.492.2022.02.22.05.03.38; Tue, 22 Feb 2022 05:03:38 -0800 (PST) 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=@zanevaniperen.com header.s=key1 header.b=gqB3jqDA; 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=NONE dis=NONE) header.from=zanevaniperen.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0E2A768B148; Tue, 22 Feb 2022 15:02:36 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 930F868B164 for ; Tue, 22 Feb 2022 15:02:29 +0200 (EET) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zanevaniperen.com; s=key1; t=1645534949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tWrVyUQTkgf9aQ+RXQ/UYD6+9i9o4v9/K75vYFkZNhw=; b=gqB3jqDAiZEkXa8nmWYhykKPXKmSz2WtFfReBisf0hdfaU64cogIV1D/yRblWgP/JouMkn XHGmNADIWp4+dt7sN1REfBh9dGd8O61TzeT9YMeC89Ki3Ov8uZF+PGgeERoEYf9pyC3HSA Tmgwqv4VcYX3IHnWOAhSxxptni09Naq+u1QbGcMuuTRPFh3u8GzSStGXnqsE9Ez8KOQJkA 6sLb7PpUpxOiIbebxZ9obmzKHtMV7NfAWFEWT2mRBpMJmR3CSIeOm8hCzljtA2nADte4K3 U2bpOqGDH1/vid2kn/5SLVkWCbGN3dumEaqC2A/oN//MvF3shSkC1Ex7u8QcRg== From: Zane van Iperen To: ffmpeg-devel@ffmpeg.org Date: Tue, 22 Feb 2022 23:01:52 +1000 Message-Id: <20220222130153.289215-7-zane@zanevaniperen.com> In-Reply-To: <20220222130153.289215-1-zane@zanevaniperen.com> References: <20220222130153.289215-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: zanevaniperen.com Subject: [FFmpeg-devel] [PATCH 6/7] avformat/imf: refactor to use avutil/uuid 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: Pierre-Anthony Lemieux Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: VnJ6PeHjqLEM From: Pierre-Anthony Lemieux Signed-off-by: Pierre-Anthony Lemieux Signed-off-by: Zane van Iperen --- libavformat/imf.h | 18 ++++--------- libavformat/imf_cpl.c | 60 +++++++++++++++-------------------------- libavformat/imfdec.c | 34 +++++++++++------------ libavformat/tests/imf.c | 18 ++++++------- 4 files changed, 52 insertions(+), 78 deletions(-) diff --git a/libavformat/imf.h b/libavformat/imf.h index 62c4468ce9..4271cd9582 100644 --- a/libavformat/imf.h +++ b/libavformat/imf.h @@ -58,17 +58,9 @@ #include "avformat.h" #include "libavformat/avio.h" #include "libavutil/rational.h" +#include "libavutil/uuid.h" #include -#define FF_IMF_UUID_FORMAT \ - "urn:uuid:%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-" \ - "%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx" - -/** - * UUID as defined in IETF RFC 422 - */ -typedef uint8_t FFIMFUUID[16]; - /** * IMF Composition Playlist Base Resource */ @@ -84,7 +76,7 @@ typedef struct FFIMFBaseResource { */ typedef struct FFIMFTrackFileResource { FFIMFBaseResource base; - FFIMFUUID track_file_uuid; /**< TrackFileResourceType/TrackFileId */ + AVUUID track_file_uuid; /**< TrackFileResourceType/TrackFileId */ } FFIMFTrackFileResource; /** @@ -109,7 +101,7 @@ typedef struct FFIMFMarkerResource { * IMF Composition Playlist Virtual Track */ typedef struct FFIMFBaseVirtualTrack { - FFIMFUUID id_uuid; /**< TrackId associated with the Virtual Track */ + AVUUID id_uuid; /**< TrackId associated with the Virtual Track */ } FFIMFBaseVirtualTrack; /** @@ -135,7 +127,7 @@ typedef struct FFIMFMarkerVirtualTrack { * IMF Composition Playlist */ typedef struct FFIMFCPL { - FFIMFUUID id_uuid; /**< CompositionPlaylist/Id element */ + AVUUID id_uuid; /**< CompositionPlaylist/Id element */ xmlChar *content_title_utf8; /**< CompositionPlaylist/ContentTitle element */ AVRational edit_rate; /**< CompositionPlaylist/EditRate element */ FFIMFMarkerVirtualTrack *main_markers_track; /**< Main Marker Virtual Track */ @@ -196,7 +188,7 @@ int ff_imf_xml_read_rational(xmlNodePtr element, AVRational *rational); * Reads a UUID from an XML element * @return 0 on success, < 0 AVERROR code on error. */ -int ff_imf_xml_read_uuid(xmlNodePtr element, uint8_t uuid[16]); +int ff_imf_xml_read_uuid(xmlNodePtr element, AVUUID uuid); /** * Returns the first child element with the specified local name diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c index 102a6b4549..c0d43cbfad 100644 --- a/libavformat/imf_cpl.c +++ b/libavformat/imf_cpl.c @@ -70,32 +70,14 @@ xmlNodePtr ff_imf_xml_get_child_element_by_name(xmlNodePtr parent, const char *n return NULL; } -int ff_imf_xml_read_uuid(xmlNodePtr element, uint8_t uuid[16]) +int ff_imf_xml_read_uuid(xmlNodePtr element, AVUUID uuid) { xmlChar *element_text = NULL; - int scanf_ret; int ret = 0; element_text = xmlNodeListGetString(element->doc, element->xmlChildrenNode, 1); - scanf_ret = sscanf(element_text, - FF_IMF_UUID_FORMAT, - &uuid[0], - &uuid[1], - &uuid[2], - &uuid[3], - &uuid[4], - &uuid[5], - &uuid[6], - &uuid[7], - &uuid[8], - &uuid[9], - &uuid[10], - &uuid[11], - &uuid[12], - &uuid[13], - &uuid[14], - &uuid[15]); - if (scanf_ret != 16) { + ret = av_uuid_urn_parse(element_text, uuid); + if (ret) { av_log(NULL, AV_LOG_ERROR, "Invalid UUID\n"); ret = AVERROR_INVALIDDATA; } @@ -370,7 +352,7 @@ static int fill_marker_resource(xmlNodePtr marker_resource_elem, static int push_marker_sequence(xmlNodePtr marker_sequence_elem, FFIMFCPL *cpl) { int ret = 0; - uint8_t uuid[16]; + AVUUID uuid; xmlNodePtr resource_list_elem = NULL; xmlNodePtr resource_elem = NULL; xmlNodePtr track_id_elem = NULL; @@ -388,8 +370,8 @@ static int push_marker_sequence(xmlNodePtr marker_sequence_elem, FFIMFCPL *cpl) } av_log(NULL, AV_LOG_DEBUG, - "Processing IMF CPL Marker Sequence for Virtual Track " FF_IMF_UUID_FORMAT "\n", - UID_ARG(uuid)); + "Processing IMF CPL Marker Sequence for Virtual Track " AV_PRI_UUID "\n", + AV_UUID_ARG(uuid)); /* create main marker virtual track if it does not exist */ if (!cpl->main_markers_track) { @@ -397,9 +379,9 @@ static int push_marker_sequence(xmlNodePtr marker_sequence_elem, FFIMFCPL *cpl) if (!cpl->main_markers_track) return AVERROR(ENOMEM); imf_marker_virtual_track_init(cpl->main_markers_track); - memcpy(cpl->main_markers_track->base.id_uuid, uuid, sizeof(uuid)); + av_uuid_copy(cpl->main_markers_track->base.id_uuid, uuid); - } else if (memcmp(cpl->main_markers_track->base.id_uuid, uuid, sizeof(uuid)) != 0) { + } else if (!av_uuid_equal(cpl->main_markers_track->base.id_uuid, uuid)) { av_log(NULL, AV_LOG_ERROR, "Multiple marker virtual tracks were found\n"); return AVERROR_INVALIDDATA; } @@ -457,7 +439,7 @@ static int has_stereo_resources(xmlNodePtr element) static int push_main_audio_sequence(xmlNodePtr audio_sequence_elem, FFIMFCPL *cpl) { int ret = 0; - uint8_t uuid[16]; + AVUUID uuid; xmlNodePtr resource_list_elem = NULL; xmlNodePtr resource_elem = NULL; xmlNodePtr track_id_elem = NULL; @@ -476,12 +458,12 @@ static int push_main_audio_sequence(xmlNodePtr audio_sequence_elem, FFIMFCPL *cp } av_log(NULL, AV_LOG_DEBUG, - "Processing IMF CPL Audio Sequence for Virtual Track " FF_IMF_UUID_FORMAT "\n", - UID_ARG(uuid)); + "Processing IMF CPL Audio Sequence for Virtual Track " AV_PRI_UUID "\n", + AV_UUID_ARG(uuid)); /* get the main audio virtual track corresponding to the sequence */ for (uint32_t i = 0; i < cpl->main_audio_track_count; i++) { - if (memcmp(cpl->main_audio_tracks[i].base.id_uuid, uuid, sizeof(uuid)) == 0) { + if (av_uuid_equal(cpl->main_audio_tracks[i].base.id_uuid, uuid)) { vt = &cpl->main_audio_tracks[i]; break; } @@ -501,7 +483,7 @@ static int push_main_audio_sequence(xmlNodePtr audio_sequence_elem, FFIMFCPL *cp vt = &cpl->main_audio_tracks[cpl->main_audio_track_count]; imf_trackfile_virtual_track_init(vt); cpl->main_audio_track_count++; - memcpy(vt->base.id_uuid, uuid, sizeof(uuid)); + av_uuid_copy(vt->base.id_uuid, uuid); } /* process resources */ @@ -544,7 +526,7 @@ static int push_main_audio_sequence(xmlNodePtr audio_sequence_elem, FFIMFCPL *cp static int push_main_image_2d_sequence(xmlNodePtr image_sequence_elem, FFIMFCPL *cpl) { int ret = 0; - uint8_t uuid[16]; + AVUUID uuid; xmlNodePtr resource_list_elem = NULL; xmlNodePtr resource_elem = NULL; xmlNodePtr track_id_elem = NULL; @@ -573,16 +555,16 @@ static int push_main_image_2d_sequence(xmlNodePtr image_sequence_elem, FFIMFCPL if (!cpl->main_image_2d_track) return AVERROR(ENOMEM); imf_trackfile_virtual_track_init(cpl->main_image_2d_track); - memcpy(cpl->main_image_2d_track->base.id_uuid, uuid, sizeof(uuid)); + av_uuid_copy(cpl->main_image_2d_track->base.id_uuid, uuid); - } else if (memcmp(cpl->main_image_2d_track->base.id_uuid, uuid, sizeof(uuid)) != 0) { + } else if (!av_uuid_equal(cpl->main_image_2d_track->base.id_uuid, uuid)) { av_log(NULL, AV_LOG_ERROR, "Multiple MainImage virtual tracks found\n"); return AVERROR_INVALIDDATA; } av_log(NULL, AV_LOG_DEBUG, - "Processing IMF CPL Main Image Sequence for Virtual Track " FF_IMF_UUID_FORMAT "\n", - UID_ARG(uuid)); + "Processing IMF CPL Main Image Sequence for Virtual Track " AV_PRI_UUID "\n", + AV_UUID_ARG(uuid)); /* process resources */ resource_list_elem = ff_imf_xml_get_child_element_by_name(image_sequence_elem, "ResourceList"); @@ -746,7 +728,7 @@ static void imf_trackfile_virtual_track_free(FFIMFTrackFileVirtualTrack *vt) static void imf_cpl_init(FFIMFCPL *cpl) { - memset(cpl->id_uuid, 0, sizeof(cpl->id_uuid)); + av_uuid_nil_set(cpl->id_uuid); cpl->content_title_utf8 = NULL; cpl->edit_rate = av_make_q(0, 1); cpl->main_markers_track = NULL; @@ -828,8 +810,8 @@ int ff_imf_parse_cpl(AVIOContext *in, FFIMFCPL **cpl) (*cpl)->content_title_utf8); av_log(NULL, AV_LOG_INFO, - "IMF CPL Id: " FF_IMF_UUID_FORMAT "\n", - UID_ARG((*cpl)->id_uuid)); + "IMF CPL Id: " AV_PRI_UUID "\n", + AV_UUID_ARG((*cpl)->id_uuid)); } xmlFreeDoc(doc); diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c index 3ce850b75a..8a6457d5cc 100644 --- a/libavformat/imfdec.c +++ b/libavformat/imfdec.c @@ -82,7 +82,7 @@ * IMF Asset locator */ typedef struct IMFAssetLocator { - FFIMFUUID uuid; + AVUUID uuid; char *absolute_uri; } IMFAssetLocator; @@ -222,7 +222,7 @@ static int parse_imf_asset_map_from_xml_dom(AVFormatContext *s, return AVERROR_INVALIDDATA; } - av_log(s, AV_LOG_DEBUG, "Found asset id: " FF_IMF_UUID_FORMAT "\n", UID_ARG(asset->uuid)); + av_log(s, AV_LOG_DEBUG, "Found asset id: " AV_PRI_URN_UUID "\n", AV_UUID_ARG(asset->uuid)); if (!(node = ff_imf_xml_get_child_element_by_name(asset_element, "ChunkList"))) { av_log(s, AV_LOG_ERROR, "Unable to parse asset map XML - missing ChunkList node\n"); @@ -330,7 +330,7 @@ clean_up: return ret; } -static IMFAssetLocator *find_asset_map_locator(IMFAssetLocatorMap *asset_map, FFIMFUUID uuid) +static IMFAssetLocator *find_asset_map_locator(IMFAssetLocatorMap *asset_map, AVUUID uuid) { for (uint32_t i = 0; i < asset_map->asset_count; i++) { if (memcmp(asset_map->assets[i].uuid, uuid, 16) == 0) @@ -451,15 +451,15 @@ static int open_track_file_resource(AVFormatContext *s, if (!asset_locator) { av_log(s, AV_LOG_ERROR, - "Could not find asset locator for UUID: " FF_IMF_UUID_FORMAT "\n", - UID_ARG(track_file_resource->track_file_uuid)); + "Could not find asset locator for UUID: " AV_PRI_URN_UUID "\n", + AV_UUID_ARG(track_file_resource->track_file_uuid)); return AVERROR_INVALIDDATA; } av_log(s, AV_LOG_DEBUG, - "Found locator for " FF_IMF_UUID_FORMAT ": %s\n", - UID_ARG(asset_locator->uuid), + "Found locator for " AV_PRI_URN_UUID ": %s\n", + AV_UUID_ARG(asset_locator->uuid), asset_locator->absolute_uri); if (track->resource_count > INT32_MAX - track_file_resource->base.repeat_count @@ -521,14 +521,14 @@ static int open_virtual_track(AVFormatContext *s, for (uint32_t i = 0; i < virtual_track->resource_count; i++) { av_log(s, AV_LOG_DEBUG, - "Open stream from file " FF_IMF_UUID_FORMAT ", stream %d\n", - UID_ARG(virtual_track->resources[i].track_file_uuid), + "Open stream from file " AV_PRI_URN_UUID ", stream %d\n", + AV_UUID_ARG(virtual_track->resources[i].track_file_uuid), i); if ((ret = open_track_file_resource(s, &virtual_track->resources[i], track)) != 0) { av_log(s, AV_LOG_ERROR, - "Could not open image track resource " FF_IMF_UUID_FORMAT "\n", - UID_ARG(virtual_track->resources[i].track_file_uuid)); + "Could not open image track resource " AV_PRI_URN_UUID "\n", + AV_UUID_ARG(virtual_track->resources[i].track_file_uuid)); goto clean_up; } } @@ -604,8 +604,8 @@ static int open_cpl_tracks(AVFormatContext *s) if ((ret = open_virtual_track(s, c->cpl->main_image_2d_track, track_index++)) != 0) { av_log(s, AV_LOG_ERROR, - "Could not open image track " FF_IMF_UUID_FORMAT "\n", - UID_ARG(c->cpl->main_image_2d_track->base.id_uuid)); + "Could not open image track " AV_PRI_URN_UUID "\n", + AV_UUID_ARG(c->cpl->main_image_2d_track->base.id_uuid)); return ret; } } @@ -614,8 +614,8 @@ static int open_cpl_tracks(AVFormatContext *s) if ((ret = open_virtual_track(s, &c->cpl->main_audio_tracks[i], track_index++)) != 0) { av_log(s, AV_LOG_ERROR, - "Could not open audio track " FF_IMF_UUID_FORMAT "\n", - UID_ARG(c->cpl->main_audio_tracks[i].base.id_uuid)); + "Could not open audio track " AV_PRI_URN_UUID "\n", + AV_UUID_ARG(c->cpl->main_audio_tracks[i].base.id_uuid)); return ret; } } @@ -649,8 +649,8 @@ static int imf_read_header(AVFormatContext *s) av_log(s, AV_LOG_DEBUG, - "parsed IMF CPL: " FF_IMF_UUID_FORMAT "\n", - UID_ARG(c->cpl->id_uuid)); + "parsed IMF CPL: " AV_PRI_URN_UUID "\n", + AV_UUID_ARG(c->cpl->id_uuid)); if (!c->asset_map_paths) { c->asset_map_paths = av_append_path_component(c->base_url, "ASSETMAP.xml"); diff --git a/libavformat/tests/imf.c b/libavformat/tests/imf.c index 142aa04261..e65629ccbc 100644 --- a/libavformat/tests/imf.c +++ b/libavformat/tests/imf.c @@ -304,7 +304,7 @@ static int test_cpl_parsing(void) } printf("%s\n", cpl->content_title_utf8); - printf(FF_IMF_UUID_FORMAT "\n", UID_ARG(cpl->id_uuid)); + printf(AV_PRI_URN_UUID "\n", AV_UUID_ARG(cpl->id_uuid)); printf("%i %i\n", cpl->edit_rate.num, cpl->edit_rate.den); printf("Marker resource count: %" PRIu32 "\n", cpl->main_markers_track->resource_count); @@ -320,7 +320,7 @@ static int test_cpl_parsing(void) printf("Main image resource count: %" PRIu32 "\n", cpl->main_image_2d_track->resource_count); for (uint32_t i = 0; i < cpl->main_image_2d_track->resource_count; i++) { printf("Track file resource %" PRIu32 "\n", i); - printf(" " FF_IMF_UUID_FORMAT "\n", UID_ARG(cpl->main_image_2d_track->resources[i].track_file_uuid)); + printf(" " AV_PRI_URN_UUID "\n", AV_UUID_ARG(cpl->main_image_2d_track->resources[i].track_file_uuid)); } printf("Main audio track count: %" PRIu32 "\n", cpl->main_audio_track_count); @@ -329,7 +329,7 @@ static int test_cpl_parsing(void) printf(" Main audio resource count: %" PRIu32 "\n", cpl->main_audio_tracks[i].resource_count); for (uint32_t j = 0; j < cpl->main_audio_tracks[i].resource_count; j++) { printf(" Track file resource %" PRIu32 "\n", j); - printf(" " FF_IMF_UUID_FORMAT "\n", UID_ARG(cpl->main_audio_tracks[i].resources[j].track_file_uuid)); + printf(" " AV_PRI_URN_UUID "\n", AV_UUID_ARG(cpl->main_audio_tracks[i].resources[j].track_file_uuid)); } } @@ -363,15 +363,15 @@ static int test_bad_cpl_parsing(void) static int check_asset_locator_attributes(IMFAssetLocator *asset, IMFAssetLocator *expected_asset) { - printf("\tCompare " FF_IMF_UUID_FORMAT " to " FF_IMF_UUID_FORMAT ".\n", - UID_ARG(asset->uuid), - UID_ARG(expected_asset->uuid)); + printf("\tCompare " AV_PRI_URN_UUID " to " AV_PRI_URN_UUID ".\n", + AV_UUID_ARG(asset->uuid), + AV_UUID_ARG(expected_asset->uuid)); for (uint32_t i = 0; i < 16; ++i) { if (asset->uuid[i] != expected_asset->uuid[i]) { - printf("Invalid asset locator UUID: found " FF_IMF_UUID_FORMAT " instead of " FF_IMF_UUID_FORMAT " expected.\n", - UID_ARG(asset->uuid), - UID_ARG(expected_asset->uuid)); + printf("Invalid asset locator UUID: found " AV_PRI_URN_UUID " instead of " AV_PRI_URN_UUID " expected.\n", + AV_UUID_ARG(asset->uuid), + AV_UUID_ARG(expected_asset->uuid)); return 1; } }