Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge devices from the same bus #125

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joaoantoniocardoso
Copy link
Collaborator

@joaoantoniocardoso joaoantoniocardoso commented Aug 30, 2022

  • Helps About the duplicated device #14: gives enough information for the front-end to merge the devices from the same BUS if it wants to.
  • Also gives enough information for the front-end to detect each port a USB camera is connected to (v4l_by_path).

Breaking Changes:

1. VideoSourceLocal is used in the API:

image

Diff

#[derive(Apiv2Schema, Clone, Debug, Deserialize, PartialEq, Serialize)]
pub struct VideoSourceLocal {
    pub name: String,
    pub device_path: String,
+    pub v4l_by_path: String,
    #[serde(rename = "type")]
    pub typ: VideoSourceLocalType,
}

Because of this change on VideoSourceLocal, settings will also break.

That's all

@joaoantoniocardoso joaoantoniocardoso force-pushed the merge-devices-with-same-bus branch 3 times, most recently from b67e12c to ed5aea0 Compare August 31, 2022 20:05
@joaoantoniocardoso joaoantoniocardoso added the Breaking Changes For changes that break the API. label Aug 31, 2022
@joaoantoniocardoso joaoantoniocardoso marked this pull request as ready for review August 31, 2022 20:08
@patrickelectric
Copy link
Member

@joaoantoniocardoso can you specify what exactly this breaks ?

@joaoantoniocardoso
Copy link
Collaborator Author

@joaoantoniocardoso can you specify what exactly this breaks ?

Done

@patrickelectric
Copy link
Member

Example of how to create the same desired functionality:

https://github.com/patrickelectric/mavlink-camera-manager/pull/new/example-device

We can deal with the device in the frontend with:

property var device: devices
  .filter(device => device.real_device == box_name.currentValue)
  .map(device => {
     device.formats = device.formats.map(format => {
          format.source = device.source; return format
     })
     return device.formats
  })

@joaoantoniocardoso joaoantoniocardoso marked this pull request as draft September 7, 2022 21:01
@joaoantoniocardoso joaoantoniocardoso marked this pull request as ready for review September 13, 2022 22:28
@joaoantoniocardoso joaoantoniocardoso marked this pull request as draft January 6, 2024 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Changes For changes that break the API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants