Sha256: fadefdeef2760ad8dfedaf70907e6a109d0cce2ed0a1a8f278a61d9d46ae9d3a

Contents?: true

Size: 856 Bytes

Versions: 4

Compression:

Stored size: 856 Bytes

Contents

# frozen_string_literal: true

module Evostream
  module Commands
    # Send command transcode
    # @see https://docs.evostream.com/2.0/transcode.html
    class Transcode < Command
      MANDATORY = %w[source destinations].freeze

      def initialize(commands = {
        source: 'null', destinations: 'null'
      })
        super(commands)
      end

      def cmd
        super
        "transcode?params=#{encode64}"
      end

      private

      attr_reader :command

      def source(param)
        "source=#{param}"
      end

      def group_name(param)
        "groupName=#{param}"
      end

      def video_bitrates(param)
        "videoBitrates=#{param}"
      end

      def audio_bitrates(param)
        "audioBitrates=#{param}"
      end

      def destinations(param = 'null')
        "destinations=#{param}"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
evostream-event-2.0.3 lib/evostream/event/commands/transcode.rb
evostream-event-2.0.3.pre.1265906291 lib/evostream/event/commands/transcode.rb
evostream-event-2.0.3.pre.1265756691 lib/evostream/event/commands/transcode.rb
evostream-event-2.0.3.pre.1265752332 lib/evostream/event/commands/transcode.rb