Ticket #2460: libavcodec-log-2.patch
File libavcodec-log-2.patch, 2.0 KB (added by , 18 years ago) |
---|
-
libs/libmyth/mythcontext.cpp
old new QString safe_eno_to_string(int errnum) 153 153 return QString("%1 (%2)").arg(strerror(errnum)).arg(errnum); 154 154 } 155 155 156 extern "C" 157 { 158 #include "../libavutil/avutil.h" 159 } 160 161 void myth_av_log(void *ptr, int level, const char* fmt, va_list vl) 162 { 163 static QString full_line(""); 164 165 if (level >= AV_LOG_DEBUG) 166 return; 167 168 if ((print_verbose_messages & VB_LIBAV) != VB_LIBAV) 169 return; 170 171 if (full_line.isEmpty() && ptr) { 172 AVClass* avc = *(AVClass**)ptr; 173 full_line.sprintf("[%s @ %p]", avc->item_name(ptr), avc); 174 } 175 176 char str[256]; 177 vsprintf(str, fmt, vl); 178 179 full_line += QString(str); 180 if (full_line.endsWith("\n")) 181 { 182 full_line.truncate(full_line.length() - 1); 183 VERBOSE(VB_LIBAV, full_line); 184 full_line.truncate(0); 185 } 186 } 187 156 188 157 189 class MythContextPrivate 158 190 { … … bool MythContextPrivate::Init(bool gui) 442 474 StoreGUIsettings(); 443 475 } 444 476 477 av_log_set_callback(myth_av_log); 478 445 479 return true; 446 480 } 447 481 -
programs/mythuitest/mythuitest.pro
old new 1 1 INCLUDEPATH += ../../libs/libmythui ../../libs/libmyth 2 2 3 3 LIBS += -L../../libs/libmyth -L../../libs/libmythui 4 LIBS += -L../../libs/libavutil 4 5 5 6 include ( ../../config.mak ) 6 7 include ( ../../settings.pro ) … … TARGET = mythuitest 10 11 CONFIG += thread opengl 11 12 12 13 LIBS += -lmythui-$$LIBVERSION -lmyth-$$LIBVERSION $$EXTRA_LIBS 14 LIBS += -lmythavutil-$$LIBVERSION 13 15 14 16 isEmpty(QMAKE_EXTENSION_SHLIB) { 15 17 QMAKE_EXTENSION_SHLIB=so