From patchwork Wed Oct 4 10:51:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 5410 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.76 with SMTP id m12csp705036jah; Wed, 4 Oct 2017 03:51:59 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBuW+KaPJYnvxm8AOjWE2i81A1G2XJpWcj+z0ZABc85gUhoRF15DdwKt+iUsnbfjmpQM7Va X-Received: by 10.223.134.157 with SMTP id 29mr19562732wrx.72.1507114319888; Wed, 04 Oct 2017 03:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507114319; cv=none; d=google.com; s=arc-20160816; b=EL2ubEelQOduU+OLqA6+pH9ls0uN3sHw3Sw3o0jDCBmYDPkCr1K0UXYw614xlGjqry 3DZshCP87xqBWYQcvUrWa8KDFT1fgxRXPjoi/HsXf1dzCzTtXMnPEVF5HTI3X+grDWfz CYPz/4jWcf7JqZu+CbWxGcbGp6RqR2Gt41QNKIempOkZEEuflbtRO3XfiPOqQvTglyIX k9nEf5h6J83rFnE/MoNNfq/kdrtD07pJ0VwR12rUv2VaNj6KkhZwTF/OzEjDRM7YChO0 UboFTA+/QJcwOANqtzJ8BT/rvVkclcrYQ3Jt25ydEweZRGhgIRroFKpq5LUic059JOEG dbaw== 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:delivered-to :arc-authentication-results; bh=RZ/lVU34oZQTTgMHpda1PhAhP4TzCO+8JyfCcBi+n2o=; b=LyyXjC6fvVwKlKQjFGAOP0l2u5FiJR3qedGVbvIfXO/3blSr5peS9eMT1SVist+arg gedQpT3+zoE5ieEKYGE4fuSZSU9cr4OIBO8oel4WZGyYCtdLfwRoLSH9GPyaAn7cCXF+ Na0e2fHqyQR9cmy/zWwxZma9bpMv8XfghPSyBrdj2FOxI5IfMlnFzqahSs9lHYarljc/ SspBMk5drfWbZpcY2Bg6jp0iQLIXR+zetfC4PZTKASadx3IawPgoZvXiDWSap4UgL2+W 4f9gaMtw1UXQUOk1ZWvBtyBeG7LLXWGNgagOEz1Iko6XWPueYJ2bSEkUFT3Pom0MUyv7 IaAQ== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n131si4349983wmd.23.2017.10.04.03.51.59; Wed, 04 Oct 2017 03:51:59 -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; 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 5293568A267; Wed, 4 Oct 2017 13:51:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-3.mx.upcmail.net (vie01a-qmta-pe01-3.mx.upcmail.net [62.179.121.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E40AD68A263 for ; Wed, 4 Oct 2017 13:51:41 +0300 (EEST) Received: from [172.31.218.51] (helo=vie01a-dmta-pe07-3.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dzhHQ-0005Mz-7G for ffmpeg-devel@ffmpeg.org; Wed, 04 Oct 2017 12:51:56 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe07.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dzhHK-0002MQ-Ht for ffmpeg-devel@ffmpeg.org; Wed, 04 Oct 2017 12:51:50 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id HNri1w01c0S5wYM01NrjYL; Wed, 04 Oct 2017 12:51:43 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 4 Oct 2017 12:51:42 +0200 Message-Id: <20171004105142.7675-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.14.2 Subject: [FFmpeg-devel] [PATCH] avcodec/v4l2_context: Replace "0 in case of success" by "non negative in case of success" 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" This makes the return code consistent with most of FFmpeg Signed-off-by: Michael Niedermayer --- libavcodec/v4l2_context.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/v4l2_context.h b/libavcodec/v4l2_context.h index 503cc36dc4..63e01dfb89 100644 --- a/libavcodec/v4l2_context.h +++ b/libavcodec/v4l2_context.h @@ -97,7 +97,7 @@ typedef struct V4L2Context { * Initializes a V4L2Context. * * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables. - * @return 0 in case of success, a negative value representing the error otherwise. + * @return non negative in case of success, a negative value representing the error otherwise. */ int ff_v4l2_context_init(V4L2Context* ctx); @@ -105,7 +105,7 @@ int ff_v4l2_context_init(V4L2Context* ctx); * Sets the V4L2Context format in the v4l2 driver. * * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables. - * @return 0 in case of success, a negative value representing the error otherwise. + * @return non negative in case of success, a negative value representing the error otherwise. */ int ff_v4l2_context_set_format(V4L2Context* ctx); @@ -113,7 +113,7 @@ int ff_v4l2_context_set_format(V4L2Context* ctx); * Queries the driver for a valid v4l2 format and copies it to the context. * * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables. - * @return 0 in case of success, a negative value representing the error otherwise. + * @return non negative in case of success, a negative value representing the error otherwise. */ int ff_v4l2_context_get_format(V4L2Context* ctx); @@ -133,7 +133,7 @@ void ff_v4l2_context_release(V4L2Context* ctx); * @param[in] cmd The status to set (VIDIOC_STREAMON or VIDIOC_STREAMOFF). * Warning: If VIDIOC_STREAMOFF is sent to a buffer context that still has some frames buffered, * those frames will be dropped. - * @return 0 in case of success, a negative value representing the error otherwise. + * @return non negative in case of success, a negative value representing the error otherwise. */ int ff_v4l2_context_set_status(V4L2Context* ctx, int cmd); @@ -143,7 +143,7 @@ int ff_v4l2_context_set_status(V4L2Context* ctx, int cmd); * The pkt must be non NULL. * @param[in] ctx The V4L2Context to dequeue from. * @param[inout] pkt The AVPacket to dequeue to. - * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error. + * @return non negative in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error. */ int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt); @@ -153,7 +153,7 @@ int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt); * The frame must be non NULL. * @param[in] ctx The V4L2Context to dequeue from. * @param[inout] f The AVFrame to dequeue to. - * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error. + * @return non negative in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error. */ int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f); @@ -165,7 +165,7 @@ int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f); * * @param[in] ctx The V4L2Context to enqueue to. * @param[in] pkt A pointer to an AVPacket. - * @return 0 in case of success, a negative error otherwise. + * @return non negative in case of success, a negative error otherwise. */ int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt); @@ -176,7 +176,7 @@ int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt); * * @param[in] ctx The V4L2Context to enqueue to. * @param[in] f A pointer to an AVFrame to enqueue. - * @return 0 in case of success, a negative error otherwise. + * @return non negative in case of success, a negative error otherwise. */ int ff_v4l2_context_enqueue_frame(V4L2Context* ctx, const AVFrame* f);