History

use WelsLog instead of fprintf to have a unified trace output

ruil2 committed 12 years ago

Commit 6bb23f51 parent cad753d1 file · +5 −9Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+5−9
@@ -90,19 +90,15 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) { · 89 unmodified lines
9090 if (fDlp->fOutputFrameRate > fDlp->fInputFrameRate || (fDlp->fInputFrameRate >= -fEpsn
9191 && fDlp->fInputFrameRate <= fEpsn)
9292 || (fDlp->fOutputFrameRate >= -fEpsn && fDlp->fOutputFrameRate <= fEpsn)) {
93−#if defined (_DEBUG)
94− fprintf (stderr, "Invalid settings in input frame rate(%.6f) or output frame rate(%.6f) of layer #%d config file..\n",
93+ WelsLog (NULL, WELS_LOG_ERROR,"Invalid settings in input frame rate(%.6f) or output frame rate(%.6f) of layer #%d config file..\n",
9594 fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i);
96−#endif
97− return 1;
95+ return ENC_RETURN_INVALIDINPUT;
9896 }
9997 if (UINT_MAX == GetLogFactor (fDlp->fOutputFrameRate, fDlp->fInputFrameRate)) {
100−#if defined (_DEBUG)
101− fprintf (stderr,
98+ WelsLog (NULL,WELS_LOG_ERROR,
10299 "Invalid settings in input frame rate(%.6f) and output frame rate(%.6f) of layer #%d config file: iResult of output frame rate divided by input frame rate should be power of 2(i.e,in/pOut=2^n)..\n",
103100 fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i);
104−#endif
105− return 1;
101+ return ENC_RETURN_INVALIDINPUT;
106102 }
107103 }
108104
@@ -117,7 +113,7 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) { · 8 unmodified lines
117113 pCfg->fMaxFrameRate = fMaxFrameRate;
118114 }
119115
120− return 0;
116+ return ENC_RETURN_SUCCESS;
121117 }
122118
123119

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t