-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Constantin Geier
committed
Jul 5, 2020
1 parent
36f3d1d
commit 74c9275
Showing
12 changed files
with
132 additions
and
10 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri Jun 12 12:04:08 CEST 2020 | ||
#Fri Jul 03 14:15:32 CEST 2020 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-rc-1-all.zip |
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
71 changes: 71 additions & 0 deletions
71
uvcintegration/src/main/java/constantin/video/core/DecodingInfo.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,71 @@ | ||
package constantin.video.core; | ||
|
||
import android.util.ArrayMap; | ||
|
||
import java.util.Map; | ||
|
||
@SuppressWarnings("WeakerAccess") | ||
public class DecodingInfo { | ||
public final float currentFPS; | ||
public final float currentKiloBitsPerSecond; | ||
public final float avgParsingTime_ms; | ||
public final float avgWaitForInputBTime_ms; | ||
public final float avgHWDecodingTime_ms; //time the hw decoder was holding on to frames. Not the full decoding time ! | ||
public final float avgTotalDecodingTime_ms; | ||
public final int nNALU; | ||
public final int nNALUSFeeded; | ||
|
||
public DecodingInfo(){ | ||
currentFPS=0; | ||
currentKiloBitsPerSecond=0; | ||
avgParsingTime_ms=0; | ||
avgWaitForInputBTime_ms=0; | ||
avgHWDecodingTime_ms=0; | ||
nNALU=0; | ||
nNALUSFeeded=0; | ||
avgTotalDecodingTime_ms =0; | ||
} | ||
|
||
public DecodingInfo(float currentFPS, float currentKiloBitsPerSecond,float avgParsingTime_ms,float avgWaitForInputBTime_ms,float avgHWDecodingTime_ms, | ||
int nNALU,int nNALUSFeeded){ | ||
this.currentFPS=currentFPS; | ||
this.currentKiloBitsPerSecond=currentKiloBitsPerSecond; | ||
this.avgParsingTime_ms=avgParsingTime_ms; | ||
this.avgWaitForInputBTime_ms=avgWaitForInputBTime_ms; | ||
this.avgHWDecodingTime_ms =avgHWDecodingTime_ms; | ||
this.avgTotalDecodingTime_ms =avgParsingTime_ms+avgWaitForInputBTime_ms+avgHWDecodingTime_ms; | ||
this.nNALU=nNALU; | ||
this.nNALUSFeeded=nNALUSFeeded; | ||
} | ||
|
||
public Map<String,Object> toMap(){ | ||
Map<String, Object> decodingInfo = new ArrayMap<>(); | ||
decodingInfo.put("currentFPS",currentFPS); | ||
decodingInfo.put("currentKiloBitsPerSecond",currentKiloBitsPerSecond); | ||
decodingInfo.put("avgParsingTime_ms",avgParsingTime_ms); | ||
decodingInfo.put("avgWaitForInputBTime_ms",avgWaitForInputBTime_ms); | ||
decodingInfo.put("avgHWDecodingTime_ms", avgHWDecodingTime_ms); | ||
decodingInfo.put("avgTotalDecodingTime_ms", avgTotalDecodingTime_ms); | ||
decodingInfo.put("nNALU",nNALU); | ||
decodingInfo.put("nNALUSFeeded",nNALUSFeeded); | ||
return decodingInfo; | ||
} | ||
|
||
public String toString(final boolean newline){ | ||
final StringBuilder builder=new StringBuilder(); | ||
builder.append( "Decoding info:\n"); | ||
final Map<String,Object> map=toMap(); | ||
for(final String key:map.keySet()){ | ||
//Either float or int, toString available | ||
final Object value=map.get(key); | ||
builder.append(key).append(":").append(value); | ||
if(newline)builder.append("\n"); | ||
} | ||
return builder.toString(); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return toString(false); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
uvcintegration/src/main/java/constantin/video/core/IVideoParamsChanged.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,9 @@ | ||
package constantin.video.core; | ||
|
||
|
||
//Similar to INativeVideoParamsChanged,but instead of passing all float's it passes | ||
//a DecodingInfo instance. Not called by native code | ||
public interface IVideoParamsChanged{ | ||
void onVideoRatioChanged(int videoW, int videoH); | ||
void onDecodingInfoChanged(final DecodingInfo decodingInfo); | ||
} |
10 changes: 10 additions & 0 deletions
10
uvcintegration/src/main/java/constantin/video/core/gl/ISurfaceAvailable.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,10 @@ | ||
package constantin.video.core.gl; | ||
|
||
import android.graphics.SurfaceTexture; | ||
import android.view.Surface; | ||
|
||
public interface ISurfaceAvailable { | ||
// Always called on the UI thread and while activity is in state == resumed | ||
void XSurfaceCreated(final SurfaceTexture surfaceTexture, final Surface surface); | ||
void XSurfaceDestroyed(); | ||
} |