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

Pipeline callback api #2773

Merged
merged 6 commits into from
Nov 28, 2018

Conversation

matkatz
Copy link
Contributor

@matkatz matkatz commented Nov 26, 2018

New Pipeline callback (async) API

Code snippet
rs2::pipeline pipe;

pipe.start([](const rs2::frame& f)
{
// handle frame
});

Jira:
DSO-10774 - gyro and accel aren't a default in motion module
DSO-10943 - D435i should work properly with all SDK examples

@matkatz matkatz requested a review from dorodnic November 26, 2018 08:00
stream_names[p.unique_id()] = p.stream_name();
```

Periodically print the frame counters.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this require a bit more explanation


## Overview

This sample demonstrates how to configure the camera for streaming frames using the pipeline's callback API.
Copy link
Contributor

Choose a reason for hiding this comment

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

This part has to be considerably expanded -
We need to explain why the user would want to consider callback and what the example is trying to demonstrate.

#include <librealsense2/rs.hpp> // Include RealSense Cross Platform API
```

Define frame counters
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe more explanation about the state and how it is going to be used

// Therefore any modification to common memory should be done under lock
auto callback = [&](const rs2::frame& frame)
{
std::lock_guard<std::mutex> lock(mutex);
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on the lock

project(hello_librealsense2)
```

Find librealsense installation, librealsense currently not implemented for Windows
Copy link
Contributor

Choose a reason for hiding this comment

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

librealsense currently not implemented for Windows - this doesn't sound right

@dorodnic dorodnic merged commit e82dc15 into IntelRealSense:development Nov 28, 2018
@matkatz matkatz deleted the pipeline_callback_api branch December 23, 2018 07:51
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