Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
a7adfbda
Commit
a7adfbda
authored
Oct 13, 2017
by
Sylvain Berfini
🐮
Browse files
Improvements on OpenH264 Java helper
parent
367243d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
19 deletions
+13
-19
wrappers/java/classes/tools/OpenH264DownloadHelper.java
wrappers/java/classes/tools/OpenH264DownloadHelper.java
+13
-18
wrappers/java/migration.sh
wrappers/java/migration.sh
+0
-1
No files found.
wrappers/java/classes/tools/OpenH264DownloadHelper.java
View file @
a7adfbda
...
@@ -63,6 +63,19 @@ public class OpenH264DownloadHelper {
...
@@ -63,6 +63,19 @@ public class OpenH264DownloadHelper {
if
(
context
.
getFilesDir
()
!=
null
)
{
if
(
context
.
getFilesDir
()
!=
null
)
{
fileDirection
=
context
.
getFilesDir
().
toString
();
fileDirection
=
context
.
getFilesDir
().
toString
();
}
}
File
file
=
new
File
(
context
.
getApplicationInfo
().
nativeLibraryDir
+
"/libmsopenh264.so"
);
if
(!
file
.
exists
())
{
Log
.
i
(
"LinphoneCoreFactoryImpl"
,
" libmsopenh264 not found, we disable the download of Openh264"
);
isDownloadEnabled
=
false
;
}
if
(
isCodecFound
())
{
Log
.
i
(
"OpenH264DownloadHelper"
,
" Loading OpenH264 downloaded plugin:"
+
downloadHelper
.
getFullPathLib
());
System
.
load
(
downloadHelper
.
getFullPathLib
());
}
else
{
Log
.
i
(
"OpenH264DownloadHelper"
,
" Cannot load OpenH264 downloaded plugin"
);
}
isDownloadEnabled
=
true
;
}
}
public
static
boolean
isOpenH264DownloadEnabled
()
{
public
static
boolean
isOpenH264DownloadEnabled
()
{
...
@@ -73,24 +86,6 @@ public class OpenH264DownloadHelper {
...
@@ -73,24 +86,6 @@ public class OpenH264DownloadHelper {
isDownloadEnabled
=
enabled
;
isDownloadEnabled
=
enabled
;
}
}
public
static
boolean
checkIfOpenH264DownloadCanBeEnabled
(
Context
context
)
{
File
file
=
new
File
(
context
.
getApplicationInfo
().
nativeLibraryDir
+
"/libmsopenh264.so"
);
if
(!
file
.
exists
())
{
Log
.
i
(
"LinphoneCoreFactoryImpl"
,
" libmsopenh264 not found, we disable the download of Openh264"
);
return
false
;
}
OpenH264DownloadHelper
downloadHelper
=
new
OpenH264DownloadHelper
(
context
);
if
(
downloadHelper
.
isCodecFound
())
{
Log
.
i
(
"OpenH264DownloadHelper"
,
" Loading OpenH264 downloaded plugin:"
+
downloadHelper
.
getFullPathLib
());
System
.
load
(
downloadHelper
.
getFullPathLib
());
}
else
{
Log
.
i
(
"OpenH264DownloadHelper"
,
" Cannot load OpenH264 downloaded plugin"
);
}
return
true
;
}
/**
/**
* Set OpenH264DownloadHelperListener
* Set OpenH264DownloadHelperListener
* @param h264Listener
* @param h264Listener
...
...
wrappers/java/migration.sh
View file @
a7adfbda
...
@@ -234,7 +234,6 @@ eval "$SED_START 's/enableDownloadOpenH264(/OpenH264DownloadHelper.enableDownloa
...
@@ -234,7 +234,6 @@ eval "$SED_START 's/enableDownloadOpenH264(/OpenH264DownloadHelper.enableDownloa
#Factory.instance().setLogCollectionPath(getFilesDir().getAbsolutePath());
#Factory.instance().setLogCollectionPath(getFilesDir().getAbsolutePath());
#Factory.instance().enableLogCollection(isDebugEnabled);
#Factory.instance().enableLogCollection(isDebugEnabled);
#Factory.instance().setDebugMode(isDebugEnabled, getString(R.string.app_name));
#Factory.instance().setDebugMode(isDebugEnabled, getString(R.string.app_name));
#Factory.instance().createConfig(String s);
#AccountCreator.updatePassword
#AccountCreator.updatePassword
#Android specifics not wrapped automatically
#Android specifics not wrapped automatically
...
...
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