Skip to content

Commit 06b8687

Browse files
authored
Update README.md
1 parent 08ef08c commit 06b8687

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Support device list (firmware version):
120120
||Gemini E||
121121
||Gemini E Lite||
122122

123-
# Quick Start
123+
# Simple code of open depth stream
124124
Create OBContext global member to manager attach devices
125125
```java
126126
// Application hold only one OBContext instance.
@@ -194,14 +194,18 @@ Start Depth stream
194194
```java
195195
try {
196196
mPipeline = new Pipeline(mCurrentDevice);
197+
197198
StreamProfileList depthProfileList = mPipeline.getStreamProfileList(SensorType.DEPTH);
198-
StreamProfile streamProfile = depthProfileList.getStreamProfile(0);
199199
if (null != depthProfileList) {
200200
depthProfileList.close();
201201
return;
202202
}
203-
203+
StreamProfile streamProfile = depthProfileList.getStreamProfile(0);
204204
Config config = new Config();
205+
config.enableStream(streamProfile);
206+
streamProfile.close();
207+
depthProfileList.close();
208+
205209
mPipeline.start(config, new FrameSetCallback() {
206210
public void onFrameSet(FrameSet frameSet) {
207211
DepthFrame depthFrame = frameSet.getDepthFrame()
@@ -254,4 +258,4 @@ Android studio --> File --> Settings --> Build,Execution,Deployment --> Build To
254258
**reference**:
255259
https://developer.android.com/studio/releases#android_gradle_plugin_and_android_studio_compatibility
256260

257-
https://developer.android.com/build/releases/gradle-plugin
261+
https://developer.android.com/build/releases/gradle-plugin

0 commit comments

Comments
 (0)