daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. my_plugin_change_state (GstElement * element, GstStateChange transition)
  2. {
  3.   /* TODO: Add GST_DEBUG traces for function enter */
  4.   MyPlugin *my_plugin = MY_PLUGIN (element);
  5.  
  6.   switch (transition) {
  7.     case GST_STATE_CHANGE_READY_TO_PAUSED:
  8.       my_plugin_start (my_plugin);
  9.       break;    
  10.     default:
  11.       break;
  12.   }
  13. }
  14.  
  15. void my_plugin_start(MyPlugin *my_plugin)
  16. {
  17.   g_print("host is %s\n",my_plugin->property); // This doesn't print the property that I set in my test application
  18. }
  19.  
  20. gst_my_plugin_set_property (GObject * object, guint prop_id,
  21.     const GValue * value, GParamSpec * pspec)
  22. {
  23.  
  24.   GstMyPlugin *my_plugin = GST_MY_PLUGIN (object);
  25.  
  26.  
  27.   switch (prop_id) {
  28.     case PROP_PROPERTY:
  29.       my_plugin->property = g_value_get_boxed(value);
  30.       break;
  31.     default:
  32.       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
  33.       break;
  34.   }
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top