From patchwork Mon Jan 9 12:06:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 2140 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp7018758vsb; Mon, 9 Jan 2017 04:06:47 -0800 (PST) X-Received: by 10.194.47.138 with SMTP id d10mr4671980wjn.10.1483963607096; Mon, 09 Jan 2017 04:06:47 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v190si9992174wme.72.2017.01.09.04.06.46; Mon, 09 Jan 2017 04:06:47 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5C29B68A6A3; Mon, 9 Jan 2017 14:06:36 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-2.mx.upcmail.net (vie01a-dmta-pe03-2.mx.upcmail.net [62.179.121.161]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CF35F68A680 for ; Mon, 9 Jan 2017 14:06:30 +0200 (EET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1cQYij-000604-0G for ffmpeg-devel@ffmpeg.org; Mon, 09 Jan 2017 13:06:37 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id WC6b1u02N0S5wYM01C6c1q; Mon, 09 Jan 2017 13:06:36 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 9 Jan 2017 13:06:35 +0100 Message-Id: <20170109120635.14769-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.11.0 Subject: [FFmpeg-devel] [PATCH] avutil/frame: Remove requirements to use accessors for AVFrame 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" After this it is not allowed to remove, insert or change fields except to add them at the end. The accessors were in the past required to achieve ABI compatibility with the fork. The community decided long ago that this ABI compatibility is not needed and should be dropped, so the accessors lost their main reason for existence. Several people prefer not using accessors, the fields affected did not move since 3.0 AFAICS. Signed-off-by: Michael Niedermayer --- libavutil/frame.h | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/libavutil/frame.h b/libavutil/frame.h index b4500923af..38dd767a90 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -420,8 +420,6 @@ typedef struct AVFrame { /** * MPEG vs JPEG YUV range. - * It must be accessed using av_frame_get_color_range() and - * av_frame_set_color_range(). * - encoding: Set by user * - decoding: Set by libavcodec */ @@ -433,8 +431,6 @@ typedef struct AVFrame { /** * YUV colorspace type. - * It must be accessed using av_frame_get_colorspace() and - * av_frame_set_colorspace(). * - encoding: Set by user * - decoding: Set by libavcodec */ @@ -444,8 +440,6 @@ typedef struct AVFrame { /** * frame timestamp estimated using various heuristics, in stream time base - * Code outside libavutil should access this field using: - * av_frame_get_best_effort_timestamp(frame) * - encoding: unused * - decoding: set by libavcodec, read by user. */ @@ -453,8 +447,6 @@ typedef struct AVFrame { /** * reordered pos from the last AVPacket that has been input into the decoder - * Code outside libavutil should access this field using: - * av_frame_get_pkt_pos(frame) * - encoding: unused * - decoding: Read by user. */ @@ -463,8 +455,6 @@ typedef struct AVFrame { /** * duration of the corresponding packet, expressed in * AVStream->time_base units, 0 if unknown. - * Code outside libavutil should access this field using: - * av_frame_get_pkt_duration(frame) * - encoding: unused * - decoding: Read by user. */ @@ -472,8 +462,6 @@ typedef struct AVFrame { /** * metadata. - * Code outside libavutil should access this field using: - * av_frame_get_metadata(frame) * - encoding: Set by user. * - decoding: Set by libavcodec. */ @@ -483,8 +471,6 @@ typedef struct AVFrame { * decode error flags of the frame, set to a combination of * FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there * were errors during the decoding. - * Code outside libavutil should access this field using: - * av_frame_get_decode_error_flags(frame) * - encoding: unused * - decoding: set by libavcodec, read by user. */ @@ -494,8 +480,6 @@ typedef struct AVFrame { /** * number of audio channels, only used for audio. - * Code outside libavutil should access this field using: - * av_frame_get_channels(frame) * - encoding: unused * - decoding: Read by user. */ @@ -503,8 +487,7 @@ typedef struct AVFrame { /** * size of the corresponding packet containing the compressed - * frame. It must be accessed using av_frame_get_pkt_size() and - * av_frame_set_pkt_size(). + * frame. * It is set to a negative value if unknown. * - encoding: unused * - decoding: set by libavcodec, read by user.