Lines Matching refs:discoverer
2437 gst_discoverer_start (GstDiscoverer * discoverer) in gst_discoverer_start() argument
2442 g_return_if_fail (GST_IS_DISCOVERER (discoverer)); in gst_discoverer_start()
2444 GST_DEBUG_OBJECT (discoverer, "Starting..."); in gst_discoverer_start()
2446 if (discoverer->priv->async) { in gst_discoverer_start()
2447 GST_DEBUG_OBJECT (discoverer, "We were already started"); in gst_discoverer_start()
2451 discoverer->priv->async = TRUE; in gst_discoverer_start()
2452 discoverer->priv->running = TRUE; in gst_discoverer_start()
2460 source = gst_bus_create_watch (discoverer->priv->bus); in gst_discoverer_start()
2464 discoverer->priv->bus_source = source; in gst_discoverer_start()
2465 discoverer->priv->ctx = g_main_context_ref (ctx); in gst_discoverer_start()
2467 start_discovering (discoverer); in gst_discoverer_start()
2468 GST_DEBUG_OBJECT (discoverer, "Started"); in gst_discoverer_start()
2479 gst_discoverer_stop (GstDiscoverer * discoverer) in gst_discoverer_stop() argument
2481 g_return_if_fail (GST_IS_DISCOVERER (discoverer)); in gst_discoverer_stop()
2483 GST_DEBUG_OBJECT (discoverer, "Stopping..."); in gst_discoverer_stop()
2485 if (!discoverer->priv->async) { in gst_discoverer_stop()
2486 GST_DEBUG_OBJECT (discoverer, in gst_discoverer_stop()
2491 DISCO_LOCK (discoverer); in gst_discoverer_stop()
2492 if (discoverer->priv->processing) { in gst_discoverer_stop()
2496 if (discoverer->priv->bus) in gst_discoverer_stop()
2497 gst_bus_set_flushing (discoverer->priv->bus, TRUE); in gst_discoverer_stop()
2498 if (discoverer->priv->pipeline) in gst_discoverer_stop()
2499 gst_element_set_state ((GstElement *) discoverer->priv->pipeline, in gst_discoverer_stop()
2502 discoverer->priv->running = FALSE; in gst_discoverer_stop()
2503 DISCO_UNLOCK (discoverer); in gst_discoverer_stop()
2506 if (discoverer->priv->timeout_source) { in gst_discoverer_stop()
2507 g_source_destroy (discoverer->priv->timeout_source); in gst_discoverer_stop()
2508 g_source_unref (discoverer->priv->timeout_source); in gst_discoverer_stop()
2509 discoverer->priv->timeout_source = NULL; in gst_discoverer_stop()
2512 if (discoverer->priv->bus_source) { in gst_discoverer_stop()
2513 g_source_destroy (discoverer->priv->bus_source); in gst_discoverer_stop()
2514 g_source_unref (discoverer->priv->bus_source); in gst_discoverer_stop()
2515 discoverer->priv->bus_source = NULL; in gst_discoverer_stop()
2518 if (discoverer->priv->ctx) { in gst_discoverer_stop()
2519 g_main_context_unref (discoverer->priv->ctx); in gst_discoverer_stop()
2520 discoverer->priv->ctx = NULL; in gst_discoverer_stop()
2522 discoverer_reset (discoverer); in gst_discoverer_stop()
2524 discoverer->priv->async = FALSE; in gst_discoverer_stop()
2526 GST_DEBUG_OBJECT (discoverer, "Stopped"); in gst_discoverer_stop()
2545 gst_discoverer_discover_uri_async (GstDiscoverer * discoverer, in gst_discoverer_discover_uri_async() argument
2550 g_return_val_if_fail (GST_IS_DISCOVERER (discoverer), FALSE); in gst_discoverer_discover_uri_async()
2552 GST_DEBUG_OBJECT (discoverer, "uri : %s", uri); in gst_discoverer_discover_uri_async()
2554 DISCO_LOCK (discoverer); in gst_discoverer_discover_uri_async()
2555 can_run = (discoverer->priv->pending_uris == NULL); in gst_discoverer_discover_uri_async()
2556 discoverer->priv->pending_uris = in gst_discoverer_discover_uri_async()
2557 g_list_append (discoverer->priv->pending_uris, g_strdup (uri)); in gst_discoverer_discover_uri_async()
2558 DISCO_UNLOCK (discoverer); in gst_discoverer_discover_uri_async()
2561 start_discovering (discoverer); in gst_discoverer_discover_uri_async()
2583 gst_discoverer_discover_uri (GstDiscoverer * discoverer, const gchar * uri, in gst_discoverer_discover_uri() argument
2589 g_return_val_if_fail (GST_IS_DISCOVERER (discoverer), NULL); in gst_discoverer_discover_uri()
2592 GST_DEBUG_OBJECT (discoverer, "uri:%s", uri); in gst_discoverer_discover_uri()
2594 DISCO_LOCK (discoverer); in gst_discoverer_discover_uri()
2595 if (G_UNLIKELY (discoverer->priv->current_info)) { in gst_discoverer_discover_uri()
2596 DISCO_UNLOCK (discoverer); in gst_discoverer_discover_uri()
2597 GST_WARNING_OBJECT (discoverer, "Already handling a uri"); in gst_discoverer_discover_uri()
2604 discoverer->priv->pending_uris = in gst_discoverer_discover_uri()
2605 g_list_append (discoverer->priv->pending_uris, g_strdup (uri)); in gst_discoverer_discover_uri()
2606 DISCO_UNLOCK (discoverer); in gst_discoverer_discover_uri()
2608 res = start_discovering (discoverer); in gst_discoverer_discover_uri()
2609 discoverer_collect (discoverer); in gst_discoverer_discover_uri()
2613 if (discoverer->priv->current_error) in gst_discoverer_discover_uri()
2614 *err = g_error_copy (discoverer->priv->current_error); in gst_discoverer_discover_uri()
2620 discoverer->priv->current_info->result); in gst_discoverer_discover_uri()
2621 discoverer->priv->current_info->result = res; in gst_discoverer_discover_uri()
2623 info = _ensure_info_tags (discoverer); in gst_discoverer_discover_uri()
2625 discoverer_cleanup (discoverer); in gst_discoverer_discover_uri()