Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-Android
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
243
Issues
243
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLC-Android
Commits
9ad60177
Commit
9ad60177
authored
May 29, 2018
by
Geoffrey Métais
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deactivate mediarouter callbacks in benchmark
parent
0f388166
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
vlc-android/src/org/videolan/vlc/gui/video/DisplayManager.kt
vlc-android/src/org/videolan/vlc/gui/video/DisplayManager.kt
+4
-4
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
...d/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+4
-4
No files found.
vlc-android/src/org/videolan/vlc/gui/video/DisplayManager.kt
View file @
9ad60177
...
...
@@ -57,8 +57,8 @@ class DisplayManager(private val activity: Activity, cloneMode: Boolean) {
}}
init
{
presentation
=
if
(
AndroidUtil
.
isJellyBeanMR1OrLater
)
createPresentation
(
cloneMode
)
else
null
displayType
=
getCurrentType
()
presentation
=
if
(
AndroidUtil
.
isJellyBeanMR1OrLater
&&
!
cloneMode
)
createPresentation
(
)
else
null
displayType
=
if
(
cloneMode
)
DisplayType
.
PRIMARY
else
getCurrentType
()
if
(!
AndroidDevices
.
isChromeBook
)
RendererDelegate
.
selectedRenderer
.
observeForever
(
rendererObs
)
}
...
...
@@ -85,8 +85,8 @@ class DisplayManager(private val activity: Activity, cloneMode: Boolean) {
}
@TargetApi
(
Build
.
VERSION_CODES
.
JELLY_BEAN_MR1
)
private
fun
createPresentation
(
cloneMode
:
Boolean
):
SecondaryDisplay
?
{
if
(
mediaRouter
===
null
||
cloneMode
)
return
null
private
fun
createPresentation
():
SecondaryDisplay
?
{
if
(
mediaRouter
===
null
)
return
null
// Get the current route and its presentation display.
val
route
=
mediaRouter
?.
getSelectedRoute
(
MediaRouter
.
ROUTE_TYPE_LIVE_VIDEO
)
...
...
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
View file @
9ad60177
...
...
@@ -324,7 +324,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
audioBoostEnabled
=
mSettings
.
getBoolean
(
"audio_boost"
,
false
);
mEnableCloneMode
=
mSettings
.
getBoolean
(
"enable_clone_mode"
,
false
);
mDisplayManager
=
new
DisplayManager
(
this
,
mEnableCloneMode
);
mDisplayManager
=
new
DisplayManager
(
this
,
mEnableCloneMode
||
mIsBenchmark
);
setContentView
(
mDisplayManager
.
isPrimary
()
?
R
.
layout
.
player
:
R
.
layout
.
player_remote_control
);
/** initialize Views an their Events */
...
...
@@ -777,7 +777,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
surfaceFrameAddLayoutListener
(
true
);
/* Listen for changes to media routes. */
mDisplayManager
.
mediaRouterAddCallback
(
true
);
if
(!
mIsBenchmark
)
mDisplayManager
.
mediaRouterAddCallback
(
true
);
if
(
mRootView
!=
null
)
mRootView
.
setKeepScreenOn
(
true
);
}
...
...
@@ -845,7 +845,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
if
(
mRootView
!=
null
)
mRootView
.
setKeepScreenOn
(
false
);
/* Stop listening for changes to media routes. */
mDisplayManager
.
mediaRouterAddCallback
(
false
);
if
(!
mIsBenchmark
)
mDisplayManager
.
mediaRouterAddCallback
(
false
);
surfaceFrameAddLayoutListener
(
false
);
...
...
@@ -933,7 +933,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
}
};
public
void
exit
(
int
resultCode
){
public
void
exit
(
int
resultCode
)
{
if
(
isFinishing
())
return
;
final
Intent
resultIntent
=
new
Intent
(
ACTION_RESULT
);
if
(
mUri
!=
null
&&
mService
!=
null
)
{
...
...
Geoffrey Métais
@Dekans
mentioned in commit
3531c047
·
May 29, 2018
mentioned in commit
3531c047
mentioned in commit 3531c04753ba793e0b671bf2feeac675638fe645
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment