Exemplo n.º 1
0
        protected void GetVideoInfo(string itemId)
        {
             
            Resource r=new Resource();
            ResourceEntity vs = r.GetResourceInfoByItemId(itemId);

            VideoType obj = new VideoType();
            //yangguang
            //string previewPath = obj.PreviewPathRead;
            //if(string.IsNullOrEmpty(previewPath))
            //{
            //    return;
            //}

            if (vs != null)
            {
                folder = vs.FolderName;
                //yangguang
                //flvFilePath = previewPath + "/flv/" + vs.FolderName + "/" + vs.ItemSerialNum + ".flv";
                //imageFilePath = previewPath + "/image/" + vs.FolderName + "/" + vs.ItemSerialNum + ".jpg";
                //flvFilePath = obj.GetPreviewPath(vs.FolderName, vs.ItemSerialNum + ".flv", "flv");
                flvFilePath = obj.GetPreviewPathRead(vs.FolderName, vs.ItemSerialNum + ".flv", "flv");
                imageFilePath = obj.GetPreviewPathRead(vs.FolderName, vs.ItemSerialNum + ".jpg", "image");// + "/image/" + vs.FolderName + "/" + vs.ItemSerialNum + ".jpg";
                this.lb_Caption.Text = vs.Caption;
                this.lb_Description.Text = vs.Description;
                this.lb_enableDate.Text = string.Format("{0} -- {1}", vs.StartDate.ToShortDateString(), vs.EndDate.ToShortDateString());
                this.lb_FileName.Text = vs.FileName;
                this.lb_ItemSerialNum.Text = vs.ItemSerialNum;
                this.lb_Keyword.Text = vs.Keyword;
                this.lb_shotDate.Text = vs.shotDate.ToShortDateString();
                this.lb_uploadDate.Text = vs.uploadDate.ToShortDateString();
                this.lb_FileType.Text = Path.GetExtension(vs.FileName);
                this.lb_FileLength.Text = Tool.toFileSize( vs.FileSize);
                this.pageTitle.Text = vs.Caption;

                if (vs.ResourceType.Equals("video"))
                { 
                    VideoStorage v=r.GetVideoInfoBySN(vs.ItemSerialNum);
                    if (v != null)
                    {
                        if (v.ClipLength.Length > 8)
                        {
                            this.lb_duration.Text = v.ClipLength.Substring(0, 8);
                        }
                        this.lb_wh.Text = v.ClipSize;
                        this.lb_bitrate.Text = v.Bitrate;
                    }                    

                }
            
            }

            
        }