bzip2 and zlib headers
yusuf.husainy
yusuf.husainy at gmail.com
Thu Mar 28 07:33:58 PDT 2013
Thanks again for the reply David,
Thanks to Tony also for the reply.
I get it, the linking has some errors.
I found out a bug on gstreamer's side:
1. Bug 59250 - https://bugs.freedesktop.org/show_bug.cgi?id=59250
2. In continuation with the above solution, i appended "-lbz2" also. This is
wrt to Andoni's comment#1 for Bug 59250.
For now, I got no errors and linking is successful.
But i do have some trouble running the application on my tablet.
I have made some minor modifications to the native code of
android-tutorial-3 in the app_function() method:
/* Main method for the native code. This is executed on its own thread. */
static void *app_function (void *userdata) {
JavaVMAttachArgs args;
GstBus *bus;
CustomData *data = (CustomData *)userdata;
GSource *bus_source;
GError *error = NULL;
GstElement *source, *rtpdepay, *decoder, *sink/*, *appsrc*/;
// GstBus *bus;
GstCaps *caps;
GstMessage *msg;
GST_DEBUG ("Creating pipeline in CustomData at %p", data);
/* Create our own GLib Main Context and make it the default one */
data->context = g_main_context_new ();
g_main_context_push_thread_default(data->context);
/* Build pipeline */
//data->pipeline = gst_parse_launch("videotestsrc ! warptv !
ffmpegcolorspace ! autovideosink", &error);
data->pipeline = gst_pipeline_new("videopipeline");
/* Create the elements */
//appsrc = gst_element_factory_make ("appsrc", "app-src");
source = gst_element_factory_make ("udpsrc", "source");
rtpdepay = gst_element_factory_make ("rtpmp4vdepay", "rtpdepay");
decoder = gst_element_factory_make ("ffdec_mpeg4", "decoder");
sink = gst_element_factory_make ("eglglessink", "sink");
/*if(!appsrc)
g_printerr ("Pipeline Error");
// set_ui_message("appsrc error", data);
*/
if(!source)
{
g_printerr ("Source Error");
set_ui_message("source error", data);
return NULL;
}
if(!sink)
{
g_printerr ("Sink Error");
set_ui_message("sink error", data);
return NULL;
}
if(!rtpdepay)
{
g_printerr ("RTPDepay Error");
set_ui_message("RTPdepay error", data);
return NULL;
}
if(!decoder)
{
g_printerr ("Decoder Error");
set_ui_message("decoder error", data);
return NULL;
}
/*if (!pipeline || !source || !sink || !rtpdepay || !decoder) {
g_printerr ("Not all elements could be created.\n");
return -1;
}*/
// Modify the properties
g_object_set(G_OBJECT(sink), "sync", 0, NULL);
g_object_set(G_OBJECT(source), "do-timestamp", 1, NULL);
// Set the stream to act "live stream"
//g_object_set(G_OBJECT(appsrc), "is-live", 1, NULL);
// Set the stream type to "stream"
//g_object_set(G_OBJECT(appsrc), "stream-type", 0, NULL);
caps = gst_caps_from_string("application/x-rtp, media=video,
encoding-name=MP4V-ES,
config=000001b001000001b58913000001000000012000c48d8800553204961463000001b24c61766335332e33352e30");
// caps=gst_caps_from_string("application/x-rtp, media=video,
encoding-name=MP4V-ES,
config=000001b001000001b58913000001000000012000c48d8800553204961463000001b24c61766335332e33352e30");
g_object_set(source, "caps", caps, NULL);
gst_caps_unref(caps);
//gst_app_src_set_caps(GST_APP_SRC(appsrc), caps);
//gst_caps_unref (caps);
gst_bin_add_many (GST_BIN (data->pipeline), source, rtpdepay, decoder, sink,
NULL);
if (gst_element_link_many (source, rtpdepay, decoder, sink, NULL) != TRUE) {
gst_object_unref (data->pipeline);
// data->pipeline = gst_parse_launch("udpsrc ! rtpmp4vdepay ! ffdec_mpeg4 !
xvimagesink sync=0", &error);
gchar * message = g_strdup_printf("Unable to build pipeline: %s",
"elements could not be linked");
//g_clear_error (&error);
set_ui_message(message, data);
g_free (message);
return NULL;
}
/* Set the pipeline to READY, so it can already accept a window handle, if
we have one */
gst_element_set_state(data->pipeline, GST_STATE_READY);
data->video_sink = gst_bin_get_by_interface(GST_BIN(data->pipeline),
GST_TYPE_X_OVERLAY);
if (!data->video_sink) {
GST_ERROR ("Could not retrieve video sink");
return NULL;
}
/* Instruct the bus to emit signals for each received message, and connect
to the interesting signals */
bus = gst_element_get_bus (data->pipeline);
bus_source = gst_bus_create_watch (bus);
g_source_set_callback (bus_source, (GSourceFunc)
gst_bus_async_signal_func, NULL, NULL);
g_source_attach (bus_source, data->context);
g_source_unref (bus_source);
g_signal_connect (G_OBJECT (bus), "message::error", (GCallback)error_cb,
data);
g_signal_connect (G_OBJECT (bus), "message::state-changed",
(GCallback)state_changed_cb, data);
gst_object_unref (bus);
/* Create a GLib Main Loop and set it to run */
GST_DEBUG ("Entering main loop... (CustomData:%p)", data);
data->main_loop = g_main_loop_new (data->context, FALSE);
check_initialization_complete (data);
g_main_loop_run (data->main_loop);
GST_DEBUG ("Exited main loop");
g_main_loop_unref (data->main_loop);
data->main_loop = NULL;
/* Free resources */
g_main_context_pop_thread_default(data->context);
g_main_context_unref (data->context);
gst_element_set_state (data->pipeline, GST_STATE_NULL);
gst_object_unref (data->video_sink);
gst_object_unref (data->pipeline);
return NULL;
}
Now I have a project wherein i live stream a video from my laptop's inbuilt
web-cam to my tablet through UDP link(via unicast).
Before I start the transmission, infact even after starting the
transmission, the tab app does not listen(on the UDP source), meaning it
gives an error on the ui as - "Error received from element source: Could not
open resource for reading"
I have not pressed the play button, so technically, the pipeline hasn't gone
to the playing stage as yet.
I appreciate any help.
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/bzip2-and-zlib-headers-tp4659284p4659298.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list