Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andriy Gelman <andriy.gelman@gmail.com>
To: Ming Qian <ming.qian@nxp.com>
Cc: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [EXT] Re: [PATCH v4 2/3] avcodec/v4l2_context: resume the decoding process after source change event received.
Date: Tue, 4 Jan 2022 17:58:02 -0500
Message-ID: <20220104225802.btiwwikprkeaqf2e@jackie> (raw)
In-Reply-To: <20220104224813.cfsz6oafoi7a2qwp@jackie>

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 <ffmpeg-devel@ffmpeg.org>
> > > Cc: Ming Qian <ming.qian@nxp.com>
> > > 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&amp;data=04%7C01%
> > > 7Cming.qian%40nxp.com%7Cea94a9c4cc0643b0a41f08d9ce0eadc5%7C686e
> > > a1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C637767384703207931%7CU
> > > nknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6
> > > Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=X4rKQX19MQg1gO3ILiBCQ
> > > qSLIvqovZLA95KKiyoVNzI%3D&amp;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".

  reply	other threads:[~2022-01-04 22:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210819085533.1174-1-ming.qian@nxp.com>
2022-01-02 16:23 ` [FFmpeg-devel] [PATCH v4 1/3] avcodec/v4l2_context: don't reinit output queue when dynamic resolution change Andriy Gelman
2022-01-04  7:40   ` [FFmpeg-devel] [EXT] " Ming Qian
     [not found] ` <20210819085533.1174-2-ming.qian@nxp.com>
2022-01-02 16:41   ` [FFmpeg-devel] [PATCH v4 2/3] avcodec/v4l2_context: resume the decoding process after source change event received Andriy Gelman
2022-01-04  7:51     ` [FFmpeg-devel] [EXT] " Ming Qian
2022-01-04 22:48       ` Andriy Gelman
2022-01-04 22:58         ` Andriy Gelman [this message]
2022-01-05  2:02           ` Ming Qian
2022-01-08 17:13           ` Andriy Gelman
2022-01-10  8:57             ` Ming Qian
     [not found] ` <20210819085533.1174-3-ming.qian@nxp.com>
2022-01-02 16:53   ` [FFmpeg-devel] [PATCH v4 3/3] avcodec/v4l2_m2m_dec: setup capture queue before enqueue the first frame Andriy Gelman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220104225802.btiwwikprkeaqf2e@jackie \
    --to=andriy.gelman@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=ming.qian@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git