Skip to content

Commit e0867db

Browse files
Added Example for video streaming
1 parent 78ec196 commit e0867db

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Examples/LPBFSystem/Main/mcplugin_main.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ __DECLARESTATE(init)
8181
}
8282

8383
pVideoDevice->SetToSupportedResolution(0) ;
84+
8485

8586
auto pImage = pStateEnvironment->CreateEmptyImage (pVideoDevice->GetCurrentResolutionX(), pVideoDevice->GetCurrentResolutionY(), 100.0, 100.0, LibMCEnv::eImagePixelFormat::RGB24bit);
8687
if (pVideoDevice->CaptureRawImage(pImage)) {
@@ -106,6 +107,13 @@ __DECLARESTATE(init)
106107
pJPEGStream->Finish();
107108

108109

110+
auto pVideoStream = pStateEnvironment->CreateVideoStream (
111+
pVideoDevice->GetCurrentResolutionX (), pVideoDevice->GetCurrentResolutionY (), 33333, 100000, 66666);
112+
113+
pVideoDevice->StartStreamCapture(pVideoStream);
114+
115+
pStateEnvironment->LogMessage("video stream uuid: " + pVideoStream->GetUUID());
116+
109117

110118
pStateEnvironment->SetIntegerParameter("jobinfo", "layercount", 0);
111119
pStateEnvironment->SetIntegerParameter("jobinfo", "currentlayer", 0);

0 commit comments

Comments
 (0)