- more fixes from pvqa_server project
This commit is contained in:
@@ -111,6 +111,9 @@ public:
|
||||
static void setupAndroidEnvironment(void* environment, void* appcontext);
|
||||
#endif
|
||||
|
||||
// Verbose run - dump debugging info to console
|
||||
static void set_verbose(bool verbose = true);
|
||||
|
||||
// Path to config file can be empty
|
||||
// In this case library will be considered initialized (but will produce zero MOS)
|
||||
static bool initialize(const std::string& pathToLicenseFile, const std::string& pathToConfigFile);
|
||||
@@ -118,6 +121,8 @@ public:
|
||||
const void* config_buffer, size_t config_len);
|
||||
static bool is_initialized();
|
||||
|
||||
static std::string get_copyright_string();
|
||||
|
||||
static int library_error();
|
||||
static void release();
|
||||
static int instance_counter() { return mInstanceCounter; }
|
||||
@@ -145,6 +150,7 @@ public:
|
||||
bool is_open() const;
|
||||
|
||||
// Update/Get model. pcm_length is bytes.
|
||||
// Please - pcm_length must be a multiple of interval time!
|
||||
bool update(const void* pcm_buffer, size_t pcm_length);
|
||||
int error() const;
|
||||
|
||||
@@ -153,7 +159,7 @@ public:
|
||||
{
|
||||
float mMos = 0.0f;
|
||||
std::string mReport;
|
||||
size_t mIntervals = 0, mPoorIntervals = 0;
|
||||
size_t mIntervals = 0, mPoorIntervals = 0, mUncertainIntervals = 0;
|
||||
};
|
||||
|
||||
bool get_result(result& r, size_t last_milliseconds = 0);
|
||||
@@ -171,6 +177,7 @@ public:
|
||||
|
||||
// Combines update & get_result calls
|
||||
bool singleshot(result& r, const void* pcm_buffer, size_t pcm_length);
|
||||
bool singleshot_file(result& r, const std::string& path);
|
||||
};
|
||||
|
||||
} // end of namespace
|
||||
|
||||
@@ -29,6 +29,7 @@ typedef struct
|
||||
|
||||
long dNumPoorIntervals;
|
||||
long dNumTotalIntervals;
|
||||
long dNumUncertainIntervals;
|
||||
|
||||
double dTimeShift;
|
||||
} TPVQA_Results;
|
||||
@@ -38,7 +39,7 @@ typedef struct
|
||||
{
|
||||
long dSampleRate; // Sample rate of signal
|
||||
long dNChannels; // Number of sound channels in audio
|
||||
short * pSamples; // Pointer to the samples of signal
|
||||
const short * pSamples; // Pointer to the samples of signal
|
||||
long dNSamples; // Number of samples
|
||||
} TPVQA_AudioItem;
|
||||
|
||||
@@ -82,7 +83,7 @@ PVQA_API int PVQA_AudioQualityAnalyzerCreateDelayLine(void * aPVQA_ID, long aSam
|
||||
PVQA_API int PVQA_StartRecordingWave(void * aPVQA_ID, const char * aPWavFName, long aSampleRate, long aNChannels);
|
||||
|
||||
// Performs audio file quality estimation
|
||||
PVQA_API int PVQA_OnTestAudioFile(void * aPVQA_ID, const char * aPFileName);
|
||||
PVQA_API int PVQA_OnTestAudioFile(void * aPVQA_ID, const char * aPFileName, double offset_begin, double offset_end);
|
||||
|
||||
// Process loaded in memory audio data
|
||||
PVQA_API int PVQA_OnTestAudioData(void * aPVQA_ID, TPVQA_AudioItem * aPVQA_PAudio);
|
||||
@@ -95,7 +96,6 @@ PVQA_API int PVQA_OnStartStreamData(void * aPVQA_ID);
|
||||
|
||||
// Process streaming Audio data
|
||||
PVQA_API int PVQA_OnAddStreamAudioData(void * aPVQA_ID, TPVQA_AudioItem * aPVQA_PAudio);
|
||||
PVQA_API int PVQA_OnAddStreamAudioDataHex(void * aPVQA_ID, int rate, int channels, const char* samples);
|
||||
|
||||
// Updates quality results data
|
||||
PVQA_API int PVQA_OnUpdateStreamQualityResults(void * aPVQA_ID, int rate, int millisecondsFromEnd);
|
||||
@@ -104,7 +104,6 @@ PVQA_API int PVQA_OnUpdateStreamQualityResults(void * aPVQA_ID, int rate, int mi
|
||||
PVQA_API int PVQA_OnFinalizeStream(void * aPVQA_ID, long aSampleRate);
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Displaying audio quality testing results
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -129,7 +128,10 @@ PVQA_API const char ** PVQA_GetProcessorValuesNamesList(void * aPVQA_ID, const c
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// number of columns and rows
|
||||
int columns, rows;
|
||||
|
||||
// data itself
|
||||
float* data;
|
||||
} PVQA_Array2D;
|
||||
|
||||
@@ -137,6 +139,7 @@ typedef struct
|
||||
// Returned value has to be released via PVQA_ReleaseArray2D
|
||||
PVQA_API PVQA_Array2D* PVQA_GetProcessorValuesList(void * aPVQA_ID, const char * aPDetectorName, long aStartTime,
|
||||
long aStopTime, const char * aStatType, int * errCode);
|
||||
|
||||
// Release allocated 2D array
|
||||
PVQA_API void PVQA_ReleaseArray2D(PVQA_Array2D* array);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user