input-selector problem in Android

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

input-selector problem in Android

JPM
Hi,

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=224.1.1.1 auto-multicast=true port=6000 ! \
image/jpeg,width=1280,height=720,framerate=31/1 ! jpegparse ! jpegdec ! sel.
tcpclientsrc host=80.28.166.18 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
"sink_1".

Any help ?. Thanks and best regards.




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel