gstreamer/resolution/main.c
static void print_pad_templates_information (GstElementFactory * factory)
{
  const GList *pads;
  GstStaticPadTemplate *padtemplate;

  g_print ("Pad Templates for %s:\n", gst_element_factory_get_longname (factory));
  if (!gst_element_factory_get_num_pad_templates (factory)) {
    g_print ("  none\n");
    return;
  }

  pads = gst_element_factory_get_static_pad_templates (factory);
  while (pads) {
    padtemplate = pads->data;
    pads = g_list_next (pads);

    if (padtemplate->direction == GST_PAD_SRC)
      g_print ("  SRC template: '%s'\n", padtemplate->name_template);
    else if (padtemplate->direction == GST_PAD_SINK)
      g_print ("  SINK template: '%s'\n", padtemplate->name_template);
    else
      g_print ("  UNKNOWN!!! template: '%s'\n", padtemplate->name_template);

    if (padtemplate->presence == GST_PAD_ALWAYS)
      g_print ("    Availability: Always\n");
    else if (padtemplate->presence == GST_PAD_SOMETIMES)
      g_print ("    Availability: Sometimes\n");
    else if (padtemplate->presence == GST_PAD_REQUEST)
      g_print ("    Availability: On request\n");
    else
      g_print ("    Availability: UNKNOWN!!!\n");

    if (padtemplate->static_caps.string) {
      GstCaps *caps;
      g_print ("    Capabilities:\n");
      caps = gst_static_caps_get (&padtemplate->static_caps);
      print_caps (caps, "      ");
      gst_caps_unref (caps);

    }

    g_print ("\n");
  }
}
/* Prints information about a Pad Template, including its Capabilities */
Prints information about a Pad Template, including its Capabilities
Prints information about a Pad Template including its Capabilities
static void print_pad_templates_information (GstElementFactory * factory)
{
  const GList *pads;
  GstStaticPadTemplate *padtemplate;
  g_print ("Pad Templates for %s:\n", gst_element_factory_get_longname (factory));
  if (!gst_element_factory_get_num_pad_templates (factory)) {
    g_print ("  none\n");
    return;
  }
  pads = gst_element_factory_get_static_pad_templates (factory);
  while (pads) {
    padtemplate = pads->data;
    pads = g_list_next (pads);
    if (padtemplate->direction == GST_PAD_SRC)
      g_print ("  SRC template: '%s'\n", padtemplate->name_template);
    else if (padtemplate->direction == GST_PAD_SINK)
      g_print ("  SINK template: '%s'\n", padtemplate->name_template);
    else
      g_print ("  UNKNOWN!!! template: '%s'\n", padtemplate->name_template);
    if (padtemplate->presence == GST_PAD_ALWAYS)
      g_print ("    Availability: Always\n");
    else if (padtemplate->presence == GST_PAD_SOMETIMES)
      g_print ("    Availability: Sometimes\n");
    else if (padtemplate->presence == GST_PAD_REQUEST)
      g_print ("    Availability: On request\n");
    else
      g_print ("    Availability: UNKNOWN!!!\n");
    if (padtemplate->static_caps.string) {
      GstCaps *caps;
      g_print ("    Capabilities:\n");
      caps = gst_static_caps_get (&padtemplate->static_caps);
      print_caps (caps, "      ");
      gst_caps_unref (caps);
    }
    g_print ("\n");
  }
}
static void print_pad_templates_information ( GstElementFactory * factory ) { const GList * pads ; GstStaticPadTemplate * padtemplate ; g_print ( " \n " , gst_element_factory_get_longname ( factory ) ) ; if ( ! gst_element_factory_get_num_pad_templates ( factory ) ) { g_print ( " \n " ) ; return ; } pads = gst_element_factory_get_static_pad_templates ( factory ) ; while ( pads ) { padtemplate = pads -> data ; pads = g_list_next ( pads ) ; if ( padtemplate -> direction == GST_PAD_SRC ) g_print ( " \n " , padtemplate -> name_template ) ; else if ( padtemplate -> direction == GST_PAD_SINK ) g_print ( " \n " , padtemplate -> name_template ) ; else g_print ( " \n " , padtemplate -> name_template ) ; if ( padtemplate -> presence == GST_PAD_ALWAYS ) g_print ( " \n " ) ; else if ( padtemplate -> presence == GST_PAD_SOMETIMES ) g_print ( " \n " ) ; else if ( padtemplate -> presence == GST_PAD_REQUEST ) g_print ( " \n " ) ; else g_print ( " \n " ) ; if ( padtemplate -> static_caps . string ) { GstCaps * caps ; g_print ( " \n " ) ; caps = gst_static_caps_get ( & padtemplate -> static_caps ) ; print_caps ( caps , " " ) ; gst_caps_unref ( caps ) ; } g_print ( " \n " ) ; } }
Prints information about a Pad Template, including its Capabilities
Prints information about a Pad Template including its Capabilities