Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ public void shutDown() {
inputSurface.release();
inputSurface = null;
}
if (mEglCore != null) {
mEglCore.release();
mEglCore = null;
}
} catch (Exception ex) {
DebugTool.logError(TAG, "shutDown() failed");
}
Expand All @@ -262,6 +266,9 @@ public void shutDown() {
* @param Height
*/
private void setupGLES(int Width, int Height) {
if (mEglCore != null) {
mEglCore.release();
}
mEglCore = new EglCore(null, 0);

// This 1x1 offscreen is created just to get the texture name (mTextureId).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,15 @@ public void onServiceStarted(SdlSession session, SessionType type, boolean isEnc
public void onServiceEnded(SdlSession session, SessionType type) {
if (SessionType.NAV.equals(type)) {
if (remoteDisplay != null) {
stopStreaming(withPendingRestart);
if (withPendingRestart && isHMIStateVideoStreamCapable(currentOnHMIStatus)) {
stopStreaming(withPendingRestart);
} else {
stopStreaming();
}
}
stateMachine.transitionToState(StreamingStateMachine.NONE);
transitionToState(SETTING_UP);

if (withPendingRestart) {
if (withPendingRestart && isHMIStateVideoStreamCapable(currentOnHMIStatus)) {
VideoStreamManager manager = VideoStreamManager.this;
manager.internalInterface.startVideoService(manager.getLastCachedStreamingParameters(), manager.isEncrypted, withPendingRestart);
}
Expand Down Expand Up @@ -198,6 +201,10 @@ public void onNotified(RPCNotification notification) {
if (hasStarted && (isHMIStateVideoStreamCapable(prevOnHMIStatus)) && (!isHMIStateVideoStreamCapable(currentOnHMIStatus))) {
stopVideoStream();
}
if (withPendingRestart && hasStarted && (!isHMIStateVideoStreamCapable(prevOnHMIStatus)) && (isHMIStateVideoStreamCapable(currentOnHMIStatus))) {
VideoStreamManager manager = VideoStreamManager.this;
manager.internalInterface.startVideoService(manager.getLastCachedStreamingParameters(), manager.isEncrypted, withPendingRestart);
}
}
}
};
Expand Down