Class | Xiron::Stream |
In: |
ext/audioport.c
lib/xiron/stream.rb |
Parent: | Object |
album | [R] | The album of opened title. |
amp_mute | [RW] | Boolean |
amplification | [RW] | The value is in 0%..200% with default of 100%. Due to xine’s internal conversion, the returned value may not be exact the value given. |
artist | [R] | The artist of opened media stream. |
aspect_ratio | [RW] | "auto", "square", "normal", "anamorphic" or "dvb" |
audio_bitrate | [R] | Numeric |
audio_bits | [R] | Numeric |
audio_channel | [RW] | Audio channel number. Special values: -1 means auto, -2 means off. |
audio_channels | [R] | Numeric |
audio_close | [RW] | Boolean |
audio_fourcc | [R] | String |
audio_handled? | [R] | Boolean |
audio_port | [R] | The AudioPort given on instanciation of the stream. |
audio_samplerate | [R] | Numeric |
audiocodec | [R] | The audio-codec of opened media stream. |
av_offset | [RW] | Numeric |
bitrate | [R] | Numeric |
brightness | [RW] | brightness of video output. valid range: -100..100, default is 0. |
cdindex_discid | [R] | The disc id of opened title. |
comment | [R] | The comment of opened media stream. |
compression | [RW] | A value <= 100 means compression is off, >100 is the compression percentage used. The returned value may not be exact the value given. This is due to xine’s internal conversion. |
contrast | [RW] | contrast of video output. valid range: -100..100, default is 0. |
crop_bottom | [RW] | The number of pixels which will be croped from the lower border of the video |
crop_left | [RW] | The number of pixels which will be croped from the left border of the video |
crop_right | [RW] | The number of pixels which will be croped from the right border of the video |
crop_top | [RW] | The number of pixels which will be croped from the upper border of the video |
date | [R] | The creation date of opened media stream. |
deinterlace | [RW] | Boolean |
discarded_frames | [R] | Number of decoded but discarded frames of the last 1000. |
fine_speed | [RW] | The value is in 0..2000000 with normal speed=1000000 |
frame_duration | [R] | Duration of a single frame in 1/90000s. So divide by 90 to get ms. |
genre | [R] | The genre of opened title. |
has_audio? | [R] | Boolean |
has_chapters? | [R] | Boolean |
has_video? | [R] | Boolean |
hue | [RW] | hue of video output. valid range: -100..100, default is 0. broken on nvidia cards. |
ignore_audio | [RW] | Boolean, xine’s stream parameter |
ignore_audio? | [R] | Boolean from xine’s stream info. |
ignore_spu | [RW] | Boolean, xine’s stream parameter |
ignore_spu? | [R] | Boolean from xine’s stream info. |
ignore_video | [RW] | Boolean, xine’s stream parameter |
ignore_video? | [R] | Boolean from xine’s stream info. |
input_plugin | [R] | The input plugin id current media is loaded with. |
languages | [R] | An Array with available languages. |
length | [R] | The length of the stream in seconds. May be invalid in live streams. |
max_audio_channel | [R] | Numeric |
max_spu_channel | [R] | Numeric |
mute | [RW] | Audio is muted, if true. |
paused? | [R] | true, if a media is loaded and paused |
playing? | [R] | true, if a media is loaded and playing (not paused) |
port | [RW] | Broadcast port of the stream. Set to 0 to turn off broadcasting. |
position | [RW] | Holds the current position of media playback in percent. An assignment to this property causes a seek to the new position. If you want to seek in a separate thread, use Stream#play. |
prebuffer | [RW] | Numeric |
report_volume | [RW] | Generate audio volume changed events, if true. |
saturation | [RW] | saturation of video output. valid range: -100..100, default is 0. |
seekable? | [R] | Boolean |
skipped_frames | [R] | Number of skipped frames of the last 1000. |
speed | [RW] | Possible values are: "pause", "quater", "half", "normal", "double", "quadruple" |
spu_channel | [RW] | Numeric |
spu_offset | [RW] | Numeric |
status | [R] | holds the current status of the stream. idle means no mrl assigned. values may be: "idle", "stop", "play", "quit", "unknown" |
stopped? | [R] | true, if a media is loaded and neigher playing nor paused |
subtitles | [R] | An Array with available subtitles. |
systemlayer | [R] | The system-layer of opened media stream. |
time | [RW] | Holds the current time of media playback in seconds. An assignment to this property causes a seek to the new time. If you want to seek in a separate thread, use Stream#play. |
title | [R] | The title of opened media stream. |
track_number | [R] | The track number of current title. |
verbosity | [RW] | Verbosity level: "none", "log" or "debug" |
video_bitrate | [R] | Numeric |
video_channel | [RW] | Numeric |
video_channels | [R] | Numeric |
video_fourcc | [R] | String |
video_handled? | [R] | Boolean |
video_has_still? | [R] | Boolean |
video_height | [R] | Numeric |
video_port | [R] | The VideoPort given on instanciation of the stream. |
video_ratio | [R] | The aspect ratio of a video frame x:10000. |
video_streams | [R] | Numeric |
video_width | [R] | Numeric |
videocodec | [R] | The video-codec of opened media stream. |
volume | [RW] | The current volume of the stream in (0..100). Depending on the driver used, the returned value may not be exactly the value previously assigned. |
vpts | [R] | holds current xine’s virtual presentation timestamp (1/90000 sec). May be used in Osd#show and Osd#hide. |
zoom_x | [RW] | Numeric |
zoom_y | [RW] | Numeric |
Create a new stream. The VideoPort and AudioPort used to create the stream are extracted from the given parameters. It is possible to give an AudioPort or a VideoPort directly, giving one or more PostPort’s (which have to be input ports) or giving post plugins directly whose input ports shall be used. The first suitable ports are used. If there are no suitable audio or video ports among the parameters, these are created implicitely using autodetection.
Etablish a connection between compatible output ports of this stream instance to the given input port(s). The other port may be of class PostPort, VideoPort or AudioPort. If a Post instance is given, all output ports of the stream are wired to compatible input ports of the post plugin. If nothing can be wired because all input ports are incompatible, an exception is raised. Returns true, if rewireing was successful.
If two parameters given, Sets the equalizer value for given frequency. The value is a number in -100..100 and 0 by default. Returns the equalizer value of given frequency. The frequency is rounded down to the next available band: [ 30, 60, 125, 250, 500, 1000, 2000, 4000, 8000, 16000 ]. The returned value may not be exact the value given. This is due to xine’s internal conversion.
returns the frequency for v4l mrls for given channel. Stream#open, Stream#play and Stream#play_inline calls this method automatically if given v4l:// mrl has a channel and no frequency.
Starts a new thread which grabs keys typed in the terminal the script is started in. It sends these keys to the event system of xine. These events can then be handled by Stream#handle and Stream#wait.
If block is given, it is called on given event. If no block was given, an existing handler is uninstalled. The handler is only called, if Stream#wait is called. If the block evaluates to false, the event is considered not handled and will passed to Stream#wait. Only one handler can be installed for each event.
Returns the Proc object of the block installed.
Opens given mrl in order (unlike Stream#play). Returns true, if open was successful, false otherwise
Start playing the stream. mrl can be omitted, if it was given using Stream#open or a previous Stream#play. Position and time parameters are optional and cause the stream to seek to given position (percent) or time (seconds).
Play is executed in a separate thread. So the play status is sent as events (see Event, Stream#handle, Stream#wait).
Start playing the stream. mrl can be omitted, if it was given using Stream#open or a previous Stream#play. Position and time parameters are optional and cause the stream to seek to given position (percent) or time (seconds).
This method waits until the stream has been started or failed to start. Returns true, if the stream has been started successfully.
Sets the stream to be the master of given stream. The affection is given in a hash. By default play, stop and speed operations are affected.
Sets the stream to be the slave of given stream. The affection is given in a hash. By default play, stop and speed operations are affected.
Grabs the current frame from the video. On success, returns an Array of Arrays of scanlines. Each scanline array is filles filles with pixel data as fixnums between 0 and 255 and in the following pattern: [ r, g, b, r, g, b, … ].
Stops the playback in the stream. The associated mrl stays valid, so Stream#play may be called after this.
Waits for the next event of the stream and returns it. If a block is given, it is called with the event as parameter and wait only returns, if the block evaluates to true.
Calling wait is also neccessary if Stream#handle was used. If an event is handled this way, wait doesn’t return or call the block on this event.
The events "motion", "menu_motion" and mouse button presses are not passed to Stream#wait.