C# 클래스 Business.DownloadBusiness

파일 보기 프로젝트 열기: mysteryx93/NaturalGroundingPlayer 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DownloadedExtensions string[]

공개 메소드들

메소드 설명
DownloadVideoAsync ( Media video, int queuePos, EventHandler callback ) : Task

Downloads specified video from YouTube.

DownloadVideoAsync ( Media video, int queuePos, bool upgradeAudio, EventHandler callback ) : Task

Downloads specified video from YouTube.

GetAudioExtension ( AudioType audio ) : string

Returns the file extension for specified audio type.

GetCodecExtension ( VideoType video ) : string

Returns the file extension for specified video codec type. To avoid conflicting file names, the codec extension must be different than the final extension.

GetDownloadUrlsAsync ( string url ) : Task>

Returns the list of download URLs from YouTube.

GetFinalExtension ( VideoType video, AudioType audio ) : string

Returns the file extension for specified video type. To avoid conflicting file names, the codec extension must be different than the final extension.

GetFinalExtension ( string video, string audio ) : string

Returns the file extension for specified video type. To avoid conflicting file names, the codec extension must be different than the final extension.

IsDownloadDuplicate ( Media request ) : bool
SelectBestAudio ( IEnumerable list ) : VideoInfo

Selects OGG (Vorbis) audio if available, otherwise AAC.

SelectBestFormat ( IEnumerable list ) : BestFormatInfo

Returns the best format from the list in this order of availability: WebM, Mp4 or Flash. Mp4 will be chosen if WebM is over 35% smaller.

비공개 메소드들

메소드 설명
DownloadCanceled ( Business.DownloadItem downloadInfo ) : void
DownloadCompletedAsync ( Business.DownloadItem downloadInfo ) : Task
DownloadFilesAsync ( Business.DownloadItem downloadInfo, EventHandler callback ) : Task

Downloads the specified list of files.

DownloadVideoAsync ( Business.DownloadItem downloadInfo, Business.DownloadItem fileInfo, EventHandler callback ) : Task
FileHasContent ( string fileName ) : bool

Returns whether specified file exists and contains data (at least 500KB).

RaiseCallback ( Business.DownloadItem downloadInfo ) : void
StartDownloadAsync ( Business.DownloadItem downloadInfo ) : Task
StartNextDownloadAsync ( ) : Task

메소드 상세

DownloadVideoAsync() 공개 메소드

Downloads specified video from YouTube.
public DownloadVideoAsync ( Media video, int queuePos, EventHandler callback ) : Task
video DataAccess.Media The video to download.
queuePos int The position in the queue to auto-play, or -1.
callback EventHandler The method to call once download is completed.
리턴 Task

DownloadVideoAsync() 공개 메소드

Downloads specified video from YouTube.
public DownloadVideoAsync ( Media video, int queuePos, bool upgradeAudio, EventHandler callback ) : Task
video DataAccess.Media The video to download.
queuePos int The position in the queue to auto-play, or -1.
upgradeAudio bool If true, only the audio will be downloaded and it will be merged with the local video file.
callback EventHandler The method to call once download is completed.
리턴 Task

GetAudioExtension() 공개 메소드

Returns the file extension for specified audio type.
public GetAudioExtension ( AudioType audio ) : string
audio AudioType The audio type to get file extension for.
리턴 string

GetCodecExtension() 공개 메소드

Returns the file extension for specified video codec type. To avoid conflicting file names, the codec extension must be different than the final extension.
public GetCodecExtension ( VideoType video ) : string
video VideoType The video type to get file extension for.
리턴 string

GetDownloadUrlsAsync() 공개 정적인 메소드

Returns the list of download URLs from YouTube.
public static GetDownloadUrlsAsync ( string url ) : Task>
url string The YouTube video URL to query.
리턴 Task>

GetFinalExtension() 공개 메소드

Returns the file extension for specified video type. To avoid conflicting file names, the codec extension must be different than the final extension.
public GetFinalExtension ( VideoType video, AudioType audio ) : string
video VideoType The video type to get file extension for.
audio AudioType
리턴 string

GetFinalExtension() 공개 메소드

Returns the file extension for specified video type. To avoid conflicting file names, the codec extension must be different than the final extension.
public GetFinalExtension ( string video, string audio ) : string
video string The video type to get file extension for.
audio string
리턴 string

IsDownloadDuplicate() 공개 메소드

public IsDownloadDuplicate ( Media request ) : bool
request DataAccess.Media
리턴 bool

SelectBestAudio() 공개 정적인 메소드

Selects OGG (Vorbis) audio if available, otherwise AAC.
public static SelectBestAudio ( IEnumerable list ) : VideoInfo
list IEnumerable The list of available audios.
리턴 VideoInfo

SelectBestFormat() 공개 정적인 메소드

Returns the best format from the list in this order of availability: WebM, Mp4 or Flash. Mp4 will be chosen if WebM is over 35% smaller.
public static SelectBestFormat ( IEnumerable list ) : BestFormatInfo
list IEnumerable The list of videos to chose from.
리턴 BestFormatInfo

프로퍼티 상세

DownloadedExtensions 공개적으로 정적으로 프로퍼티

public static string[] DownloadedExtensions
리턴 string[]