Is it possible to use glviewconvert on Android with version 1.6.1 package?
少华王
naozhong at gmail.com
Sat Oct 31 22:44:22 PDT 2015
---------- Forwarded message ----------
From: 少华王 <naozhong at gmail.com>
Date: 2015-11-01 13:43 GMT+08:00
Subject: Re: Is it possible to use glviewconvert on Android?
To: Matthew Waters <ystreet00 at gmail.com>
I don't know whether you could read my last message, because of the char
set.
I just can't use glviewconvert on Android even use version 1.6.1 package. I
got this message in logcat:
0:00:00.753867240 0xaef2f860 ./grammar.y:691:priv_gst_parse_yyparse no
element "glviewconvert"
I just write this code in app_function, maybe not in the right way, but I
wanna to got the separated/frame-by-frame modes on Android first.
>
> data->pipeline = gst_element_factory_make("playbin", &error);
data->sinkbin =(GstBin *) gst_parse_bin_from_description ("glupload !
glcolorconvert ! glviewconvert name=viewconvert ! glimagesink name=sink",
TRUE, NULL);
data->glconvert = gst_bin_get_by_name (data->sinkbin, "viewconvert");
data->videosink = gst_bin_get_by_name (data->sinkbin, "sink");
if (!data->glconvert)
{
GST_DEBUG("no viewconvert!!!!!!!!");
}
if (error) {
gchar *message = g_strdup_printf("Unable to build pipeline: %s",
error->message);
g_clear_error (&error);
set_ui_message(message, data);
g_free (message);
return NULL;
}
g_object_set (G_OBJECT (data->pipeline), "video-sink", data->sinkbin,
NULL);
GstElement *sink = gst_bin_get_by_name (GST_BIN (data->videosink),
"sink");
g_object_set (G_OBJECT (sink), "output-multiview-mode", GST_VIDEO_
MULTIVIEW_MODE_SIDE_BY_SIDE, NULL);
g_object_set (G_OBJECT (data->glconvert), "input-mode-override", GST
_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED, NULL);
Is there any step which I lost to use glviewconvert on Android?
Thank you for you help very much.
2015-11-01 0:41 GMT+08:00 naozhong <naozhong at gmail.com>:
>
> I have downloaded version 1.6.1 package, and I still can not use glviewconvert on Android. Is there any necessary step to use glviewconvert on Android?
> Thank you for your help.
>
> ---Original---
> *From:* "Matthew Waters "<ystreet00 at gmail.com>
> *Date:* 2015/10/27 12:44:39
> *To:* "少华王"<naozhong at gmail.com>;
> *Subject:* Re: Is it possible to use glviewconvert on Android?
>
> The binaries are built using cerbero which is available from
> <http://cgit.freedesktop.org/gstreamer/cerbero>
> http://cgit.freedesktop.org/gstreamer/cerbero
>
> The following commands should get you started
>
> cd path/to/clone
> git clone git://anongit.freedesktop.org/gstreamer/cerbero
> echo 'alias cerbero="path/to/clone/cerbero/cerbero-uninstalled"' >>
> ~/.profile
> # or ~/.bashrc depending on where you want to set it up/what shell you're
> running
> source ~/.profile # get the changes into you current session (or open a
> new terminal)
> cerbero bootstrap # these take a while
> cerbero package gstreamer-1.0 # as does this
>
> You have two options for developing against GStreamer.
> 1. Extract the generated package somewhere and point your application at
> the extracted package
> 2. Develop against the cerbero version by pointing GSTREAMER_ROOT to the
> installed cerbero prefix in cerbero/dist/android_armv7/
>
> Good luck
>
> -Matt
>
> On 26/10/15 20:05, 少华王 wrote:
>
> So is it a last commit that I can't use in the 1.6.0 release package?
> Maybe I want to use this feature by compiling from source myself. I know
> that is not recommended. But where can I get any tutorial to learn how to
> do that?
>
> 2015-10-26 15:32 GMT+08:00 Matthew Waters <ystreet00 at gmail.com>:
>
>> On 26/10/15 02:59, 少华王 wrote:
>> > I wrote a small demo on Linux using glviewconvert like this:
>> > #include <gst/gst.h>
>> > #include <gst/video/video.h>
>> > #include <gst/video/videooverlay.h>
>> >
>> > int main(int argc, char *argv[]) {
>> > GstMessage *msg;
>> > /* Initialize GStreamer */
>> > gst_init (&argc, &argv);
>> > /* Build the pipeline */
>> > GstElement *pipeline = gst_element_factory_make ("playbin", NULL);
>> > GstBin *sinkbin = (GstBin *) gst_parse_bin_from_description
>> ("glupload ! glcolorconvert ! glviewconvert name=viewconvert ! glimagesink
>> name=sink", TRUE, NULL);
>> > GstElement *glconvert = gst_bin_get_by_name (sinkbin, "viewconvert");
>> > GstElement *videosink = gst_bin_get_by_name (sinkbin, "sink");
>> > g_object_set (G_OBJECT (pipeline), "video-sink", sinkbin, NULL);
>> > g_object_set (G_OBJECT (pipeline), "uri",
>> "file:///home/sheldon/1.webm", NULL);
>> >
>> > // g_object_get (pipeline, "video-multiview-mode", &state.in_mode,
>> > // "video-multiview-flags", &state.in_flags, NULL);
>> >
>> > g_object_set (G_OBJECT (glconvert), "input-mode-override", 0,
>> > NULL);
>> > g_object_set (G_OBJECT (glconvert), "input-flags-override", 0,
>> > NULL);
>> >
>> > GstElement *sink = gst_bin_get_by_name (GST_BIN (videosink), "sink");
>> > g_object_set (G_OBJECT (sink), "output-multiview-mode",
>> GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE, NULL);
>> >
>> > g_object_set (G_OBJECT (glconvert), "input-mode-override",
>> GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED, NULL);
>> >
>> > gst_element_set_state (pipeline, GST_STATE_PLAYING);
>> > GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
>> > msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
>> GST_MESSAGE_ERROR | GST_MESSAGE_EOS);
>> >
>> > // /* Free resources */
>> > if (msg != NULL)
>> > gst_message_unref (msg);
>> > gst_object_unref (bus);
>> > gst_element_set_state (pipeline, GST_STATE_NULL);
>> > gst_object_unref (pipeline);
>> > return 0;
>> > }
>> > And I want to use this on Android. Then I got a error log like "cannot
>> find glviewconvert". Is there a way to use glviewconvert directly? If not,
>> what can I do? Like compile the glviewconvert?
>>
>> Looks like glviewconvert was only built for desktop OpenGL systems.
>> That's since been rectified by
>>
>> http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=09976e021b8d222daf96e1b1328fde4a00b5c05f
>> .
>> As hinted by the commit message, if you have a gles2 system (no gles3)
>> then you cannot output the separated/frame-by-frame modes due to
>> limitations in the GLES 2.0 API.
>>
>> Cheers
>> -Matt
>>
>> > I'm new on GStreamer, it's very nice of you if you could help me or
>> give me any tips. Thank you very much.
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151101/77b9d61d/attachment.html>
More information about the gstreamer-devel
mailing list