From patchwork Thu Aug 4 13:00:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sebechlebskyjan@gmail.com X-Patchwork-Id: 90 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.67 with SMTP id o64csp1187092vsd; Thu, 4 Aug 2016 06:00:58 -0700 (PDT) X-Received: by 10.194.21.200 with SMTP id x8mr73624549wje.129.1470315658067; Thu, 04 Aug 2016 06:00:58 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id wn5si13494739wjb.200.2016.08.04.06.00.56; Thu, 04 Aug 2016 06:00:58 -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; 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 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 CE6EE68A492; Thu, 4 Aug 2016 16:00:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2B6AA680483 for ; Thu, 4 Aug 2016 16:00:36 +0300 (EEST) Received: by mail-wm0-f65.google.com with SMTP id x83so44083022wma.3 for ; Thu, 04 Aug 2016 06:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ID/WVPMUBzZbP+uevGQWtmtIQQ8YCv7B6tmFczDmP1M=; b=KAXC++Bw+URywvkRhfNylBU/ElMs0QwjbkT+s9oG9lVeFb37UDSjDZQID06ZlWMSqR lg+3XMMPj4ZCzWBzxJaFzPlDXi8akYLZQwZ+5q7XG89p2JBCBumEc31PgkD3VK4OBgG3 6EmfRsVHcFN0rYOKUNS20E7lXMvdmVgKJXP1mINCms8UCzJLkg3a1gbr5mwLLYyUkYxc INL4ihybNrUZhgzmKRfIw5PPRq5bZ4h8olGJ2JukhMbv8YlhKFx1ya5SkiFqSMKIrGQ4 Abccp0ygJFhNq2XRYRCf3rRmASDNS0rKrDZ2U0kmlPbPsphOfW6uyirKJqoabzHVyBLU pZZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ID/WVPMUBzZbP+uevGQWtmtIQQ8YCv7B6tmFczDmP1M=; b=EKM7HaLSCg6LguPb506Hz55xe0hD1DJwRhNlzHRxxL/jF9a3ZlWBwnmS+6g6W+AqqN /T10Kkqg5ODte8o8JhTGRS4fi+8Gjid5wOnEBAwnjOjLBXg/MIbnvZmOfCs4FdvZeRjm SVVaCOSZTdVtMEPSTBObdMH/OEWv7XAW+tfGyPEwW5w0vEJWwr31cjssh6SdeOKTCDyJ acLZ7LrcwOd2eW5MXqrJ37PVXbsaW7vPT9lCCF+m9qlorlCV87tZ8rPs3r+mQ+hQoA37 fEqXy3m8f2aV6WAIFz/0gBSR0AeZPzPFoKu1B6HwyB+1v182rzWS4G4/nwdi26y7Cts/ IMuQ== X-Gm-Message-State: AEkoousm1eIqjaOk4CgPcMIqXAYfWVEu2DadsRVezxVgg0YDzX4P/pfkihX2MkjYSox+sA== X-Received: by 10.28.29.211 with SMTP id d202mr69262082wmd.64.1470315642081; Thu, 04 Aug 2016 06:00:42 -0700 (PDT) Received: from localhost.localdomain (157.174.broadband3.iol.cz. [85.70.174.157]) by smtp.gmail.com with ESMTPSA id h7sm12784318wjd.17.2016.08.04.06.00.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Aug 2016 06:00:41 -0700 (PDT) From: sebechlebskyjan@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 4 Aug 2016 15:00:28 +0200 Message-Id: <1470315628-19056-1-git-send-email-sebechlebskyjan@gmail.com> X-Mailer: git-send-email 1.9.1 Subject: [FFmpeg-devel] [PATCH v2 07/11] avformat/avformat.h: Add comments regarding AVFMT_FLAG_NONBLOCK. 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 Cc: Jan Sebechlebsky MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Jan Sebechlebsky Add comments regarding AVFMG_FLAG_NONBLOCK usage with muxers. Signed-off-by: Jan Sebechlebsky --- There are no changes in this patch, it is just rebased version because of change in previous patch. libavformat/avformat.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 3f6a6eb..e2c4c41 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1428,7 +1428,7 @@ typedef struct AVFormatContext { int flags; #define AVFMT_FLAG_GENPTS 0x0001 ///< Generate missing pts even if it requires parsing future frames. #define AVFMT_FLAG_IGNIDX 0x0002 ///< Ignore index. -#define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input. +#define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input / writing packets to output. #define AVFMT_FLAG_IGNDTS 0x0008 ///< Ignore DTS on frames that contain both DTS & PTS #define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other values, just return what is stored in the container #define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled @@ -2391,6 +2391,10 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options); * the interleaving should call av_interleaved_write_frame() instead of this * function. * + * In case the muxer is operating in non-blocking mode (AVFMT_FLAG_NONBLOCK + * is set), this function can return AVERROR(EAGAIN) meaning the call should + * be repeated. + * * @param s media file handle * @param pkt The packet containing the data to be written. Note that unlike * av_interleaved_write_frame(), this function does not take @@ -2433,6 +2437,9 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt); * knowledge of future packets, improving e.g. the behaviour of the mp4 * muxer for VFR content in fragmenting mode. * + * This call is not supported and must not be called if muxer is operating + * in non-blocking mode (AVFMT_FLAG_NONBLOCK is set). + * * @param s media file handle * @param pkt The packet containing the data to be written. *