Exemple #1
0
        /// <summary>
        /// 视频上传初始化
        /// </summary>
        /// <param name="initParamMap">上传文件的相关信息集合</param>
        /// <returns>视频上传初始化返回结果的封装类</returns>
        public InitUploadVideoParam initUploadVideo(IDictionary <String, Object> initParamMap)
        {
            InitUploadVideoModule initUploadVideoModule = new InitUploadVideoModule(initParamMap);
            UploadUtil            util = new UploadUtil(initUploadVideoModule);

            return(util.initUploadVideo());
        }
Exemple #2
0
        /// <summary>
        /// 上传完成后查询视频ID
        /// </summary>
        /// <param name="objectNamesList"> 查询视频的对象名集合</param>
        /// <returns>上传完成后查询视频ID返回结果的封装类</returns>
        public QueryVideoIDorWatermarkIDParam queryVideoID(List <string> objectNamesList)
        {
            QueryVideoIDorWatermarkIDModule queryVideoIDorWatermarkIDModule = new QueryVideoIDorWatermarkIDModule(objectNamesList);
            UploadUtil util = new UploadUtil(queryVideoIDorWatermarkIDModule);

            return(util.queryVideoID());
        }
Exemple #3
0
        /// <summary>
        /// 设置上传回调地址
        /// </summary>
        /// <param name="callbackUrl">上传成功后回调客户端的URL地址</param>
        /// <returns></returns>
        public SetCallbackParam setCallback(string callbackUrl)
        {
            SetCallbackModule setCallbackModule = new SetCallbackModule(callbackUrl);

            UploadUtil util = new UploadUtil(setCallbackModule);

            return(util.setCallback());
        }
Exemple #4
0
        /// <summary>
        /// 获取上传加速节点地址
        /// </summary>
        /// <param name="bucket">桶名</param>
        /// <returns> 获取上传加速节点地址返回结果的封装类</returns>
        public GetUploadHostParam getUploadHost(string bucket)
        {
            UploadUtil util = new UploadUtil(bucket);

            return(util.getUploadHost());
        }
Exemple #5
0
        /// <summary>
        /// 断点续传查询断点
        /// </summary>
        /// <param name="uploadHost">上传加速节点地址</param>
        /// <param name="bucket">存储上传文件的桶名</param>
        /// <param name="objectName">存储上传文件的对象名</param>
        /// <param name="context">上传上下文</param>
        /// <param name="xNosToken">上传的token信息</param>
        /// <returns></returns>
        public QueryOffsetParam getPartOffset(string uploadHost, string bucket, string objectName, string context, string xNosToken)
        {
            UploadUtil util = new UploadUtil(uploadHost, bucket, objectName, context, xNosToken);

            return(util.getPartOffset());
        }
Exemple #6
0
        /// <summary>
        /// 上传视频分片
        /// </summary>
        /// <param name="bucket">存储上传文件的桶名 </param>
        /// <param name="uploadHost">上传加速节点地址</param>
        /// <param name="objectName">存储上传文件的对象名</param>
        /// <param name="offset">当前分片在整个对象中的起始偏移量</param>
        /// <param name="context"> 上传上下文</param>
        /// <param name="fileStream">上传文件的输出流</param>
        /// <param name="remainderSize">上传文件剩余大小</param>
        /// <param name="xNosToken">上传的token信息</param>
        /// <returns>分片上传视频返回结果的封装类</returns>
        public UploadVideoFragmentParam uploadVideoFragment(string bucket, string uploadHost, string objectName, long offset, string context, FileStream fileStream, long remainderSize, string xNosToken)
        {
            UploadUtil util = new UploadUtil(bucket, uploadHost, objectName, offset, context, fileStream, remainderSize, xNosToken);

            return(util.uploadVideoFragment());
        }
Exemple #7
0
        /// <summary>
        /// 上传视频分片
        /// </summary>
        /// <param name="initUploadVideoParam">视频上传初始化返回结果的封装类</param>
        /// <param name="getUploadHostParam">获取上传加速节点地址返回结果的封装类</param>
        /// <param name="offset">当前分片在整个对象中的起始偏移量</param>
        /// <param name="context">上传上下文</param>
        /// <param name="fileStream">上传文件的输出流</param>
        /// <param name="remainderSize">上传文件剩余大小</param>
        /// <returns>分片上传视频返回结果的封装类</returns>
        public UploadVideoFragmentParam uploadVideoFragment(InitUploadVideoParam initUploadVideoParam, GetUploadHostParam getUploadHostParam, long offset, string context, Stream fileStream, long remainderSize)
        {
            UploadUtil util = new UploadUtil(initUploadVideoParam, getUploadHostParam, offset, context, fileStream, remainderSize);

            return(util.uploadVideoFragment());
        }