Class: WscSdk::Templates::Transcoder

Inherits:
ModelTemplate show all
Defined in:
lib/wsc_sdk/templates/transcoder.rb

Overview

Templates for generating Transcoders

Class Method Summary collapse

Methods inherited from ModelTemplate

merge

Class Method Details

.rtmp_pull(name, source_url, modifiers = {}) ⇒ Object

A template to build an RTMP/PULL transcoder

Parameters:

  • name (String)

    The name of the transcoder

  • source_url (String)

    The source URL of the encoded stream

  • modifiers (Hash) (defaults to: {})

    A hash of key/value modifiers to change data in the template.



22
23
24
25
26
27
28
29
30
# File 'lib/wsc_sdk/templates/transcoder.rb', line 22

def self.rtmp_pull(name, source_url, modifiers={})
  self.merge({
    name:                   name,
    source_url:             source_url,
    broadcast_location:     WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
    protocol:               WscSdk::Enums::Protocol::RTMP,
    delivery_method:        WscSdk::Enums::DeliveryMethod::PULL
  }, modifiers)
end

.rtmp_push(name, stream_source_id, modifiers = {}) ⇒ Object

A template to build an RTMP/PUSH transcoder

Parameters:

  • name (String)

    The name of the transcoder

  • stream_source_id (String)

    The ID of the stream source to push data to.

  • modifiers (Hash) (defaults to: {})

    A hash of key/value modifiers to change data in the template.



43
44
45
46
47
48
49
50
51
# File 'lib/wsc_sdk/templates/transcoder.rb', line 43

def self.rtmp_push(name, stream_source_id, modifiers={})
  self.merge({
    name:                   name,
    stream_source_id:       stream_source_id,
    broadcast_location:     WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
    protocol:               WscSdk::Enums::Protocol::RTMP,
    delivery_method:        WscSdk::Enums::DeliveryMethod::PUSH
  }, modifiers)
end

.rtsp_pull(name, source_url, modifiers = {}) ⇒ Object

A template to build an RTSP/PULL transcoder

Parameters:

  • name (String)

    The name of the transcoder

  • source_url (String)

    The source URL of the encoded stream

  • modifiers (Hash) (defaults to: {})

    A hash of key/value modifiers to change data in the template.



65
66
67
68
69
70
71
72
73
# File 'lib/wsc_sdk/templates/transcoder.rb', line 65

def self.rtsp_pull(name, source_url, modifiers={})
  self.merge({
    name:                   name,
    source_url:             source_url,
    broadcast_location:     WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
    protocol:               WscSdk::Enums::Protocol::RTSP,
    delivery_method:        WscSdk::Enums::DeliveryMethod::PULL
  }, modifiers)
end

.rtsp_push(name, stream_source_id, modifiers = {}) ⇒ Object

A template to build an RTSP/PULL transcoder

Parameters:

  • name (String)

    The name of the transcoder

  • stream_source_id (String)

    The ID of the stream source to push data to.

  • modifiers (Hash) (defaults to: {})

    A hash of key/value modifiers to change data in the template.



86
87
88
89
90
91
92
93
94
# File 'lib/wsc_sdk/templates/transcoder.rb', line 86

def self.rtsp_push(name, stream_source_id, modifiers={})
  self.merge({
    name:                   name,
    stream_source_id:       stream_source_id,
    broadcast_location:     WscSdk::Enums::BroadcastLocation::US_WEST_CALIFORNIA,
    protocol:               WscSdk::Enums::Protocol::RTSP,
    delivery_method:        WscSdk::Enums::DeliveryMethod::PUSH
  }, modifiers)
end