C# 클래스 Metrics.QualityCalculator

This static class contains methods to calculate various component of the Quality Coefficient
파일 보기 프로젝트 열기: zencoders/sambatyon

공개 메소드들

메소드 설명
calculateFileQuality ( String filepath ) : QualityCoefficient

Calculates only the File Quality component of the Quality Coefficient

calculatePeerQuality ( int buffered, int queueSize ) : QualityCoefficient

Calculates only the Peer Quality component of the Quality Coefficient

calculateQualityCoefficient ( String searchString, String tags, int buffered, int queueSize, String filepath ) : QualityCoefficient

Calculates all components of the Quality Coefficient. This method extact file quality information directly from the file itself.

calculateQualityCoefficient ( String searchString, String tags, int buffered, int queueSize, int bitrate, int channelmode, int samplerate ) : QualityCoefficient

Calculates all components of the Quality Coefficient. This method needs file quality information to be passed as arguments.

calculateSearchAffinity ( String searchString, String tags ) : QualityCoefficient

Calculates only the Search Affinity Component of the Quality Coefficient.

비공개 메소드들

메소드 설명
calculateAFF ( String searchString, String tags ) : double

Calculates the affinity coefficient of a tag sets with a given search string. For implementation details read the Wiki Page for this coefficient (http://code.google.com/p/p2p-player/wiki/ImplicitQoS#Coefficiente_di_Affinità)

calculateFQ ( String filepath ) : FileQualityCoefficient

Calculates the File Quality Coefficient extracting information from the MPEG file Header. For implementation details read the Wiki Page for this coefficient (http://code.google.com/p/p2p-player/wiki/ImplicitQoS#Coefficiente_di_Qualità_del_File)

calculateFQ ( int bitrate, int channelmode, int samplerate ) : FileQualityCoefficient

Returns an object of type FileQualityCoefficient with the given components

calculatePQ ( int buffered, int queueSize ) : double

Calculates Peer Quality Coefficient

메소드 상세

calculateFileQuality() 공개 정적인 메소드

Calculates only the File Quality component of the Quality Coefficient
public static calculateFileQuality ( String filepath ) : QualityCoefficient
filepath String Path of the file to analyze
리턴 QualityCoefficient

calculatePeerQuality() 공개 정적인 메소드

Calculates only the Peer Quality component of the Quality Coefficient
public static calculatePeerQuality ( int buffered, int queueSize ) : QualityCoefficient
buffered int Number of buffered chunks
queueSize int Size of the chunk queue
리턴 QualityCoefficient

calculateQualityCoefficient() 공개 정적인 메소드

Calculates all components of the Quality Coefficient. This method extact file quality information directly from the file itself.
public static calculateQualityCoefficient ( String searchString, String tags, int buffered, int queueSize, String filepath ) : QualityCoefficient
searchString String Searched String
tags String List of tags returned by the research action
buffered int Number of buffered chunks
queueSize int Size of the chunk queue
filepath String Path of the file to analyze
리턴 QualityCoefficient

calculateQualityCoefficient() 공개 정적인 메소드

Calculates all components of the Quality Coefficient. This method needs file quality information to be passed as arguments.
public static calculateQualityCoefficient ( String searchString, String tags, int buffered, int queueSize, int bitrate, int channelmode, int samplerate ) : QualityCoefficient
searchString String Searched String
tags String List of tags returned by the research action
buffered int Number of buffered chunks
queueSize int Size of the chunk queue
bitrate int Bit rate component
channelmode int Channel mode component
samplerate int Sample rate component
리턴 QualityCoefficient

calculateSearchAffinity() 공개 정적인 메소드

Calculates only the Search Affinity Component of the Quality Coefficient.
public static calculateSearchAffinity ( String searchString, String tags ) : QualityCoefficient
searchString String Searched String
tags String List of tags returned by the research action
리턴 QualityCoefficient