OOStream.h
1 
9 #import <Foundation/Foundation.h>
10 #import "OOTBXML.h"
11 #import "OOReturnState.h"
12 
13 @class OOStream;
14 
20 typedef OOStream *(^OOStreamSelector)(NSArray *streams);
21 
22 @interface OOStream : NSObject {
23  NSString *deliveryType;
24  NSString *videoCodec;
25  NSString *urlFormat;
26  NSString *framerate;
27  NSInteger videoBitrate;
28  NSInteger audioBitrate;
29  NSInteger height;
30  NSInteger width;
31  NSString *url;
32  NSString *aspectRatio;
34 }
35 
36 @property (readonly, nonatomic) NSString *deliveryType;
37 @property (readonly, nonatomic) NSString *videoCodec;
38 @property (readonly, nonatomic) NSString *urlFormat;
39 @property (readonly, nonatomic) NSString *framerate;
40 @property (readonly, nonatomic) NSInteger videoBitrate;
41 @property (readonly, nonatomic) NSInteger audioBitrate;
42 @property (readonly, nonatomic) NSInteger height;
43 @property (readonly, nonatomic) NSInteger width;
44 @property (readonly, nonatomic) NSString *url;
45 @property (readonly, nonatomic) NSString *aspectRatio;
46 @property (readonly, nonatomic, assign) BOOL isLiveStream;
47 @property (readonly, nonatomic) NSString *profile;
49 @property (readonly, nonatomic) NSString *drmType;
50 @property (readonly, nonatomic) NSString *licenseUrl;
51 @property (readonly, nonatomic) NSString *certificateUrl;
57 - (NSInteger)combinedBitrate;
58 
64 - (instancetype)initWithUrl:(NSURL *)theUrl deliveryType:(NSString *)theType;
65 
71 - (instancetype)initWithDictionary:(NSDictionary *)data;
72 
78 - (instancetype)initWithAssetDictionary:(NSDictionary *)data;
79 
85 - (OOReturnState)updateWithDictionary:(NSDictionary *)data;
86 
91 - (NSURL *)decodedURL;
92 
97 + (BOOL)is:(OOStream *)stream betterThan:(OOStream *)better;
98 
103 + (BOOL)isPlayable:(OOStream *)stream;
104 
109 + (BOOL)areSizeBitrateAndProfilePlayable:(OOStream *)stream;
110 
115 + (BOOL)isDeliveryTypePlayable:(OOStream *)stream;
116 
122 + (OOStream *)streamFromDictionary:(NSDictionary *)data;
123 
124 + (OOStream *)streamFromUrl:(NSURL *)url withType:(NSString *)type;
125 
131 + (OOStream *)bestStreamFromArray:(NSArray *)streams;
132 
133 + (BOOL)containsDeliveryType:(NSString *)type inArray:(NSArray *)streams;
134 
135 + (OOStream *)streamWithType:(NSString *)type fromArray:(NSArray *)streams;
136 
141 + (void)setStreamSelector:(OOStreamSelector)selector;
142 
146 + (void)resetStreamSelector;
147 
148 @end
NSString * profile
The OOStream&#39;s encoding profile.
Definition: OOStream.h:47
OOStream.
Definition: OOStream.h:22
NSString * videoCodec
The OOStream&#39;s video codec.
Definition: OOStream.h:24
NSString * url
The OOStream&#39;s URL in the format specified by OOStream.urlFormat.
Definition: OOStream.h:31
NSInteger combinedBitrate()
Get the combined (video+audio) bitrate of this OOStream.
NSString * deliveryType
The OOStream&#39;s delivery type.
Definition: OOStream.h:23
NSString * certificateUrl
If drm protected, The OOStream&#39;s certificate url.
Definition: OOStream.h:51
NSString * licenseUrl
If drm protected, The OOStream&#39;s license url.
Definition: OOStream.h:50
NSString * urlFormat
The OOStream&#39;s url format.
Definition: OOStream.h:25
BOOL isLiveStream
The OOStream&#39;s URL (Remote Asset only)
Definition: OOStream.h:33
NSInteger videoBitrate
The OOStream&#39;s video bitrate.
Definition: OOStream.h:27
NSString * aspectRatio
The OOStream&#39;s URL (Remote Asset only)
Definition: OOStream.h:32
NSString * framerate
The OOStream&#39;s framerate.
Definition: OOStream.h:26
NSInteger audioBitrate
The OOStream&#39;s audio bitrate.
Definition: OOStream.h:28
NSInteger width
The OOStream&#39;s width.
Definition: OOStream.h:30
void resetStreamSelector()
Reset the OOStreamSelector to the default.
NSString * drmType
If drm protected, The OOStream&#39;s drm type.
Definition: OOStream.h:49
NSInteger height
The OOStream&#39;s height.
Definition: OOStream.h:29
NSURL * decodedURL()