mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Drop redundant init code from JNI side
GStreamer initialisation is done on the Java side before the transcode API is called.
This commit is contained in:
parent
ba151484b8
commit
d34c8299cd
1 changed files with 0 additions and 14 deletions
|
|
@ -3,18 +3,6 @@
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
|
|
||||||
static int init(void)
|
|
||||||
{
|
|
||||||
/* XXX: ZERO thread-safety guarantees here */
|
|
||||||
static gboolean inited = 0;
|
|
||||||
|
|
||||||
if (inited)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
gst_init(NULL, NULL);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int transcode(const char *infile, const char *outfile,
|
static int transcode(const char *infile, const char *outfile,
|
||||||
const char *profile, jobject cb_obj, JNIEnv *env)
|
const char *profile, jobject cb_obj, JNIEnv *env)
|
||||||
{
|
{
|
||||||
|
|
@ -24,8 +12,6 @@ static int transcode(const char *infile, const char *outfile,
|
||||||
gchar pipeline_str[1024];
|
gchar pipeline_str[1024];
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
init();
|
|
||||||
|
|
||||||
snprintf(pipeline_str, 1024,
|
snprintf(pipeline_str, 1024,
|
||||||
"filesrc location=\"%s\" ! "
|
"filesrc location=\"%s\" ! "
|
||||||
"progressreport silent=true format=percent update-freq=1 ! "
|
"progressreport silent=true format=percent update-freq=1 ! "
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue