• Home
  • Raw
  • Download

Lines Matching refs:app

80 feed_data (GstElement * appsrc, guint size, App * app)  in feed_data()  argument
86 if (app->offset >= app->length) { in feed_data()
88 g_signal_emit_by_name (app->appsrc, "end-of-stream", &ret); in feed_data()
96 if (app->offset + len > app->length) in feed_data()
97 len = app->length - app->offset; in feed_data()
101 app->data, app->length, app->offset, len, NULL, NULL)); in feed_data()
104 app->offset, len); in feed_data()
105 g_signal_emit_by_name (app->appsrc, "push-buffer", buffer, &ret); in feed_data()
108 app->offset += len; in feed_data()
117 found_source (GObject * object, GObject * orig, GParamSpec * pspec, App * app) in found_source() argument
120 g_object_get (orig, pspec->name, &app->appsrc, NULL); in found_source()
122 GST_DEBUG ("got appsrc %p", app->appsrc); in found_source()
127 g_object_set (app->appsrc, "size", (gint64) app->length, NULL); in found_source()
131 g_signal_connect (app->appsrc, "need-data", G_CALLBACK (feed_data), app); in found_source()
135 bus_message (GstBus * bus, GstMessage * message, App * app) in bus_message() argument
143 g_main_loop_quit (app->loop); in bus_message()
146 g_main_loop_quit (app->loop); in bus_message()
157 App *app = &s_app; in main() local
172 app->file = g_mapped_file_new (argv[1], FALSE, &error); in main()
180 app->length = g_mapped_file_get_length (app->file); in main()
181 app->data = (guint8 *) g_mapped_file_get_contents (app->file); in main()
182 app->offset = 0; in main()
185 app->loop = g_main_loop_new (NULL, TRUE); in main()
187 app->playbin = gst_element_factory_make ("playbin", NULL); in main()
188 g_assert (app->playbin); in main()
190 bus = gst_pipeline_get_bus (GST_PIPELINE (app->playbin)); in main()
193 gst_bus_add_watch (bus, (GstBusFunc) bus_message, app); in main()
196 g_object_set (app->playbin, "uri", "appsrc://", NULL); in main()
200 g_signal_connect (app->playbin, "deep-notify::source", in main()
201 (GCallback) found_source, app); in main()
204 gst_element_set_state (app->playbin, GST_STATE_PLAYING); in main()
207 g_main_loop_run (app->loop); in main()
211 gst_element_set_state (app->playbin, GST_STATE_NULL); in main()
214 g_mapped_file_unref (app->file); in main()
217 g_main_loop_unref (app->loop); in main()