-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GStremaer capture use of video/x-raw-rgb to increase FPS
- Loading branch information
Showing
5 changed files
with
111 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
webcam-capture-drivers/driver-gstreamer/src/example/java/WebcamPanelExample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import javax.swing.JFrame; | ||
|
||
import com.github.sarxos.webcam.Webcam; | ||
import com.github.sarxos.webcam.WebcamPanel; | ||
import com.github.sarxos.webcam.WebcamResolution; | ||
import com.github.sarxos.webcam.ds.gstreamer.GStreamerDriver; | ||
|
||
|
||
public class WebcamPanelExample { | ||
|
||
static { | ||
Webcam.setDriver(new GStreamerDriver()); | ||
} | ||
|
||
public static void main(String[] args) { | ||
|
||
Webcam webcam = Webcam.getDefault(); | ||
webcam.setViewSize(WebcamResolution.HD720.getSize()); | ||
|
||
WebcamPanel panel = new WebcamPanel(webcam); | ||
panel.setDisplayDebugInfo(true); | ||
panel.setFPSDisplayed(true); | ||
panel.setFillArea(true); | ||
|
||
JFrame window = new JFrame("Test webcam panel"); | ||
window.add(panel); | ||
window.setResizable(true); | ||
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | ||
window.pack(); | ||
window.setVisible(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters