def setup_proxy(element, config):
 if ((not hasattr(element.props, u'proxy')) or (not config.get(u'hostname'))):
  return
 element.set_property(u'proxy', httpclient.format_proxy(config, auth=False))
 element.set_property(u'proxy-id', config.get(u'username'))
 element.set_property(u'proxy-pw', config.get(u'password'))

def setup_proxy ( element , config ) : if ( ( not hasattr ( element . props , u'proxy' ) ) or ( not config . get ( u'hostname' ) ) ) : return element . set_property ( u'proxy' , httpclient . format_proxy ( config , auth = False ) ) element . set_property ( u'proxy-id' , config . get ( u'username' ) ) element . set_property ( u'proxy-pw' , config . get ( u'password' ) )
configure a gstreamer element with proxy settings .