Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <gst/base/gstpushsrc.h>                                                          
  2. struct SoupURI;                                                                          
  3. struct SoupSrc {                                                                          
  4.   GstPushSrc element;                                                                    
  5.   gchar* location;                                                                        
  6.   gchar* user_agent;                                                                      
  7.   gboolean automatic_redirect;                                                            
  8.   SoupURI* proxy;                                                                        
  9. };                                                                                        
  10.                                                                                          
  11. void GstEnginePipeline::NotifySourceCallback(                                            
  12.     GObject* object, GParamSpec* param, gpointer self) {                                  
  13.   if (g_object_class_find_property(G_OBJECT_GET_CLASS(object), "source")) {              
  14.     GObject* source_element = NULL;                                                      
  15.     g_object_get(object, "source", &source_element, NULL);                                
  16.                                                                                          
  17.     if (g_object_class_find_property(G_OBJECT_GET_CLASS(source_element), "proxy")) {      
  18.       gchar* proxy = NULL;                                                                
  19.       g_object_get(source_element, "proxy", &proxy, NULL);                                
  20.       qDebug() << "Proxy:" << proxy;                                                      
  21.       ((SoupSrc*)source_element)->proxy = NULL;                                          
  22.       g_object_get(source_element, "proxy", &proxy, NULL);                                
  23.       qDebug() << "Proxy:" << proxy;                                                      
  24.     }                                                                                    
  25.     g_object_unref(source_element);                                                      
  26.   }                                                                                      
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement