From 54c721cc4956f2d62db323a2414ac8fb59172a8f Mon Sep 17 00:00:00 2001 From: Fredrik Mellbin Date: Sat, 3 Jan 2009 15:17:53 +0000 Subject: [PATCH] FFMS2 Add NoLog to the API Originally committed to SVN as r2617. --- FFmpegSource2/ffavsfilters.cpp | 2 +- FFmpegSource2/ffms.cpp | 4 ++++ FFmpegSource2/ffms.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/FFmpegSource2/ffavsfilters.cpp b/FFmpegSource2/ffavsfilters.cpp index 7f078ed59..f257ac11e 100644 --- a/FFmpegSource2/ffavsfilters.cpp +++ b/FFmpegSource2/ffavsfilters.cpp @@ -220,7 +220,7 @@ AVSValue __cdecl CreateSWScale(AVSValue Args, void* UserData, IScriptEnvironment } AVSValue __cdecl FFNoLog(AVSValue Args, void* UserData, IScriptEnvironment* Env) { - av_log_set_level(AV_LOG_QUIET); + FFMS_NoLog(); return 0; } diff --git a/FFmpegSource2/ffms.cpp b/FFmpegSource2/ffms.cpp index 0d47f1523..2d93dc43b 100644 --- a/FFmpegSource2/ffms.cpp +++ b/FFmpegSource2/ffms.cpp @@ -54,6 +54,10 @@ FFMS_API(void) FFMS_Init() { InitDone = true; } +FFMS_API(void) FFMS_NoLog() { + av_log_set_level(AV_LOG_QUIET); +} + FFMS_API(VideoBase *) FFMS_CreateVideoSource(const char *SourceFile, int Track, FrameIndex *TrackIndices, const char *PP, int Threads, int SeekMode, char *ErrorMsg, unsigned MsgSize) { try { switch (TrackIndices->Decoder) { diff --git a/FFmpegSource2/ffms.h b/FFmpegSource2/ffms.h index 8f2acfc6a..18ff89d7d 100644 --- a/FFmpegSource2/ffms.h +++ b/FFmpegSource2/ffms.h @@ -160,6 +160,7 @@ struct AudioProperties { // Most functions return 0 on success // Functions without error message output can be assumed to never fail FFMS_API(void) FFMS_Init(); +FFMS_API(void) FFMS_NoLog(); FFMS_API(VideoBase *) FFMS_CreateVideoSource(const char *SourceFile, int Track, FrameIndex *TrackIndices, const char *PP, int Threads, int SeekMode, char *ErrorMsg, unsigned MsgSize); FFMS_API(AudioBase *) FFMS_CreateAudioSource(const char *SourceFile, int Track, FrameIndex *TrackIndices, char *ErrorMsg, unsigned MsgSize); FFMS_API(void) FFMS_DestroyVideoSource(VideoBase *VB);