input-selector problem in Android

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

input-selector problem in Android


In Android Tutorial3 I have added this new native function :

static void gst_native_acceso (JNIEnv* env, jobject thiz, int lan) {
    CustomData *data = GET_CUSTOM_DATA (env, thiz, custom_data_field_id);
    GstElement *selector = gst_bin_get_by_name(data->pipeline, "sel");
    gint nb_sources;
    GstPad *active_pad, *new_pad;
    gchar *active_name;
    g_object_get (G_OBJECT (selector), "n-pads", &nb_sources, NULL);
    g_object_get (G_OBJECT (selector), "active-pad", &active_pad, NULL);
    active_name = gst_pad_get_name(active_pad);
    gchar *message = g_strdup_printf("active_name: %s , n-pads: %d",
active_name, nb_sources);
    set_ui_message(message, data);
    g_free (message);  

 The pipeline is :

data->pipeline = gst_parse_launch("input-selector name=sel udpsrc
multicast-group= auto-multicast=true port=6000 ! \
image/jpeg,width=1280,height=720,framerate=31/1 ! jpegparse ! jpegdec ! sel.
tcpclientsrc host= port=6001 ! \
h264parse ! avdec_h264 ! sel. sel. ! glimagesink sync=false", &error);

The problem is the active-pad name is "(NULL)" when it should be "sink_0" or

Any help ?. Thanks and best regards.

Sent from:
gstreamer-devel mailing list
[hidden email]