From patchwork Tue Aug 2 13:24:18 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: 59 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.67 with SMTP id o64csp217198vsd; Tue, 2 Aug 2016 06:37:04 -0700 (PDT) X-Received: by 10.194.238.42 with SMTP id vh10mr55646349wjc.111.1470145024851; Tue, 02 Aug 2016 06:37:04 -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 bj4si2713118wjd.210.2016.08.02.06.37.04; Tue, 02 Aug 2016 06:37:04 -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 2BB29689F51; Tue, 2 Aug 2016 16:36:54 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 301AC689F3A for ; Tue, 2 Aug 2016 16:36:29 +0300 (EEST) Received: by mail-wm0-f68.google.com with SMTP id x83so30823522wma.3 for ; Tue, 02 Aug 2016 06:36:35 -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:in-reply-to:references; bh=0ZXJc6iW9jbtWgNlzr0oTPo4Rt6CWs+52STrCPnfTuI=; b=YmJXlw5Xb2ziy1UZONJPvMwQnNS8eZdU1aThlnk9FOn2WtC5WyRiXIo4JAR3wJ3EAH cUVUAcrkFOM+mIa7HspKOprE2tohgyAM31JUDmxBcO3/e0QMOJFzKwjmtEWWIExGsMWH zUluccQlfPncveR7X2NYqBEABkcKXgDSKip3gtEyI8V95xN1TiCLds2QjJbwlARP2lVH ojvKGNs1LvjpamSM9lPQKMFmHwUdkLecjAsJO3ux0Gctp0AXqe62vALUwGYt66Wjr723 pyTZ1k8yqnP5T+8O+lzR47riQUfFnKCwkOeFQRJfToexDC02bB5rZsiFDBoY1JTpfdds zICQ== 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:in-reply-to :references; bh=0ZXJc6iW9jbtWgNlzr0oTPo4Rt6CWs+52STrCPnfTuI=; b=LBHyyHcH5ggN/jxKLo6l8+4JskmgbtkYeZOJI/Ulc+/Z0dPU23cUY5YPBF8TLhJtq1 q4g8KGMa6LRioP8CE4k1mJ8Y19GtKwGJRX6lVdBTSBe+i2qOdihR7j1d8XTzC+Ym1SbW JVQYbsRYKz9//TKdS1g6fmRsoBxoHr3Cq8Ub6FyjZKYZv3Fe/ElivZak18/uGjbFzPVl fS/a0GCX25KUsZADJPZZ0ke+YWITMOkJFIuG8MYiovZQhoNgZKWiuVwPwW1Lqzs03ih9 yXs1FNcCRJrj8hMnwrUIsIMUvjSMl6vymJJk2TnvR3FFdw2iOHdlN7LY2dsNSahnbXJp xjrg== X-Gm-Message-State: AEkoout5GGL5muq2CtJFEsCJT4mAAkJKXvYI8Xy3WwpYfCN+Yd5oqvnfkdC1gCpcA4KYMw== X-Received: by 10.28.58.7 with SMTP id h7mr18537777wma.35.1470144279276; Tue, 02 Aug 2016 06:24:39 -0700 (PDT) Received: from localhost.localdomain (157.174.broadband3.iol.cz. [85.70.174.157]) by smtp.gmail.com with ESMTPSA id n131sm22060902wmd.3.2016.08.02.06.24.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Aug 2016 06:24:38 -0700 (PDT) From: sebechlebskyjan@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 2 Aug 2016 15:24:18 +0200 Message-Id: <1470144262-13167-8-git-send-email-sebechlebskyjan@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470144262-13167-1-git-send-email-sebechlebskyjan@gmail.com> References: <1470144262-13167-1-git-send-email-sebechlebskyjan@gmail.com> Subject: [FFmpeg-devel] [PATCH 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 --- libavformat/avformat.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 9173908..6898c8c 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1426,7 +1426,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 @@ -2389,6 +2389,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 @@ -2431,6 +2435,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. *