wsc_sdk 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.circleci/config.yml +146 -0
- data/.circleci/docker/build/Dockerfile +3 -0
- data/.circleci/helpers/add_preamble.rb +29 -0
- data/.circleci/helpers/build_docs.sh +5 -0
- data/.circleci/helpers/build_gem.sh +5 -0
- data/.circleci/helpers/debundle-context.sh +14 -0
- data/.circleci/helpers/finalize_release.sh +24 -0
- data/.circleci/helpers/publish_docs.sh +10 -0
- data/.circleci/helpers/release_gem.sh +8 -0
- data/.circleci/helpers/setup.sh +11 -0
- data/.circleci/helpers/setup_aws.sh +13 -0
- data/.circleci/helpers/setup_gem.sh +2 -0
- data/.circleci/helpers/setup_git.sh +27 -0
- data/.circleci/helpers/setup_rubygems.sh +15 -0
- data/.circleci/helpers/test_integration.sh +12 -0
- data/.circleci/helpers/test_unit.sh +6 -0
- data/.circleci/jobs/publish-production.sh +17 -0
- data/.circleci/jobs/publish-staging.sh +17 -0
- data/.circleci/jobs/release-production.sh +21 -0
- data/.circleci/jobs/test-integration.sh +9 -0
- data/.circleci/jobs/test-unit.sh +9 -0
- data/.circleci/tag_repo.rb +46 -0
- data/.gitignore +28 -0
- data/.rspec +2 -0
- data/.yard/config +2 -0
- data/.yard/template/default/fulldoc/html/css/custom.css +151 -0
- data/.yard/template/default/layout/html/footer.erb +0 -0
- data/.yard/template/default/layout/html/headers.erb +10 -0
- data/.yard/template/default/layout/html/layout.erb +45 -0
- data/.yard/template/default/layout/html/setup.rb +24 -0
- data/.yardopts +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +99 -0
- data/LICENSE.txt +28 -0
- data/README.md +397 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/Hash.html +291 -0
- data/doc/WscSdk.html +570 -0
- data/doc/WscSdk/ApiResponse.html +242 -0
- data/doc/WscSdk/Attributes.html +128 -0
- data/doc/WscSdk/Attributes/Mode.html +191 -0
- data/doc/WscSdk/Attributes/Type.html +389 -0
- data/doc/WscSdk/Client.html +2677 -0
- data/doc/WscSdk/Configuration.html +595 -0
- data/doc/WscSdk/Endpoint.html +2974 -0
- data/doc/WscSdk/Endpoints.html +141 -0
- data/doc/WscSdk/Endpoints/CustomStreamTargets.html +383 -0
- data/doc/WscSdk/Endpoints/LiveStreams.html +197 -0
- data/doc/WscSdk/Endpoints/OutputStreamTargets.html +180 -0
- data/doc/WscSdk/Endpoints/Outputs.html +180 -0
- data/doc/WscSdk/Endpoints/StreamTargets.html +446 -0
- data/doc/WscSdk/Endpoints/Transcoders.html +197 -0
- data/doc/WscSdk/Endpoints/UllStreamTargets.html +383 -0
- data/doc/WscSdk/Endpoints/WowzaStreamTargets.html +383 -0
- data/doc/WscSdk/Enum.html +225 -0
- data/doc/WscSdk/Enums.html +321 -0
- data/doc/WscSdk/Enums/BillingMode.html +188 -0
- data/doc/WscSdk/Enums/BroadcastLocation.html +396 -0
- data/doc/WscSdk/Enums/BufferSize.html +301 -0
- data/doc/WscSdk/Enums/ClosedCaptionType.html +221 -0
- data/doc/WscSdk/Enums/CustomProvider.html +252 -0
- data/doc/WscSdk/Enums/DeliveryMethod.html +188 -0
- data/doc/WscSdk/Enums/DeliveryType.html +188 -0
- data/doc/WscSdk/Enums/Encoder.html +460 -0
- data/doc/WscSdk/Enums/Errors.html +555 -0
- data/doc/WscSdk/Enums/IdleTimeout.html +398 -0
- data/doc/WscSdk/Enums/ImagePosition.html +220 -0
- data/doc/WscSdk/Enums/ModelMode.html +175 -0
- data/doc/WscSdk/Enums/ModelType.html +373 -0
- data/doc/WscSdk/Enums/PlayerType.html +188 -0
- data/doc/WscSdk/Enums/Protocol.html +204 -0
- data/doc/WscSdk/Enums/TargetDeliveryProtocol.html +188 -0
- data/doc/WscSdk/Enums/TranscoderType.html +188 -0
- data/doc/WscSdk/Enums/UserRegion.html +383 -0
- data/doc/WscSdk/Enums/WowzaProvider.html +188 -0
- data/doc/WscSdk/Errors.html +683 -0
- data/doc/WscSdk/Loggable.html +346 -0
- data/doc/WscSdk/Model.html +3316 -0
- data/doc/WscSdk/ModelList.html +442 -0
- data/doc/WscSdk/ModelTemplate.html +267 -0
- data/doc/WscSdk/Models.html +141 -0
- data/doc/WscSdk/Models/CustomStreamTarget.html +192 -0
- data/doc/WscSdk/Models/Error.html +351 -0
- data/doc/WscSdk/Models/LiveStream.html +601 -0
- data/doc/WscSdk/Models/LiveStreamConnectionCode.html +192 -0
- data/doc/WscSdk/Models/LiveStreamState.html +200 -0
- data/doc/WscSdk/Models/LiveStreamStats.html +200 -0
- data/doc/WscSdk/Models/LiveStreamThumbnailUrl.html +200 -0
- data/doc/WscSdk/Models/Output.html +294 -0
- data/doc/WscSdk/Models/OutputStreamTarget.html +274 -0
- data/doc/WscSdk/Models/StreamTarget.html +273 -0
- data/doc/WscSdk/Models/Transcoder.html +793 -0
- data/doc/WscSdk/Models/TranscoderBooleanStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderConnectionCode.html +192 -0
- data/doc/WscSdk/Models/TranscoderFloatStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderIntegerStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderState.html +196 -0
- data/doc/WscSdk/Models/TranscoderStats.html +196 -0
- data/doc/WscSdk/Models/TranscoderStreamTargetState.html +192 -0
- data/doc/WscSdk/Models/TranscoderStringStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderThumbnailUrl.html +196 -0
- data/doc/WscSdk/Models/UllStreamTarget.html +360 -0
- data/doc/WscSdk/Models/WowzaStreamTarget.html +380 -0
- data/doc/WscSdk/Pagination.html +1277 -0
- data/doc/WscSdk/Schema.html +861 -0
- data/doc/WscSdk/SchemaAttribute.html +2400 -0
- data/doc/WscSdk/Templates.html +141 -0
- data/doc/WscSdk/Templates/CustomStreamTarget.html +1045 -0
- data/doc/WscSdk/Templates/LiveStream.html +1432 -0
- data/doc/WscSdk/Templates/Output.html +829 -0
- data/doc/WscSdk/Templates/Transcoder.html +699 -0
- data/doc/WscSdk/Templates/UllStreamTarget.html +411 -0
- data/doc/WscSdk/Templates/WowzaStreamTarget.html +447 -0
- data/doc/WscSdk/TranscoderSharedMethods.html +1113 -0
- data/doc/_index.html +705 -0
- data/doc/class_list.html +51 -0
- data/doc/css/bootstrap.css +5 -0
- data/doc/css/common.css +1 -0
- data/doc/css/custom.css +151 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.README.html +570 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/images/wsc-ruby-1800x400.png +0 -0
- data/doc/index.html +570 -0
- data/doc/js/app.js +292 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1731 -0
- data/doc/top-level-namespace.html +182 -0
- data/examples/client.rb +40 -0
- data/examples/helpers.rb +100 -0
- data/examples/live_streams/create.rb +39 -0
- data/examples/live_streams/delete.rb +32 -0
- data/examples/live_streams/find.rb +22 -0
- data/examples/live_streams/flood.rb +126 -0
- data/examples/live_streams/list.rb +24 -0
- data/examples/live_streams/regenerate_connection_code.rb +29 -0
- data/examples/live_streams/reset.rb +32 -0
- data/examples/live_streams/reset_and_wait.rb +51 -0
- data/examples/live_streams/start.rb +33 -0
- data/examples/live_streams/start_and_wait.rb +51 -0
- data/examples/live_streams/state.rb +33 -0
- data/examples/live_streams/stats.rb +43 -0
- data/examples/live_streams/stop.rb +33 -0
- data/examples/live_streams/stop_and_wait.rb +51 -0
- data/examples/live_streams/thumbnail_url.rb +46 -0
- data/examples/live_streams/update.rb +43 -0
- data/examples/live_streams/workflow.rb +165 -0
- data/examples/output_stream_targets/create.rb +56 -0
- data/examples/output_stream_targets/delete.rb +45 -0
- data/examples/output_stream_targets/find.rb +37 -0
- data/examples/output_stream_targets/list.rb +36 -0
- data/examples/output_stream_targets/update.rb +56 -0
- data/examples/outputs/create.rb +49 -0
- data/examples/outputs/delete.rb +39 -0
- data/examples/outputs/find.rb +31 -0
- data/examples/outputs/list.rb +29 -0
- data/examples/outputs/update.rb +50 -0
- data/examples/stream_targets/custom/create.rb +42 -0
- data/examples/stream_targets/custom/delete.rb +31 -0
- data/examples/stream_targets/custom/find.rb +23 -0
- data/examples/stream_targets/custom/list.rb +24 -0
- data/examples/stream_targets/custom/update.rb +43 -0
- data/examples/stream_targets/list.rb +24 -0
- data/examples/stream_targets/ull/create.rb +41 -0
- data/examples/stream_targets/ull/delete.rb +31 -0
- data/examples/stream_targets/ull/find.rb +23 -0
- data/examples/stream_targets/ull/list.rb +24 -0
- data/examples/stream_targets/ull/update.rb +43 -0
- data/examples/stream_targets/wowza/create.rb +42 -0
- data/examples/stream_targets/wowza/delete.rb +31 -0
- data/examples/stream_targets/wowza/find.rb +23 -0
- data/examples/stream_targets/wowza/list.rb +23 -0
- data/examples/stream_targets/wowza/update.rb +43 -0
- data/examples/transcoders/create.rb +39 -0
- data/examples/transcoders/delete.rb +31 -0
- data/examples/transcoders/find.rb +23 -0
- data/examples/transcoders/list.rb +24 -0
- data/examples/transcoders/reset.rb +32 -0
- data/examples/transcoders/reset_and_wait.rb +48 -0
- data/examples/transcoders/start.rb +33 -0
- data/examples/transcoders/start_and_wait.rb +50 -0
- data/examples/transcoders/state.rb +33 -0
- data/examples/transcoders/stats.rb +43 -0
- data/examples/transcoders/stop.rb +33 -0
- data/examples/transcoders/stop_and_wait.rb +50 -0
- data/examples/transcoders/thumbnail_url.rb +46 -0
- data/examples/transcoders/update.rb +43 -0
- data/images/wsc-ruby-1800x400.png +0 -0
- data/lib/wsc_sdk.rb +81 -0
- data/lib/wsc_sdk/client.rb +417 -0
- data/lib/wsc_sdk/configuration.rb +21 -0
- data/lib/wsc_sdk/constants.rb +29 -0
- data/lib/wsc_sdk/endpoint.rb +492 -0
- data/lib/wsc_sdk/endpoints/custom_stream_targets.rb +44 -0
- data/lib/wsc_sdk/endpoints/live_streams.rb +34 -0
- data/lib/wsc_sdk/endpoints/output_stream_targets.rb +17 -0
- data/lib/wsc_sdk/endpoints/outputs.rb +17 -0
- data/lib/wsc_sdk/endpoints/stream_targets.rb +45 -0
- data/lib/wsc_sdk/endpoints/transcoders.rb +38 -0
- data/lib/wsc_sdk/endpoints/ull_stream_targets.rb +44 -0
- data/lib/wsc_sdk/endpoints/wowza_stream_targets.rb +44 -0
- data/lib/wsc_sdk/enums.rb +31 -0
- data/lib/wsc_sdk/enums/billing_mode.rb +20 -0
- data/lib/wsc_sdk/enums/broadcast_location.rb +58 -0
- data/lib/wsc_sdk/enums/buffer_size.rb +41 -0
- data/lib/wsc_sdk/enums/closed_caption_type.rb +26 -0
- data/lib/wsc_sdk/enums/custom_provider.rb +32 -0
- data/lib/wsc_sdk/enums/delivery_method.rb +20 -0
- data/lib/wsc_sdk/enums/delivery_type.rb +20 -0
- data/lib/wsc_sdk/enums/encoder.rb +71 -0
- data/lib/wsc_sdk/enums/idle_timeout.rb +50 -0
- data/lib/wsc_sdk/enums/image_position.rb +26 -0
- data/lib/wsc_sdk/enums/player_type.rb +20 -0
- data/lib/wsc_sdk/enums/protocol.rb +23 -0
- data/lib/wsc_sdk/enums/target_delivery_protocol.rb +20 -0
- data/lib/wsc_sdk/enums/transcoder_type.rb +20 -0
- data/lib/wsc_sdk/enums/wowza_provider.rb +20 -0
- data/lib/wsc_sdk/errors.rb +115 -0
- data/lib/wsc_sdk/model.rb +515 -0
- data/lib/wsc_sdk/model_list.rb +42 -0
- data/lib/wsc_sdk/model_template.rb +27 -0
- data/lib/wsc_sdk/models/custom_stream_target.rb +34 -0
- data/lib/wsc_sdk/models/error.rb +53 -0
- data/lib/wsc_sdk/models/live_stream.rb +130 -0
- data/lib/wsc_sdk/models/live_stream_connection_code.rb +31 -0
- data/lib/wsc_sdk/models/live_stream_state.rb +20 -0
- data/lib/wsc_sdk/models/live_stream_stats.rb +20 -0
- data/lib/wsc_sdk/models/live_stream_thumbnail_url.rb +20 -0
- data/lib/wsc_sdk/models/output.rb +61 -0
- data/lib/wsc_sdk/models/output_stream_target.rb +37 -0
- data/lib/wsc_sdk/models/stream_target.rb +29 -0
- data/lib/wsc_sdk/models/transcoder.rb +135 -0
- data/lib/wsc_sdk/models/transcoder_boolean_stat.rb +41 -0
- data/lib/wsc_sdk/models/transcoder_connection_code.rb +29 -0
- data/lib/wsc_sdk/models/transcoder_float_stat.rb +40 -0
- data/lib/wsc_sdk/models/transcoder_integer_stat.rb +40 -0
- data/lib/wsc_sdk/models/transcoder_state.rb +31 -0
- data/lib/wsc_sdk/models/transcoder_stats.rb +51 -0
- data/lib/wsc_sdk/models/transcoder_stream_target_state.rb +29 -0
- data/lib/wsc_sdk/models/transcoder_string_stat.rb +40 -0
- data/lib/wsc_sdk/models/transcoder_thumbnail_url.rb +29 -0
- data/lib/wsc_sdk/models/ull_stream_target.rb +54 -0
- data/lib/wsc_sdk/models/wowza_stream_target.rb +60 -0
- data/lib/wsc_sdk/modules/api_response.rb +24 -0
- data/lib/wsc_sdk/modules/loggable.rb +44 -0
- data/lib/wsc_sdk/modules/transcoder_shared_methods.rb +221 -0
- data/lib/wsc_sdk/pagination.rb +89 -0
- data/lib/wsc_sdk/schema.rb +140 -0
- data/lib/wsc_sdk/schema_attribute.rb +349 -0
- data/lib/wsc_sdk/templates/custom_stream_target.rb +154 -0
- data/lib/wsc_sdk/templates/live_stream.rb +234 -0
- data/lib/wsc_sdk/templates/output.rb +133 -0
- data/lib/wsc_sdk/templates/transcoder.rb +97 -0
- data/lib/wsc_sdk/templates/ull_stream_target.rb +49 -0
- data/lib/wsc_sdk/templates/wowza_stream_target.rb +57 -0
- data/lib/wsc_sdk/version.rb +7 -0
- data/wsc_sdk.gemspec +48 -0
- metadata +460 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
####> This code and all components © 2015 – 2019 Wowza Media Systems, LLC. All rights reserved.
|
|
2
|
+
####> This code is licensed pursuant to the BSD 3-Clause License.
|
|
3
|
+
|
|
4
|
+
require 'wsc_sdk/enums/custom_provider'
|
|
5
|
+
|
|
6
|
+
module WscSdk
|
|
7
|
+
module Templates
|
|
8
|
+
|
|
9
|
+
# Templates for generating Custom Stream Targets
|
|
10
|
+
#
|
|
11
|
+
class CustomStreamTarget < ModelTemplate
|
|
12
|
+
|
|
13
|
+
# A template to build an Akamai HLS custom stream target
|
|
14
|
+
#
|
|
15
|
+
# @param [String] name
|
|
16
|
+
# The name of the transcoder
|
|
17
|
+
#
|
|
18
|
+
# @param [String] primary_url
|
|
19
|
+
# The primary URL of the stream target.
|
|
20
|
+
#
|
|
21
|
+
# @param [String] stream_name
|
|
22
|
+
# The name of the stream.
|
|
23
|
+
#
|
|
24
|
+
# @param [Hash] modifiers
|
|
25
|
+
# A hash of key/value modifiers to change data in the template.
|
|
26
|
+
#
|
|
27
|
+
def self.akamai_hd(name, primary_url, stream_name, modifiers={})
|
|
28
|
+
self.merge({
|
|
29
|
+
name: name,
|
|
30
|
+
provider: WscSdk::Enums::CustomProvider::AKAMAI_HD,
|
|
31
|
+
primary_url: primary_url,
|
|
32
|
+
stream_name: stream_name
|
|
33
|
+
}, modifiers)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# A template to build an Akamai HD custom stream target
|
|
37
|
+
#
|
|
38
|
+
# @param [String] name
|
|
39
|
+
# The name of the transcoder
|
|
40
|
+
#
|
|
41
|
+
# @param [String] primary_url
|
|
42
|
+
# The primary URL of the stream target.
|
|
43
|
+
#
|
|
44
|
+
# @param [String] stream_name
|
|
45
|
+
# The name of the stream.
|
|
46
|
+
#
|
|
47
|
+
# @param [Hash] modifiers
|
|
48
|
+
# A hash of key/value modifiers to change data in the template.
|
|
49
|
+
#
|
|
50
|
+
def self.akamai_hls(name, primary_url, stream_name, modifiers={})
|
|
51
|
+
self.merge({
|
|
52
|
+
name: name,
|
|
53
|
+
provider: WscSdk::Enums::CustomProvider::AKAMAI_HLS,
|
|
54
|
+
primary_url: primary_url,
|
|
55
|
+
stream_name: stream_name
|
|
56
|
+
}, modifiers)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# A template to build an Akamai RTMP custom stream target
|
|
60
|
+
#
|
|
61
|
+
# @param [String] name
|
|
62
|
+
# The name of the transcoder
|
|
63
|
+
#
|
|
64
|
+
# @param [String] primary_url
|
|
65
|
+
# The primary URL of the stream target.
|
|
66
|
+
#
|
|
67
|
+
# @param [String] stream_name
|
|
68
|
+
# The name of the stream.
|
|
69
|
+
#
|
|
70
|
+
# @param [Hash] modifiers
|
|
71
|
+
# A hash of key/value modifiers to change data in the template.
|
|
72
|
+
#
|
|
73
|
+
def self.akamai_rtmp(name, primary_url, stream_name, modifiers={})
|
|
74
|
+
self.merge({
|
|
75
|
+
name: name,
|
|
76
|
+
provider: WscSdk::Enums::CustomProvider::AKAMAI_RTMP,
|
|
77
|
+
primary_url: primary_url,
|
|
78
|
+
stream_name: stream_name
|
|
79
|
+
}, modifiers)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
# A template to build a Limelight custom stream target
|
|
84
|
+
#
|
|
85
|
+
# @param [String] name
|
|
86
|
+
# The name of the transcoder
|
|
87
|
+
#
|
|
88
|
+
# @param [String] primary_url
|
|
89
|
+
# The primary URL of the stream target.
|
|
90
|
+
#
|
|
91
|
+
# @param [String] stream_name
|
|
92
|
+
# The name of the stream.
|
|
93
|
+
#
|
|
94
|
+
# @param [Hash] modifiers
|
|
95
|
+
# A hash of key/value modifiers to change data in the template.
|
|
96
|
+
#
|
|
97
|
+
def self.limelight(name, primary_url, stream_name, modifiers={})
|
|
98
|
+
self.merge({
|
|
99
|
+
name: name,
|
|
100
|
+
provider: WscSdk::Enums::CustomProvider::LIMELIGHT,
|
|
101
|
+
primary_url: primary_url,
|
|
102
|
+
stream_name: stream_name
|
|
103
|
+
}, modifiers)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# A template to build an RTMP custom stream target
|
|
107
|
+
#
|
|
108
|
+
# @param [String] name
|
|
109
|
+
# The name of the transcoder
|
|
110
|
+
#
|
|
111
|
+
# @param [String] primary_url
|
|
112
|
+
# The primary URL of the stream target.
|
|
113
|
+
#
|
|
114
|
+
# @param [String] stream_name
|
|
115
|
+
# The name of the stream.
|
|
116
|
+
#
|
|
117
|
+
# @param [Hash] modifiers
|
|
118
|
+
# A hash of key/value modifiers to change data in the template.
|
|
119
|
+
#
|
|
120
|
+
def self.rtmp(name, primary_url, stream_name, modifiers={})
|
|
121
|
+
self.merge({
|
|
122
|
+
name: name,
|
|
123
|
+
provider: WscSdk::Enums::CustomProvider::RTMP,
|
|
124
|
+
primary_url: primary_url,
|
|
125
|
+
stream_name: stream_name
|
|
126
|
+
}, modifiers)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# A template to build an UStream custom stream target
|
|
130
|
+
#
|
|
131
|
+
# @param [String] name
|
|
132
|
+
# The name of the transcoder
|
|
133
|
+
#
|
|
134
|
+
# @param [String] primary_url
|
|
135
|
+
# The primary URL of the stream target.
|
|
136
|
+
#
|
|
137
|
+
# @param [String] stream_name
|
|
138
|
+
# The name of the stream.
|
|
139
|
+
#
|
|
140
|
+
# @param [Hash] modifiers
|
|
141
|
+
# A hash of key/value modifiers to change data in the template.
|
|
142
|
+
#
|
|
143
|
+
def self.ustream(name, primary_url, stream_name, modifiers={})
|
|
144
|
+
self.merge({
|
|
145
|
+
name: name,
|
|
146
|
+
provider: WscSdk::Enums::CustomProvider::USTREAM,
|
|
147
|
+
primary_url: primary_url,
|
|
148
|
+
stream_name: stream_name
|
|
149
|
+
}, modifiers)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
####> This code and all components © 2015 – 2019 Wowza Media Systems, LLC. All rights reserved.
|
|
2
|
+
####> This code is licensed pursuant to the BSD 3-Clause License.
|
|
3
|
+
|
|
4
|
+
module WscSdk
|
|
5
|
+
module Templates
|
|
6
|
+
|
|
7
|
+
# Templates for generating Live Streams
|
|
8
|
+
#
|
|
9
|
+
class LiveStream < ModelTemplate
|
|
10
|
+
|
|
11
|
+
# A template to build a Wowza Streaming Engine Live Stream with
|
|
12
|
+
# single-bitrate delivery
|
|
13
|
+
#
|
|
14
|
+
# @param [String] name
|
|
15
|
+
# The name of the live stream.
|
|
16
|
+
#
|
|
17
|
+
# @param [Integer] width
|
|
18
|
+
# The width of the largest rendition of the stream.
|
|
19
|
+
#
|
|
20
|
+
# @param [Integer] height
|
|
21
|
+
# The height of the largest rendition of the stream.
|
|
22
|
+
#
|
|
23
|
+
# @param [Hash] modifiers
|
|
24
|
+
# A hash of key/value modifiers to change data in the template.
|
|
25
|
+
#
|
|
26
|
+
def self.wse_single_bitrate(name, width, height, modifiers={})
|
|
27
|
+
self.merge({
|
|
28
|
+
name: name,
|
|
29
|
+
encoder: WscSdk::Enums::Encoder::WOWZA_STREAMING_ENGINE,
|
|
30
|
+
broadcast_location: WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
|
|
31
|
+
aspect_ratio_width: width,
|
|
32
|
+
aspect_ratio_height: height,
|
|
33
|
+
delivery_type: WscSdk::Enums::DeliveryType::SINGLE_BITRATE,
|
|
34
|
+
delivery_method: WscSdk::Enums::DeliveryMethod::PUSH
|
|
35
|
+
}, modifiers)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# A template to build a Wowza Streaming Engine Live Stream with
|
|
39
|
+
# single-bitrate delivery
|
|
40
|
+
#
|
|
41
|
+
# @param [String] name
|
|
42
|
+
# The name of the live stream.
|
|
43
|
+
#
|
|
44
|
+
# @param [Integer] width
|
|
45
|
+
# The width of the largest rendition of the stream.
|
|
46
|
+
#
|
|
47
|
+
# @param [Integer] height
|
|
48
|
+
# The height of the largest rendition of the stream.
|
|
49
|
+
#
|
|
50
|
+
# @param [Hash] modifiers
|
|
51
|
+
# A hash of key/value modifiers to change data in the template.
|
|
52
|
+
#
|
|
53
|
+
def self.wse_multi_bitrate(name, width, height, modifiers={})
|
|
54
|
+
self.merge({
|
|
55
|
+
name: name,
|
|
56
|
+
encoder: WscSdk::Enums::Encoder::WOWZA_STREAMING_ENGINE,
|
|
57
|
+
broadcast_location: WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
|
|
58
|
+
aspect_ratio_width: width,
|
|
59
|
+
aspect_ratio_height: height,
|
|
60
|
+
delivery_type: WscSdk::Enums::DeliveryType::MULTI_BITRATE,
|
|
61
|
+
delivery_method: WscSdk::Enums::DeliveryMethod::PUSH
|
|
62
|
+
}, modifiers)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# A template to build a Wowza GoCoder Live Stream with
|
|
66
|
+
# multi-bitrate delivery
|
|
67
|
+
#
|
|
68
|
+
# @param [String] name
|
|
69
|
+
# The name of the live stream.
|
|
70
|
+
#
|
|
71
|
+
# @param [Integer] width
|
|
72
|
+
# The width of the largest rendition of the stream.
|
|
73
|
+
#
|
|
74
|
+
# @param [Integer] height
|
|
75
|
+
# The height of the largest rendition of the stream.
|
|
76
|
+
#
|
|
77
|
+
# @param [Hash] modifiers
|
|
78
|
+
# A hash of key/value modifiers to change data in the template.
|
|
79
|
+
#
|
|
80
|
+
def self.gocoder(name, width, height, modifiers={})
|
|
81
|
+
self.merge({
|
|
82
|
+
name: name,
|
|
83
|
+
encoder: WscSdk::Enums::Encoder::WOWZA_GOCODER,
|
|
84
|
+
broadcast_location: WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
|
|
85
|
+
aspect_ratio_width: width,
|
|
86
|
+
aspect_ratio_height: height,
|
|
87
|
+
delivery_method: WscSdk::Enums::DeliveryMethod::PUSH
|
|
88
|
+
}, modifiers)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# A template to build an IP Camera Live Stream with with RTSP/PULL
|
|
93
|
+
# delivery.
|
|
94
|
+
#
|
|
95
|
+
# @param [String] name
|
|
96
|
+
# The name of the live stream.
|
|
97
|
+
#
|
|
98
|
+
# @param [Integer] width
|
|
99
|
+
# The width of the largest rendition of the stream.
|
|
100
|
+
#
|
|
101
|
+
# @param [Integer] height
|
|
102
|
+
# The height of the largest rendition of the stream.
|
|
103
|
+
#
|
|
104
|
+
# @param [String] source_url
|
|
105
|
+
# The source url of the IP camera.
|
|
106
|
+
#
|
|
107
|
+
# @param [Hash] modifiers
|
|
108
|
+
# A hash of key/value modifiers to change data in the template.
|
|
109
|
+
#
|
|
110
|
+
def self.ip_camera(name, width, height, source_url, modifiers={})
|
|
111
|
+
self.merge({
|
|
112
|
+
name: name,
|
|
113
|
+
encoder: WscSdk::Enums::Encoder::IP_CAMERA,
|
|
114
|
+
broadcast_location: WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
|
|
115
|
+
aspect_ratio_width: width,
|
|
116
|
+
aspect_ratio_height: height,
|
|
117
|
+
source_url: source_url,
|
|
118
|
+
delivery_method: WscSdk::Enums::DeliveryMethod::PULL
|
|
119
|
+
}, modifiers)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# A template to build an Other RTMP/PUSH Live Stream
|
|
123
|
+
#
|
|
124
|
+
# @param [String] name
|
|
125
|
+
# The name of the live stream.
|
|
126
|
+
#
|
|
127
|
+
# @param [Integer] width
|
|
128
|
+
# The width of the largest rendition of the stream.
|
|
129
|
+
#
|
|
130
|
+
# @param [Integer] height
|
|
131
|
+
# The height of the largest rendition of the stream.
|
|
132
|
+
#
|
|
133
|
+
# @param [Hash] modifiers
|
|
134
|
+
# A hash of key/value modifiers to change data in the template.
|
|
135
|
+
#
|
|
136
|
+
def self.rtmp_push(name, width, height, modifiers={})
|
|
137
|
+
self.merge({
|
|
138
|
+
name: name,
|
|
139
|
+
encoder: WscSdk::Enums::Encoder::OTHER_RTMP,
|
|
140
|
+
delivery_method: WscSdk::Enums::DeliveryMethod::PUSH,
|
|
141
|
+
broadcast_location: WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
|
|
142
|
+
aspect_ratio_width: width,
|
|
143
|
+
aspect_ratio_height: height
|
|
144
|
+
}, modifiers)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# A template to build an Other RTMP/PULL Live Stream
|
|
148
|
+
#
|
|
149
|
+
# @param [String] name
|
|
150
|
+
# The name of the live stream.
|
|
151
|
+
#
|
|
152
|
+
# @param [Integer] width
|
|
153
|
+
# The width of the largest rendition of the stream.
|
|
154
|
+
#
|
|
155
|
+
# @param [Integer] height
|
|
156
|
+
# The height of the largest rendition of the stream.
|
|
157
|
+
#
|
|
158
|
+
# @param [String] source_url
|
|
159
|
+
# The source url of the IP camera.
|
|
160
|
+
#
|
|
161
|
+
# @param [Hash] modifiers
|
|
162
|
+
# A hash of key/value modifiers to change data in the template.
|
|
163
|
+
#
|
|
164
|
+
def self.rtmp_pull(name, width, height, source_url, modifiers={})
|
|
165
|
+
self.merge({
|
|
166
|
+
name: name,
|
|
167
|
+
encoder: WscSdk::Enums::Encoder::OTHER_RTMP,
|
|
168
|
+
protocol: WscSdk::Enums::Protocol::RTMP,
|
|
169
|
+
delivery_method: WscSdk::Enums::DeliveryMethod::PULL,
|
|
170
|
+
broadcast_location: WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
|
|
171
|
+
aspect_ratio_width: width,
|
|
172
|
+
aspect_ratio_height: height,
|
|
173
|
+
source_url: source_url
|
|
174
|
+
}, modifiers)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
# A template to build an Other RTSP/PUSH Live Stream
|
|
179
|
+
#
|
|
180
|
+
# @param [String] name
|
|
181
|
+
# The name of the live stream.
|
|
182
|
+
#
|
|
183
|
+
# @param [Integer] width
|
|
184
|
+
# The width of the largest rendition of the stream.
|
|
185
|
+
#
|
|
186
|
+
# @param [Integer] height
|
|
187
|
+
# The height of the largest rendition of the stream.
|
|
188
|
+
#
|
|
189
|
+
# @param [Hash] modifiers
|
|
190
|
+
# A hash of key/value modifiers to change data in the template.
|
|
191
|
+
#
|
|
192
|
+
def self.rtsp_push(name, width, height, modifiers={})
|
|
193
|
+
self.merge({
|
|
194
|
+
name: name,
|
|
195
|
+
encoder: WscSdk::Enums::Encoder::OTHER_RTSP,
|
|
196
|
+
delivery_method: WscSdk::Enums::DeliveryMethod::PUSH,
|
|
197
|
+
broadcast_location: WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
|
|
198
|
+
aspect_ratio_width: width,
|
|
199
|
+
aspect_ratio_height: height
|
|
200
|
+
}, modifiers)
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# A template to build an Other RTSP/PULL Live Stream
|
|
204
|
+
#
|
|
205
|
+
# @param [String] name
|
|
206
|
+
# The name of the live stream.
|
|
207
|
+
#
|
|
208
|
+
# @param [Integer] width
|
|
209
|
+
# The width of the largest rendition of the stream.
|
|
210
|
+
#
|
|
211
|
+
# @param [Integer] height
|
|
212
|
+
# The height of the largest rendition of the stream.
|
|
213
|
+
#
|
|
214
|
+
# @param [String] source_url
|
|
215
|
+
# The source url of the IP camera.
|
|
216
|
+
#
|
|
217
|
+
# @param [Hash] modifiers
|
|
218
|
+
# A hash of key/value modifiers to change data in the template.
|
|
219
|
+
#
|
|
220
|
+
def self.rtsp_pull(name, width, height, source_url, modifiers={})
|
|
221
|
+
self.merge({
|
|
222
|
+
name: name,
|
|
223
|
+
encoder: WscSdk::Enums::Encoder::OTHER_RTSP,
|
|
224
|
+
delivery_method: WscSdk::Enums::DeliveryMethod::PULL,
|
|
225
|
+
broadcast_location: WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
|
|
226
|
+
aspect_ratio_width: width,
|
|
227
|
+
aspect_ratio_height: height,
|
|
228
|
+
source_url: source_url
|
|
229
|
+
}, modifiers)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
end
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
####> This code and all components © 2015 – 2019 Wowza Media Systems, LLC. All rights reserved.
|
|
2
|
+
####> This code is licensed pursuant to the BSD 3-Clause License.
|
|
3
|
+
|
|
4
|
+
module WscSdk
|
|
5
|
+
module Templates
|
|
6
|
+
|
|
7
|
+
# Templates for generating Outputs
|
|
8
|
+
#
|
|
9
|
+
class Output < ModelTemplate
|
|
10
|
+
|
|
11
|
+
# Generate a Full HD output (1920x1080).
|
|
12
|
+
#
|
|
13
|
+
# @param [Hash] modifiers
|
|
14
|
+
# A hash of key/value modifiers to change data in the template.
|
|
15
|
+
#
|
|
16
|
+
def self.full_hd(modifiers={})
|
|
17
|
+
self.merge({
|
|
18
|
+
stream_format: "audiovideo",
|
|
19
|
+
passthrough_video: false,
|
|
20
|
+
passthrough_audio: false,
|
|
21
|
+
aspect_ratio_height: 1080,
|
|
22
|
+
aspect_ratio_width: 1920,
|
|
23
|
+
bitrate_audio: 128,
|
|
24
|
+
bitrate_video: 4000,
|
|
25
|
+
h264_profile: "high",
|
|
26
|
+
framerate_reduction: "0",
|
|
27
|
+
keyframes: "follow_source"
|
|
28
|
+
}, modifiers)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Generate an HD output (1280x720)
|
|
32
|
+
#
|
|
33
|
+
# @param [Hash] modifiers
|
|
34
|
+
# A hash of key/value modifiers to change data in the template.
|
|
35
|
+
#
|
|
36
|
+
def self.hd(modifiers={})
|
|
37
|
+
self.merge({
|
|
38
|
+
stream_format: "audiovideo",
|
|
39
|
+
passthrough_video: false,
|
|
40
|
+
passthrough_audio: false,
|
|
41
|
+
aspect_ratio_height: 720,
|
|
42
|
+
aspect_ratio_width: 1280,
|
|
43
|
+
bitrate_audio: 128,
|
|
44
|
+
bitrate_video: 2600,
|
|
45
|
+
h264_profile: "high",
|
|
46
|
+
framerate_reduction: "0",
|
|
47
|
+
keyframes: "follow_source",
|
|
48
|
+
}, modifiers)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# Generate an SD wide screen output (854x480)
|
|
53
|
+
#
|
|
54
|
+
# @param [Hash] modifiers
|
|
55
|
+
# A hash of key/value modifiers to change data in the template.
|
|
56
|
+
#
|
|
57
|
+
def self.sd_wide(modifiers={})
|
|
58
|
+
self.merge({
|
|
59
|
+
stream_format: "audiovideo",
|
|
60
|
+
passthrough_video: false,
|
|
61
|
+
passthrough_audio: false,
|
|
62
|
+
aspect_ratio_height: 480,
|
|
63
|
+
aspect_ratio_width: 854,
|
|
64
|
+
bitrate_audio: 128,
|
|
65
|
+
bitrate_video: 1600,
|
|
66
|
+
h264_profile: "main",
|
|
67
|
+
framerate_reduction: "0",
|
|
68
|
+
keyframes: "follow_source",
|
|
69
|
+
}, modifiers)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Generate a larger sized low res output (640x360)
|
|
73
|
+
#
|
|
74
|
+
# @param [Hash] modifiers
|
|
75
|
+
# A hash of key/value modifiers to change data in the template.
|
|
76
|
+
#
|
|
77
|
+
def self.low_res_large(modifiers={})
|
|
78
|
+
self.merge({
|
|
79
|
+
stream_format: "audiovideo",
|
|
80
|
+
passthrough_video: false,
|
|
81
|
+
passthrough_audio: false,
|
|
82
|
+
aspect_ratio_height: 360,
|
|
83
|
+
aspect_ratio_width: 640,
|
|
84
|
+
bitrate_audio: 128,
|
|
85
|
+
bitrate_video: 1024,
|
|
86
|
+
h264_profile: "main",
|
|
87
|
+
framerate_reduction: "0",
|
|
88
|
+
keyframes: "follow_source",
|
|
89
|
+
}, modifiers)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Generate a medium sized low res output (512x288)
|
|
93
|
+
#
|
|
94
|
+
# @param [Hash] modifiers
|
|
95
|
+
# A hash of key/value modifiers to change data in the template.
|
|
96
|
+
#
|
|
97
|
+
def self.low_res_medium(modifiers={})
|
|
98
|
+
self.merge({
|
|
99
|
+
stream_format: "audiovideo",
|
|
100
|
+
passthrough_video: false,
|
|
101
|
+
passthrough_audio: false,
|
|
102
|
+
aspect_ratio_height: 288,
|
|
103
|
+
aspect_ratio_width: 512,
|
|
104
|
+
bitrate_audio: 128,
|
|
105
|
+
bitrate_video: 512,
|
|
106
|
+
h264_profile: "baseline",
|
|
107
|
+
framerate_reduction: "0",
|
|
108
|
+
keyframes: "follow_source",
|
|
109
|
+
}, modifiers)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Generate a smaller sized low res output (320x180)
|
|
113
|
+
#
|
|
114
|
+
# @param [Hash] modifiers
|
|
115
|
+
# A hash of key/value modifiers to change data in the template.
|
|
116
|
+
#
|
|
117
|
+
def self.low_res_small(modifiers={})
|
|
118
|
+
self.merge({
|
|
119
|
+
stream_format: "audiovideo",
|
|
120
|
+
passthrough_video: false,
|
|
121
|
+
passthrough_audio: false,
|
|
122
|
+
aspect_ratio_height: 180,
|
|
123
|
+
aspect_ratio_width: 320,
|
|
124
|
+
bitrate_audio: 128,
|
|
125
|
+
bitrate_video: 320,
|
|
126
|
+
h264_profile: "baseline",
|
|
127
|
+
framerate_reduction: "0",
|
|
128
|
+
keyframes: "follow_source",
|
|
129
|
+
}, modifiers)
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|