• Home
  • Raw
  • Download

Lines Matching refs:sgroup

256 static void stream_group_remove (GstEncodeBaseBin * ebin, StreamGroup * sgroup);
257 static void stream_group_free (GstEncodeBaseBin * ebin, StreamGroup * sgroup);
561 StreamGroup *sgroup = (StreamGroup *) tmp->data; in stream_profile_used_count() local
563 if (sgroup->profile == sprof) in stream_profile_used_count()
669 StreamGroup *sgroup = NULL; in request_pad_for_stream() local
675 while (sgroup == NULL) { in request_pad_for_stream()
684 sgroup = _create_stream_group (encodebin, sprof, name, caps, in request_pad_for_stream()
687 if (G_UNLIKELY (sgroup)) in request_pad_for_stream()
701 if (!sgroup) in request_pad_for_stream()
705 return sgroup->ghostpad; in request_pad_for_stream()
784 StreamGroup *sgroup = (StreamGroup *) tmp->data; in find_stream_group_from_pad() local
785 if (G_UNLIKELY (sgroup->ghostpad == pad)) in find_stream_group_from_pad()
786 return sgroup; in find_stream_group_from_pad()
796 StreamGroup *sgroup; in gst_encode_base_bin_release_pad() local
800 sgroup = find_stream_group_from_pad (ebin, pad); in gst_encode_base_bin_release_pad()
801 if (G_UNLIKELY (sgroup == NULL)) in gst_encode_base_bin_release_pad()
805 stream_group_remove (ebin, sgroup); in gst_encode_base_bin_release_pad()
1178 GParamSpec * arg G_GNUC_UNUSED, StreamGroup * sgroup) in _capsfilter_force_format() argument
1193 if (parent == sgroup->outfilter || parent == sgroup->smart_capsfilter) { in _capsfilter_force_format()
1196 if (sgroup->smart_capsfilter) { in _capsfilter_force_format()
1226 g_object_set (sgroup->smart_capsfilter, "caps", caps, NULL); in _capsfilter_force_format()
1228 g_signal_handler_disconnect (sgroup->smart_capsfilter->sinkpads->data, in _capsfilter_force_format()
1229 sgroup->smart_capsfilter_sid); in _capsfilter_force_format()
1230 sgroup->smart_capsfilter_sid = 0; in _capsfilter_force_format()
1233 if (sgroup->outfilter) { in _capsfilter_force_format()
1235 g_object_set (sgroup->outfilter, "caps", tmpcaps, NULL); in _capsfilter_force_format()
1237 g_signal_handler_disconnect (sgroup->outfilter->sinkpads->data, in _capsfilter_force_format()
1238 sgroup->outputfilter_caps_sid); in _capsfilter_force_format()
1239 sgroup->outputfilter_caps_sid = 0; in _capsfilter_force_format()
1241 } else if (parent == sgroup->capsfilter) { in _capsfilter_force_format()
1243 g_signal_handler_disconnect (pad, sgroup->inputfilter_caps_sid); in _capsfilter_force_format()
1253 _set_group_caps_format (StreamGroup * sgroup, GstEncodingProfile * prof, in _set_group_caps_format() argument
1256 g_object_set (sgroup->outfilter, "caps", format, NULL); in _set_group_caps_format()
1259 if (!sgroup->outputfilter_caps_sid) { in _set_group_caps_format()
1260 sgroup->outputfilter_caps_sid = in _set_group_caps_format()
1261 g_signal_connect (sgroup->outfilter->sinkpads->data, in _set_group_caps_format()
1262 "notify::caps", G_CALLBACK (_capsfilter_force_format), sgroup); in _set_group_caps_format()
1292 StreamGroup *sgroup = udata; in _missing_plugin_probe() local
1293 GstEncodeBaseBin *ebin = sgroup->ebin; in _missing_plugin_probe()
1295 _post_missing_plugin_message (ebin, sgroup->profile); in _missing_plugin_probe()
1301 _set_up_fake_encoder_pad_probe (GstEncodeBaseBin * ebin, StreamGroup * sgroup) in _set_up_fake_encoder_pad_probe() argument
1303 GstPad *pad = gst_element_get_static_pad (sgroup->fakesink, "sink"); in _set_up_fake_encoder_pad_probe()
1306 sgroup, NULL); in _set_up_fake_encoder_pad_probe()
1313 StreamGroup * sgroup) in setup_smart_encoder() argument
1342 sgroup->smart_capsfilter = gst_element_factory_make ("capsfilter", NULL); in setup_smart_encoder()
1367 g_object_set (sgroup->smart_capsfilter, "caps", format, NULL); in setup_smart_encoder()
1372 gst_object_ref (sgroup->smart_capsfilter), in setup_smart_encoder()
1373 parser ? gst_object_ref (sgroup->smart_capsfilter) : NULL, NULL); in setup_smart_encoder()
1391 parser ? parser : sgroup->smart_capsfilter, in setup_smart_encoder()
1392 parser ? sgroup->smart_capsfilter : NULL, NULL)) { in setup_smart_encoder()
1404 gst_ghost_pad_new ("src", sgroup->smart_capsfilter->srcpads->data))) { in setup_smart_encoder()
1412 if (!sgroup->smart_capsfilter_sid) { in setup_smart_encoder()
1413 sgroup->smart_capsfilter_sid = in setup_smart_encoder()
1414 g_signal_connect (sgroup->smart_capsfilter->sinkpads->data, in setup_smart_encoder()
1415 "notify::caps", G_CALLBACK (_capsfilter_force_format), sgroup); in setup_smart_encoder()
1456 StreamGroup *sgroup = NULL; in _create_stream_group() local
1472 sgroup = g_slice_new0 (StreamGroup); in _create_stream_group()
1473 sgroup->ebin = ebin; in _create_stream_group()
1474 sgroup->profile = sprof; in _create_stream_group()
1488 sgroup->encoder = _get_encoder (ebin, sprof); in _create_stream_group()
1489 if (!sgroup->encoder && (gst_encoding_profile_get_preset (sgroup->profile) in _create_stream_group()
1490 || gst_encoding_profile_get_preset_name (sgroup->profile))) { in _create_stream_group()
1515 last = sgroup->outqueue = gst_element_factory_make ("queue", NULL); in _create_stream_group()
1516 g_object_set (sgroup->outqueue, "max-size-buffers", (guint) 0, in _create_stream_group()
1520 gst_bin_add (GST_BIN (ebin), sgroup->outqueue); in _create_stream_group()
1521 tosync = g_list_append (tosync, sgroup->outqueue); in _create_stream_group()
1522 srcpad = gst_element_get_static_pad (sgroup->outqueue, "src"); in _create_stream_group()
1540 sgroup->formatter = _get_formatter (ebin, sprof); in _create_stream_group()
1541 if (sgroup->formatter) { in _create_stream_group()
1544 gst_bin_add (GST_BIN (ebin), sgroup->formatter); in _create_stream_group()
1545 tosync = g_list_append (tosync, sgroup->formatter); in _create_stream_group()
1546 if (G_UNLIKELY (!fast_element_link (sgroup->formatter, last))) in _create_stream_group()
1548 last = sgroup->formatter; in _create_stream_group()
1556 sgroup->outfilter = gst_element_factory_make ("capsfilter", NULL); in _create_stream_group()
1557 _set_group_caps_format (sgroup, sprof, format); in _create_stream_group()
1559 gst_bin_add (GST_BIN (ebin), sgroup->outfilter); in _create_stream_group()
1560 tosync = g_list_append (tosync, sgroup->outfilter); in _create_stream_group()
1561 if (G_UNLIKELY (!fast_element_link (sgroup->outfilter, last))) in _create_stream_group()
1563 last = sgroup->outfilter; in _create_stream_group()
1565 sgroup->parser = _get_parser (ebin, sgroup->profile, sgroup->encoder); in _create_stream_group()
1566 if (sgroup->parser != NULL) { in _create_stream_group()
1567 GST_DEBUG ("Got a parser %s", GST_ELEMENT_NAME (sgroup->parser)); in _create_stream_group()
1568 gst_bin_add (GST_BIN (ebin), sgroup->parser); in _create_stream_group()
1569 tosync = g_list_append (tosync, sgroup->parser); in _create_stream_group()
1570 if (G_UNLIKELY (!gst_element_link (sgroup->parser, last))) in _create_stream_group()
1572 last = sgroup->parser; in _create_stream_group()
1576 sgroup->combiner = g_object_new (GST_TYPE_STREAM_COMBINER, NULL); in _create_stream_group()
1578 gst_bin_add (GST_BIN (ebin), sgroup->combiner); in _create_stream_group()
1579 tosync = g_list_append (tosync, sgroup->combiner); in _create_stream_group()
1580 if (G_UNLIKELY (!fast_element_link (sgroup->combiner, last))) in _create_stream_group()
1585 sgroup->splitter = g_object_new (GST_TYPE_STREAM_SPLITTER, NULL); in _create_stream_group()
1587 gst_bin_add (GST_BIN (ebin), sgroup->splitter); in _create_stream_group()
1588 tosync = g_list_append (tosync, sgroup->splitter); in _create_stream_group()
1593 sgroup->identity = gst_element_factory_make ("identity", NULL); in _create_stream_group()
1594 g_object_set (sgroup->identity, "single-segment", TRUE, NULL); in _create_stream_group()
1595 gst_bin_add (GST_BIN (ebin), sgroup->identity); in _create_stream_group()
1596 tosync = g_list_append (tosync, sgroup->identity); in _create_stream_group()
1605 sgroup->inqueue = gst_element_factory_make ("queue", NULL); in _create_stream_group()
1606 g_object_set (sgroup->inqueue, "max-size-buffers", in _create_stream_group()
1611 gst_bin_add (GST_BIN (ebin), sgroup->inqueue); in _create_stream_group()
1612 tosync = g_list_append (tosync, sgroup->inqueue); in _create_stream_group()
1616 gst_element_get_static_pad (sgroup->identity ? sgroup->identity : sgroup-> in _create_stream_group()
1623 sgroup->ghostpad = gst_ghost_pad_new (pname, sinkpad); in _create_stream_group()
1626 sgroup->ghostpad = gst_ghost_pad_new (sinkpadname, sinkpad); in _create_stream_group()
1629 if (sgroup->identity in _create_stream_group()
1630 && G_UNLIKELY (!fast_element_link (sgroup->identity, sgroup->inqueue))) in _create_stream_group()
1633 if (G_UNLIKELY (!fast_element_link (sgroup->inqueue, sgroup->splitter))) in _create_stream_group()
1639 local_element_request_pad (sgroup->combiner, NULL, "passthroughsink", in _create_stream_group()
1646 sgroup->smartencoder = setup_smart_encoder (ebin, sprof, sgroup); in _create_stream_group()
1647 if (sgroup->smartencoder) { in _create_stream_group()
1648 gst_bin_add ((GstBin *) ebin, sgroup->smartencoder); in _create_stream_group()
1649 srcpad = gst_element_get_static_pad (sgroup->smartencoder, "src"); in _create_stream_group()
1652 tosync = g_list_append (tosync, sgroup->smartencoder); in _create_stream_group()
1653 sinkpad = gst_element_get_static_pad (sgroup->smartencoder, "sink"); in _create_stream_group()
1658 local_element_request_pad (sgroup->splitter, NULL, "passthroughsrc", in _create_stream_group()
1674 if (sgroup->encoder) { in _create_stream_group()
1675 gst_bin_add ((GstBin *) ebin, sgroup->encoder); in _create_stream_group()
1676 tosync = g_list_append (tosync, sgroup->encoder); in _create_stream_group()
1679 local_element_request_pad (sgroup->combiner, NULL, "encodingsink", in _create_stream_group()
1683 srcpad = gst_element_get_static_pad (sgroup->encoder, "src"); in _create_stream_group()
1697 last = sgroup->capsfilter = gst_element_factory_make ("capsfilter", NULL); in _create_stream_group()
1699 g_object_set (sgroup->capsfilter, "caps", restriction, NULL); in _create_stream_group()
1702 if (!sgroup->inputfilter_caps_sid) { in _create_stream_group()
1703 sgroup->inputfilter_caps_sid = in _create_stream_group()
1704 g_signal_connect (sgroup->capsfilter->sinkpads->data, in _create_stream_group()
1705 "notify::caps", G_CALLBACK (_capsfilter_force_format), sgroup); in _create_stream_group()
1709 gst_bin_add ((GstBin *) ebin, sgroup->capsfilter); in _create_stream_group()
1710 tosync = g_list_append (tosync, sgroup->capsfilter); in _create_stream_group()
1711 if (sgroup->encoder == NULL) { in _create_stream_group()
1715 sgroup->fakesink = gst_element_factory_make ("fakesink", NULL); in _create_stream_group()
1716 g_object_set (sgroup->fakesink, "async", FALSE, NULL); in _create_stream_group()
1717 gst_bin_add (GST_BIN_CAST (ebin), sgroup->fakesink); in _create_stream_group()
1718 tosync = g_list_append (tosync, sgroup->fakesink); in _create_stream_group()
1719 encoder = sgroup->fakesink; in _create_stream_group()
1721 _set_up_fake_encoder_pad_probe (ebin, sgroup); in _create_stream_group()
1723 encoder = sgroup->encoder; in _create_stream_group()
1725 fast_element_link (sgroup->capsfilter, encoder); in _create_stream_group()
1726 sgroup->restriction_sid = g_signal_connect (sprof, "notify::restriction-caps", in _create_stream_group()
1727 G_CALLBACK (_profile_restriction_caps_cb), sgroup); in _create_stream_group()
1759 sgroup->converters = g_list_prepend (sgroup->converters, cspace); in _create_stream_group()
1760 sgroup->converters = g_list_prepend (sgroup->converters, scale); in _create_stream_group()
1761 sgroup->converters = g_list_prepend (sgroup->converters, cspace2); in _create_stream_group()
1779 sgroup->converters = g_list_prepend (sgroup->converters, vrate); in _create_stream_group()
1831 sgroup->converters = g_list_prepend (sgroup->converters, arate); in _create_stream_group()
1832 sgroup->converters = g_list_prepend (sgroup->converters, aconv); in _create_stream_group()
1833 sgroup->converters = g_list_prepend (sgroup->converters, ares); in _create_stream_group()
1834 sgroup->converters = g_list_prepend (sgroup->converters, aconv2); in _create_stream_group()
1842 local_element_request_pad (sgroup->splitter, NULL, "encodingsrc", NULL); in _create_stream_group()
1859 GST_DEBUG ("Adding ghostpad %s:%s", GST_DEBUG_PAD_NAME (sgroup->ghostpad)); in _create_stream_group()
1860 gst_pad_set_active (sgroup->ghostpad, TRUE); in _create_stream_group()
1861 gst_element_add_pad ((GstElement *) ebin, sgroup->ghostpad); in _create_stream_group()
1868 ebin->streams = g_list_prepend (ebin->streams, sgroup); in _create_stream_group()
1875 return sgroup; in _create_stream_group()
1952 stream_group_free (ebin, sgroup); in _create_stream_group()
2316 stream_group_free (GstEncodeBaseBin * ebin, StreamGroup * sgroup) in stream_group_free() argument
2322 GST_DEBUG_OBJECT (ebin, "Freeing StreamGroup %p", sgroup); in stream_group_free()
2324 if (sgroup->restriction_sid != 0) in stream_group_free()
2325 g_signal_handler_disconnect (sgroup->profile, sgroup->restriction_sid); in stream_group_free()
2327 if (sgroup->outqueue) { in stream_group_free()
2330 tmppad = gst_element_get_static_pad (sgroup->outqueue, "src"); in stream_group_free()
2343 gst_element_set_state (sgroup->outqueue, GST_STATE_NULL); in stream_group_free()
2346 if (sgroup->formatter) { in stream_group_free()
2348 gst_element_set_state (sgroup->formatter, GST_STATE_NULL); in stream_group_free()
2349 gst_element_set_state (sgroup->outfilter, GST_STATE_NULL); in stream_group_free()
2350 gst_element_unlink (sgroup->formatter, sgroup->outqueue); in stream_group_free()
2351 gst_element_unlink (sgroup->outfilter, sgroup->formatter); in stream_group_free()
2352 } else if (sgroup->outfilter) { in stream_group_free()
2354 gst_element_set_state (sgroup->outfilter, GST_STATE_NULL); in stream_group_free()
2355 gst_element_unlink (sgroup->outfilter, sgroup->outqueue); in stream_group_free()
2358 if (sgroup->outqueue) { in stream_group_free()
2359 gst_element_set_state (sgroup->outqueue, GST_STATE_NULL); in stream_group_free()
2360 gst_bin_remove (GST_BIN (ebin), sgroup->outqueue); in stream_group_free()
2364 if (sgroup->parser) { in stream_group_free()
2365 gst_element_set_state (sgroup->parser, GST_STATE_NULL); in stream_group_free()
2366 gst_element_unlink (sgroup->parser, sgroup->outfilter); in stream_group_free()
2367 gst_element_unlink (sgroup->combiner, sgroup->parser); in stream_group_free()
2368 gst_bin_remove ((GstBin *) ebin, sgroup->parser); in stream_group_free()
2372 if (sgroup->ghostpad) { in stream_group_free()
2373 if (GST_PAD_PARENT (sgroup->ghostpad) != NULL) in stream_group_free()
2374 gst_element_remove_pad (GST_ELEMENT_CAST (ebin), sgroup->ghostpad); in stream_group_free()
2376 gst_object_unref (sgroup->ghostpad); in stream_group_free()
2379 if (sgroup->inqueue) in stream_group_free()
2380 gst_element_set_state (sgroup->inqueue, GST_STATE_NULL); in stream_group_free()
2382 if (sgroup->encoder) { in stream_group_free()
2383 gst_element_set_state (sgroup->encoder, GST_STATE_NULL); in stream_group_free()
2384 g_signal_handlers_disconnect_by_func (sgroup->profile, in stream_group_free()
2385 set_element_properties_from_encoding_profile, sgroup->encoder); in stream_group_free()
2387 if (sgroup->fakesink) in stream_group_free()
2388 gst_element_set_state (sgroup->fakesink, GST_STATE_NULL); in stream_group_free()
2389 if (sgroup->outfilter) { in stream_group_free()
2390 gst_element_set_state (sgroup->outfilter, GST_STATE_NULL); in stream_group_free()
2392 if (sgroup->outputfilter_caps_sid) { in stream_group_free()
2393 g_signal_handler_disconnect (sgroup->outfilter->sinkpads->data, in stream_group_free()
2394 sgroup->outputfilter_caps_sid); in stream_group_free()
2395 sgroup->outputfilter_caps_sid = 0; in stream_group_free()
2398 if (sgroup->smartencoder) in stream_group_free()
2399 gst_element_set_state (sgroup->smartencoder, GST_STATE_NULL); in stream_group_free()
2400 gst_clear_object (&sgroup->smart_capsfilter); in stream_group_free()
2402 if (sgroup->capsfilter) { in stream_group_free()
2403 gst_element_set_state (sgroup->capsfilter, GST_STATE_NULL); in stream_group_free()
2404 if (sgroup->encoder) in stream_group_free()
2405 gst_element_unlink (sgroup->capsfilter, sgroup->encoder); in stream_group_free()
2407 gst_element_unlink (sgroup->capsfilter, sgroup->fakesink); in stream_group_free()
2409 gst_bin_remove ((GstBin *) ebin, sgroup->capsfilter); in stream_group_free()
2412 for (tmp = sgroup->converters; tmp; tmp = tmp->next) { in stream_group_free()
2418 if (sgroup->converters) in stream_group_free()
2419 g_list_free (sgroup->converters); in stream_group_free()
2421 if (sgroup->combiner) { in stream_group_free()
2422 GstIterator *it = gst_element_iterate_sink_pads (sgroup->combiner); in stream_group_free()
2428 sgroup->combiner); in stream_group_free()
2432 gst_element_set_state (sgroup->combiner, GST_STATE_NULL); in stream_group_free()
2433 gst_bin_remove ((GstBin *) ebin, sgroup->combiner); in stream_group_free()
2436 if (sgroup->splitter) { in stream_group_free()
2437 GstIterator *it = gst_element_iterate_src_pads (sgroup->splitter); in stream_group_free()
2442 sgroup->splitter); in stream_group_free()
2447 gst_element_set_state (sgroup->splitter, GST_STATE_NULL); in stream_group_free()
2448 gst_bin_remove ((GstBin *) ebin, sgroup->splitter); in stream_group_free()
2451 if (sgroup->inqueue) in stream_group_free()
2452 gst_bin_remove ((GstBin *) ebin, sgroup->inqueue); in stream_group_free()
2454 if (sgroup->encoder) in stream_group_free()
2455 gst_bin_remove ((GstBin *) ebin, sgroup->encoder); in stream_group_free()
2457 if (sgroup->fakesink) in stream_group_free()
2458 gst_bin_remove ((GstBin *) ebin, sgroup->fakesink); in stream_group_free()
2460 if (sgroup->smartencoder) in stream_group_free()
2461 gst_bin_remove ((GstBin *) ebin, sgroup->smartencoder); in stream_group_free()
2463 if (sgroup->outfilter) in stream_group_free()
2464 gst_bin_remove ((GstBin *) ebin, sgroup->outfilter); in stream_group_free()
2466 g_slice_free (StreamGroup, sgroup); in stream_group_free()
2470 stream_group_remove (GstEncodeBaseBin * ebin, StreamGroup * sgroup) in stream_group_remove() argument
2472 ebin->streams = g_list_remove (ebin->streams, sgroup); in stream_group_remove()
2474 stream_group_free (ebin, sgroup); in stream_group_remove()
2573 StreamGroup *sgroup = tmp->data; in gst_encode_base_bin_deactivate() local
2574 GstCaps *format = gst_encoding_profile_get_format (sgroup->profile); in gst_encode_base_bin_deactivate()
2576 _set_group_caps_format (sgroup, sgroup->profile, format); in gst_encode_base_bin_deactivate()