Ejemplo n.º 1
0
        private static bool putAdpTask()
        {
            try
            {
                Console.WriteLine("--- putAdpTask begin: ---");
                PutAdpRequest putAdpRequest = new PutAdpRequest();
                putAdpRequest.BucketName = "kingsoft.test.ml";
                putAdpRequest.ObjectKey  = "testPut.mp4";
                IList <Adp> fops  = new List <Adp>();
                Adp         fop12 = new Adp();
                fop12.Command = "tag=avscrnshot&ss=5";
                fop12.Bucket  = "kingsoft.test.ml";
                fop12.Key     = "testAdp.jpg";
                fops.Add(fop12);
                putAdpRequest.Adps      = fops;
                putAdpRequest.NotifyURL = "http://10.4.2.38:19090/";
                String taskid = ks3Client.putAdpTask(putAdpRequest);

                Console.WriteLine("---------putAdpTask end; taskid:" + taskid + "---------\n");
            }
            catch (System.Exception e)
            {
                Console.WriteLine(e.ToString());
                return(false);
            }

            return(true);
        }
Ejemplo n.º 2
0
 public void TestputAdpTask()
 {
     if (!init())
     {
         PutAdpRequest putAdpRequest = new PutAdpRequest();
         putAdpRequest.BucketName = bucketName;
         putAdpRequest.ObjectKey  = objKeyNameFileData;
         IList <Adp> fops  = new List <Adp>();
         Adp         fop12 = new Adp();
         fop12.Command = "tag=avm3u8&segtime=10&abr=128k&vbr=1000k&&res=1280x720";
         fop12.Key     = "野生动物-hls切片.m3u8";
         fops.Add(fop12);
         putAdpRequest.Adps      = fops;
         putAdpRequest.NotifyURL = "http://10.4.2.38:19090/";
         String taskid = ks3Client.putAdpTask(putAdpRequest);
         Assert.IsNotNull(taskid);
     }
 }