public PushLocalStream ( Variant streamConfig ) : bool | ||
streamConfig | Variant | |
return | bool |
virtual public bool PushLocalStream(Variant streamConfig) { //1. Minimal verification if (streamConfig["targetUri"] == null) { Logger.FATAL("Invalid uri"); return(false); } if (streamConfig["localStreamName"] == null) { Logger.FATAL("Invalid local stream name"); return(false); } var streamName = (string)streamConfig["localStreamName"]; streamName = streamName.Trim(); if (streamName == "") { Logger.FATAL("Invalid local stream name"); return(false); } streamConfig["localStreamName"] = streamName; //2. Split the URI Uri uri = new Uri((string)streamConfig["targetUri"]); //3. Depending on the scheme name, get the curresponding protocol handler ///TODO: integrate this into protocol factory manager via protocol factories string scheme = uri.Scheme; BaseAppProtocolHandler pProtocolHandler = GetProtocolHandler(scheme); if (pProtocolHandler == null) { Logger.WARN("Unable to find protocol handler for scheme {0} in application {1}", scheme, Name); return(false); } //4. Initiate the stream pulling sequence return(pProtocolHandler.PushLocalStream(streamConfig)); }