forked from wjhwsh/VideoPlayer-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRendererProtocol.h
53 lines (48 loc) · 1.44 KB
/
RendererProtocol.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// RendererProtocol.h
// FFmpegPlayTest
//
// Created by Jack on 11/5/12.
// Copyright (c) 2012 Jack. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <OpenGLES/EAGLDrawable.h>
#import "VideoScreen.h"
enum {
kRendererRotate0,
kRendererRotate90,
kRendererRotate180,
kRendererRotate270,
kRendererRotateDefault = kRendererRotate0
};
typedef NSInteger RendererRotate;
enum {
kRendererScaleModeNon,
kRendererScaleModeScale,
kRendererScaleModeAspectFit,
kRendererScaleModeAspectFill,
kRendererScaleModeDefault = kRendererScaleModeAspectFit
};
typedef NSInteger RendererScaleMode;
//-----------------------------------------------------------------------------
@protocol Renderer;
#pragma mark - RendererDelegate
@protocol RendererDelegate <NSObject>
@required
- (void) finishFrameByRenderer: (id<Renderer>) renderer;
@optional
@end
//-----------------------------------------------------------------------------
#pragma mark - Renderer Protocol
@protocol Renderer <NSObject>
@required
@property (nonatomic, assign) id<RendererDelegate> delegate;
@property (nonatomic, assign) id<VideoScreen> videoScreen;
@property (nonatomic, assign) id<VideoScreenSource> videoSource;
- (void) render: (VideoPicture*) picture;
- (BOOL) prepareTexture;
- (BOOL) prepareTextureForVideoForSource: (id<VideoScreenSource>) videoSource
screen: (id<VideoScreen>) viewScreen;
@optional
// ....
@end