<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">少华王</b> <span dir="ltr"><<a href="mailto:naozhong@gmail.com">naozhong@gmail.com</a>></span><br>Date: 2015-11-01 13:43 GMT+08:00<br>Subject: Re: Is it possible to use glviewconvert on Android?<br>To: Matthew Waters <<a href="mailto:ystreet00@gmail.com">ystreet00@gmail.com</a>><br><br><br><div dir="ltr"><div>I don't know whether you could read my last message, because of the char set.</div><div>I just can't use <span>glviewconvert</span> on Android even use version 1.6.1 package. I got this message in <span>logcat</span>:</div>0:00:00.753867240 0xaef2f860 ./grammar.y:691:<span>priv</span>_<span>gst</span>_parse_<span>yyparse</span> no element "<span>glviewconvert</span>"<br><div><br></div><div>I just write this code in app_function, maybe not in the right way, but I wanna to got the <span style="font-size:14px">separated/frame-by-frame modes on Android first.</span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:14px"><br></span></blockquote><div><blockquote><span style="font-size:14px">  data->pipeline = <span>gst</span>_element_factory_make("<span>playbin</span>", &error);<br></span><span style="font-size:14px">  data-><span>sinkbin</span> =(<span>GstBin</span> *) <span>gst</span>_parse_bin_from_description ("<span>glupload</span> ! <span>glcolorconvert</span> ! <span>glviewconvert</span>   name=<span>viewconvert</span> ! <span>glimagesink</span> name=sink", TRUE, NULL);<br></span><span style="font-size:14px">  data-><span>glconvert</span> =  <span>gst</span>_bin_get_by_name (data-><span>sinkbin</span>, "<span>viewconvert</span>");<br></span><span style="font-size:14px">  data-><span>videosink</span> = <span>gst</span>_bin_get_by_name (data-><span>sinkbin</span>, "sink");<br></span><span style="font-size:14px">  if (!data-><span>glconvert</span>)<br></span><span style="font-size:14px">  {<br></span><span style="font-size:14px"><span style="white-space:pre-wrap">  </span>  <span>GST</span>_DEBUG("no <span>viewconvert</span>!!!!!!!!");<br></span><span style="font-size:14px">  }</span><span style="font-size:14px"><br></span><span style="font-size:14px">  if (error) {<br></span><span style="font-size:14px">    <span>gchar</span> *message = g_<span>strdup</span>_<span>printf</span>("Unable to build pipeline: %s", error->message);<br></span><span style="font-size:14px">    g_clear_error (&error);<br></span><span style="font-size:14px">    set_<span>ui</span>_message(message, data);<br></span><span style="font-size:14px">    g_free (message);<br></span><span style="font-size:14px">    return NULL;<br></span><span style="font-size:14px">  }</span><span style="font-size:14px"><br></span><span style="font-size:14px">  g_object_set (G_OBJECT (data->pipeline), "video-sink", data-><span>sinkbin</span>, NULL);<br></span><span style="font-size:14px">  <span>GstElement</span> *sink = <span>gst</span>_bin_get_by_name (<span>GST</span>_BIN (data-><span>videosink</span>), "sink");<br></span><span class=""><span style="font-size:14px">  g_object_set (G_OBJECT (sink), "output-<span>multiview</span>-mode", <span>GST</span>_VIDEO_<span>MULTIVIEW</span>_MODE_SIDE_BY_SIDE, NULL);<br></span></span><span style="font-size:14px">  g_object_set (G_OBJECT (data-><span>glconvert</span>), "input-mode-override", <span>GST</span>_VIDEO_<span>MULTIVIEW</span>_FRAME_PACKING_COLUMN_INTERLEAVED, NULL);</span></blockquote></div><div>Is there any step which I lost to use <span>glviewconvert</span> on Android?</div><div>Thank you for you help very much.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-11-01 0:41 GMT+08:00 naozhong <span dir="ltr"><<a href="mailto:naozhong@gmail.com" target="_blank">naozhong@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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?<br>Thank you for your help.<br><br><div style="font-size:12px;padding:2px 0">---Original---</div><div style="font-size:12px;background:#f0f0f0;color:#212121;padding:8px!important;border-radius:4px;line-height:1.5"><div><b>From:</b> "Matthew Waters "<<a href="mailto:ystreet00@gmail.com" target="_blank">ystreet00@gmail.com</a>></div><div><b>Date:</b> 2015/10/27 12:44:39</div><div><b>To:</b> "少华王"<<a href="mailto:naozhong@gmail.com" target="_blank">naozhong@gmail.com</a>>;</div><div><b>Subject:</b> Re: Is it possible to use glviewconvert on Android?</div></div><br>
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><span>
    <div>The binaries are built using cerbero
      which is available from <a href="http://cgit.freedesktop.org/gstreamer/cerbero" target="_blank"></a><a href="http://cgit.freedesktop.org/gstreamer/cerbero" target="_blank">http://cgit.freedesktop.org/gstreamer/cerbero</a><br>
      <br>
      The following commands should get you started<br>
      <br>
      cd path/to/clone<br>
      git clone <a>git://anongit.freedesktop.org/gstreamer/cerbero</a><br>
      echo 'alias cerbero="path/to/clone/cerbero/cerbero-uninstalled"'
      >> ~/.profile<br>
      # or ~/.bashrc depending on where you want to set it up/what shell
      you're running<br>
      source ~/.profile # get the changes into you current session (or
      open a new terminal)<br>
      cerbero bootstrap # these take a while<br>
      cerbero package gstreamer-1.0 # as does this<br>
      <br>
      You have two options for developing against GStreamer.<br>
      1. Extract the generated package somewhere and point your
      application at the extracted package<br>
      2. Develop against the cerbero version by pointing GSTREAMER_ROOT
      to the installed cerbero prefix in cerbero/dist/android_armv7/<br>
      <br>
      Good luck<br>
      <br>
      -Matt<br>
      <br>
      On 26/10/15 20:05, 少华王 wrote:<br>
    </div>
    </span><blockquote type="cite"><span>
      <div dir="ltr">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?</div>
      </span><div class="gmail_extra"><br>
        <div class="gmail_quote"><span>2015-10-26 15:32 GMT+08:00 Matthew
          Waters <span dir="ltr"><<a href="mailto:ystreet00@gmail.com" target="_blank">ystreet00@gmail.com</a>></span>:<br>
          </span><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div>
              <div>On 26/10/15 02:59, 少华王 wrote:<br>
                > I wrote a small demo on Linux using glviewconvert
                like this:<br>
                > #include <gst/gst.h><br>
                > #include <gst/video/video.h><br>
                > #include <gst/video/videooverlay.h><br>
                ><br>
                > int main(int argc, char *argv[]) {<br>
                >   GstMessage *msg;<br>
                >   /* Initialize GStreamer */<br>
                >   gst_init (&argc, &argv);<br>
                >   /* Build the pipeline */<br>
                >   GstElement *pipeline = gst_element_factory_make
                ("playbin", NULL);<br>
                >   GstBin *sinkbin = (GstBin *)
                gst_parse_bin_from_description ("glupload !
                glcolorconvert ! glviewconvert name=viewconvert !
                glimagesink name=sink", TRUE, NULL);<br>
                >   GstElement *glconvert = gst_bin_get_by_name
                (sinkbin, "viewconvert");<br>
                >   GstElement *videosink = gst_bin_get_by_name
                (sinkbin, "sink");<br>
                >   g_object_set (G_OBJECT (pipeline), "video-sink",
                sinkbin, NULL);<br>
                >   g_object_set (G_OBJECT (pipeline), "uri",
                <a>"file:///home/sheldon/1.webm"</a>, NULL);<br>
                ><br>
                >   // g_object_get (pipeline,
                "video-multiview-mode", &state.in_mode,<br>
                >   //   "video-multiview-flags",
                &state.in_flags, NULL);<br>
                ><br>
                >   g_object_set (G_OBJECT (glconvert),
                "input-mode-override", 0,<br>
                >     NULL);<br>
                >   g_object_set (G_OBJECT (glconvert),
                "input-flags-override", 0,<br>
                >       NULL);<br>
                ><br>
                >   GstElement *sink = gst_bin_get_by_name (GST_BIN
                (videosink), "sink");<br>
                >   g_object_set (G_OBJECT (sink),
                "output-multiview-mode",
                GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE, NULL);<br>
                ><br>
                >   g_object_set (G_OBJECT (glconvert),
                "input-mode-override",
                GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED,
                NULL);<br>
                ><br>
                >   gst_element_set_state (pipeline,
                GST_STATE_PLAYING);<br>
                >   GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE
                (pipeline));<br>
                >   msg = gst_bus_timed_pop_filtered (bus,
                GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR |
                GST_MESSAGE_EOS);<br>
                ><br>
                >   // /* Free resources */<br>
                >   if (msg != NULL)<br>
                >     gst_message_unref (msg);<br>
                >   gst_object_unref (bus);<br>
                >   gst_element_set_state (pipeline, GST_STATE_NULL);<br>
                >   gst_object_unref (pipeline);<br>
                >   return 0;<br>
                > }<br>
                > 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?<br>
                <br>
              </div>
            </div>
            Looks like glviewconvert was only built for desktop OpenGL
            systems.<br>
            That's since been rectified by<br>
            <a href="http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=09976e021b8d222daf96e1b1328fde4a00b5c05f" rel="noreferrer" target="_blank">http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=09976e021b8d222daf96e1b1328fde4a00b5c05f</a>.<br>
            As hinted by the commit message, if you have a gles2 system
            (no gles3)<br>
            then you cannot output the separated/frame-by-frame modes
            due to<br>
            limitations in the GLES 2.0 API.<br>
            <br>
            Cheers<br>
            -Matt<br>
            <div>
              <div><br>
                > 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.<br>
                <br>
                <br>
              </div>
            </div>
          </blockquote>
        </div></div></div>
        <br>
      </div>
    </blockquote>
  </div>

</blockquote></div><br></div>
</div></div></div><br></div>