Пример #1
0
        public DownloadVideo(VideoURL aVideoURL, String aOutputFolder)
        {
            this.videoURLDownload = aVideoURL;
            this.outputFolder = aOutputFolder;

            this.timerDownload = new System.Timers.Timer();

            this.timerDownload.Elapsed += new ElapsedEventHandler(timerSecond_Tick);
            this.timerDownload.Interval = TIMER_DOWNLOAD_INTERVAL;
        }
Пример #2
0
        public void testCreateLocalPath()
        {
            Video video = new Video();
            video.author = "Test Author";
            video.title = "Test Title";

            VideoURL videoURL = new VideoURL(video);
            videoURL.Type = "video/x-flv";

            DownloadVideo downloadVideo = new DownloadVideo(videoURL, @"C:\VIDEO");
            String localPath = downloadVideo.CreateLocalPath();
            String expected = @"C:\VIDEO\Test Author_Test Title.flv";

            Assert.AreEqual(expected, localPath);
        }
Пример #3
0
        private void AnalyseVideoStreamMap(String aMap)
        {
            IVideoInfoUrlParser[] vidInfoParsers = YT2013VideoInfoParser.Split(aMap);

            foreach(IVideoInfoUrlParser vidInfoParser in vidInfoParsers)
            {
                VideoURL videoURL = new VideoURL(this);
                videoURL.Quality = vidInfoParser.extractQuality();
                videoURL.Type = vidInfoParser.extractType();
                videoURL.SIG = vidInfoParser.extractSig();
                videoURL.BaseURL = vidInfoParser.extractURL();
                this.videoUrls.Add(videoURL);
            }
        }
Пример #4
0
 public UdlVUrlException(VideoURL aVideoURL, String aMessage, Exception aInnerException)
     : base(aMessage, aInnerException)
 {
     this._videoURL = aVideoURL;
 }
Пример #5
0
 public UdlVUrlException(VideoURL aVideoURL, String aMessage)
     : base(aMessage)
 {
     this._videoURL = aVideoURL;
 }