From patchwork Mon Oct 23 16:08:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 5659 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp6898714jah; Mon, 23 Oct 2017 09:08:44 -0700 (PDT) X-Received: by 10.223.178.26 with SMTP id u26mr12300812wra.239.1508774924035; Mon, 23 Oct 2017 09:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508774923; cv=none; d=google.com; s=arc-20160816; b=yG7AinuD4xuIlubpjPyo6MWzTKhifqwJOz7BIm/qeTtV8AgmwgASdvcD6zk1xtNXlz A5O7ZzcpOMPfceVLEWvkc49rs5/r0bQ36dcCGXNKppXmTR6tmKo8gUjH5IHlDsduZu3P PCnJbBZxLhiXNTzbjUvzaHQevW/Z0jxIik2rOdnkE7t55WCGBZ3C4dn32qAo1A8rB1ox Jk/xVDKggWlTSQZZzf3cDAM5CSjUBLTQhmMukbH7qlKB0pC9gKOLax5ObcUwe8nSjstm CJoGLO8K9B3Miw8sPjtqRGFq7PAfsVAhVPEu/CrJG4wOpMdpVUHEtMeGwQaVejx4M7QK WhgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=2lTnOpg3cXT5lBMEFKTdJewwzhBrMTmEgKlrjTgTd3c=; b=Oh4ycBR21dZtKSA2ALcHlZnU9+cTYE/XTBfq4Rp2PtH+okeXef/mqh3YgksQKt57Gq LnyP5PXYZHvJ57h/nDG3EGWGLsw1smbT7Pt67WWX4a2SsaEOv2j+qgnlk9ugVFmVWFnt NQUXrH9QwEi+XbMYS84kOO1Ix8yjYqKwS8tn+aNRjbjcsdV/VjRtRXeZtcFuTXzXArrC 2Y3PFIrU0Q9SQoxsgVbRjDQDKxzdKDOmfproBmeHG/HOGDeCTUZBpjexs1/ijvXUf6Me +zsoX/Eio/CGTBJQHtHNBVIQdM6GfDsRgKXIPdZcElHV3xJ3GOZyEoXQrNUn8OiE4eBg HthA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Niv62pga; 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=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x5si5425365wre.387.2017.10.23.09.08.43; Mon, 23 Oct 2017 09:08:43 -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=@gmail.com header.s=20161025 header.b=Niv62pga; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 07CD968A169; Mon, 23 Oct 2017 19:08:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk0-f194.google.com (mail-qk0-f194.google.com [209.85.220.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7EBCC689D7C for ; Mon, 23 Oct 2017 19:08:28 +0300 (EEST) Received: by mail-qk0-f194.google.com with SMTP id l194so22589288qke.13 for ; Mon, 23 Oct 2017 09:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=gxDATCk2jNsohZjgOX16+psYVu/J37p7nehUwcB/tVE=; b=Niv62pgaZSPH0JuwwogdZLx8c/tZ8D29AoDNuNzmJ3tNPMtPAnSdlAguWLoyyA5prS hqefpFz+JOnpcYKb+iZPQznAmnYbe/WembtMH3uEiJHOxNE6j7jFrN49GZUFUUtyYgXu sWh9rkfAJRo4I2uWlnVgDbHUbf7aI8s8bc+96cY0vQYyTgkKVRCMMUGlWJRNqPWX735K hrvVMu3bZyn8oTDwq+nqU9Zk1pAaygyVfDBs7CipQgg7TiFaCvKCEbGjKtL/dYXX5VHt g7u1gx5jtMIQBNCcGOo0y8/n7F6w/QFZMmOqG11nEYgFGPlokkYA5v2FVZrpFjpqBMMR 8pLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=gxDATCk2jNsohZjgOX16+psYVu/J37p7nehUwcB/tVE=; b=Japc1RKIMxu5nFqIlwCm5Enq0ZUwiSpvgf9ZIAz/C353jHbt8u91lWQXIham4TGXpx gTawL39m5nYkk+rkA4bXqJ4PkbYr668wZVOGa2m6RLuwVIa0R1MV0at+VkIjQ2ax30Rj Vu4AU3B68MzPQpx1CQAeCJZ6kRT+zUzYcX15dTbRrokyVcM1iFYkXBbDF65xsIbGVpQd B6QI8kYZwHrPCPZAREoed2LsRmZ4EfxbVcQt10o5NFfE7SS0rCos3s3/EWO9Yw/2gDRF CXq/G7rRATwQQZqAI4p6HNMvDytdG0z9D+ZFVlVPyVzmITZiVOy69Xqv4mdvqYSJ2kre 25cA== X-Gm-Message-State: AMCzsaW652QAuboMZ4pi5bdSOv2Nj7Fme9byQ9GHR918taxil46F/tlE h76Cy4P2bNbbUCfDCLT/KhhOmQ== X-Google-Smtp-Source: ABhQp+SNvrKFAP4rrTFAeCe/4ox2ofDKSyNyPkFcH6jRhJXkIAZQ70zSBwq01/dBFVV0TcoJ/tEcmg== X-Received: by 10.55.120.131 with SMTP id t125mr19386846qkc.63.1508774913833; Mon, 23 Oct 2017 09:08:33 -0700 (PDT) Received: from localhost.localdomain ([181.231.59.220]) by smtp.gmail.com with ESMTPSA id w6sm5188214qtc.53.2017.10.23.09.08.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Oct 2017 09:08:33 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 23 Oct 2017 13:08:20 -0300 Message-Id: <20171023160821.6384-1-jamrial@gmail.com> X-Mailer: git-send-email 2.14.2 Subject: [FFmpeg-devel] [PATCH 1/2] avformat: move public AVStream fields up in the struct X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Remove the silly second notice. Signed-off-by: James Almer --- libavformat/avformat.h | 65 ++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index ece1b179f3..7594277f06 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -980,6 +980,34 @@ typedef struct AVStream { int event_flags; #define AVSTREAM_EVENT_FLAG_METADATA_UPDATED 0x0001 ///< The call resulted in updated metadata. + /** + * Real base framerate of the stream. + * This is the lowest framerate with which all timestamps can be + * represented accurately (it is the least common multiple of all + * framerates in the stream). Note, this value is just a guess! + * For example, if the time base is 1/90000 and all frames have either + * approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1. + */ + AVRational r_frame_rate; + + /** + * String containing paris of key and values describing recommended encoder configuration. + * Paris are separated by ','. + * Keys are separated from values by '='. + */ + char *recommended_encoder_configuration; + + /** + * Codec parameters associated with this stream. Allocated and freed by + * libavformat in avformat_new_stream() and avformat_free_context() + * respectively. + * + * - demuxing: filled by libavformat on stream creation or in + * avformat_find_stream_info() + * - muxing: filled by the caller before avformat_write_header() + */ + AVCodecParameters *codecpar; + /***************************************************************** * All fields below this line are not part of the public API. They * may not be used outside of libavformat and can be changed and @@ -1064,19 +1092,6 @@ typedef struct AVStream { int nb_index_entries; unsigned int index_entries_allocated_size; - /** - * Real base framerate of the stream. - * This is the lowest framerate with which all timestamps can be - * represented accurately (it is the least common multiple of all - * framerates in the stream). Note, this value is just a guess! - * For example, if the time base is 1/90000 and all frames have either - * approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1. - * - * Code outside avformat should access this field using: - * av_stream_get/set_r_frame_rate(stream) - */ - AVRational r_frame_rate; - /** * Stream Identifier * This is the MPEG-TS stream identifier +1 @@ -1182,19 +1197,6 @@ typedef struct AVStream { */ int inject_global_side_data; - /***************************************************************** - * All fields above this line are not part of the public API. - * Fields below are part of the public API and ABI again. - ***************************************************************** - */ - - /** - * String containing paris of key and values describing recommended encoder configuration. - * Paris are separated by ','. - * Keys are separated from values by '='. - */ - char *recommended_encoder_configuration; - /** * display aspect ratio (0 if unknown) * - encoding: unused @@ -1209,17 +1211,6 @@ typedef struct AVStream { * Must not be accessed in any way by callers. */ AVStreamInternal *internal; - - /* - * Codec parameters associated with this stream. Allocated and freed by - * libavformat in avformat_new_stream() and avformat_free_context() - * respectively. - * - * - demuxing: filled by libavformat on stream creation or in - * avformat_find_stream_info() - * - muxing: filled by the caller before avformat_write_header() - */ - AVCodecParameters *codecpar; } AVStream; AVRational av_stream_get_r_frame_rate(const AVStream *s);