750 lines
79 KiB
Swift
750 lines
79 KiB
Swift
//
|
|
// AudioAPI.swift
|
|
//
|
|
// Generated by swagger-codegen
|
|
// https://github.com/swagger-api/swagger-codegen
|
|
//
|
|
|
|
import Foundation
|
|
import Alamofire
|
|
|
|
|
|
open class AudioAPI {
|
|
/**
|
|
Gets an audio stream.
|
|
|
|
- parameter itemId: (path) The item id.
|
|
- parameter container: (query) The audio container. (optional)
|
|
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
|
|
- parameter params: (query) The streaming parameters. (optional)
|
|
- parameter tag: (query) The tag. (optional)
|
|
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
|
|
- parameter playSessionId: (query) The play session id. (optional)
|
|
- parameter segmentContainer: (query) The segment container. (optional)
|
|
- parameter segmentLength: (query) The segment length. (optional)
|
|
- parameter minSegments: (query) The minimum number of segments. (optional)
|
|
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
|
|
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
|
|
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma. (optional)
|
|
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
|
|
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
|
|
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
|
|
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
|
|
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
|
|
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
|
|
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
|
|
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
|
|
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
|
|
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. (optional)
|
|
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
|
|
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
|
|
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
|
|
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
|
|
- parameter maxRefFrames: (query) Optional. (optional)
|
|
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
|
|
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
|
|
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
|
|
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
|
|
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
|
|
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
|
|
- parameter liveStreamId: (query) The live stream id. (optional)
|
|
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
|
|
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
|
|
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
|
|
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
|
|
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
|
|
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
|
|
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
|
|
- parameter streamOptions: (query) Optional. The streaming options. (optional)
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func getAudioStream(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
|
|
getAudioStreamWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets an audio stream.
|
|
- GET /Audio/{itemId}/stream
|
|
-
|
|
|
|
- examples: [{contentType=application/json, example=""}]
|
|
- parameter itemId: (path) The item id.
|
|
- parameter container: (query) The audio container. (optional)
|
|
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
|
|
- parameter params: (query) The streaming parameters. (optional)
|
|
- parameter tag: (query) The tag. (optional)
|
|
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
|
|
- parameter playSessionId: (query) The play session id. (optional)
|
|
- parameter segmentContainer: (query) The segment container. (optional)
|
|
- parameter segmentLength: (query) The segment length. (optional)
|
|
- parameter minSegments: (query) The minimum number of segments. (optional)
|
|
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
|
|
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
|
|
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma. (optional)
|
|
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
|
|
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
|
|
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
|
|
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
|
|
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
|
|
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
|
|
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
|
|
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
|
|
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
|
|
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. (optional)
|
|
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
|
|
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
|
|
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
|
|
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
|
|
- parameter maxRefFrames: (query) Optional. (optional)
|
|
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
|
|
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
|
|
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
|
|
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
|
|
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
|
|
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
|
|
- parameter liveStreamId: (query) The live stream id. (optional)
|
|
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
|
|
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
|
|
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
|
|
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
|
|
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
|
|
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
|
|
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
|
|
- parameter streamOptions: (query) Optional. The streaming options. (optional)
|
|
|
|
- returns: RequestBuilder<Data>
|
|
*/
|
|
open class func getAudioStreamWithRequestBuilder(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
|
|
var path = "/Audio/{itemId}/stream"
|
|
let itemIdPreEscape = "\(itemId)"
|
|
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
|
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
var url = URLComponents(string: URLString)
|
|
url?.queryItems = APIHelper.mapValuesToQueryItems([
|
|
"container": container,
|
|
"static": _static,
|
|
"params": params,
|
|
"tag": tag,
|
|
"deviceProfileId": deviceProfileId,
|
|
"playSessionId": playSessionId,
|
|
"segmentContainer": segmentContainer,
|
|
"segmentLength": segmentLength?.encodeToJSON(),
|
|
"minSegments": minSegments?.encodeToJSON(),
|
|
"mediaSourceId": mediaSourceId,
|
|
"deviceId": deviceId,
|
|
"audioCodec": audioCodec,
|
|
"enableAutoStreamCopy": enableAutoStreamCopy,
|
|
"allowVideoStreamCopy": allowVideoStreamCopy,
|
|
"allowAudioStreamCopy": allowAudioStreamCopy,
|
|
"breakOnNonKeyFrames": breakOnNonKeyFrames,
|
|
"audioSampleRate": audioSampleRate?.encodeToJSON(),
|
|
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
|
|
"audioBitRate": audioBitRate?.encodeToJSON(),
|
|
"audioChannels": audioChannels?.encodeToJSON(),
|
|
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
|
|
"profile": profile,
|
|
"level": level,
|
|
"framerate": framerate,
|
|
"maxFramerate": maxFramerate,
|
|
"copyTimestamps": copyTimestamps,
|
|
"startTimeTicks": startTimeTicks?.encodeToJSON(),
|
|
"width": width?.encodeToJSON(),
|
|
"height": height?.encodeToJSON(),
|
|
"videoBitRate": videoBitRate?.encodeToJSON(),
|
|
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
|
|
"subtitleMethod": subtitleMethod,
|
|
"maxRefFrames": maxRefFrames?.encodeToJSON(),
|
|
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
|
|
"requireAvc": requireAvc,
|
|
"deInterlace": deInterlace,
|
|
"requireNonAnamorphic": requireNonAnamorphic,
|
|
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
|
|
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
|
|
"liveStreamId": liveStreamId,
|
|
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
|
|
"videoCodec": videoCodec,
|
|
"subtitleCodec": subtitleCodec,
|
|
"transcodeReasons": transcodeReasons,
|
|
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
|
|
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
|
|
"context": context,
|
|
"streamOptions": streamOptions
|
|
])
|
|
|
|
|
|
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
/**
|
|
Gets an audio stream.
|
|
|
|
- parameter itemId: (path) The item id.
|
|
- parameter container: (path) The audio container.
|
|
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
|
|
- parameter params: (query) The streaming parameters. (optional)
|
|
- parameter tag: (query) The tag. (optional)
|
|
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
|
|
- parameter playSessionId: (query) The play session id. (optional)
|
|
- parameter segmentContainer: (query) The segment container. (optional)
|
|
- parameter segmentLength: (query) The segment lenght. (optional)
|
|
- parameter minSegments: (query) The minimum number of segments. (optional)
|
|
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
|
|
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
|
|
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma. (optional)
|
|
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
|
|
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
|
|
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
|
|
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
|
|
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
|
|
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
|
|
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
|
|
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
|
|
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
|
|
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. (optional)
|
|
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
|
|
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
|
|
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
|
|
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
|
|
- parameter maxRefFrames: (query) Optional. (optional)
|
|
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
|
|
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
|
|
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
|
|
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamporphic stream. (optional)
|
|
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
|
|
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
|
|
- parameter liveStreamId: (query) The live stream id. (optional)
|
|
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
|
|
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
|
|
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
|
|
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
|
|
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
|
|
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
|
|
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
|
|
- parameter streamOptions: (query) Optional. The streaming options. (optional)
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func getAudioStreamByContainer(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod2? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context2? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
|
|
getAudioStreamByContainerWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets an audio stream.
|
|
- GET /Audio/{itemId}/stream.{container}
|
|
-
|
|
|
|
- examples: [{contentType=application/json, example=""}]
|
|
- parameter itemId: (path) The item id.
|
|
- parameter container: (path) The audio container.
|
|
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
|
|
- parameter params: (query) The streaming parameters. (optional)
|
|
- parameter tag: (query) The tag. (optional)
|
|
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
|
|
- parameter playSessionId: (query) The play session id. (optional)
|
|
- parameter segmentContainer: (query) The segment container. (optional)
|
|
- parameter segmentLength: (query) The segment lenght. (optional)
|
|
- parameter minSegments: (query) The minimum number of segments. (optional)
|
|
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
|
|
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
|
|
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma. (optional)
|
|
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
|
|
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
|
|
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
|
|
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
|
|
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
|
|
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
|
|
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
|
|
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
|
|
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
|
|
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. (optional)
|
|
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
|
|
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
|
|
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
|
|
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
|
|
- parameter maxRefFrames: (query) Optional. (optional)
|
|
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
|
|
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
|
|
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
|
|
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamporphic stream. (optional)
|
|
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
|
|
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
|
|
- parameter liveStreamId: (query) The live stream id. (optional)
|
|
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
|
|
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
|
|
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
|
|
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
|
|
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
|
|
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
|
|
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
|
|
- parameter streamOptions: (query) Optional. The streaming options. (optional)
|
|
|
|
- returns: RequestBuilder<Data>
|
|
*/
|
|
open class func getAudioStreamByContainerWithRequestBuilder(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod2? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context2? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
|
|
var path = "/Audio/{itemId}/stream.{container}"
|
|
let itemIdPreEscape = "\(itemId)"
|
|
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
|
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
|
|
let containerPreEscape = "\(container)"
|
|
let containerPostEscape = containerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
|
path = path.replacingOccurrences(of: "{container}", with: containerPostEscape, options: .literal, range: nil)
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
var url = URLComponents(string: URLString)
|
|
url?.queryItems = APIHelper.mapValuesToQueryItems([
|
|
"static": _static,
|
|
"params": params,
|
|
"tag": tag,
|
|
"deviceProfileId": deviceProfileId,
|
|
"playSessionId": playSessionId,
|
|
"segmentContainer": segmentContainer,
|
|
"segmentLength": segmentLength?.encodeToJSON(),
|
|
"minSegments": minSegments?.encodeToJSON(),
|
|
"mediaSourceId": mediaSourceId,
|
|
"deviceId": deviceId,
|
|
"audioCodec": audioCodec,
|
|
"enableAutoStreamCopy": enableAutoStreamCopy,
|
|
"allowVideoStreamCopy": allowVideoStreamCopy,
|
|
"allowAudioStreamCopy": allowAudioStreamCopy,
|
|
"breakOnNonKeyFrames": breakOnNonKeyFrames,
|
|
"audioSampleRate": audioSampleRate?.encodeToJSON(),
|
|
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
|
|
"audioBitRate": audioBitRate?.encodeToJSON(),
|
|
"audioChannels": audioChannels?.encodeToJSON(),
|
|
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
|
|
"profile": profile,
|
|
"level": level,
|
|
"framerate": framerate,
|
|
"maxFramerate": maxFramerate,
|
|
"copyTimestamps": copyTimestamps,
|
|
"startTimeTicks": startTimeTicks?.encodeToJSON(),
|
|
"width": width?.encodeToJSON(),
|
|
"height": height?.encodeToJSON(),
|
|
"videoBitRate": videoBitRate?.encodeToJSON(),
|
|
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
|
|
"subtitleMethod": subtitleMethod,
|
|
"maxRefFrames": maxRefFrames?.encodeToJSON(),
|
|
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
|
|
"requireAvc": requireAvc,
|
|
"deInterlace": deInterlace,
|
|
"requireNonAnamorphic": requireNonAnamorphic,
|
|
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
|
|
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
|
|
"liveStreamId": liveStreamId,
|
|
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
|
|
"videoCodec": videoCodec,
|
|
"subtitleCodec": subtitleCodec,
|
|
"transcodeReasons": transcodeReasons,
|
|
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
|
|
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
|
|
"context": context,
|
|
"streamOptions": streamOptions
|
|
])
|
|
|
|
|
|
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
/**
|
|
Gets an audio stream.
|
|
|
|
- parameter itemId: (path) The item id.
|
|
- parameter container: (query) The audio container. (optional)
|
|
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
|
|
- parameter params: (query) The streaming parameters. (optional)
|
|
- parameter tag: (query) The tag. (optional)
|
|
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
|
|
- parameter playSessionId: (query) The play session id. (optional)
|
|
- parameter segmentContainer: (query) The segment container. (optional)
|
|
- parameter segmentLength: (query) The segment length. (optional)
|
|
- parameter minSegments: (query) The minimum number of segments. (optional)
|
|
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
|
|
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
|
|
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma. (optional)
|
|
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
|
|
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
|
|
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
|
|
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
|
|
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
|
|
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
|
|
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
|
|
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
|
|
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
|
|
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. (optional)
|
|
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
|
|
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
|
|
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
|
|
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
|
|
- parameter maxRefFrames: (query) Optional. (optional)
|
|
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
|
|
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
|
|
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
|
|
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
|
|
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
|
|
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
|
|
- parameter liveStreamId: (query) The live stream id. (optional)
|
|
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
|
|
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
|
|
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
|
|
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
|
|
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
|
|
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
|
|
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
|
|
- parameter streamOptions: (query) Optional. The streaming options. (optional)
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func headAudioStream(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod1? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context1? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
|
|
headAudioStreamWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets an audio stream.
|
|
- HEAD /Audio/{itemId}/stream
|
|
-
|
|
|
|
- examples: [{contentType=application/json, example=""}]
|
|
- parameter itemId: (path) The item id.
|
|
- parameter container: (query) The audio container. (optional)
|
|
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
|
|
- parameter params: (query) The streaming parameters. (optional)
|
|
- parameter tag: (query) The tag. (optional)
|
|
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
|
|
- parameter playSessionId: (query) The play session id. (optional)
|
|
- parameter segmentContainer: (query) The segment container. (optional)
|
|
- parameter segmentLength: (query) The segment length. (optional)
|
|
- parameter minSegments: (query) The minimum number of segments. (optional)
|
|
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
|
|
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
|
|
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma. (optional)
|
|
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
|
|
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
|
|
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
|
|
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
|
|
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
|
|
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
|
|
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
|
|
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
|
|
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
|
|
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. (optional)
|
|
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
|
|
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
|
|
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
|
|
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
|
|
- parameter maxRefFrames: (query) Optional. (optional)
|
|
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
|
|
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
|
|
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
|
|
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
|
|
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
|
|
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
|
|
- parameter liveStreamId: (query) The live stream id. (optional)
|
|
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
|
|
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
|
|
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
|
|
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
|
|
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
|
|
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
|
|
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
|
|
- parameter streamOptions: (query) Optional. The streaming options. (optional)
|
|
|
|
- returns: RequestBuilder<Data>
|
|
*/
|
|
open class func headAudioStreamWithRequestBuilder(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod1? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context1? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
|
|
var path = "/Audio/{itemId}/stream"
|
|
let itemIdPreEscape = "\(itemId)"
|
|
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
|
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
var url = URLComponents(string: URLString)
|
|
url?.queryItems = APIHelper.mapValuesToQueryItems([
|
|
"container": container,
|
|
"static": _static,
|
|
"params": params,
|
|
"tag": tag,
|
|
"deviceProfileId": deviceProfileId,
|
|
"playSessionId": playSessionId,
|
|
"segmentContainer": segmentContainer,
|
|
"segmentLength": segmentLength?.encodeToJSON(),
|
|
"minSegments": minSegments?.encodeToJSON(),
|
|
"mediaSourceId": mediaSourceId,
|
|
"deviceId": deviceId,
|
|
"audioCodec": audioCodec,
|
|
"enableAutoStreamCopy": enableAutoStreamCopy,
|
|
"allowVideoStreamCopy": allowVideoStreamCopy,
|
|
"allowAudioStreamCopy": allowAudioStreamCopy,
|
|
"breakOnNonKeyFrames": breakOnNonKeyFrames,
|
|
"audioSampleRate": audioSampleRate?.encodeToJSON(),
|
|
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
|
|
"audioBitRate": audioBitRate?.encodeToJSON(),
|
|
"audioChannels": audioChannels?.encodeToJSON(),
|
|
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
|
|
"profile": profile,
|
|
"level": level,
|
|
"framerate": framerate,
|
|
"maxFramerate": maxFramerate,
|
|
"copyTimestamps": copyTimestamps,
|
|
"startTimeTicks": startTimeTicks?.encodeToJSON(),
|
|
"width": width?.encodeToJSON(),
|
|
"height": height?.encodeToJSON(),
|
|
"videoBitRate": videoBitRate?.encodeToJSON(),
|
|
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
|
|
"subtitleMethod": subtitleMethod,
|
|
"maxRefFrames": maxRefFrames?.encodeToJSON(),
|
|
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
|
|
"requireAvc": requireAvc,
|
|
"deInterlace": deInterlace,
|
|
"requireNonAnamorphic": requireNonAnamorphic,
|
|
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
|
|
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
|
|
"liveStreamId": liveStreamId,
|
|
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
|
|
"videoCodec": videoCodec,
|
|
"subtitleCodec": subtitleCodec,
|
|
"transcodeReasons": transcodeReasons,
|
|
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
|
|
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
|
|
"context": context,
|
|
"streamOptions": streamOptions
|
|
])
|
|
|
|
|
|
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
/**
|
|
Gets an audio stream.
|
|
|
|
- parameter itemId: (path) The item id.
|
|
- parameter container: (path) The audio container.
|
|
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
|
|
- parameter params: (query) The streaming parameters. (optional)
|
|
- parameter tag: (query) The tag. (optional)
|
|
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
|
|
- parameter playSessionId: (query) The play session id. (optional)
|
|
- parameter segmentContainer: (query) The segment container. (optional)
|
|
- parameter segmentLength: (query) The segment lenght. (optional)
|
|
- parameter minSegments: (query) The minimum number of segments. (optional)
|
|
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
|
|
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
|
|
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma. (optional)
|
|
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
|
|
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
|
|
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
|
|
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
|
|
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
|
|
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
|
|
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
|
|
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
|
|
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
|
|
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. (optional)
|
|
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
|
|
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
|
|
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
|
|
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
|
|
- parameter maxRefFrames: (query) Optional. (optional)
|
|
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
|
|
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
|
|
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
|
|
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamporphic stream. (optional)
|
|
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
|
|
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
|
|
- parameter liveStreamId: (query) The live stream id. (optional)
|
|
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
|
|
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
|
|
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
|
|
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
|
|
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
|
|
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
|
|
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
|
|
- parameter streamOptions: (query) Optional. The streaming options. (optional)
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func headAudioStreamByContainer(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod3? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context3? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
|
|
headAudioStreamByContainerWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets an audio stream.
|
|
- HEAD /Audio/{itemId}/stream.{container}
|
|
-
|
|
|
|
- examples: [{contentType=application/json, example=""}]
|
|
- parameter itemId: (path) The item id.
|
|
- parameter container: (path) The audio container.
|
|
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
|
|
- parameter params: (query) The streaming parameters. (optional)
|
|
- parameter tag: (query) The tag. (optional)
|
|
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
|
|
- parameter playSessionId: (query) The play session id. (optional)
|
|
- parameter segmentContainer: (query) The segment container. (optional)
|
|
- parameter segmentLength: (query) The segment lenght. (optional)
|
|
- parameter minSegments: (query) The minimum number of segments. (optional)
|
|
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
|
|
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
|
|
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma. (optional)
|
|
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
|
|
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
|
|
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
|
|
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
|
|
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
|
|
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
|
|
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
|
|
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
|
|
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
|
|
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
|
|
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
|
|
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. (optional)
|
|
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
|
|
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
|
|
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
|
|
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
|
|
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
|
|
- parameter maxRefFrames: (query) Optional. (optional)
|
|
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
|
|
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
|
|
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
|
|
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamporphic stream. (optional)
|
|
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
|
|
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
|
|
- parameter liveStreamId: (query) The live stream id. (optional)
|
|
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
|
|
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
|
|
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
|
|
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
|
|
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
|
|
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
|
|
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
|
|
- parameter streamOptions: (query) Optional. The streaming options. (optional)
|
|
|
|
- returns: RequestBuilder<Data>
|
|
*/
|
|
open class func headAudioStreamByContainerWithRequestBuilder(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod3? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context3? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
|
|
var path = "/Audio/{itemId}/stream.{container}"
|
|
let itemIdPreEscape = "\(itemId)"
|
|
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
|
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
|
|
let containerPreEscape = "\(container)"
|
|
let containerPostEscape = containerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
|
|
path = path.replacingOccurrences(of: "{container}", with: containerPostEscape, options: .literal, range: nil)
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
var url = URLComponents(string: URLString)
|
|
url?.queryItems = APIHelper.mapValuesToQueryItems([
|
|
"static": _static,
|
|
"params": params,
|
|
"tag": tag,
|
|
"deviceProfileId": deviceProfileId,
|
|
"playSessionId": playSessionId,
|
|
"segmentContainer": segmentContainer,
|
|
"segmentLength": segmentLength?.encodeToJSON(),
|
|
"minSegments": minSegments?.encodeToJSON(),
|
|
"mediaSourceId": mediaSourceId,
|
|
"deviceId": deviceId,
|
|
"audioCodec": audioCodec,
|
|
"enableAutoStreamCopy": enableAutoStreamCopy,
|
|
"allowVideoStreamCopy": allowVideoStreamCopy,
|
|
"allowAudioStreamCopy": allowAudioStreamCopy,
|
|
"breakOnNonKeyFrames": breakOnNonKeyFrames,
|
|
"audioSampleRate": audioSampleRate?.encodeToJSON(),
|
|
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
|
|
"audioBitRate": audioBitRate?.encodeToJSON(),
|
|
"audioChannels": audioChannels?.encodeToJSON(),
|
|
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
|
|
"profile": profile,
|
|
"level": level,
|
|
"framerate": framerate,
|
|
"maxFramerate": maxFramerate,
|
|
"copyTimestamps": copyTimestamps,
|
|
"startTimeTicks": startTimeTicks?.encodeToJSON(),
|
|
"width": width?.encodeToJSON(),
|
|
"height": height?.encodeToJSON(),
|
|
"videoBitRate": videoBitRate?.encodeToJSON(),
|
|
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
|
|
"subtitleMethod": subtitleMethod,
|
|
"maxRefFrames": maxRefFrames?.encodeToJSON(),
|
|
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
|
|
"requireAvc": requireAvc,
|
|
"deInterlace": deInterlace,
|
|
"requireNonAnamorphic": requireNonAnamorphic,
|
|
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
|
|
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
|
|
"liveStreamId": liveStreamId,
|
|
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
|
|
"videoCodec": videoCodec,
|
|
"subtitleCodec": subtitleCodec,
|
|
"transcodeReasons": transcodeReasons,
|
|
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
|
|
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
|
|
"context": context,
|
|
"streamOptions": streamOptions
|
|
])
|
|
|
|
|
|
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
}
|