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:
Arun Raghavan 2012-11-20 23:59:41 +05:30
parent ba151484b8
commit d34c8299cd

View file

@ -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 ! "