Closed Bug 1843786 Opened 1 year ago Closed 1 year ago

Some Pipewire webcam / camera improvements

Categories

(Core :: WebRTC, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: rmader, Assigned: rmader)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Some improvements that came up during testing. Webrtc changes will also be proposed upstream.

@rmader, with this patch set there is one remaining issue: the width and height are swapped when getting the webrtc track settings.

For instance I get that on the PPP:

{
  "deviceId":"6meR3wfblEzfaZwr5+FBRA2WVOtGrpgycgPioTFj/rg=",
  "frameRate":0,
  "groupId":"tImRBoCnx0o/1WCWi8RsmONAJzk0alUkawBsrp6GcyI=",
  "height":480,
  "width":640
}
Attachment #9344062 - Attachment description: WIP: Bug 1843786 - webrtc: Implement camera rotation support → WIP: Bug 1843786 - webrtc: Implement Pipewire camera rotation support
See Also: → 1724900
Attachment #9344061 - Attachment description: WIP: Bug 1843786 - Pipewire: Add videotransform meta → Bug 1843786 - Pipewire: Add videotransform meta
Attachment #9344061 - Attachment description: Bug 1843786 - Pipewire: Add videotransform meta → Bug 1843786 - Pipewire: Add videotransform meta, r=grulja,@webrtc-reviewers
Attachment #9344060 - Attachment description: WIP: Bug 1843786 - webrtc: Filter out non-camera nodes → Bug 1843786 - webrtc: Filter out non-camera nodes, r=grulja,@webrtc-reviewers
Attachment #9344062 - Attachment description: WIP: Bug 1843786 - webrtc: Implement Pipewire camera rotation support → Bug 1843786 - webrtc: Implement Pipewire camera rotation support, r=grulja,@webrtc-reviewers

(In reply to [:fabrice] Fabrice Desré from comment #5)

@rmader, with this patch set there is one remaining issue: the width and height are swapped when getting the webrtc track settings.

Thanks - this might be an upstream bug in the rotation support but didn't dig yet.

(In reply to [:fabrice] Fabrice Desré from comment #5)

@rmader, with this patch set there is one remaining issue: the width and height are swapped when getting the webrtc track settings.

What are the dimensions of the rendered frames in this case?

The spec says

On systems where it's desirable to sometimes automatically flip the X and Y axis of the resulting captured video in response to ongoing environmental factors, the width, height and aspectRatio constraints and capabilities MUST remain unaffected in all algorithms and be considered in the primary orientation only, except for the getSettings() algorithm where settings for these constrainable properties MUST be flipped if necessary to match the returned dimensions of the captured video at any point in time.

and looking at code we seem to match that.

Flags: needinfo?(fabrice)

(In reply to Andreas Pehrson [:pehrsons] from comment #7)

(In reply to [:fabrice] Fabrice Desré from comment #5)

@rmader, with this patch set there is one remaining issue: the width and height are swapped when getting the webrtc track settings.

What are the dimensions of the rendered frames in this case?

They were 640x480 iirc. I would have to back out the patches from my fork to verify.

The spec says

On systems where it's desirable to sometimes automatically flip the X and Y axis of the resulting captured video in response to ongoing environmental factors, the width, height and aspectRatio constraints and capabilities MUST remain unaffected in all algorithms and be considered in the primary orientation only, except for the getSettings() algorithm where settings for these constrainable properties MUST be flipped if necessary to match the returned dimensions of the captured video at any point in time.

and looking at code we seem to match that.

Right, I think Robert's patch in https://phabricator.services.mozilla.com/D183652 addresses correctly the problem.

Flags: needinfo?(fabrice)

Great, thanks for confirming. Robert, are you pushing these patches upstream, or can I help in some way?

Flags: needinfo?(robert.mader)

(In reply to Andreas Pehrson [:pehrsons] from comment #9)

Great, thanks for confirming. Robert, are you pushing these patches upstream, or can I help in some way?

Yep, will do now.

(In reply to [:fabrice] Fabrice Desré from comment #5)

@rmader, with this patch set there is one remaining issue: the width and height are swapped when getting the webrtc track settings.

I somewhat suspect this to have to do with https://searchfox.org/mozilla-central/source/third_party/libwebrtc/modules/video_capture/video_capture_impl.cc#249-254 - we don't use it all all, but Chromium probably does? Anyhow, will submit the changes as is and wait for feedback.

Flags: needinfo?(robert.mader)
Pushed by robert.mader@posteo.de: https://hg.mozilla.org/integration/autoland/rev/4c2505f53328 webrtc: Filter out non-camera nodes, r=webrtc-reviewers,pehrsons,@webrtc-reviewers https://hg.mozilla.org/integration/autoland/rev/214fd339fda5 Pipewire: Add videotransform meta, r=grulja,@webrtc-reviewers https://hg.mozilla.org/integration/autoland/rev/1db7a958b945 webrtc: Implement Pipewire camera rotation support, r=webrtc-reviewers,pehrsons,@webrtc-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: