Is it possible to use glviewconvert on Android?

少华王 naozhong at
Sun Oct 25 08:59:02 PDT 2015

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,
  g_object_set (G_OBJECT (glconvert), "input-flags-override", 0,

  GstElement *sink = gst_bin_get_by_name (GST_BIN (videosink), "sink");
  g_object_set (G_OBJECT (sink), "output-multiview-mode",

  g_object_set (G_OBJECT (glconvert), "input-mode-override",

  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,

  // /* 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?

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: <>

More information about the gstreamer-devel mailing list