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 05BF1490FD for ; Tue, 5 Mar 2024 00:02:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C468E68D4EC; Tue, 5 Mar 2024 02:00:58 +0200 (EET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 625EA68D4E3 for ; Tue, 5 Mar 2024 02:00:52 +0200 (EET) Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-29a7951c6faso3303484a91.1 for ; Mon, 04 Mar 2024 16:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709596850; x=1710201650; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NIfYjwWm5niVOcJhbH1zHQrO2268JqC6VFsD8LzVLPc=; b=kmj+jzzu4DocAos5x7nX+E/7VcIZvnHFFFNxAGrJ5UNhvLxpg1H/p5sS8NctNK6KQo TTx0jxCqD1FnKkzhIHbeFFvVR4MT6dm3ibKS830aK0giZdH6qNt+ATZ1f8kO6WrILx8n kTzQL8rfMGywaSz4Uw4vPreRQnzlynMrjB8JfMJedocXhE7qtxrqHovivkFgqe3LdSnF bJFVygpBTP8HjTW2QVflvCbqssco+GCUcFmQD0IjMI+EBnhZal0zUul79WpRA2cTRfv8 isgqbCt6CBfatiL+kaMOcmFU79xBHgG3jsl5NaE0j0MKcYkecp0QdquJh1swUH3c4sDa xm8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709596850; x=1710201650; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NIfYjwWm5niVOcJhbH1zHQrO2268JqC6VFsD8LzVLPc=; b=U31GH86vtQnAX76M9yv8HRB4bmsQiIA2+Bz4lbyYGtpYv+LXUQZL43+qaWfO7dnVcl oXDjBdIsYJiSxt8Dp1KrfI5x1p9/h0mYDrJP2L2T+1pNpwmsdhXd4z1mA47JCq1f7p45 JJ6bFBQhw0c6iDZ2nFXbf1V8xUj24QltNqBOIH0PNm21+OS1DUYGaqa8mQpwlupnAYNS ki/BtBcgOcD9hA2pdw6X8VN2+7o7FqJL49L3ykj3GGGXTpekRFJFBfjrqq4xTbX/KKer 6sSiNtm3up3TY0vlQv6VKxdQLCeNlMzbIavhSV7dVPOjpVP4VtfdU3U8tOI777ZEVf3H Iiew== X-Gm-Message-State: AOJu0YwbPXMJMtd5h67yZAUoO4SrPqH1tvd81Cr1xOUbNnT4rIdf2Hj8 KDFLE95EEwYqf4bj1SzqtPyK7yjcuB7LSdIeCRsly9tq6FvrEmDK6D16g2GJ X-Google-Smtp-Source: AGHT+IHJiXjEnVW/Z/uYN2Uyu15gIdVp8UszysrL0wxhiEE3GVUYVfXmrXQOi9ToEC/OySrixFegBg== X-Received: by 2002:a17:90b:103:b0:29a:e097:50b4 with SMTP id p3-20020a17090b010300b0029ae09750b4mr6678234pjz.46.1709596849418; Mon, 04 Mar 2024 16:00:49 -0800 (PST) Received: from localhost.localdomain ([190.194.169.124]) by smtp.gmail.com with ESMTPSA id gb2-20020a17090b060200b0029acce2420asm8288663pjb.10.2024.03.04.16.00.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 16:00:48 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Mar 2024 21:00:26 -0300 Message-ID: <20240305000033.10379-6-jamrial@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305000033.10379-1-jamrial@gmail.com> References: <20240305000033.10379-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/9] fftools/ffprobe: export Tile Grid Stream Group parameters 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: Signed-off-by: James Almer --- fftools/ffprobe.c | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index ff05c4c1db..e736023bcd 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -209,6 +209,10 @@ typedef enum { SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION, SECTION_ID_STREAM_GROUP_STREAM_TAGS, SECTION_ID_STREAM_GROUP, + SECTION_ID_STREAM_GROUP_COMPONENTS, + SECTION_ID_STREAM_GROUP_COMPONENT, + SECTION_ID_STREAM_GROUP_PIECES, + SECTION_ID_STREAM_GROUP_PIECE, SECTION_ID_STREAM_GROUP_STREAMS, SECTION_ID_STREAM_GROUP_STREAM, SECTION_ID_STREAM_GROUP_DISPOSITION, @@ -282,8 +286,8 @@ static struct section sections[] = { [SECTION_ID_FRAME_SIDE_DATA_TIMECODE] = { SECTION_ID_FRAME_SIDE_DATA_TIMECODE, "timecode", 0, { -1 } }, [SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST] = { SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST, "components", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_COMPONENT, -1 }, .element_name = "component", .unique_name = "frame_side_data_components" }, [SECTION_ID_FRAME_SIDE_DATA_COMPONENT] = { SECTION_ID_FRAME_SIDE_DATA_COMPONENT, "component", SECTION_FLAG_HAS_VARIABLE_FIELDS|SECTION_FLAG_HAS_TYPE, { SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST, -1 }, .unique_name = "frame_side_data_component", .element_name = "component_entry", .get_type = get_raw_string_type }, - [SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST] = { SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST, "pieces", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_PIECE, -1 }, .element_name = "piece" }, - [SECTION_ID_FRAME_SIDE_DATA_PIECE] = { SECTION_ID_FRAME_SIDE_DATA_PIECE, "piece", SECTION_FLAG_HAS_VARIABLE_FIELDS|SECTION_FLAG_HAS_TYPE, { -1 }, .element_name = "piece_entry", .get_type = get_raw_string_type }, + [SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST] = { SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST, "pieces", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_PIECE, -1 }, .element_name = "piece", .unique_name = "frame_side_data_pieces" }, + [SECTION_ID_FRAME_SIDE_DATA_PIECE] = { SECTION_ID_FRAME_SIDE_DATA_PIECE, "piece", SECTION_FLAG_HAS_VARIABLE_FIELDS|SECTION_FLAG_HAS_TYPE, { -1 }, .element_name = "piece_entry", .unique_name = "frame_side_data_piece", .get_type = get_raw_string_type }, [SECTION_ID_FRAME_LOGS] = { SECTION_ID_FRAME_LOGS, "logs", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_LOG, -1 } }, [SECTION_ID_FRAME_LOG] = { SECTION_ID_FRAME_LOG, "log", 0, { -1 }, }, [SECTION_ID_LIBRARY_VERSIONS] = { SECTION_ID_LIBRARY_VERSIONS, "library_versions", SECTION_FLAG_IS_ARRAY, { SECTION_ID_LIBRARY_VERSION, -1 } }, @@ -309,7 +313,11 @@ static struct section sections[] = { [SECTION_ID_PROGRAMS] = { SECTION_ID_PROGRAMS, "programs", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PROGRAM, -1 } }, [SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION] = { SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_group_stream_disposition" }, [SECTION_ID_STREAM_GROUP_STREAM_TAGS] = { SECTION_ID_STREAM_GROUP_STREAM_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "stream_group_stream_tags" }, - [SECTION_ID_STREAM_GROUP] = { SECTION_ID_STREAM_GROUP, "stream_group", SECTION_FLAG_HAS_TYPE, { SECTION_ID_STREAM_GROUP_TAGS, SECTION_ID_STREAM_GROUP_DISPOSITION, SECTION_ID_STREAM_GROUP_STREAMS, -1 }, .get_type = get_stream_group_type }, + [SECTION_ID_STREAM_GROUP] = { SECTION_ID_STREAM_GROUP, "stream_group", SECTION_FLAG_HAS_TYPE, { SECTION_ID_STREAM_GROUP_TAGS, SECTION_ID_STREAM_GROUP_DISPOSITION, SECTION_ID_STREAM_GROUP_COMPONENTS, SECTION_ID_STREAM_GROUP_STREAMS, -1 }, .get_type = get_stream_group_type }, + [SECTION_ID_STREAM_GROUP_COMPONENTS] = { SECTION_ID_STREAM_GROUP_COMPONENTS, "components", SECTION_FLAG_IS_ARRAY, { SECTION_ID_STREAM_GROUP_COMPONENT, -1 }, .element_name = "component", .unique_name = "stream_group_components" }, + [SECTION_ID_STREAM_GROUP_COMPONENT] = { SECTION_ID_STREAM_GROUP_COMPONENT, "component", SECTION_FLAG_HAS_VARIABLE_FIELDS|SECTION_FLAG_HAS_TYPE, { SECTION_ID_STREAM_GROUP_PIECES, -1 }, .unique_name = "stream_group_component", .element_name = "component_entry", .get_type = get_raw_string_type }, + [SECTION_ID_STREAM_GROUP_PIECES] = { SECTION_ID_STREAM_GROUP_PIECES, "pieces", SECTION_FLAG_IS_ARRAY, { SECTION_ID_STREAM_GROUP_PIECE, -1 }, .element_name = "piece", .unique_name = "stream_group_pieces" }, + [SECTION_ID_STREAM_GROUP_PIECE] = { SECTION_ID_STREAM_GROUP_PIECE, "piece", SECTION_FLAG_HAS_VARIABLE_FIELDS|SECTION_FLAG_HAS_TYPE, { -1 }, .element_name = "piece_entry", .unique_name = "stream_group_piece", .get_type = get_raw_string_type }, [SECTION_ID_STREAM_GROUP_STREAMS] = { SECTION_ID_STREAM_GROUP_STREAMS, "streams", SECTION_FLAG_IS_ARRAY, { SECTION_ID_STREAM_GROUP_STREAM, -1 }, .unique_name = "stream_group_streams" }, [SECTION_ID_STREAM_GROUP_STREAM] = { SECTION_ID_STREAM_GROUP_STREAM, "stream", 0, { SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION, SECTION_ID_STREAM_GROUP_STREAM_TAGS, -1 }, .unique_name = "stream_group_stream" }, [SECTION_ID_STREAM_GROUP_DISPOSITION] = { SECTION_ID_STREAM_GROUP_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_group_disposition" }, @@ -3388,9 +3396,32 @@ static int show_programs(WriterContext *w, InputFile *ifile) static void print_stream_group_params(WriterContext *w, AVStreamGroup *stg) { const char *unknown = "unknown"; - if (stg->type != AV_STREAM_GROUP_PARAMS_NONE) + if (stg->type != AV_STREAM_GROUP_PARAMS_NONE) { print_str("type", av_x_if_null(avformat_stream_group_name(stg->type), unknown)); - else + if (stg->type == AV_STREAM_GROUP_PARAMS_TILE_GRID) { + AVStreamGroupTileGrid *tile_grid = stg->params.tile_grid; + writer_print_section_header(w, NULL, SECTION_ID_STREAM_GROUP_COMPONENTS); + writer_print_section_header(w, "parameters", SECTION_ID_STREAM_GROUP_COMPONENT); + print_int("nb_tiles", tile_grid->nb_tiles); + print_int("coded_width", tile_grid->coded_width); + print_int("coded_height", tile_grid->coded_height); + print_int("horizontal_offset", tile_grid->horizontal_offset); + print_int("vertical_offset", tile_grid->vertical_offset); + print_int("width", tile_grid->width); + print_int("height", tile_grid->height); + writer_print_section_header(w, NULL, SECTION_ID_STREAM_GROUP_PIECES); + for (int i = 0; i < tile_grid->nb_tiles; i++) { + writer_print_section_header(w, "tile_offset", SECTION_ID_STREAM_GROUP_PIECE); + print_int("stream_index", tile_grid->offsets[i].idx); + print_int("tile_horizontal_offset", tile_grid->offsets[i].horizontal); + print_int("tile_vertical_offset", tile_grid->offsets[i].vertical); + writer_print_section_footer(w); + } + writer_print_section_footer(w); + writer_print_section_footer(w); + writer_print_section_footer(w); + } + } else print_str_opt("type", unknown); } -- 2.44.0 _______________________________________________ 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".