.TH "Engine management" 3 "15 Oct 2001" "XINE, A Free Video Player Project - API reference" \" -*- nroff -*- .ad l .nh .SH NAME Engine management \- .SS "Defines" .in +1c .ti -1c .RI "#define \fBSPEED_PAUSE\fP 0" .br .ti -1c .RI "#define \fBSPEED_SLOW_4\fP 1" .br .ti -1c .RI "#define \fBSPEED_SLOW_2\fP 2" .br .ti -1c .RI "#define \fBSPEED_NORMAL\fP 4" .br .ti -1c .RI "#define \fBSPEED_FAST_2\fP 8" .br .ti -1c .RI "#define \fBSPEED_FAST_4\fP 16" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "void \fBxine_play\fP (\fBxine_t\fP *self, char *MRL, int start_pos, int start_time)" .br .RI "\fIStart to play a stream.\fP" .ti -1c .RI "void \fBxine_set_speed\fP (\fBxine_t\fP *self, int speed)" .br .RI "\fISet playback speed.\fP" .ti -1c .RI "int \fBxine_get_speed\fP (\fBxine_t\fP *self)" .br .RI "\fIGet the playback speed.\fP" .ti -1c .RI "void \fBxine_set_av_offset\fP (\fBxine_t\fP *self, int offset_pts)" .br .RI "\fISet audio/video sync.\fP" .ti -1c .RI "int \fBxine_get_av_offset\fP (\fBxine_t\fP *self)" .br .RI "\fIGet audio/video sync.\fP" .ti -1c .RI "void \fBxine_stop\fP (\fBxine_t\fP *self)" .br .RI "\fIStop playing.\fP" .ti -1c .RI "int \fBxine_eject\fP (\fBxine_t\fP *self)" .br .RI "\fIEject media.\fP" .ti -1c .RI "int \fBxine_get_status\fP (\fBxine_t\fP *self)" .br .RI "\fIGet current xine status.\fP" .ti -1c .RI "int \fBxine_get_current_position\fP (\fBxine_t\fP *self)" .br .RI "\fIGet current position.\fP" .ti -1c .RI "int \fBxine_get_current_time\fP (\fBxine_t\fP *self)" .br .RI "\fIget current pos in seconds.\fP" .ti -1c .RI "int \fBxine_get_stream_length\fP (\fBxine_t\fP *self)" .br .RI "\fIestimate length of input stream in seconds.\fP" .ti -1c .RI "int \fBxine_get_audio_channel\fP (\fBxine_t\fP *self)" .br .RI "\fIGet current audio channel.\fP" .ti -1c .RI "void \fBxine_select_audio_channel\fP (\fBxine_t\fP *self, int channel)" .br .RI "\fISet audio channel.\fP" .ti -1c .RI "int \fBxine_get_spu_channel\fP (\fBxine_t\fP *self)" .br .RI "\fIGet current sub-title channel.\fP" .ti -1c .RI "void \fBxine_select_spu_channel\fP (\fBxine_t\fP *self, int channel)" .br .RI "\fISet sub-title channel.\fP" .in -1c .SH "DEFINE DOCUMENTATION" .PP .SS "#define SPEED_FAST_2 8" .PP Playback at 200% speed. .PP \fBSee also: \fP .in +1c \fBxine_set_speed\fP(), \fBxine_get_speed\fP() .SS "#define SPEED_FAST_4 16" .PP Playback at 400% speed. .PP \fBSee also: \fP .in +1c \fBxine_set_speed\fP(), \fBxine_get_speed\fP() .SS "#define SPEED_NORMAL 4" .PP Playback at 100% speed. .PP \fBSee also: \fP .in +1c \fBxine_set_speed\fP(), \fBxine_get_speed\fP() .SS "#define SPEED_PAUSE 0" .PP Playback pause. .PP \fBSee also: \fP .in +1c \fBxine_set_speed\fP(), \fBxine_get_speed\fP() .SS "#define SPEED_SLOW_2 2" .PP Playback at 50% speed. .PP \fBSee also: \fP .in +1c \fBxine_set_speed\fP(), \fBxine_get_speed\fP() .SS "#define SPEED_SLOW_4 1" .PP Playback at 25% speed. .PP \fBSee also: \fP .in +1c \fBxine_set_speed\fP(), \fBxine_get_speed\fP() .SH "FUNCTION DOCUMENTATION" .PP .SS "int xine_eject (\fBxine_t\fP * self)" .PP Eject media. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c 1 on success, 0 on failure. .PP Tell current input plugin to eject media. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .SS "int xine_get_audio_channel (\fBxine_t\fP * self)" .PP Get current audio channel. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c Current audio chennel .PP Get current audio channel. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .SS "int xine_get_av_offset (\fBxine_t\fP * self)" .PP Get audio/video sync. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c Current audio/video offset. .PP Return the current audio/video sync offset ( see \fBxine_set_av_offset\fP() ). .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .SS "int xine_get_current_position (\fBxine_t\fP * self)" .PP Get current position. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c Current position ( 0..65535 ) .PP Get current position in stream. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .SS "int xine_get_current_time (\fBxine_t\fP * self)" .PP get current pos in seconds. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c current position measured in seconds from the beginning of the stream .PP get current position measured in seconds from the beginning of the stream .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .SS "int xine_get_speed (\fBxine_t\fP * self)" .PP Get the playback speed. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c speed value ( see SPEED_PAUSE, SPEED_SLOW_4, SPEED_SLOW_2, SPEED_NORMAL, SPEED_FAST_2, SPEED_FAST_4 ) .PP Get the current speed playback. Possible values are SPEED_PAUSE, SPEED_SLOW_4, SPEED_SLOW_2, SPEED_NORMAL, SPEED_FAST_2, SPEED_FAST_4. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .SS "int xine_get_spu_channel (\fBxine_t\fP * self)" .PP Get current sub-title channel. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c Current sub-title channel .PP Get current sub-title channel. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .SS "int xine_get_status (\fBxine_t\fP * self)" .PP Get current xine status. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c Current status ( see Player status constants ) .PP Return the current state of xine engine. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .SS "int xine_get_stream_length (\fBxine_t\fP * self)" .PP estimate length of input stream in seconds. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c length of input stream in seconds or 0 if stream is not seekable .PP estimate length of input stream in seconds .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .SS "void xine_play (\fBxine_t\fP * self, char * MRL, int start_pos, int start_time)" .PP Start to play a stream. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .TP \fB\fIMRL\fP\fP Media Resource Location to open .TP \fB\fIstart_pos\fP\fP position in input source (0..65535) .TP \fB\fIstart_time\fP\fP position measured in seconds from stream start .PP \fBReturns: \fP .in +1c Nothing .PP Open a stream and play it. If both start position parameters are !=0 start_pos will be used for non-seekable streams both values will be ignored .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .TP \fB\fIMRL\fP\fP .TP \fB\fIstart_pos\fP\fP .TP \fB\fIstart_time\fP\fP .SS "void xine_select_audio_channel (\fBxine_t\fP * self, int channel)" .PP Set audio channel. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c Nothing .PP Set desired audio channel. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .TP \fB\fIchannel\fP\fP .SS "void xine_select_spu_channel (\fBxine_t\fP * self, int channel)" .PP Set sub-title channel. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c Nothing .PP Set desired sub-title channel. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .TP \fB\fIchannel\fP\fP .SS "void xine_set_av_offset (\fBxine_t\fP * self, int offset_pts)" .PP Set audio/video sync. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .TP \fB\fIoffset_pts\fP\fP New pts. .PP \fBReturns: \fP .in +1c Nothing .PP Set audio/video sync offset, according to offset_pts value ( see \fBxine_get_av_offset\fP() ). .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .TP \fB\fIoffset_pts\fP\fP .SS "void xine_set_speed (\fBxine_t\fP * self, int speed)" .PP Set playback speed. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .TP \fB\fIspeed\fP\fP Desired playback speed ( see SPEED_PAUSE, SPEED_SLOW_4, SPEED_SLOW_2, SPEED_NORMAL, SPEED_FAST_2, SPEED_FAST_4 ) .PP \fBReturns: \fP .in +1c Nothing .PP Set the playback speed to desired speed, according of SPEED_x constant. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP .TP \fB\fIspeed\fP\fP .SS "void xine_stop (\fBxine_t\fP * self)" .PP Stop playing. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP Current xine engine configuration ( see \fBxine_init\fP() ) .PP \fBReturns: \fP .in +1c Nothing .PP Stop the playback. .PP \fBParameters: \fP .in +1c .TP \fB\fIself\fP\fP