Appsrc and Playbin
Sasha1987
topilski at mail.ru
Thu May 16 05:09:44 PDT 2013
Good day, is it posible to use playbin and appsrc for playing video and audio
stream at once? Now i found example how to get appsrc out of Playbin.
struct _App
{
GstElement *playbin;
GstElement *appsrc;
GMainLoop *loop;
GMappedFile *file;
guint8 *data;
gsize length;
guint64 offset;
};
app->playbin = gst_element_factory_make ("playbin2", NULL);
g_assert (app->playbin);
bus = gst_pipeline_get_bus (GST_PIPELINE (app->playbin));
/* add watch for messages */
gst_bus_add_watch (bus, (GstBusFunc) bus_message, app);
/* set to read from appsrc */
g_object_set (app->playbin, "uri", "appsrc://", NULL);
/* get notification when the source is created so that we get a handle to
it
* and can configure it */
g_signal_connect (app->playbin, "deep-notify::source",
(GCallback) found_source, app);
found_source (GObject * object, GObject * orig, GParamSpec * pspec, App *
app)
{
g_object_get (orig, pspec->name, &app->appsrc, NULL);
g_object_set (app->appsrc, "size", (gint64) app->length, NULL);
g_signal_connect (app->appsrc, "need-data", G_CALLBACK (feed_data), app);
}
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Appsrc-and-Playbin-tp4659959.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list