Class: WscSdk::Models::Transcoder

Inherits:
WscSdk::Model show all
Includes:
TranscoderSharedMethods
Defined in:
lib/wsc_sdk/models/transcoder.rb

Overview

A model to represent a Transcoder in the Wowza Streaming Cloud API.

Instance Attribute Summary

Attributes inherited from WscSdk::Model

#attributes, #changes, #data_mode, #endpoint, #errors, #partial_data

Instance Method Summary collapse

Methods included from TranscoderSharedMethods

#reset, #start, #state, #stop

Methods inherited from WscSdk::Model

#add_error, attribute, #build_payload, #build_payload!, #clean!, #clear_primary_key, #delete, #dirty?, #has_attribute?, #ingest_attribute, #ingest_attributes, #initialize, #initialize_attributes, model_name_plural, model_name_singular, #new_model?, #primary_key, primary_key, #primary_key_attribute, #refresh, #save, #schema, schema, #success?, #valid!, #valid?, #validate

Methods included from Loggable

#logger, #logger=

Methods included from ApiResponse

#success?

Constructor Details

This class inherits a constructor from WscSdk::Model

Instance Method Details

#disable_all_stream_targetsWscSdk::Model::TranscoderStreamTargetState

Disables all of the stream targets assigned to the transcoder.

Returns:

  • (WscSdk::Model::TranscoderStreamTargetState)


129
130
131
# File 'lib/wsc_sdk/models/transcoder.rb', line 129

def disable_all_stream_targets
  return self.endpoint.disable_all_stream_targets(self.id)
end

#enable_all_stream_targetsWscSdk::Model::TranscoderStreamTargetState

Enables all of the stream targets assigned to the transcoder.

Returns:

  • (WscSdk::Model::TranscoderStreamTargetState)


121
122
123
# File 'lib/wsc_sdk/models/transcoder.rb', line 121

def enable_all_stream_targets
  return self.endpoint.enable_all_stream_targets(self.id)
end

#outputsWscSdk::Endpoints::Outputs

Outputs endpoint for outputs associated with the transcoder.

Returns:

  • (WscSdk::Endpoints::Outputs)

    An instance of the Outputs endpoint, with the results limited to the outputs associated with this trancoder.



85
86
87
# File 'lib/wsc_sdk/models/transcoder.rb', line 85

def outputs
  @outputs ||= WscSdk::Endpoints::Outputs.new(endpoint.client, parent_path: endpoint.find_path(self.primary_key))
end

#regenerate_connection_codeWscSdk::Models::TranscoderConnectionCode

Regenerates the connection code for the transcoder.

Returns:



113
114
115
# File 'lib/wsc_sdk/models/transcoder.rb', line 113

def regenerate_connection_code
  return self.endpoint.regenerate_connection_code(self.id)
end

#source_url_is_required?Boolean

Determine if the source_url attribute is required.

Returns:

  • (Boolean)


66
67
68
# File 'lib/wsc_sdk/models/transcoder.rb', line 66

def source_url_is_required?
  delivery_method == Enums::DeliveryMethod::PULL
end

#statsWscSdk::Models::TranscoderStats

Returns the current transcoding statistics for the transcoder.

Returns:



104
105
106
# File 'lib/wsc_sdk/models/transcoder.rb', line 104

def stats
  return self.endpoint.stats(self.id)
end

#thumbnail_urlString

Returns a URL where the current thumbnail image for the transcoder can be retrieved

Returns:

  • (String)

    The URL of the thumbnail image.



95
96
97
# File 'lib/wsc_sdk/models/transcoder.rb', line 95

def thumbnail_url
  return self.endpoint.thumbnail_url(self.id)
end