[libcamera-devel,v1,0/3] Fix Gnome Cheese and multiple camera
mbox series

Message ID 20210825211852.1207168-1-nicolas@ndufresne.ca
Headers show
Series
  • Fix Gnome Cheese and multiple camera
Related show

Message

Nicolas Dufresne Aug. 25, 2021, 9:18 p.m. UTC
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>

This patchset address issues seen when trying to stream from multiple
cameras at the same time or when using Gnome Cheese software. The core
of the issue was that multiple CameraManager instances were created.
Two deadlocks were encountered during testing and are fixed.

Nicolas Dufresne (3):
  gstreamer: Fix deadlock when last allocator ref is held by buffer
  gstreamer: Fix concurrent access issues to CameraManager
  libcamerasrc: Fix deadlock on EOS

 src/gstreamer/gstlibcamera-utils.cpp    | 31 +++++++++++++++++++++++++
 src/gstreamer/gstlibcamera-utils.h      |  6 +++--
 src/gstreamer/gstlibcameraallocator.cpp | 17 ++++++++------
 src/gstreamer/gstlibcameraprovider.cpp  | 22 ++----------------
 src/gstreamer/gstlibcamerasrc.cpp       | 23 +++++++++---------
 5 files changed, 58 insertions(+), 41 deletions(-)

Comments

Kieran Bingham Aug. 26, 2021, 1:23 p.m. UTC | #1
Hi Nicolas,

On 25/08/2021 22:18, Nicolas Dufresne wrote:
> From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> 
> This patchset address issues seen when trying to stream from multiple
> cameras at the same time or when using Gnome Cheese software. The core
> of the issue was that multiple CameraManager instances were created.
> Two deadlocks were encountered during testing and are fixed.
> 
> Nicolas Dufresne (3):
>   gstreamer: Fix deadlock when last allocator ref is held by buffer
>   gstreamer: Fix concurrent access issues to CameraManager
>   libcamerasrc: Fix deadlock on EOS

Thank you for these,

Indeed, this also fixes the hangs when shutting down I had experienced
(but not yet reported)

Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>


>  src/gstreamer/gstlibcamera-utils.cpp    | 31 +++++++++++++++++++++++++
>  src/gstreamer/gstlibcamera-utils.h      |  6 +++--
>  src/gstreamer/gstlibcameraallocator.cpp | 17 ++++++++------
>  src/gstreamer/gstlibcameraprovider.cpp  | 22 ++----------------
>  src/gstreamer/gstlibcamerasrc.cpp       | 23 +++++++++---------
>  5 files changed, 58 insertions(+), 41 deletions(-)
>
Nicolas Dufresne Aug. 26, 2021, 1:25 p.m. UTC | #2
Le jeudi 26 août 2021 à 14:23 +0100, Kieran Bingham a écrit :
> Hi Nicolas,
> 
> On 25/08/2021 22:18, Nicolas Dufresne wrote:
> > From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> > 
> > This patchset address issues seen when trying to stream from multiple
> > cameras at the same time or when using Gnome Cheese software. The core
> > of the issue was that multiple CameraManager instances were created.
> > Two deadlocks were encountered during testing and are fixed.
> > 
> > Nicolas Dufresne (3):
> >   gstreamer: Fix deadlock when last allocator ref is held by buffer
> >   gstreamer: Fix concurrent access issues to CameraManager
> >   libcamerasrc: Fix deadlock on EOS
> 
> Thank you for these,
> 
> Indeed, this also fixes the hangs when shutting down I had experienced
> (but not yet reported)
> 
> Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Thanks for testing, I just sent v2 before noticing, if you are happy with v2,
please add Kieran Tb, otherwise it will be in v3.
> 
> 
> >  src/gstreamer/gstlibcamera-utils.cpp    | 31 +++++++++++++++++++++++++
> >  src/gstreamer/gstlibcamera-utils.h      |  6 +++--
> >  src/gstreamer/gstlibcameraallocator.cpp | 17 ++++++++------
> >  src/gstreamer/gstlibcameraprovider.cpp  | 22 ++----------------
> >  src/gstreamer/gstlibcamerasrc.cpp       | 23 +++++++++---------
> >  5 files changed, 58 insertions(+), 41 deletions(-)
> >
Kieran Bingham Aug. 26, 2021, 1:27 p.m. UTC | #3
On 26/08/2021 14:25, Nicolas Dufresne wrote:
> Le jeudi 26 août 2021 à 14:23 +0100, Kieran Bingham a écrit :
>> Hi Nicolas,
>>
>> On 25/08/2021 22:18, Nicolas Dufresne wrote:
>>> From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
>>>
>>> This patchset address issues seen when trying to stream from multiple
>>> cameras at the same time or when using Gnome Cheese software. The core
>>> of the issue was that multiple CameraManager instances were created.
>>> Two deadlocks were encountered during testing and are fixed.
>>>
>>> Nicolas Dufresne (3):
>>>   gstreamer: Fix deadlock when last allocator ref is held by buffer
>>>   gstreamer: Fix concurrent access issues to CameraManager
>>>   libcamerasrc: Fix deadlock on EOS
>>
>> Thank you for these,
>>
>> Indeed, this also fixes the hangs when shutting down I had experienced
>> (but not yet reported)
>>
>> Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> 
> Thanks for testing, I just sent v2 before noticing, if you are happy with v2,
> please add Kieran Tb, otherwise it will be in v3.

No worries, it looks like we hit send at the same time ;-)

--
Kieran