forked from wjhwsh/VideoPlayer-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVideo.h
48 lines (38 loc) · 1.18 KB
/
Video.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
//
// Video.h
// FFmpegPlayTest
//
// Created by Jack on 11/12/12.
// Copyright (c) 2012 Jack. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "FFmpeg.h"
typedef NSInteger VIdeoStatus;
@interface Video : NSObject
{
@private
NSString* _fileUrl;
AVFormatContext* _formatContext;
// Video Stream Variables
NSInteger _videoStreamIndex;
AVStream* _videoStream;
AVCodecContext* _videoCodecCtx;
//Audio Stream Variables
NSInteger _audioStreamIndex;
AVStream* _audioStream;
AVCodecContext* _audioCodecCtx;
}
@property (nonatomic, readonly) NSInteger status;
@property (nonatomic,readonly) NSInteger videoStreamIndex;
@property (nonatomic,readonly) NSInteger audioStreamIndex;
- (id) initWithUrl: (NSURL *)url
interuptCallback: (AVIOInterruptCB) callback;
//- (id) initWithUrl: (NSURL*) url;
- (BOOL) openVideoWithCallback: (AVIOInterruptCB) interuptCallback;
- (void) close;
- ( AVFormatContext * const) formatContext;
- ( AVCodecContext * const) audioCodecContext;
- ( AVCodecContext * const) videoCodecContext;
- ( AVStream * const) audioStream;
- ( AVStream * const) videoStream;
@end