mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Video Editing
This commit is contained in:
@@ -1,21 +1,7 @@
|
||||
#import "GPUImageContext.h"
|
||||
#import "GPUImageFramebuffer.h"
|
||||
|
||||
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
|
||||
#import <UIKit/UIKit.h>
|
||||
#else
|
||||
// For now, just redefine this on the Mac
|
||||
typedef NS_ENUM(NSInteger, UIImageOrientation) {
|
||||
UIImageOrientationUp, // default orientation
|
||||
UIImageOrientationDown, // 180 deg rotation
|
||||
UIImageOrientationLeft, // 90 deg CCW
|
||||
UIImageOrientationRight, // 90 deg CW
|
||||
UIImageOrientationUpMirrored, // as above but image mirrored along other axis. horizontal flip
|
||||
UIImageOrientationDownMirrored, // horizontal flip
|
||||
UIImageOrientationLeftMirrored, // vertical flip
|
||||
UIImageOrientationRightMirrored, // vertical flip
|
||||
};
|
||||
#endif
|
||||
|
||||
void runOnMainQueueWithoutDeadlocking(void (^block)(void));
|
||||
void runSynchronouslyOnVideoProcessingQueue(void (^block)(void));
|
||||
@@ -24,17 +10,6 @@ void runSynchronouslyOnContextQueue(GPUImageContext *context, void (^block)(void
|
||||
void runAsynchronouslyOnContextQueue(GPUImageContext *context, void (^block)(void));
|
||||
void reportAvailableMemoryForGPUImage(NSString *tag);
|
||||
|
||||
/** GPUImage's base source object
|
||||
|
||||
Images or frames of video are uploaded from source objects, which are subclasses of GPUImageOutput. These include:
|
||||
|
||||
- GPUImageVideoCamera (for live video from an iOS camera)
|
||||
- GPUImageStillCamera (for taking photos with the camera)
|
||||
- GPUImagePicture (for still images)
|
||||
- GPUImageMovie (for movies)
|
||||
|
||||
Source objects upload still image frames to OpenGL ES as textures, then hand those textures off to the next objects in the processing chain.
|
||||
*/
|
||||
@interface GPUImageOutput : NSObject
|
||||
{
|
||||
GPUImageFramebuffer *outputFramebuffer;
|
||||
@@ -56,7 +31,6 @@ void reportAvailableMemoryForGPUImage(NSString *tag);
|
||||
@property(nonatomic) BOOL enabled;
|
||||
@property(readwrite, nonatomic) GPUTextureOptions outputTextureOptions;
|
||||
|
||||
/// @name Managing targets
|
||||
- (void)setInputFramebufferForTarget:(id<GPUImageInput>)target atIndex:(NSInteger)inputTextureIndex;
|
||||
- (GPUImageFramebuffer *)framebufferForOutput;
|
||||
- (void)removeOutputFramebuffer;
|
||||
@@ -106,15 +80,8 @@ void reportAvailableMemoryForGPUImage(NSString *tag);
|
||||
- (void)useNextFrameForImageCapture;
|
||||
- (CGImageRef)newCGImageFromCurrentlyProcessedOutput;
|
||||
|
||||
// Platform-specific image output methods
|
||||
// If you're trying to use these methods, remember that you need to set -useNextFrameForImageCapture before running -processImage or running video and calling any of these methods, or you will get a nil image
|
||||
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
|
||||
- (UIImage *)imageFromCurrentFramebuffer;
|
||||
- (UIImage *)imageFromCurrentFramebufferWithOrientation:(UIImageOrientation)imageOrientation;
|
||||
#else
|
||||
- (NSImage *)imageFromCurrentFramebuffer;
|
||||
- (NSImage *)imageFromCurrentFramebufferWithOrientation:(UIImageOrientation)imageOrientation;
|
||||
#endif
|
||||
|
||||
- (BOOL)providesMonochromeOutput;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user