-
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.
GStreamer 1.0 capture driver, continuation 2
- Loading branch information
Showing
6 changed files
with
114 additions
and
90 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
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
30 changes: 0 additions & 30 deletions
30
...re-drivers/driver-gst1/src/main/java/com/github/sarxos/webcam/ds/gst1/ListUvcDevices.java
This file was deleted.
Oops, something went wrong.
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
52 changes: 52 additions & 0 deletions
52
...e-drivers/driver-gst1/src/main/java/com/github/sarxos/webcam/ds/gst1/impl/GsPlatform.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,52 @@ | ||
package com.github.sarxos.webcam.ds.gst1.impl; | ||
|
||
import java.io.File; | ||
|
||
|
||
public class GsPlatform { | ||
|
||
private static final String OS_NAME = System.getProperty("os.name", ""); | ||
|
||
public enum OS { | ||
WINDOWS, | ||
LINUX, | ||
MACOS, | ||
} | ||
|
||
private static OS os; | ||
static { | ||
if (GsPlatform.isLinux()) { | ||
os = OS.LINUX; | ||
} | ||
if (GsPlatform.isWindows()) { | ||
os = OS.WINDOWS; | ||
} | ||
if (GsPlatform.isMacOSX()) { | ||
os = OS.MACOS; | ||
} | ||
} | ||
|
||
public static boolean isUnix() { | ||
return File.separatorChar == '/'; | ||
} | ||
|
||
public static boolean isWindows() { | ||
return File.separatorChar == '\\'; | ||
} | ||
|
||
public static boolean isLinux() { | ||
return isUnix() && OS_NAME.toLowerCase().contains("linux"); | ||
} | ||
|
||
public static boolean isMacOSX() { | ||
return isUnix() && (OS_NAME.startsWith("Mac") || OS_NAME.startsWith("Darwin")); | ||
} | ||
|
||
public static boolean isSolaris() { | ||
return isUnix() && (OS_NAME.startsWith("SunOS") || OS_NAME.startsWith("Solaris")); | ||
} | ||
|
||
public static OS getOs() { | ||
return os; | ||
} | ||
} |
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