public Int64 processVideo ( VideoProcessQuery query )
{
var url = apiUrl + "/api/v1.1/videos";
var data = "<vzaar-api><video>";
if (query.replaceId != "")
data += "<replace_id>" + query.replaceId + "</replace_id>";
data += "<guid>" + query.guid + "</guid><title>" + HttpUtility.HtmlEncode(query.title) + "</title><description>" + HttpUtility.HtmlEncode(query.description) + "</description><labels>";
data += HttpUtility.HtmlEncode(String.Join( ",", query.labels )) + "</labels><profile>" + (int)query.profile + "</profile>";
if (query.chunks > 0)
{
data += "<chunks>" + query.chunks + "</chunks>";
}
if (query.transcode)
data += "<transcoding>true</transcoding>";
data += "</video> </vzaar-api>";
var response = executeRequest( url, "POST", data );
var doc = new XmlDocument();
doc.LoadXml( response );
var videoId = Int64.Parse( doc.SelectSingleNode( "//video" ).InnerText );
return videoId;
}