jsonwang 3 gadi atpakaļ
vecāks
revīzija
3bd376c5de
36 mainītis faili ar 153 papildinājumiem un 187 dzēšanām
  1. 3 11
      BFFFmpeglib.podspec
  2. 12 12
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/avcodec.h
  3. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/avdct.h
  4. 2 2
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/dv_profile.h
  5. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/mediacodec.h
  6. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/qsv.h
  7. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/vaapi.h
  8. 2 2
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/vdpau.h
  9. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/version.h
  10. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/videotoolbox.h
  11. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/xvmc.h
  12. 4 4
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavdevice/avdevice.h
  13. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavdevice/version.h
  14. 9 9
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavfilter/avfilter.h
  15. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavfilter/version.h
  16. 4 4
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavformat/avformat.h
  17. 4 4
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavformat/avio.h
  18. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavformat/version.h
  19. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavutil/bswap.h
  20. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavutil/common.h
  21. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavutil/intreadwrite.h
  22. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libavutil/pixfmt.h
  23. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libpostproc/version.h
  24. 4 4
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libswresample/swresample.h
  25. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libswresample/version.h
  26. 3 3
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libswscale/swscale.h
  27. 1 1
      BFFFmpeglib/vendores/FFmpeg-iOS/include/libswscale/version.h
  28. 2 2
      Example/BFFFmpeglib.xcodeproj/project.pbxproj
  29. BIN
      Example/BFFFmpeglib.xcworkspace/xcuserdata/ak.xcuserdatad/UserInterfaceState.xcuserstate
  30. 9 9
      Example/BFFFmpeglib/BFAVParseHandler.h
  31. 41 41
      Example/BFFFmpeglib/BFAVParseHandler.mm
  32. 2 0
      Example/BFFFmpeglib/BFFFMPEGLIBViewController.m
  33. 13 0
      Example/BFFFmpeglib/BFMediaLog.h
  34. 1 1
      Example/BFFFmpeglib/BFVideoDecoder.h
  35. 21 22
      Example/BFFFmpeglib/BFVideoDecoder.mm
  36. 0 40
      Example/BFFFmpeglib/log4cplus.h

+ 3 - 11
BFFFmpeglib.podspec

@@ -26,23 +26,15 @@ TODO: Add long description of the pod here.
   s.license          = { :type => 'MIT', :file => 'LICENSE' }
   s.author           = { '287971051@qq.com' => '287971051@qq.com' }
   s.source           = { :git => 'https://git.yishihui.com/iOS/BFFFmpeglib.git', :tag => s.version.to_s }
-  
-  s.ios.deployment_target = '9.0'
-#  s.static_framework = true
 
+  s.ios.deployment_target = '9.0'
   s.vendored_libraries = 'BFFFmpeglib/vendores/FFmpeg-iOS/lib/*.a'
-
-#  s.source_files        = 'BFFFmpeglib/vendores/FFmpeg-iOS/include/**/*.h'
-  s.public_header_files = 'BFFFmpeglib/vendores/FFmpeg-iOS/include/**/*.h'
+  s.source_files        = 'BFFFmpeglib/vendores/FFmpeg-iOS/include/**/*.h'
   #保持目录结构
-  s.header_mappings_dir = 'BFFFmpeglib/vendores/FFmpeg-iOS/include'
+ s.header_mappings_dir = 'BFFFmpeglib/vendores/FFmpeg-iOS/include'
 #  s.user_target_xcconfig = { 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES' }
 
   s.libraries = 'bz2', 'iconv', 'z'
   s.frameworks = 'AudioToolbox', 'CoreMedia', 'VideoToolbox', 'AVFoundation'
- 
 
-  # s.public_header_files = 'Pod/Classes/**/*.h'
-  # s.frameworks = 'UIKit', 'MapKit'
-  # s.dependency 'AFNetworking', '~> 2.3'
 end

+ 12 - 12
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/avcodec.h

@@ -28,18 +28,18 @@
  */
 
 #include <errno.h>
-#include "libavutil/samplefmt.h"
-#include "libavutil/attributes.h"
-#include "libavutil/avutil.h"
-#include "libavutil/buffer.h"
-#include "libavutil/cpu.h"
-#include "libavutil/channel_layout.h"
-#include "libavutil/dict.h"
-#include "libavutil/frame.h"
-#include "libavutil/hwcontext.h"
-#include "libavutil/log.h"
-#include "libavutil/pixfmt.h"
-#include "libavutil/rational.h"
+#include "samplefmt.h"
+#include "attributes.h"
+#include "avutil.h"
+#include "buffer.h"
+#include "cpu.h"
+#include "channel_layout.h"
+#include "dict.h"
+#include "frame.h"
+#include "hwcontext.h"
+#include "log.h"
+#include "pixfmt.h"
+#include "rational.h"
 
 #include "version.h"
 

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/avdct.h

@@ -19,7 +19,7 @@
 #ifndef AVCODEC_AVDCT_H
 #define AVCODEC_AVDCT_H
 
-#include "libavutil/opt.h"
+#include "opt.h"
 
 /**
  * AVDCT context.

+ 2 - 2
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/dv_profile.h

@@ -21,8 +21,8 @@
 
 #include <stdint.h>
 
-#include "libavutil/pixfmt.h"
-#include "libavutil/rational.h"
+#include "pixfmt.h"
+#include "rational.h"
 #include "avcodec.h"
 
 /* minimum number of bytes to read from a DV stream in order to

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/mediacodec.h

@@ -23,7 +23,7 @@
 #ifndef AVCODEC_MEDIACODEC_H
 #define AVCODEC_MEDIACODEC_H
 
-#include "libavcodec/avcodec.h"
+#include "avcodec.h"
 
 /**
  * This structure holds a reference to a android/view/Surface object that will

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/qsv.h

@@ -23,7 +23,7 @@
 
 #include <mfx/mfxvideo.h>
 
-#include "libavutil/buffer.h"
+#include "buffer.h"
 
 /**
  * This struct is used for communicating QSV parameters between libavcodec and

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/vaapi.h

@@ -31,7 +31,7 @@
  */
 
 #include <stdint.h>
-#include "libavutil/attributes.h"
+#include "attributes.h"
 #include "version.h"
 
 #if FF_API_STRUCT_VAAPI_CONTEXT

+ 2 - 2
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/vdpau.h

@@ -51,8 +51,8 @@
 
 #include <vdpau/vdpau.h>
 
-#include "libavutil/avconfig.h"
-#include "libavutil/attributes.h"
+#include "avconfig.h"
+#include "attributes.h"
 
 #include "avcodec.h"
 #include "version.h"

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/version.h

@@ -25,7 +25,7 @@
  * Libavcodec version macros.
  */
 
-#include "libavutil/version.h"
+#include "version.h"
 
 #define LIBAVCODEC_VERSION_MAJOR  58
 #define LIBAVCODEC_VERSION_MINOR  35

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/videotoolbox.h

@@ -35,7 +35,7 @@
 #include <VideoToolbox/VideoToolbox.h>
 #undef Picture
 
-#include "libavcodec/avcodec.h"
+#include "avcodec.h"
 
 /**
  * This struct holds all the information that needs to be passed

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavcodec/xvmc.h

@@ -29,7 +29,7 @@
 
 #include <X11/extensions/XvMC.h>
 
-#include "libavutil/attributes.h"
+#include "attributes.h"
 #include "version.h"
 #include "avcodec.h"
 

+ 4 - 4
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavdevice/avdevice.h

@@ -45,10 +45,10 @@
  * @{
  */
 
-#include "libavutil/log.h"
-#include "libavutil/opt.h"
-#include "libavutil/dict.h"
-#include "libavformat/avformat.h"
+#include "log.h"
+#include "opt.h"
+#include "dict.h"
+#include "avformat.h"
 
 /**
  * Return the LIBAVDEVICE_VERSION_INT constant.

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavdevice/version.h

@@ -25,7 +25,7 @@
  * Libavdevice version macros
  */
 
-#include "libavutil/version.h"
+#include "version.h"
 
 #define LIBAVDEVICE_VERSION_MAJOR  58
 #define LIBAVDEVICE_VERSION_MINOR   5

+ 9 - 9
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavfilter/avfilter.h

@@ -37,15 +37,15 @@
 
 #include <stddef.h>
 
-#include "libavutil/attributes.h"
-#include "libavutil/avutil.h"
-#include "libavutil/buffer.h"
-#include "libavutil/dict.h"
-#include "libavutil/frame.h"
-#include "libavutil/log.h"
-#include "libavutil/samplefmt.h"
-#include "libavutil/pixfmt.h"
-#include "libavutil/rational.h"
+#include "attributes.h"
+#include "avutil.h"
+#include "buffer.h"
+#include "dict.h"
+#include "frame.h"
+#include "log.h"
+#include "samplefmt.h"
+#include "pixfmt.h"
+#include "rational.h"
 
 #include "libavfilter/version.h"
 

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavfilter/version.h

@@ -27,7 +27,7 @@
  * Libavfilter version macros
  */
 
-#include "libavutil/version.h"
+#include "version.h"
 
 #define LIBAVFILTER_VERSION_MAJOR   7
 #define LIBAVFILTER_VERSION_MINOR  40

+ 4 - 4
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavformat/avformat.h

@@ -316,12 +316,12 @@
 
 #include <time.h>
 #include <stdio.h>  /* FILE */
-#include "libavcodec/avcodec.h"
-#include "libavutil/dict.h"
-#include "libavutil/log.h"
+#include "avcodec.h"
+#include "dict.h"
+#include "log.h"
 
 #include "avio.h"
-#include "libavformat/version.h"
+#include "version.h"
 
 struct AVFormatContext;
 

+ 4 - 4
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavformat/avio.h

@@ -28,11 +28,11 @@
 
 #include <stdint.h>
 
-#include "libavutil/common.h"
-#include "libavutil/dict.h"
-#include "libavutil/log.h"
+#include "common.h"
+#include "dict.h"
+#include "log.h"
 
-#include "libavformat/version.h"
+#include "version.h"
 
 /**
  * Seeking works like for a local file.

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavformat/version.h

@@ -27,7 +27,7 @@
  * Libavformat version macros
  */
 
-#include "libavutil/version.h"
+#include "version.h"
 
 // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
 // Also please add any ticket numbers that you believe might be affected here

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavutil/bswap.h

@@ -27,7 +27,7 @@
 #define AVUTIL_BSWAP_H
 
 #include <stdint.h>
-#include "libavutil/avconfig.h"
+#include "avconfig.h"
 #include "attributes.h"
 
 #ifdef HAVE_AV_CONFIG_H

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavutil/common.h

@@ -42,7 +42,7 @@
 #include "attributes.h"
 #include "macros.h"
 #include "version.h"
-#include "libavutil/avconfig.h"
+#include "avconfig.h"
 
 #if AV_HAVE_BIGENDIAN
 #   define AV_NE(be, le) (be)

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavutil/intreadwrite.h

@@ -20,7 +20,7 @@
 #define AVUTIL_INTREADWRITE_H
 
 #include <stdint.h>
-#include "libavutil/avconfig.h"
+#include "avconfig.h"
 #include "attributes.h"
 #include "bswap.h"
 

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libavutil/pixfmt.h

@@ -26,7 +26,7 @@
  * pixel format definitions
  */
 
-#include "libavutil/avconfig.h"
+#include "avconfig.h"
 #include "version.h"
 
 #define AVPALETTE_SIZE 1024

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libpostproc/version.h

@@ -26,7 +26,7 @@
  * Libpostproc version macros
  */
 
-#include "libavutil/avutil.h"
+#include "avutil.h"
 
 #define LIBPOSTPROC_VERSION_MAJOR  55
 #define LIBPOSTPROC_VERSION_MINOR   3

+ 4 - 4
BFFFmpeglib/vendores/FFmpeg-iOS/include/libswresample/swresample.h

@@ -120,11 +120,11 @@
  */
 
 #include <stdint.h>
-#include "libavutil/channel_layout.h"
-#include "libavutil/frame.h"
-#include "libavutil/samplefmt.h"
+#include "channel_layout.h"
+#include "frame.h"
+#include "samplefmt.h"
 
-#include "libswresample/version.h"
+#include "version.h"
 
 /**
  * @name Option constants

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libswresample/version.h

@@ -26,7 +26,7 @@
  * Libswresample version macros
  */
 
-#include "libavutil/avutil.h"
+#include "avutil.h"
 
 #define LIBSWRESAMPLE_VERSION_MAJOR   3
 #define LIBSWRESAMPLE_VERSION_MINOR   3

+ 3 - 3
BFFFmpeglib/vendores/FFmpeg-iOS/include/libswscale/swscale.h

@@ -29,9 +29,9 @@
 
 #include <stdint.h>
 
-#include "libavutil/avutil.h"
-#include "libavutil/log.h"
-#include "libavutil/pixfmt.h"
+#include "avutil.h"
+#include "log.h"
+#include "pixfmt.h"
 #include "version.h"
 
 /**

+ 1 - 1
BFFFmpeglib/vendores/FFmpeg-iOS/include/libswscale/version.h

@@ -24,7 +24,7 @@
  * swscale version macros
  */
 
-#include "libavutil/version.h"
+#include "version.h"
 
 #define LIBSWSCALE_VERSION_MAJOR   5
 #define LIBSWSCALE_VERSION_MINOR   3

+ 2 - 2
Example/BFFFmpeglib.xcodeproj/project.pbxproj

@@ -42,7 +42,7 @@
 		028613EC64882A8EF2BF91F6 /* Pods-BFFFmpeglib_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BFFFmpeglib_Example.release.xcconfig"; path = "Target Support Files/Pods-BFFFmpeglib_Example/Pods-BFFFmpeglib_Example.release.xcconfig"; sourceTree = "<group>"; };
 		3532E04944359B3B1BEA3D65 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
 		3C7E5C18DBEBDE7B219EA035 /* Pods-BFFFmpeglib_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BFFFmpeglib_Tests.release.xcconfig"; path = "Target Support Files/Pods-BFFFmpeglib_Tests/Pods-BFFFmpeglib_Tests.release.xcconfig"; sourceTree = "<group>"; };
-		41424C602784E54F0060FCC1 /* log4cplus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = log4cplus.h; sourceTree = "<group>"; };
+		411B51592799993C00AD0DF9 /* BFMediaLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFMediaLog.h; sourceTree = "<group>"; };
 		41424C612784F4B40060FCC1 /* BFAVParseHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BFAVParseHandler.h; sourceTree = "<group>"; };
 		41424C622784F4B40060FCC1 /* BFAVParseHandler.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = BFAVParseHandler.mm; sourceTree = "<group>"; };
 		41424C642784F5B70060FCC1 /* BFVideoDecoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BFVideoDecoder.h; sourceTree = "<group>"; };
@@ -150,7 +150,7 @@
 		6003F593195388D20070C39A /* Example for BFFFmpeglib */ = {
 			isa = PBXGroup;
 			children = (
-				41424C602784E54F0060FCC1 /* log4cplus.h */,
+				411B51592799993C00AD0DF9 /* BFMediaLog.h */,
 				41424C612784F4B40060FCC1 /* BFAVParseHandler.h */,
 				41424C622784F4B40060FCC1 /* BFAVParseHandler.mm */,
 				6003F59C195388D20070C39A /* BFFFMPEGLIBAppDelegate.h */,

BIN
Example/BFFFmpeglib.xcworkspace/xcuserdata/ak.xcuserdatad/UserInterfaceState.xcuserstate


+ 9 - 9
Example/BFFFmpeglib/BFAVParseHandler.h

@@ -27,11 +27,11 @@ extern "C" {
 NS_ASSUME_NONNULL_BEGIN
 
 typedef enum : NSUInteger {
-    XDXH264EncodeFormat,
-    XDXH265EncodeFormat,
-} XDXVideoEncodeFormat;
+    BFH264EncodeFormat,
+    BFH265EncodeFormat,
+} BFVideoEncodeFormat;
 
-struct XDXParseVideoDataInfo {
+struct BFParseVideoDataInfo {
     uint8_t                 *data;
     int                     dataSize;
     uint8_t                 *extraData;
@@ -41,10 +41,10 @@ struct XDXParseVideoDataInfo {
     int                     videoRotate;
     int                     fps;
     CMSampleTimingInfo      timingInfo;
-    XDXVideoEncodeFormat    videoFormat;
+    BFVideoEncodeFormat    videoFormat;
 };
 
-struct XDXParseAudioDataInfo {
+struct BFParseAudioDataInfo {
     uint8_t     *data;
     int         dataSize;
     int         channel;
@@ -52,7 +52,7 @@ struct XDXParseAudioDataInfo {
     Float64     pts;
 };
 
-@interface XDXAVParseHandler : NSObject
+@interface BFAVParseHandler : NSObject
 
 
 /**
@@ -68,11 +68,11 @@ struct XDXParseAudioDataInfo {
  Start parse file content
  
  Note:
- 1.You could get the audio / video infomation by `XDXParseVideoDataInfo` ,  `XDXParseAudioDataInfo`.
+ 1.You could get the audio / video infomation by `BFParseVideoDataInfo` ,  `BFParseAudioDataInfo`.
  2.You could get the audio / video infomation by `AVPacket`.
  @param handler get some parse information.
  */
-- (void)startParseWithCompletionHandler:(void (^)(BOOL isVideoFrame, BOOL isFinish, struct XDXParseVideoDataInfo *videoInfo, struct XDXParseAudioDataInfo *audioInfo))handler;
+- (void)startParseWithCompletionHandler:(void (^)(BOOL isVideoFrame, BOOL isFinish, struct BFParseVideoDataInfo *videoInfo, struct BFParseAudioDataInfo *audioInfo))handler;
 - (void)startParseGetAVPackeWithCompletionHandler:(void (^)(BOOL isVideoFrame, BOOL isFinish, AVPacket packet))handler;
 
 

+ 41 - 41
Example/BFFFmpeglib/BFAVParseHandler.mm

@@ -8,20 +8,20 @@
 
 #import "BFAVParseHandler.h"
 #import <UIKit/UIKit.h>
-#include "log4cplus.h"
+#include "BFMediaLog.h"
 
 #pragma mark - Global Var
 
 #define kModuleName "BFAVParseHandler"
 
-static const int kXDXParseSupportMaxFps     = 60;
-static const int kXDXParseFpsOffSet         = 5;
-static const int kXDXParseWidth1920         = 1920;
-static const int kXDXParseHeight1080        = 1080;
-static const int kXDXParseSupportMaxWidth   = 3840;
-static const int kXDXParseSupportMaxHeight  = 2160;
+static const int kBFParseSupportMaxFps     = 60;
+static const int kBFParseFpsOffSet         = 5;
+static const int kBFParseWidth1920         = 1920;
+static const int kBFParseHeight1080        = 1080;
+static const int kBFParseSupportMaxWidth   = 3840;
+static const int kBFParseSupportMaxHeight  = 2160;
 
-@interface XDXAVParseHandler ()
+@interface BFAVParseHandler ()
 {
     /*  Flag  */
     BOOL m_isStopParse;
@@ -40,7 +40,7 @@ static const int kXDXParseSupportMaxHeight  = 2160;
 
 @end
 
-@implementation XDXAVParseHandler
+@implementation BFAVParseHandler
 
 #pragma mark - C Function
 static int GetAVStreamFPSTimeBase(AVStream *st) {
@@ -77,7 +77,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
 }
 
 #pragma mark - public methods
-- (void)startParseWithCompletionHandler:(void (^)(BOOL isVideoFrame, BOOL isFinish, struct XDXParseVideoDataInfo *videoInfo, struct XDXParseAudioDataInfo *audioInfo))handler {
+- (void)startParseWithCompletionHandler:(void (^)(BOOL isVideoFrame, BOOL isFinish, struct BFParseVideoDataInfo *videoInfo, struct BFParseAudioDataInfo *audioInfo))handler {
     [self startParseWithFormatContext:m_formatContext
                      videoStreamIndex:m_videoStreamIndex
                      audioStreamIndex:m_audioStreamIndex
@@ -115,7 +115,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
     m_formatContext = [self createFormatContextbyFilePath:path];
     
     if (m_formatContext == NULL) {
-        log4cplus_error(kModuleName, "%s: create format context failed.",__func__);
+        NSLog(@"create format context failed.");
         return;
     }
     
@@ -128,7 +128,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
     m_video_width  = videoStream->codecpar->width;
     m_video_height = videoStream->codecpar->height;
     m_video_fps    = GetAVStreamFPSTimeBase(videoStream);
-    log4cplus_info(kModuleName, "%s: video index:%d, width:%d, height:%d, fps:%d",__func__,m_videoStreamIndex,m_video_width,m_video_height,m_video_fps);
+    NSLog(@"video index:%d, width:%d, height:%d, fps:%d",m_videoStreamIndex,m_video_width,m_video_height,m_video_fps);
     
     BOOL isSupport = [self isSupportVideoStream:videoStream
                                   formatContext:m_formatContext
@@ -136,7 +136,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
                                    sourceHeight:m_video_height
                                       sourceFps:m_video_fps];
     if (!isSupport) {
-        log4cplus_error(kModuleName, "%s: Not support the video stream",__func__);
+        NSLog(@"Not support the video stream");
         return;
     }
     
@@ -150,14 +150,14 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
     isSupport = [self isSupportAudioStream:audioStream
                              formatContext:m_formatContext];
     if (!isSupport) {
-        log4cplus_error(kModuleName, "%s: Not support the audio stream",__func__);
+        NSLog(@"Not support the audio stream");
         return;
     }
 }
 
 - (AVFormatContext *)createFormatContextbyFilePath:(NSString *)filePath {
     if (filePath == nil) {
-        log4cplus_error(kModuleName, "%s: file path is NULL",__func__);
+        NSLog(@"file path is NULL");
         return NULL;
     }
     
@@ -193,7 +193,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
     }
     
     if (avStreamIndex == -1) {
-        log4cplus_error(kModuleName, "%s: Not find video stream",__func__);
+        NSLog(@"Not find video stream");
         return NULL;
     }else {
         return avStreamIndex;
@@ -203,10 +203,10 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
 - (BOOL)isSupportVideoStream:(AVStream *)stream formatContext:(AVFormatContext *)formatContext sourceWidth:(int)sourceWidth sourceHeight:(int)sourceHeight sourceFps:(int)sourceFps {
     if (stream->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {   // Video
         AVCodecID codecID = stream->codecpar->codec_id;
-        log4cplus_info(kModuleName, "%s: Current video codec format is %s",__func__, avcodec_find_decoder(codecID)->name);
+        NSLog(@"Current video codec format is %s", avcodec_find_decoder(codecID)->name);
         // 目前只支持H264、H265(HEVC iOS11)编码格式的视频文件
         if ((codecID != AV_CODEC_ID_H264 && codecID != AV_CODEC_ID_HEVC) || (codecID == AV_CODEC_ID_HEVC && [[UIDevice currentDevice].systemVersion floatValue] < 11.0)) {
-            log4cplus_error(kModuleName, "%s: Not suuport the codec",__func__);
+            NSLog(@"Not suuport the codec");
             return NO;
         }
         
@@ -216,7 +216,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
         if (tag != NULL) {
             int rotate = [[NSString stringWithFormat:@"%s",tag->value] intValue];
             if (rotate != 0 /* && >= iPhone 8P*/) {
-                log4cplus_error(kModuleName, "%s: Not support rotate for device ",__func__);
+               NSLog(@"Not support rotate for device ");
             }
         }
         
@@ -243,32 +243,32 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
          */
         
         // 目前最高支持到60FPS
-        if (sourceFps > kXDXParseSupportMaxFps + kXDXParseFpsOffSet) {
-            log4cplus_error(kModuleName, "%s: Not support the fps",__func__);
+        if (sourceFps > kBFParseSupportMaxFps + kBFParseFpsOffSet) {
+           NSLog(@"Not support the fps");
             return NO;
         }
         
         // 目前最高支持到3840*2160
-        if (sourceWidth > kXDXParseSupportMaxWidth || sourceHeight > kXDXParseSupportMaxHeight) {
-            log4cplus_error(kModuleName, "%s: Not support the resolution",__func__);
+        if (sourceWidth > kBFParseSupportMaxWidth || sourceHeight > kBFParseSupportMaxHeight) {
+           NSLog(@"Not support the resolution");
             return NO;
         }
         
         // 60FPS -> 1080P
-        if (sourceFps > kXDXParseSupportMaxFps - kXDXParseFpsOffSet && (sourceWidth > kXDXParseWidth1920 || sourceHeight > kXDXParseHeight1080)) {
-            log4cplus_error(kModuleName, "%s: Not support the fps and resolution",__func__);
+        if (sourceFps > kBFParseSupportMaxFps - kBFParseFpsOffSet && (sourceWidth > kBFParseWidth1920 || sourceHeight > kBFParseHeight1080)) {
+           NSLog(@"Not support the fps and resolution");
             return NO;
         }
         
         // 30FPS -> 4K
-        if (sourceFps > kXDXParseSupportMaxFps / 2 + kXDXParseFpsOffSet && (sourceWidth >= kXDXParseSupportMaxWidth || sourceHeight >= kXDXParseSupportMaxHeight)) {
-            log4cplus_error(kModuleName, "%s: Not support the fps and resolution",__func__);
+        if (sourceFps > kBFParseSupportMaxFps / 2 + kBFParseFpsOffSet && (sourceWidth >= kBFParseSupportMaxWidth || sourceHeight >= kBFParseSupportMaxHeight)) {
+           NSLog(@"Not support the fps and resolution");
             return NO;
         }
         
         // 6S
-//        if ([[XDXAnywhereTool deviceModelName] isEqualToString:@"iPhone 6s"] && sourceFps > kXDXParseSupportMaxFps - kXDXParseFpsOffSet && (sourceWidth >= kXDXParseWidth1920  || sourceHeight >= kXDXParseHeight1080)) {
-//            log4cplus_error(kModuleName, "%s: Not support the fps and resolution",__func__);
+//        if ([[BFAnywhereTool deviceModelName] isEqualToString:@"iPhone 6s"] && sourceFps > kBFParseSupportMaxFps - kBFParseFpsOffSet && (sourceWidth >= kBFParseWidth1920  || sourceHeight >= kBFParseHeight1080)) {
+//           NSLog(@"Not support the fps and resolution");
 //            return NO;
 //        }
         return YES;
@@ -281,10 +281,10 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
 - (BOOL)isSupportAudioStream:(AVStream *)stream formatContext:(AVFormatContext *)formatContext {
     if (stream->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
         AVCodecID codecID = stream->codecpar->codec_id;
-        log4cplus_info(kModuleName, "%s: Current audio codec format is %s",__func__, avcodec_find_decoder(codecID)->name);
+        NSLog(@" Current audio codec format is %s", avcodec_find_decoder(codecID)->name);
         // 本项目只支持AAC格式的音频
         if (codecID != AV_CODEC_ID_AAC) {
-            log4cplus_error(kModuleName, "%s: Only support AAC format for the demo.",__func__);
+           NSLog(@"Only support AAC format for the demo.");
             return NO;
         }
         
@@ -295,7 +295,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
 }
 
 #pragma mark Start Parse
-- (void)startParseWithFormatContext:(AVFormatContext *)formatContext videoStreamIndex:(int)videoStreamIndex audioStreamIndex:(int)audioStreamIndex completionHandler:(void (^)(BOOL isVideoFrame, BOOL isFinish, struct XDXParseVideoDataInfo *videoInfo, struct XDXParseAudioDataInfo *audioInfo))handler{
+- (void)startParseWithFormatContext:(AVFormatContext *)formatContext videoStreamIndex:(int)videoStreamIndex audioStreamIndex:(int)audioStreamIndex completionHandler:(void (^)(BOOL isVideoFrame, BOOL isFinish, struct BFParseVideoDataInfo *videoInfo, struct BFParseAudioDataInfo *audioInfo))handler{
     m_isStopParse = NO;
     
     dispatch_queue_t parseQueue = dispatch_queue_create("parse_queue", DISPATCH_QUEUE_SERIAL);
@@ -317,12 +317,12 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
             int size = av_read_frame(formatContext, &packet);
             if (size < 0 || packet.size < 0) {
                 handler(YES, YES, NULL, NULL);
-                log4cplus_error(kModuleName, "%s: Parse finish",__func__);
+               NSLog(@"Parse finish");
                 break;
             }
             
             if (packet.stream_index == videoStreamIndex) {
-                XDXParseVideoDataInfo videoInfo = {0};
+                BFParseVideoDataInfo videoInfo = {0};
                 
                 // get the rotation angle of video
                 AVDictionaryEntry *tag = NULL;
@@ -346,7 +346,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
                 }
                 
                 if (videoInfo.videoRotate != 0 /* &&  <= iPhone 8*/) {
-                    log4cplus_error(kModuleName, "%s: Not support the angle",__func__);
+                   NSLog(@"Not support the angle");
                     break;
                 }
                 
@@ -357,10 +357,10 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
                 static char filter_name[32];
                 if (formatContext->streams[videoStreamIndex]->codecpar->codec_id == AV_CODEC_ID_H264) {
                     strncpy(filter_name, "h264_mp4toannexb", 32);
-                    videoInfo.videoFormat = XDXH264EncodeFormat;
+                    videoInfo.videoFormat = BFH264EncodeFormat;
                 } else if (formatContext->streams[videoStreamIndex]->codecpar->codec_id == AV_CODEC_ID_HEVC) {
                     strncpy(filter_name, "hevc_mp4toannexb", 32);
-                    videoInfo.videoFormat = XDXH265EncodeFormat;
+                    videoInfo.videoFormat = BFH265EncodeFormat;
                 } else {
                     break;
                 }
@@ -381,7 +381,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
                 }
                 av_bitstream_filter_filter(self->m_bitFilterContext, formatContext->streams[videoStreamIndex]->codec, NULL, &new_packet.data, &new_packet.size, packet.data, packet.size, 0);
                 
-                //log4cplus_info(kModuleName, "%s: extra data : %s , size : %d",__func__,formatContext->streams[videoStreamIndex]->codec->extradata,formatContext->streams[videoStreamIndex]->codec->extradata_size);
+                //NSLog(@" extra data : %s , size : %d",formatContext->streams[videoStreamIndex]->codec->extradata,formatContext->streams[videoStreamIndex]->codec->extradata_size);
                 
                 CMSampleTimingInfo timingInfo;
                 CMTime presentationTimeStamp     = kCMTimeInvalid;
@@ -410,7 +410,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
             }
             
             if (packet.stream_index == audioStreamIndex) {
-                XDXParseAudioDataInfo audioInfo = {0};
+                BFParseAudioDataInfo audioInfo = {0};
                 audioInfo.data = (uint8_t *)malloc(packet.size);
                 memcpy(audioInfo.data, packet.data, packet.size);
                 audioInfo.dataSize = packet.size;
@@ -447,7 +447,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
             int size = av_read_frame(formatContext, &packet);
             if (size < 0 || packet.size < 0) {
                 handler(YES, YES, packet);
-                log4cplus_error(kModuleName, "%s: Parse finish",__func__);
+                NSLog(@"Parse finish");
                 break;
             }
             
@@ -466,7 +466,7 @@ static int GetAVStreamFPSTimeBase(AVStream *st) {
 
 
 - (void)freeAllResources {
-    log4cplus_error(kModuleName, "%s: Free all resources !",__func__);
+    NSLog(@"Free all resources !");
     if (m_formatContext) {
         avformat_close_input(&m_formatContext);
         m_formatContext = NULL;

+ 2 - 0
Example/BFFFmpeglib/BFFFMPEGLIBViewController.m

@@ -7,6 +7,7 @@
 //
 
 #import "BFFFMPEGLIBViewController.h"
+#import "BFMediaLog.h"
 
 @interface BFFFMPEGLIBViewController ()
 
@@ -17,6 +18,7 @@
 - (void)viewDidLoad
 {
     [super viewDidLoad];
+    NSLog(@"ssssss");
 	// Do any additional setup after loading the view, typically from a nib.
 }
 

+ 13 - 0
Example/BFFFmpeglib/BFMediaLog.h

@@ -0,0 +1,13 @@
+//
+//  BFMediaLog.h
+//  BFMediaKit
+//
+//  Created by ak on 2022/1/13.
+//
+ 
+#ifdef DEBUG
+#   define NSLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
+#else
+#   define NSLog(...)
+#endif
+ 

+ 1 - 1
Example/BFFFmpeglib/BFVideoDecoder.h

@@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 /// 开始解码
 /// @param videoInfo 视频帧信息
-- (void)startDecodeVideoData:(struct XDXParseVideoDataInfo *)videoInfo;
+- (void)startDecodeVideoData:(struct BFParseVideoDataInfo *)videoInfo;
 
 /// 结束解码
 - (void)stopDecoder;

+ 21 - 22
Example/BFFFmpeglib/BFVideoDecoder.mm

@@ -9,8 +9,7 @@
 #import "BFVideoDecoder.h"
 #import <VideoToolbox/VideoToolbox.h>
 #import <pthread.h>
-#include "log4cplus.h"
-#define kModuleName "BFVideoDecoder"
+#include "BFMediaLog.h"
 
 typedef struct {
     CVPixelBufferRef outputPixelbuffer;
@@ -18,7 +17,7 @@ typedef struct {
     Float64          pts;
     int              fps;
     int              source_index;
-} XDXDecodeVideoInfo;
+} BFDecodeVideoInfo;
 
 typedef struct {
     uint8_t *vps;
@@ -34,14 +33,14 @@ typedef struct {
     int r_pps_size;
     
     Float64 last_decode_pts;
-} XDXDecoderInfo;
+} BFDecoderInfo;
 
 @interface BFVideoDecoder ()
 {
     VTDecompressionSessionRef   _decoderSession;
     CMVideoFormatDescriptionRef _decoderFormatDescription;
 
-    XDXDecoderInfo  _decoderInfo;
+    BFDecoderInfo  _decoderInfo;
     pthread_mutex_t _decoder_lock;
     
     uint8_t *_lastExtraData;
@@ -63,10 +62,10 @@ typedef struct {
 /// @param presentationTimeStamp 图像出现的时间戳
 /// @param presentationDuration 图像的持续时间
 static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFrameRefCon, OSStatus status, VTDecodeInfoFlags infoFlags, CVImageBufferRef pixelBuffer, CMTime presentationTimeStamp, CMTime presentationDuration) {
-    XDXDecodeVideoInfo *sourceRef = (XDXDecodeVideoInfo *)sourceFrameRefCon;
+    BFDecodeVideoInfo *sourceRef = (BFDecodeVideoInfo *)sourceFrameRefCon;
     NSLog(@"2827解码pts=%f 完成时间为: %f",sourceRef->pts,[[NSDate date] timeIntervalSince1970]);
     if (pixelBuffer == NULL || status != noErr) {
-        log4cplus_error(kModuleName, "%s: pixelbuffer is NULL status = %d",__func__,status);
+        NSLog(@" pixelbuffer is NULL status = %d",status);
         if (sourceRef) {
             free(sourceRef);
         }
@@ -119,7 +118,7 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
 }
 
 #pragma mark - Public
-- (void)startDecodeVideoData:(XDXParseVideoDataInfo *)videoInfo {
+- (void)startDecodeVideoData:(BFParseVideoDataInfo *)videoInfo {
     // get extra data
     if (videoInfo->extraData && videoInfo->extraDataSize) {
         uint8_t *extraData = videoInfo->extraData;
@@ -130,7 +129,7 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
                                                                lastData:&_lastExtraData
                                                                lastSize:&_lastExtraDataSize];
         if (isNeedUpdate) {
-            log4cplus_error(kModuleName, "%s: update extra data",__func__);
+            NSLog(@" update extra data");
             
             [self getNALUInfoWithVideoFormat:videoInfo->videoFormat
                                    extraData:extraData
@@ -181,13 +180,13 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
 #pragma mark - private methods
 
 #pragma mark Create / Destory decoder
-- (VTDecompressionSessionRef)createDecoderWithVideoInfo:(XDXParseVideoDataInfo *)videoInfo videoDescRef:(CMVideoFormatDescriptionRef *)videoDescRef videoFormat:(OSType)videoFormat lock:(pthread_mutex_t)lock callback:(VTDecompressionOutputCallback)callback decoderInfo:(XDXDecoderInfo)decoderInfo {
+- (VTDecompressionSessionRef)createDecoderWithVideoInfo:(BFParseVideoDataInfo *)videoInfo videoDescRef:(CMVideoFormatDescriptionRef *)videoDescRef videoFormat:(OSType)videoFormat lock:(pthread_mutex_t)lock callback:(VTDecompressionOutputCallback)callback decoderInfo:(BFDecoderInfo)decoderInfo {
     pthread_mutex_lock(&lock);
     
     // 1.根据 sps,pps 设置解码参数 区分264 265
     OSStatus status;
     // H264 格式
-    if (videoInfo->videoFormat == XDXH264EncodeFormat) {
+    if (videoInfo->videoFormat == BFH264EncodeFormat) {
         // 存放 sps 和 pps 信息的数组
         const uint8_t *const parameterSetPointers[2] = {decoderInfo.sps, decoderInfo.f_pps};
         
@@ -207,7 +206,7 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
                                                                      4,
                                                                      videoDescRef);
     // H265 格式
-    }else if (videoInfo->videoFormat == XDXH265EncodeFormat) {
+    }else if (videoInfo->videoFormat == BFH265EncodeFormat) {
         //有 PPS
         if (decoderInfo.r_pps_size == 0) {
             const uint8_t *const parameterSetPointers[3] = {decoderInfo.vps, decoderInfo.sps, decoderInfo.f_pps};
@@ -222,7 +221,7 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
                                                                              videoDescRef);
             } else {
                 status = -1;
-                log4cplus_error(kModuleName, "%s: System version is too low!",__func__);
+                NSLog(@" System version is too low!");
             }
         } else {
             const uint8_t *const parameterSetPointers[4] = {decoderInfo.vps, decoderInfo.sps, decoderInfo.f_pps, decoderInfo.r_pps};
@@ -237,7 +236,7 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
                                                                              videoDescRef);
             } else {
                 status = -1;
-                log4cplus_error(kModuleName, "%s: System version is too low!",__func__);
+                NSLog(@" System version is too low!");
             }
         }
     }else {
@@ -245,7 +244,7 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
     }
     
     if (status != noErr) {
-        log4cplus_error(kModuleName, "%s: NALU header error !",__func__);
+        NSLog(@" NALU header error !");
         pthread_mutex_unlock(&lock);
         [self destoryDecoder];
         return NULL;
@@ -282,7 +281,7 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
     CFRelease(attrs);
     pthread_mutex_unlock(&lock);
     if (status != noErr) {
-        log4cplus_error(kModuleName, "%s: Create decoder failed",__func__);
+        NSLog(@" Create decoder failed");
         [self destoryDecoder];
         return NULL;
     }
@@ -384,7 +383,7 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
     memcpy(*originDataRef, newData, size);
 }
 
-- (void)getNALUInfoWithVideoFormat:(XDXVideoEncodeFormat)videoFormat extraData:(uint8_t *)extraData extraDataSize:(int)extraDataSize decoderInfo:(XDXDecoderInfo *)decoderInfo {
+- (void)getNALUInfoWithVideoFormat:(BFVideoEncodeFormat)videoFormat extraData:(uint8_t *)extraData extraDataSize:(int)extraDataSize decoderInfo:(BFDecoderInfo *)decoderInfo {
 
     uint8_t *data = extraData;
     int      size = extraDataSize;
@@ -398,14 +397,14 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
     for (int i = 0; i < size; i ++) {
         if (i >= 3) {
             if (data[i] == 0x01 && data[i - 1] == 0x00 && data[i - 2] == 0x00 && data[i - 3] == 0x00) {
-                if (videoFormat == XDXH264EncodeFormat) {
+                if (videoFormat == BFH264EncodeFormat) {
                     if (startCodeSPSIndex == 0) {
                         startCodeSPSIndex = i;
                     }
                     if (i > startCodeSPSIndex) {
                         startCodeFPPSIndex = i;
                     }
-                }else if (videoFormat == XDXH265EncodeFormat) {
+                }else if (videoFormat == BFH265EncodeFormat) {
                     if (startCodeVPSIndex == 0) {
                         startCodeVPSIndex = i;
                         continue;
@@ -429,7 +428,7 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
     int spsSize = startCodeFPPSIndex - startCodeSPSIndex - 4;
     decoderInfo->sps_size = spsSize;
     
-    if (videoFormat == XDXH264EncodeFormat) {
+    if (videoFormat == BFH264EncodeFormat) {
         int f_ppsSize = size - (startCodeFPPSIndex + 1);
         decoderInfo->f_pps_size = f_ppsSize;
         
@@ -485,7 +484,7 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
 }
 
 #pragma mark 开始解码
-- (void)startDecode:(XDXParseVideoDataInfo *)videoInfo session:(VTDecompressionSessionRef)session lock:(pthread_mutex_t)lock {
+- (void)startDecode:(BFParseVideoDataInfo *)videoInfo session:(VTDecompressionSessionRef)session lock:(pthread_mutex_t)lock {
     pthread_mutex_lock(&lock);
     uint8_t *data  = videoInfo->data;
     int     size   = videoInfo->dataSize;
@@ -495,7 +494,7 @@ static void VideoDecoderCallback(void *decompressionOutputRefCon, void *sourceFr
     uint8_t *tempData = (uint8_t *)malloc(size);
     memcpy(tempData, data, size);
     
-    XDXDecodeVideoInfo *sourceRef = (XDXDecodeVideoInfo *)malloc(sizeof(XDXParseVideoDataInfo));
+    BFDecodeVideoInfo *sourceRef = (BFDecodeVideoInfo *)malloc(sizeof(BFParseVideoDataInfo));
     sourceRef->outputPixelbuffer  = NULL;
     sourceRef->rotate             = rotate;
     sourceRef->pts                = videoInfo->pts;

+ 0 - 40
Example/BFFFmpeglib/log4cplus.h

@@ -1,40 +0,0 @@
-
-#include <syslog.h>
-#ifndef XDX_IOS
-#define XDX_IOS
-#endif
-
-#define kXDXDebugMode
-
-#ifdef kXDXDebugMode
-
-#define log4cplus_fatal(category, logFmt, ...) \
-syslog(LOG_CRIT, "%s:" logFmt, category,##__VA_ARGS__); \
-
-#define log4cplus_error(category, logFmt, ...) \
-syslog(LOG_ERR, "%s:" logFmt, category,##__VA_ARGS__); \
-
-#define log4cplus_warn(category, logFmt, ...) \
-syslog(LOG_WARNING, "%s:" logFmt, category,##__VA_ARGS__); \
-
-#define log4cplus_info(category, logFmt, ...) \
-syslog(LOG_WARNING, "%s:" logFmt, category,##__VA_ARGS__); \
-
-#define log4cplus_debug(category, logFmt, ...) \
-syslog(LOG_WARNING, "%s:" logFmt, category,##__VA_ARGS__); \
-
-
-#else
-
-#define log4cplus_fatal(category, logFmt, ...); \
-
-#define log4cplus_error(category, logFmt, ...); \
-
-#define log4cplus_warn(category, logFmt, ...); \
-
-#define log4cplus_info(category, logFmt, ...); \
-
-#define log4cplus_debug(category, logFmt, ...); \
-
-#endif
-