LCOV - code coverage report
Current view: top level - tests/examples/manual - elementfactory.c (source / functions) Hit Total Coverage
Test: GStreamer 0.10.32.1 Lines: 7 9 77.8 %
Date: 2011-03-25 Functions: 1 1 100.0 %
Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : 
       2                 :            : /*** block  from ../../../docs/manual/basics-elements.xml ***/
       3                 :            : #include <gst/gst.h>
       4                 :            : 
       5                 :            : int
       6                 :          1 : main (int   argc,
       7                 :            :       char *argv[])
       8                 :            : {
       9                 :            :   GstElementFactory *factory;
      10                 :            : 
      11                 :            :   /* init GStreamer */
      12                 :          1 :   gst_init (&argc, &argv);
      13                 :            : 
      14                 :            :   /* get factory */
      15                 :          1 :   factory = gst_element_factory_find ("fakesrc");
      16         [ -  + ]:          1 :   if (!factory) {
      17                 :          0 :     g_print ("You don't have the 'fakesrc' element installed!\n");
      18                 :          0 :     return -1;
      19                 :            :   }
      20                 :            : 
      21                 :            :   /* display information */
      22                 :          2 :   g_print ("The '%s' element is a member of the category %s.\n"
      23                 :            :            "Description: %s\n",
      24                 :          1 :            gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)),
      25                 :            :            gst_element_factory_get_klass (factory),
      26                 :            :            gst_element_factory_get_description (factory));
      27                 :            : 
      28                 :          1 :   return 0;
      29                 :            : }

Generated by: LCOV version 1.9