Skip to content

VideoStreaming status processing#30

Merged
ktossell merged 1 commit into
libuvc:masterfrom
brainbeanapps:video_streaming_status
Oct 28, 2015
Merged

VideoStreaming status processing#30
ktossell merged 1 commit into
libuvc:masterfrom
brainbeanapps:video_streaming_status

Conversation

@alexey-pelykh
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/device.c
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to strip off the first 5 bytes when delivering this update, but 1) this breaks any existing code that might be relying on the update's content and 2) the originator ID is lost.

I'd be open to adding an originator parameter to the callback type, maybe between status_class and event, and also making the 5-byte-offset change. That way, anything that uses the callback will break, but at least the breakage will happen at compile time.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or this may be a good time to do:

struct uvc_status_update {
  enum uvc_status_class status_class;
  int originator;
  int event;
  int selector;
  enum uvc_status_attribute status_attribute;
  void *data;
  size_t data_len;
};

typedef void(uvc_status_callback_t)(struct uvc_status_update, void* user_ptr);

or something like that.

@alexey-pelykh
Copy link
Copy Markdown
Contributor Author

I'd suggest to add these interface-breaking changes in other pull-request

@alexey-pelykh
Copy link
Copy Markdown
Contributor Author

Summary:

  • First 5 bytes strip-off: already done, and it's not a breaking change since it was before
  • Originator & arguments-as-structure: Right now behaviour is the same, and this change would be better to do in other pull-request

@ktossell
Copy link
Copy Markdown
Collaborator

First 5 bytes strip-off: already done,

So it was! Will merge.

ktossell added a commit that referenced this pull request Oct 28, 2015
@ktossell ktossell merged commit e71bcbe into libuvc:master Oct 28, 2015
@alexey-pelykh alexey-pelykh deleted the video_streaming_status branch October 29, 2015 16:52
mmohsenz pushed a commit to mmohsenz/libuvc that referenced this pull request Apr 21, 2020
Device clock frequency correction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants