tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

FFmpegLog.h (2024B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef __FFmpegLog_h__
      8 #define __FFmpegLog_h__
      9 
     10 #include "mozilla/Logging.h"
     11 
     12 static mozilla::LazyLogModule sFFmpegVideoLog("FFmpegVideo");
     13 static mozilla::LazyLogModule sFFmpegAudioLog("FFmpegAudio");
     14 
     15 #ifdef FFVPX_VERSION
     16 #  define FFMPEG_LOG(str, ...)                               \
     17    MOZ_LOG(mVideoCodec ? sFFmpegVideoLog : sFFmpegAudioLog, \
     18            mozilla::LogLevel::Debug, ("FFVPX: " str, ##__VA_ARGS__))
     19 #  define FFMPEGV_LOG(str, ...)                        \
     20    MOZ_LOG(sFFmpegVideoLog, mozilla::LogLevel::Debug, \
     21            ("FFVPX: " str, ##__VA_ARGS__))
     22 #  define FFMPEGA_LOG(str, ...)                        \
     23    MOZ_LOG(sFFmpegAudioLog, mozilla::LogLevel::Debug, \
     24            ("FFVPX: " str, ##__VA_ARGS__))
     25 #  define FFMPEGP_LOG(str, ...) \
     26    MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, ("FFVPX: " str, ##__VA_ARGS__))
     27 #else
     28 #  define FFMPEG_LOG(str, ...)                               \
     29    MOZ_LOG(mVideoCodec ? sFFmpegVideoLog : sFFmpegAudioLog, \
     30            mozilla::LogLevel::Debug, ("FFMPEG: " str, ##__VA_ARGS__))
     31 #  define FFMPEGV_LOG(str, ...)                        \
     32    MOZ_LOG(sFFmpegVideoLog, mozilla::LogLevel::Debug, \
     33            ("FFMPEG: " str, ##__VA_ARGS__))
     34 #  define FFMPEGA_LOG(str, ...)                        \
     35    MOZ_LOG(sFFmpegAudioLog, mozilla::LogLevel::Debug, \
     36            ("FFMPEG: " str, ##__VA_ARGS__))
     37 #  define FFMPEGP_LOG(str, ...) \
     38    MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, ("FFMPEG: " str, ##__VA_ARGS__))
     39 #endif
     40 
     41 #define FFMPEG_LOGV(...)                                   \
     42  MOZ_LOG(mVideoCodec ? sFFmpegVideoLog : sFFmpegAudioLog, \
     43          mozilla::LogLevel::Verbose, (__VA_ARGS__))
     44 
     45 #endif  // __FFmpegLog_h__