Skip to contentSkip to conversation

gstreamer1.0-plugins-good: wave5-codec: Set max buffers same as min buffers

PATCH In review Rahul T R 2 participants 3 messages Oct 18, 2023

lore
Share & tools
lore

Rahul T R

author
#0 lore raw

PATCH v2 1/1 gstreamer1.0-plugins-good: wave5-codec: Set max buffers same as min buffers

v4l2src plugin queues same external buffer with different v4l2 buffer with different index. This workaround was implemented as a workaround for this. Workaround needs all buffers to be allocated during the init phase, if new buffers are allocated post stream start it fails. Avoid such issues by enforcing max buffers same as min buffers

---

Notes:
v2:
Updated commit message as per the comments Added the reviewed bys

 .../0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch      | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch +4 -3
index a1471661..bf73e257 100644
@@ -14,9 +14,9 @@ Signed-off-by: Prasanth Babu Mantena <[email protected]>
 ---
  sys/v4l2/gstv4l2bufferpool.c | 17 ++++++++++++++---
  sys/v4l2/gstv4l2bufferpool.h |  2 ++
- sys/v4l2/gstv4l2object.c     | 15 ++++++++++++---
+ sys/v4l2/gstv4l2object.c     | 16 +++++++++++++---
  sys/v4l2/gstv4l2videodec.c   | 20 ++++++++++++++------
- 4 files changed, 42 insertions(+), 12 deletions(-)
+ 4 files changed, 43 insertions(+), 12 deletions(-)
 
 diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c
 index d85f036..e6a60dc 100644
@@ -86,7 +86,7 @@ index ee60540..eff1cf2 100644
      own_min = MAX (own_min, GST_V4L2_MIN_BUFFERS (obj));
 
      /* for the downstream pool, we keep what downstream wants, though ensure
-@@ -5049,8 +5053,13 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, GstQuery * query)
+@@ -5049,8 +5053,14 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, GstQuery * query)
      min = MAX (min, GST_V4L2_MIN_BUFFERS (obj));
 
      /* To import we need the other pool to hold at least own_min */
@@ -95,6 +95,7 @@ index ee60540..eff1cf2 100644
 +    if (obj_pool == pool) {
 +        if (0 == strcmp(obj->vcap.driver, "wave5-dec")) {
 +            min = own_min;
++            max = min;
 +        } else {
 +            min += own_min;
 +        }
Signature · 1 line
2.34.1
#1 lore raw

Unfortunately I had already applied, tested, and marked the v1 patch for inclusion in CICD. And the patch has already been promoted onto the master branch.

You sent a message in webex that implied a level of urgency with getting this patch in for CICD. In the future, if there is no urgency and you want feedback on a patch, then do not send urgency messages off mailing list. I am watching this list and checking things on a regular basis.

Quoted 52 lines · Rahul T R

v4l2src plugin queues same external buffer with different v4l2 buffer with different index. This workaround was implemented as a workaround for this. Workaround needs all buffers to be allocated during the init phase, if new buffers are allocated post stream start it fails. Avoid such issues by enforcing max buffers same as min buffers

---

Notes:
v2:
Updated commit message as per the comments Added the reviewed bys

  .../0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch      | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch +4 -3
index a1471661..bf73e257 100644
@@ -14,9 +14,9 @@ Signed-off-by: Prasanth Babu Mantena <[email protected]>
  ---
   sys/v4l2/gstv4l2bufferpool.c | 17 ++++++++++++++---
   sys/v4l2/gstv4l2bufferpool.h |  2 ++
- sys/v4l2/gstv4l2object.c     | 15 ++++++++++++---
+ sys/v4l2/gstv4l2object.c     | 16 +++++++++++++---
   sys/v4l2/gstv4l2videodec.c   | 20 ++++++++++++++------
- 4 files changed, 42 insertions(+), 12 deletions(-)
+ 4 files changed, 43 insertions(+), 12 deletions(-)
 
  diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c
  index d85f036..e6a60dc 100644
@@ -86,7 +86,7 @@ index ee60540..eff1cf2 100644
       own_min = MAX (own_min, GST_V4L2_MIN_BUFFERS (obj));
 
       /* for the downstream pool, we keep what downstream wants, though ensure
-@@ -5049,8 +5053,13 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, GstQuery * query)
+@@ -5049,8 +5053,14 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, GstQuery * query)
       min = MAX (min, GST_V4L2_MIN_BUFFERS (obj));
 
       /* To import we need the other pool to hold at least own_min */
@@ -95,6 +95,7 @@ index ee60540..eff1cf2 100644
  +    if (obj_pool == pool) {
  +        if (0 == strcmp(obj->vcap.driver, "wave5-dec")) {
  +            min = own_min;
++            max = min;
  +        } else {
  +            min += own_min;
  +        }
Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
author
#2 lore raw
Quoted 5 lines · Ryan Eatmon

Unfortunately I had already applied, tested, and marked the v1 patch for inclusion in CICD.  And the patch has already been promoted onto the master branch.

You sent a message in webex that implied a level of urgency with getting this patch in for CICD.  In the future, if there is no urgency and you want feedback on a patch, then do not send urgency messages off mailing list.  I am watching this list and checking things on a regular basis.

Hi Ryan,

Sorry about the confusion, It was indeed urgent
anyway the change was only in the commit message

Regards
Rahul T R

Quoted 59 lines · Rahul T R
Quoted 55 lines

v4l2src plugin queues same external buffer with different v4l2 buffer with different index. This workaround was implemented as a workaround for this. Workaround needs all buffers to be allocated during the init phase, if new buffers are allocated post stream start it fails. Avoid such issues by enforcing max buffers same as min buffers

---

Notes:
     v2:
         Updated commit message as per the comments Added the reviewed bys

  .../0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch      | 7 ++++---

  1 file changed, 4 insertions(+), 3 deletions(-)
meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch +0 -0

index a1471661..bf73e257 100644
---
a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch
+++
b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch +0 -0
@@ -14,9 +14,9 @@ Signed-off-by: Prasanth Babu Mantena 

<[email protected]>
  ---
   sys/v4l2/gstv4l2bufferpool.c | 17 ++++++++++++++--- sys/v4l2/gstv4l2bufferpool.h |  2 ++
- sys/v4l2/gstv4l2object.c     | 15 ++++++++++++---
+ sys/v4l2/gstv4l2object.c     | 16 +++++++++++++--- sys/v4l2/gstv4l2videodec.c   | 20 ++++++++++++++------
- 4 files changed, 42 insertions(+), 12 deletions(-)
+ 4 files changed, 43 insertions(+), 12 deletions(-)
    diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index d85f036..e6a60dc 100644

meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Changes-for-DMA-Buf-import-j721s2.patch +2 -1
@@ -86,7 +86,7 @@ index ee60540..eff1cf2 100644
        own_min = MAX (own_min, GST_V4L2_MIN_BUFFERS (obj));
          /* for the downstream pool, we keep what downstream wants, though ensure
-@@ -5049,8 +5053,13 @@ gst_v4l2_object_decide_allocation 
 (GstV4l2Object * obj, GstQuery * query)
+@@ -5049,8 +5053,14 @@ gst_v4l2_object_decide_allocation 
 (GstV4l2Object * obj, GstQuery * query)
        min = MAX (min, GST_V4L2_MIN_BUFFERS (obj));
          /* To import we need the other pool to hold at least own_min */
@@ -95,6 +95,7 @@ index ee60540..eff1cf2 100644
   +    if (obj_pool == pool) {
   +        if (0 == strcmp(obj->vcap.driver, "wave5-dec")) {
   +            min = own_min;
++            max = min;
   +        } else {
   +            min += own_min;
   +        }