예제 #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;
 }