GCKMediaRequestItem.h
1 
2 // Copyright 2017 Google Inc.
3 
4 #import <GoogleCast/GCKDefines.h>
5 
6 #import <Foundation/Foundation.h>
7 
13 GCK_ASSUME_NONNULL_BEGIN
14 
16 typedef NS_ENUM(NSInteger, GCKStreamingProtocolType) {
18  GCKStreamingProtocolTypeUnknown = 0,
20  GCKStreamingProtocolTypeMPEGDASH = 1,
22  GCKStreamingProtocolTypeHLS = 2,
24  GCKStreamingProtocolTypeSmoothStreaming = 3,
25 };
26 
28 typedef NS_ENUM(NSInteger, GCKHLSSegmentFormat) {
30  GCKHLSSegmentFormatUndefined = 0,
32  GCKHLSSegmentFormatAAC = 1,
34  GCKHLSSegmentFormatAC3 = 2,
36  GCKHLSSegmentFormatMP3 = 3,
38  GCKHLSSegmentFormatTS = 4,
40  GCKHLSSegmentFormatTS_AAC = 5,
41 };
42 
49 GCK_EXPORT
50 @interface GCKMediaRequestItem : NSObject <NSCopying, NSSecureCoding>
51 
57 + (NSString *)mapHLSSegmentFormatToString:(GCKHLSSegmentFormat)hlsSegmentFormat;
58 
64 + (GCKHLSSegmentFormat)mapHLSSegmentFormatStringToEnum:(NSString *)hlsSegmentFormatString;
65 
70 - (instancetype)initWithURL:(NSURL *)url
71  protocolType:(GCKStreamingProtocolType)protocolType
72  initialTime:(NSTimeInterval)initialTime
73  hlsSegmentFormat:(GCKHLSSegmentFormat)hlsSegmentFormat;
74 
79 - (instancetype)initWithURL:(NSURL *)url protocolType:(GCKStreamingProtocolType)protocolType;
80 
84 @property(nonatomic, strong, readwrite) NSURL *mediaURL;
85 
89 @property(nonatomic, assign, readwrite) GCKStreamingProtocolType protocolType;
90 
94 @property(nonatomic, assign, readwrite) NSTimeInterval initialTime;
95 
100 @property(nonatomic, assign, readwrite) GCKHLSSegmentFormat hlsSegmentFormat;
101 
102 @end
103 
104 GCK_ASSUME_NONNULL_END
GCKHLSSegmentFormat hlsSegmentFormat
The HLS segment format.
Definition: GCKMediaRequestItem.h:100
NSURL * mediaURL
The URL of media content.
Definition: GCKMediaRequestItem.h:84
GCKStreamingProtocolType protocolType
The media streaming protocol.
Definition: GCKMediaRequestItem.h:89
A class representing a request item sent to Cast receivers.
Definition: GCKMediaRequestItem.h:50
NSTimeInterval initialTime
The initial time of media to precache.
Definition: GCKMediaRequestItem.h:94