Skip to content

Fix channel activation before Connect #195

@f00f

Description

@f00f

When channels are activated before Connect they will be added to ActiveChannels and ActivateChannelImpl will be called for them by Connect.

For the Orbbec cameras this will cause a malfunction of both ZImage and Point3DImage are activated before Connect. As a result none of these channels will actually be activated.

Possible actions to solve this:

  1. Drop support for the Point3DImage channel in the Orbbec.
    The channel is broken anyways and only computed by the driver.
    This would fix the problem for the Orbbec camera only.
  2. Replace the IsChannelActive checks in ActivateChannel by DepthStream.isValid().
    This would fix the problem for the Orbbec camera only.
  3. Modify the ActivateChannelImpl behaviour:
    Return true if the channel was activated and no further action is needed.
    Return false if channel activation was not possible, and ActivateChannelImpl should be called again for this channel after ConnectImpl.
    Based on the return value, the channel would be added to ActiveChannels or a new list, e.g. ChannelsToActivateAfterConnect (naming suggestions welcome).
    I would then also rename ActivateChannelImpl to TryActivateChannelImpl.
    The behaviour of DeactivateChannel must be changed accordingly (e.g. activating and deactivating a channel before Connect should result in that channel not being in any list.
    This would be a larger change to the internal interface and solve it for all cameras.

Originally posted by @sisiplac in #194

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions