xine_dispose(stream);
}
-void XineStream::select_audio_channel(int i)
-{
- if(i>=0 && static_cast<unsigned>(i)>=audio_channels.size())
- throw out_of_range("XineStream::set_audio_channel");
-
- if(i<0)
- i = OFF;
- xine_set_param(stream, XINE_PARAM_AUDIO_CHANNEL_LOGICAL, (i==OFF ? -2 : i));
-}
-
-void XineStream::select_spu_channel(int i)
-{
- if(i>=0 && static_cast<unsigned>(i)>=spu_channels.size())
- throw out_of_range("XineStream::set_spu_channel");
-
- if(i<0)
- i = OFF;
- xine_set_param(stream, XINE_PARAM_SPU_CHANNEL, (i==OFF ? -2 : i));
-}
-
void XineStream::play()
{
if(state==STOPPED)
signal_state_changed.emit(state);
}
+void XineStream::select_audio_channel(int i)
+{
+ if(i>=0 && static_cast<unsigned>(i)>=audio_channels.size())
+ throw out_of_range("XineStream::set_audio_channel");
+
+ if(i<0)
+ i = OFF;
+ xine_set_param(stream, XINE_PARAM_AUDIO_CHANNEL_LOGICAL, (i==OFF ? -2 : i));
+}
+
+void XineStream::select_spu_channel(int i)
+{
+ if(i>=0 && static_cast<unsigned>(i)>=spu_channels.size())
+ throw out_of_range("XineStream::set_spu_channel");
+
+ if(i<0)
+ i = OFF;
+ xine_set_param(stream, XINE_PARAM_SPU_CHANNEL, (i==OFF ? -2 : i));
+}
+
void XineStream::tick()
{
while(xine_event_t *event = xine_event_get(queue))
const Msp::Time::TimeDelta &get_duration() const { return duration; }
const Msp::Time::TimeDelta &get_position() const { return position; }
const std::string &get_title() const { return title; }
- const std::vector<std::string> &get_audio_channels() const { return audio_channels; }
- const std::vector<std::string> &get_spu_channels() const { return spu_channels; }
- void select_audio_channel(int);
- void select_spu_channel(int);
- int get_current_audio_channel() const { return current_audio; }
- int get_current_spu_channel() const { return current_spu; }
void play();
void seek(const Msp::Time::TimeDelta &);
void set_state(State);
public:
+ const std::vector<std::string> &get_audio_channels() const { return audio_channels; }
+ const std::vector<std::string> &get_spu_channels() const { return spu_channels; }
+ void select_audio_channel(int);
+ void select_spu_channel(int);
+ int get_current_audio_channel() const { return current_audio; }
+ int get_current_spu_channel() const { return current_spu; }
+
void tick();
private:
void update_info();