[no subject]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If that's the philosophy, the client can adapt.  If the control was
queried and it returned 0 for the number of available contexts, then
the handle could be closed and then a sw codec could be used instead.

> Reporting it with a standard control makes it also much easier for software
> to anticipate when it needs to switch to SW en/decoding.
>
I think you are talking about the codec controls[1], correct? I didn't
see an existing control present that would report the number of
currently open contexts and/or the number of maximum contexts.

[1]: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/ext-ctrls-codec.html
> >
> >
> > Failure #2 is related to a commit [1] which add checks for
> > MEDIA_ENT_F_PROC_VIDEO_ENCODER, I think this entity flag is applicable
> > for stateless encoders (Request API) but Venus driver has no use of
> > media-controller API. Did I miss something?
>
> For item 2, can you try the patch below?
>
> Regards,
>
>         Hans
>
> -----------------------------------------------------------------------
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
> ---
> diff --git a/utils/v4l2-compliance/v4l2-test-codecs.cpp b/utils/v4l2-compliance/v4l2-test-codecs.cpp
> index 22175eef..3f06070f 100644
> --- a/utils/v4l2-compliance/v4l2-test-codecs.cpp
> +++ b/utils/v4l2-compliance/v4l2-test-codecs.cpp
> @@ -29,9 +29,10 @@ int testEncoder(struct node *node)
>  {
>         struct v4l2_encoder_cmd cmd;
>         bool is_encoder = node->codec_mask & (STATEFUL_ENCODER | JPEG_ENCODER);
> +       bool is_stateless_encoder = node->codec_mask & STATELESS_ENCODER;
>         int ret;
>
> -       if (IS_ENCODER(node))
> +       if (is_stateless_encoder)
>                 fail_on_test(node->function != MEDIA_ENT_F_PROC_VIDEO_ENCODER);
>         memset(&cmd, 0xff, sizeof(cmd));
>         memset(&cmd.raw, 0, sizeof(cmd.raw));
> @@ -98,9 +99,10 @@ int testDecoder(struct node *node)
>  {
>         struct v4l2_decoder_cmd cmd;
>         bool is_decoder = node->codec_mask & (STATEFUL_DECODER | JPEG_DECODER);
> +       bool is_stateless_decoder = node->codec_mask & STATELESS_DECODER;
>         int ret;
>
> -       if (IS_DECODER(node))
> +       if (is_stateless_decoder)
>                 fail_on_test(node->function != MEDIA_ENT_F_PROC_VIDEO_DECODER);
>         memset(&cmd, 0xff, sizeof(cmd));
>         memset(&cmd.raw, 0, sizeof(cmd.raw));



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux