From: Mikko Rasa Date: Sat, 17 Oct 2015 10:15:15 +0000 (+0300) Subject: Reorder some members X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=57fa1e2b4cba16ab023aba0b5ec4a5ee9c1307f8;p=xinema.git Reorder some members --- diff --git a/source/xinestream.cpp b/source/xinestream.cpp index 1d7433e..8099f3b 100644 --- a/source/xinestream.cpp +++ b/source/xinestream.cpp @@ -31,26 +31,6 @@ XineStream::~XineStream() xine_dispose(stream); } -void XineStream::select_audio_channel(int i) -{ - if(i>=0 && static_cast(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(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) @@ -96,6 +76,26 @@ void XineStream::set_state(State s) signal_state_changed.emit(state); } +void XineStream::select_audio_channel(int i) +{ + if(i>=0 && static_cast(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(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)) diff --git a/source/xinestream.h b/source/xinestream.h index c4df85d..254b84d 100644 --- a/source/xinestream.h +++ b/source/xinestream.h @@ -58,12 +58,6 @@ public: 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 &get_audio_channels() const { return audio_channels; } - const std::vector &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 &); @@ -73,6 +67,13 @@ private: void set_state(State); public: + const std::vector &get_audio_channels() const { return audio_channels; } + const std::vector &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();