Class: FFruby::AudioStream

Inherits:
Stream
  • Object
show all
Defined in:
ext/ffruby/ffrubystream.c,
ext/ffruby/ffrubystream.c

Overview

An interface to FFmpeg on audio streams. Provides access to audio metadata.

Instance Method Summary collapse

Methods inherited from Stream

#bit_rate, #codec, #initialize, #tag

Constructor Details

This class inherits a constructor from FFruby::Stream

Instance Method Details

#channelsObject

Returns the number of audio channels.



163
164
165
166
167
# File 'ext/ffruby/ffrubystream.c', line 163

static VALUE ffras_channels(VALUE self)
{
	AVStream *stream = ffrs_get_stream(self);
	return INT2FIX(stream->codec->channels);
}

#sample_rateObject

Returns the sample rate.



170
171
172
173
174
# File 'ext/ffruby/ffrubystream.c', line 170

static VALUE ffras_sample_rate(VALUE self)
{
	AVStream *stream = ffrs_get_stream(self);
	return INT2NUM(stream->codec->sample_rate);
}