TXUGCPublishUtil.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef TXUGCUtil_h
  2. #define TXUGCUtil_h
  3. #import <AVFoundation/AVFoundation.h>
  4. #import "TXUGCPublishTypeDef.h"
  5. @interface TXUGCPublishUtil : NSObject
  6. +(CMSampleBufferRef)createAudioSample:(void *)audioData
  7. size:(UInt32)len
  8. timingInfo:(CMSampleTimingInfo)info
  9. numberChannels:(int)channels
  10. SampleRate:(int)sampleRate;
  11. +(NSString*) getFileSHA1Signature:(NSString*)filePath;
  12. +(NSString*) renameFile:(NSString*)filePath newFileName:(NSString*)newName;
  13. +(void) removeCacheFile:(NSString*)filePath;
  14. +(void)clearFileType:(NSArray*)extensions AtFolderPath:(NSString*)path;
  15. +(NSString*)getCacheFolderPath;
  16. +(NSString *)getFileNameByTimeNow:(NSString *)type fileType:(NSString *)fileType;
  17. +(UIImage*)imageFromPixelBuffer:(CVPixelBufferRef)pixelBuffer;
  18. +(void)checkVideoPath:(NSString *)videoPath;
  19. +(int)savePixelBuffer:(CVPixelBufferRef)pixelBuffer ToJPEGPath:(NSString*)path;
  20. +(void)save:(UIImage*)uiImage ToPath:(NSString*)path;
  21. +(UIImage *)loadThumbNail:(NSURL *)urlVideo;
  22. @end
  23. #endif /* TXUGCUtil_h */