From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 93AE84250F for ; Tue, 4 Jan 2022 22:58:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A0A3568A255; Wed, 5 Jan 2022 00:58:10 +0200 (EET) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 35416689D48 for ; Wed, 5 Jan 2022 00:58:05 +0200 (EET) Received: by mail-qt1-f173.google.com with SMTP id 8so35719376qtx.5 for ; Tue, 04 Jan 2022 14:58:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=wHPapjoIojZqrfKCT9Sl1Q1kVAAYNTEgLIe1sAmXWr0=; b=DzTkRnGMwyrbK0RgYwkFZbGJJ6f69iNCjkEey+uQbTeyWbeOt9Gguou6dwc/JlDX+F Jr6hwcY/ksnpI8uytAroLc0QiUA52YW7mteZCHTnHHHzB2lfUr+TiGfIITOTP3XodOJG jWcnHhP6+kon8EiOt3jtPe77kc5b0MPcM8NF5/ZQFOgVQGakq/lFu3a5bbaa1zo2mKqt gJjBrN/eVq9bEQug30RPy6YxbeGLYaneT2bhP5qxKtaxkhW4e7IRhJDl7co/tMwusWd/ 8TqisHuvXAP5UOE8xKTGuEmqX8eTQhJ1N3SpI4f+YLUwfyA6IOQjNxpGNw6cylQXEj/z HEjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wHPapjoIojZqrfKCT9Sl1Q1kVAAYNTEgLIe1sAmXWr0=; b=7g9ty6YC7GmDjqqF5XASX4+8wa9Ii/mk3WbBXOBafPTuMIrZK6hWleXiA1gRCde33G lqvELVxUsn8DSVexIDnK6NQqSSxj6Oni5CwoR0hCT7LEmX43yZlmMvLk3NATtbsK/F2s PW4bLAHkUL4oVkeecMi099kDJCWSbYlgY4QtjxcktnEFNLwswIVomTQGXWwj+aY9QT7m r5hbkZUgL7OzfH4XwPLJl0kA4ayYi2CN+u6Z6gIavHzDMT+Jzvo535rfY7ZYoikt5mGi eQL00ZdQCMvQ4ibFQ5Wuf22Xvzv8Ud3aickWLEyUzCwgQUXEKP67PLSdKBX0F8Y1MiXF jhjw== X-Gm-Message-State: AOAM5310/IFmg+4dAE/yAWpkbBCm6G+2JakrDfF5DLrCsZF8dmftONon d4BxJiLAJsVH6vt3oF2VbZbgzs4yuoM= X-Google-Smtp-Source: ABdhPJyJ9rA//QoUCoEUL15nDI9Q1RRRaetbZ2B5SXHR7/GIL28aHk6c93XAaF+9kazx6SrxMe5O9g== X-Received: by 2002:ac8:5e0f:: with SMTP id h15mr45379054qtx.490.1641337083845; Tue, 04 Jan 2022 14:58:03 -0800 (PST) Received: from jackie (pool-108-20-185-127.bstnma.fios.verizon.net. [108.20.185.127]) by smtp.gmail.com with ESMTPSA id v12sm34090555qtx.80.2022.01.04.14.58.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 14:58:03 -0800 (PST) Date: Tue, 4 Jan 2022 17:58:02 -0500 From: Andriy Gelman To: Ming Qian Message-ID: <20220104225802.btiwwikprkeaqf2e@jackie> References: <20210819085533.1174-1-ming.qian@nxp.com> <20210819085533.1174-2-ming.qian@nxp.com> <20220102164106.ptu4eet7rmwla7bg@jackie> <20220104224813.cfsz6oafoi7a2qwp@jackie> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220104224813.cfsz6oafoi7a2qwp@jackie> Subject: Re: [FFmpeg-devel] [EXT] Re: [PATCH v4 2/3] avcodec/v4l2_context: resume the decoding process after source change event received. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Tue, 04. Jan 17:48, Andriy Gelman wrote: > Hi Ming, > > On Tue, 04. Jan 07:51, Ming Qian wrote: > > > > > -----Original Message----- > > > From: Andriy Gelman [mailto:andriy.gelman@gmail.com] > > > Sent: Monday, January 3, 2022 12:41 AM > > > To: FFmpeg development discussions and patches > > > Cc: Ming Qian > > > Subject: [EXT] Re: [FFmpeg-devel] [PATCH v4 2/3] avcodec/v4l2_context: > > > resume the decoding process after source change event received. > > > > > > Caution: EXT Email > > > > > > On Thu, 19. Aug 16:55, Ming Qian wrote: > > > > client need to resume the decoding process after it dequeues the > > > > source change event. > > > > no matter what's the return value of v4l2_resolution_changed(). > > > > if the client doesn't resume the decoding process, the decoder may > > > > keep waiting > > > > > > > > in documentation of v4l2 stateful decoder, we can see the following > > > > description: > > > > The client must continue the sequence as described below to > > > > continue the decoding process. > > > > 1. Dequeue the source change event. > > > > Important > > > > A source change triggers an implicit decoder drain, > > > > similar to the explicit Drain sequence. The decoder is > > > > stopped after it completes. The decoding process must be > > > > resumed with either a pair of calls to > > > > VIDIOC_STREAMOFF() and VIDIOC_STREAMON() on the > > > CAPTURE > > > > queue, or a call to VIDIOC_DECODER_CMD() with the > > > > V4L2_DEC_CMD_START command. > > > > 2. Continue with the Capture Setup sequence. > > > > > > Please also add that this fixes decoding of > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstreams > > > .videolan.org%2Fffmpeg%2Fincoming%2F720p60.mp4&data=04%7C01% > > > 7Cming.qian%40nxp.com%7Cea94a9c4cc0643b0a41f08d9ce0eadc5%7C686e > > > a1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C637767384703207931%7CU > > > nknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 > > > Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=X4rKQX19MQg1gO3ILiBCQ > > > qSLIvqovZLA95KKiyoVNzI%3D&reserved=0 on RPi4. > > > > > > > > Hi Andriy, > > What's wrong with this stream? Everything is normal on my side when I play it using ffplay. > > > > I couldn't decode the file on the Raspberry Pi4. After enqueuing the first few packets > there was a dynamic resolution change event, and the start decode command > was not sent. This is fixed by your patch. Also you may have to upgrade kernel to reproduce. It may have been working fine before this commit: https://github.com/raspberrypi/linux/commit/b7e6b495eff31298ba4665f71b2414cc9a8f99c2#diff-93defb6da917ce9bb43cb195d0e61f81673c5183ac75d631f3e1ee475a810dd6 -- Andriy _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".