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 27FB049BEF for ; Mon, 4 Mar 2024 18:07:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0E8C768D3F4; Mon, 4 Mar 2024 20:07:09 +0200 (EET) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 327F068D335 for ; Mon, 4 Mar 2024 20:07:03 +0200 (EET) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-29b2c48fa3dso1251044a91.1 for ; Mon, 04 Mar 2024 10:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709575620; x=1710180420; 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=ZZGoFyBPhX7bAv1Ig6vIfeSlkgV1z2gomdElOoTDzCc=; b=Lk/oYFJ6FNvBv5eyzbVbsydO8GH2onDdW9bbdi/5EhIeFQdnkYfVN+awTPcmKzDjJF /VbMhQA8pffAOgRR5DeXzWN0coIplfcKkL9E8yeAt5nVLLDfP5I6jmkyTJSZQghUXNKa mKQTTQn3bkuztbbRoPBD0jAlkDA8tN4+Pa5Jf0g+Vojwt5VwgZ1+VkyeC8WivyehK9rp xWYg7g/Qyex2hweDwTnk/esN79jflZwSNduv9mjoVIdVV4SmcMXP2KtG3uOZhQmdCxCJ ug7uXbdjv2yMlMCKqCpaBkuxSejCxAnCCInj1piM7CmdIz+x597sI3d2Kq4/+gJ5+lKY g1bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709575620; x=1710180420; 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=ZZGoFyBPhX7bAv1Ig6vIfeSlkgV1z2gomdElOoTDzCc=; b=c2+ZDFdvyn085Man4XP1uoNB4Lc6UIdCX1BRh3/0VT4mYZgkB8k//dJNzSfn/WkNwm sAgQgRIHGLdxvnads+xwWwljtG3aq9EHKFjFoA9aW5IfzMvS45HZ60Y/R9sEtMey2Goo t2AStdQyl6KCnAr9bHbPKTlQoi1/cXuIcI4J35P7rkenQdYZf2AOwQwl44MNTMi8/6nt R2+i+EcPsbaYhM8Lexds33PqlN6i+lPismNENncUKduQ2B4Xgqcse5rjQOZmZ+sWNjQO 6qK3wG2510MAynuplhDdsNk9uwrwTGsPAfg/Sm9CfROAeL6E4mAgfnnksjFSF6W9+gh5 SK3A== X-Gm-Message-State: AOJu0YwmyR/0HVnccWzxMSmql/G3lc8UBnyISD8rC49g/IJ/9eoutMkK oPYYaD5XEpPlo9LCK32yU2Kac6Cmi1hjhd3o7UPDlOnftEyCKE9eLMOLds83 X-Google-Smtp-Source: AGHT+IH07HZFK8Z/vaK63UPFHY4bNqEvYA+5zAC1kqdWW3yqgppzP/N/N3YzLFqLN5MrNpUkfSuCIw== X-Received: by 2002:a17:90a:1110:b0:29b:4a20:18b7 with SMTP id d16-20020a17090a111000b0029b4a2018b7mr2854860pja.8.1709575620064; Mon, 04 Mar 2024 10:07:00 -0800 (PST) Received: from localhost.localdomain ([190.194.169.124]) by smtp.gmail.com with ESMTPSA id gx15-20020a17090b124f00b00298ca46547fsm8089145pjb.36.2024.03.04.10.06.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 10:06:59 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Mar 2024 15:06:10 -0300 Message-ID: <20240304180613.7280-1-jamrial@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240125134425.374-1-jamrial@gmail.com> References: <20240125134425.374-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH5] avcodec/codec_par: Reorder AVCodecParameters fields 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: Move related fields closer together. Signed-off-by: James Almer --- libavcodec/codec_par.h | 59 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/libavcodec/codec_par.h b/libavcodec/codec_par.h index fa6851294f..f4b9bb5c06 100644 --- a/libavcodec/codec_par.h +++ b/libavcodec/codec_par.h @@ -72,6 +72,19 @@ typedef struct AVCodecParameters { */ int extradata_size; + /** + * Additional data associated with the entire stream. + * + * Should be allocated with av_packet_side_data_new() or + * av_packet_side_data_add(), and will be freed by avcodec_parameters_free(). + */ + AVPacketSideData *coded_side_data; + + /** + * Amount of entries in @ref coded_side_data. + */ + int nb_coded_side_data; + /** * - video: the pixel format, the value corresponds to enum AVPixelFormat. * - audio: the sample format, the value corresponds to enum AVSampleFormat. @@ -130,6 +143,18 @@ typedef struct AVCodecParameters { */ AVRational sample_aspect_ratio; + /** + * Video only. Number of frames per second, for streams with constant frame + * durations. Should be set to { 0, 1 } when some frames have differing + * durations or if the value is not known. + * + * @note This field correponds to values that are stored in codec-level + * headers and is typically overridden by container/transport-layer + * timestamps, when available. It should thus be used only as a last resort, + * when no higher-level timing information is available. + */ + AVRational framerate; + /** * Video only. The order of the fields in interlaced video. */ @@ -149,6 +174,10 @@ typedef struct AVCodecParameters { */ int video_delay; + /** + * Audio only. The channel layout and number of channels. + */ + AVChannelLayout ch_layout; /** * Audio only. The number of audio samples per second. */ @@ -183,36 +212,6 @@ typedef struct AVCodecParameters { * Audio only. Number of samples to skip after a discontinuity. */ int seek_preroll; - - /** - * Audio only. The channel layout and number of channels. - */ - AVChannelLayout ch_layout; - - /** - * Video only. Number of frames per second, for streams with constant frame - * durations. Should be set to { 0, 1 } when some frames have differing - * durations or if the value is not known. - * - * @note This field correponds to values that are stored in codec-level - * headers and is typically overridden by container/transport-layer - * timestamps, when available. It should thus be used only as a last resort, - * when no higher-level timing information is available. - */ - AVRational framerate; - - /** - * Additional data associated with the entire stream. - * - * Should be allocated with av_packet_side_data_new() or - * av_packet_side_data_add(), and will be freed by avcodec_parameters_free(). - */ - AVPacketSideData *coded_side_data; - - /** - * Amount of entries in @ref coded_side_data. - */ - int nb_coded_side_data; } AVCodecParameters; /** -- 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".