<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/03/2012 10:53 AM, Anees Alappat
wrote:<br>
</div>
<blockquote
cite="mid:CAJYLsdmw133+ALGN8cuGFgCmgD5mYwonyb=1He8+SkDnesXt3g@mail.gmail.com"
type="cite">Hi,
<div><br>
</div>
<div><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I
tried to play mpeg/mp4 files as an Application using eclipse
environment by
loading some of the libraries from Gstreamer. The main
limitation is that it
requires both audio sink(audioflinger.so) and video
sink(surfaceflinger.so) to
play the files and display it on the screen, When we tested it
on the phone. we
are able to hear mp4 audio perfectly but video is not
displayed on screen. This
is due to a permission error on video sink -
surfaceflingersink.</span></div>
<div><font face="Calibri, sans-serif"><span style="font-size:15px">
<div><font color="#ff0000">08-01 16:11:31.335:
W/ServiceManager(1542): Permission failure:
android.permission.ACCESS_SURFACE_FLINGER from uid=10076
pid=15466</font></div>
<div><font color="#ff0000">08-01 16:11:31.335:
E/SurfaceFlinger(1542): Permission Denial: can't access
SurfaceFlinger pid=15466, uid=10076</font></div>
<div><font color="#ff0000"><br>
</font></div>
</span></font></div>
</blockquote>
surfaceflinger can only be used when bilding a system image. In the
ndk version, one cannot easily access surfaceflinger (in
gingerbread). Not sure if this has been relaxed in newer versions.<br>
<br>
Stefan<br>
<br>
<blockquote
cite="mid:CAJYLsdmw133+ALGN8cuGFgCmgD5mYwonyb=1He8+SkDnesXt3g@mail.gmail.com"
type="cite">
<div><font face="Calibri, sans-serif"><span style="font-size:15px">
<div><font color="#ff0000">How to resolve this permission
error?</font></div>
<div><font color="#ff0000"><br>
</font></div>
<div><font color="#003300">Regards</font></div>
<div><font color="#003300">Anees</font></div>
</span></font><br>
<div class="gmail_quote">On Tue, Jul 3, 2012 at 7:23 PM, Anees
Alappat <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:aneesalappatt@gmail.com" target="_blank">aneesalappatt@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb">
<div class="h5">Thanks for your help.<br>
<br>
We tried to write a script and used setenv to set the
PATH for environment variable but it is not working. <br>
We tried to call setenv inside gst-launch.c and also
inside the script file to set the PATH for the
environment variables but it did not work.<br>
From the JNI layer from the native code from we tried to
call the main function of the gst-launch.c passing the
command line arguments for gst-launch command as string
variables. Before calling the main function we have set
all the environment variables using setenv.But still
this option also didn't work.<br>
<br>
This is the code snippet for the caling the gst-launc
main function inside JNI layer<br>
<br>
JNIEXPORT void JNICALL Java_uk_co_videokit_gstreamer_
<blockquote class="gmail_quote">Gstreamer_run(JNIEnv
*env, jobject obj, jobjectArray args)<br>
{<br>
LOGD("run() called");<br>
int i = 0;<br>
int argc = 0;<br>
char **argv = NULL;<br>
setenv ("GST_REGISTRY",
"/data/data/videokit.gstream/cache/registry.bin", 1);<br>
setenv ("GST_PLUGIN_PATH",
"/data/data/videokit.gstream/lib", 1);<br>
setenv ("LD_LIBRARY_PATH",
"/data/data/videokit.gstream/lib",1);<br>
setenv ("PATH",
"/data/data/videokit.gstream/bin",1);<br>
setenv
("GST_PLUGIN_SCANNER","/data/data/videokit.gstream/bin/gst-plugin-scanner",1);<br>
setenv
("GST_OMX_CONFIG_DIR","/data/data/videokit.gstream/conf",1);<br>
<br>
if (args != NULL) {<br>
argc = (*env)->GetArrayLength(env,
args);<br>
argv = (char **) malloc(sizeof(char *)
* argc);<br>
<br>
for(i=0;i<argc;i++)<br>
{<br>
jstring str =
(jstring)(*env)->GetObjectArrayElement(env, args,
i);<br>
argv[i] = (char
*)(*env)->GetStringUTFChars(env, str, NULL);<br>
}<br>
}<br>
<br>
LOGD("run passing off to main()");<br>
main(argc,argv);<br>
}<br>
<br>
<br>
<br>
Regards<span><font color="#888888"><br>
Anees</font></span>
<div>
<div><br>
</div>
</div>
</blockquote>
<br>
<br>
</div>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_quote">On Tue, Jul 3, 2012 at 7:13 PM,
Anees Alappat <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:aneesalappatt@gmail.com"
target="_blank">aneesalappatt@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for your help.<br>
<br>
We tried to write a script and used setenv to set
the PATH for environment variable but it is not
working. <br>
We tried to call setenv inside gst-launch.c and
also inside the script file to set the PATH for the
environment variables but it did not work.<br>
From the JNI layer from the native code from we
tried to call the main function of the gst-launch.c
passing the command line arguments for gst-launch
command as string variables. Before calling the main
function we have set all the environment variables
using setenv.But still this option also didn't work.<br>
<br>
This is the code snippet for the caling the
gst-launc main function inside JNI layer<br>
<br>
JNIEXPORT void JNICALL
Java_uk_co_videokit_gstreamer_Gstreamer_run(JNIEnv
*env, jobject obj, jobjectArray args)<br>
{<br>
LOGD("run() called");<br>
int i = 0;<br>
int argc = 0;<br>
char **argv = NULL;<br>
setenv ("GST_REGISTRY",
"/data/data/videokit.gstream/cache/registry.bin",
1);<br>
setenv ("GST_PLUGIN_PATH",
"/data/data/videokit.gstream/lib", 1);<br>
setenv ("LD_LIBRARY_PATH",
"/data/data/videokit.gstream/lib",1);<br>
setenv ("PATH",
"/data/data/videokit.gstream/bin",1);<br>
setenv
("GST_PLUGIN_SCANNER","/data/data/videokit.gstream/bin/gst-plugin-scanner",1);<br>
setenv
("GST_OMX_CONFIG_DIR","/data/data/videokit.gstream/conf",1);<br>
<br>
if (args != NULL) {<br>
argc =
(*env)->GetArrayLength(env, args);<br>
argv = (char **) malloc(sizeof(char
*) * argc);<br>
<br>
for(i=0;i<argc;i++)<br>
{<br>
jstring str =
(jstring)(*env)->GetObjectArrayElement(env, args,
i);<br>
argv[i] = (char
*)(*env)->GetStringUTFChars(env, str, NULL);<br>
}<br>
}<br>
<br>
LOGD("run passing off to main()");<br>
main(argc,argv);<br>
}<br>
<br>
<br>
<br>
Regards<span><font color="#888888"><br>
Anees</font></span>
<div>
<div><br>
<br>
<div class="gmail_quote">On Tue, Jul 3, 2012 at
10:11 AM, Anees Alappat <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:aneesalappatt@gmail.com"
target="_blank">aneesalappatt@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">
<div>
<div><br>
<br>
<div class="gmail_quote">----------
Forwarded message ----------<br>
From: <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:gstreamer-android-request@lists.freedesktop.org"
target="_blank">gstreamer-android-request@lists.freedesktop.org</a>></span><br>
Date: Tue, Jul 3, 2012 at 12:30 AM<br>
Subject: gstreamer-android Digest, Vol
14, Issue 1<br>
To: <a moz-do-not-send="true"
href="mailto:gstreamer-android@lists.freedesktop.org"
target="_blank">gstreamer-android@lists.freedesktop.org</a><br>
<br>
<br>
Send gstreamer-android mailing list
submissions to<br>
<a moz-do-not-send="true"
href="mailto:gstreamer-android@lists.freedesktop.org"
target="_blank">gstreamer-android@lists.freedesktop.org</a><br>
<br>
To subscribe or unsubscribe via the
World Wide Web, visit<br>
<a moz-do-not-send="true"
href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-android"
target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-android</a><br>
or, via email, send a message with
subject or body 'help' to<br>
<a moz-do-not-send="true"
href="mailto:gstreamer-android-request@lists.freedesktop.org"
target="_blank">gstreamer-android-request@lists.freedesktop.org</a><br>
<br>
You can reach the person managing the
list at<br>
<a moz-do-not-send="true"
href="mailto:gstreamer-android-owner@lists.freedesktop.org"
target="_blank">gstreamer-android-owner@lists.freedesktop.org</a><br>
<br>
When replying, please edit your
Subject line so it is more specific<br>
than "Re: Contents of
gstreamer-android digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. gstreamer running on Android
app? (Anees Alappat)<br>
2. Re: gstreamer running on Android
app? (Enrique Oca?a Gonz?lez)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 2 Jul 2012 17:42:15 +0530<br>
From: Anees Alappat <<a
moz-do-not-send="true"
href="mailto:aneesalappatt@gmail.com"
target="_blank">aneesalappatt@gmail.com</a>><br>
To: <a moz-do-not-send="true"
href="mailto:gstreamer-android@lists.freedesktop.org"
target="_blank">gstreamer-android@lists.freedesktop.org</a><br>
Subject: gstreamer running on Android
app?<br>
Message-ID:<br>
<<a moz-do-not-send="true"
href="mailto:CAJYLsdkBszkZzyCPuWuQtO0GMtG4oQGj8u%2BGggOh3gpuVz_gig@mail.gmail.com"
target="_blank">CAJYLsdkBszkZzyCPuWuQtO0GMtG4oQGj8u+GggOh3gpuVz_gig@mail.gmail.com</a>><br>
Content-Type: text/plain;
charset="iso-8859-1"<br>
<br>
Hi,<br>
We could succesfully port Gstreamer
framework to Android going through the<br>
link<br>
<a moz-do-not-send="true"
href="http://gstreamer.freedesktop.org/wiki/GstreamerAndroid_InstallInstructions"
target="_blank">http://gstreamer.freedesktop.org/wiki/GstreamerAndroid_InstallInstructions</a><br>
<br>
Through adb shell, we could run
gstreamer commands to view mp4 files
as<br>
well as mpegts files using gst-launch
command. To view the video/ausio, we<br>
used audioflingersink as well as
surfaceflingersink.<br>
For this purpose, all the gstreamer
related environment variables have to<br>
be exported manually through the adb
shell.<br>
We would like to run the gst-launch as
an application in the Android phone<br>
without exporting the variables using
adb shell. Is there any method for<br>
this?<br>
<br>
I am exporting the following below
mentioned environment variables in the<br>
adb shell.<br>
<br>
export
LD_LIBRARY_PATH=/data/data/com.android.freedesktop.gstreamer/lib/<br>
<br>
export
PATH=/data/data/com.android.freedesktop.gstreamer/bin:$PATH<br>
<br>
export
GST_PLUGIN_PATH=/data/data/com.android.freedesktop.gstreamer/lib/<br>
<br>
export<br>
GST_PLUGIN_SCANNER=/data/data/com.android.freedesktop.gstreamer/bin/gst-plugin-scanner<br>
<br>
export
GST_OMX_CONFIG_DIR=/data/data/com.android.freedesktop.gstreamer/conf/<br>
<br>
export
GST_REGISTRY_REUSE_PLUGIN_SCANNER=no<br>
<br>
Thanks & Regards<br>
Anees<br>
-------------- next part
--------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a moz-do-not-send="true"
href="http://lists.freedesktop.org/archives/gstreamer-android/attachments/20120702/24f4c169/attachment-0001.html"
target="_blank">http://lists.freedesktop.org/archives/gstreamer-android/attachments/20120702/24f4c169/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 2 Jul 2012 15:53:00 +0200<br>
From: Enrique Oca?a Gonz?lez <<a
moz-do-not-send="true"
href="mailto:eocanha@igalia.com"
target="_blank">eocanha@igalia.com</a>><br>
To: <a moz-do-not-send="true"
href="mailto:gstreamer-android@lists.freedesktop.org"
target="_blank">gstreamer-android@lists.freedesktop.org</a><br>
Subject: Re: gstreamer running on
Android app?<br>
Message-ID: <<a
moz-do-not-send="true"
href="mailto:201207021553.00470.eocanha@igalia.com"
target="_blank">201207021553.00470.eocanha@igalia.com</a>><br>
Content-Type: Text/Plain;
charset="iso-8859-15"<br>
<br>
On Lunes, 2 de Julio de 2012 14:12:15
Anees Alappat escribi?:<br>
<br>
> For this purpose, all the
gstreamer related environment
variables have to<br>
> be exported manually through the
adb shell.<br>
> We would like to run the
gst-launch as an application in the
Android phone<br>
> without exporting the variables
using adb shell. Is there any method
for<br>
> this?<br>
<br>
Maybe some of these suggestions could
be useful to you:<br>
<br>
- Writing a wrapper in shell script
(eg: gst-launch.sh) that does the
variable<br>
exports before calling the actual
gst-launch executable. Execute the
script<br>
invoking /system/bin/sh
<script-name>.<br>
- Writing a wrapper C program that
does the variable exports using
setenv()<br>
and then exec() the actual executable.<br>
- Modify the gst-launch sources to add
the setenv()s there.<br>
<br>
Cheers.<br>
<br>
--<br>
Enrique Oca?a<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
gstreamer-android mailing list<br>
<a moz-do-not-send="true"
href="mailto:gstreamer-android@lists.freedesktop.org"
target="_blank">gstreamer-android@lists.freedesktop.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-android"
target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-android</a><br>
<br>
<br>
End of gstreamer-android Digest, Vol
14, Issue 1<br>
************************************************<br>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gstreamer-android mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-android@lists.freedesktop.org">gstreamer-android@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-android">http://lists.freedesktop.org/mailman/listinfo/gstreamer-android</a>
</pre>
</blockquote>
<br>
</body>
</html>