]> git.tdb.fi Git - xinema.git/commitdiff
Reorder some members
authorMikko Rasa <tdb@tdb.fi>
Sat, 17 Oct 2015 10:15:15 +0000 (13:15 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 17 Oct 2015 10:15:15 +0000 (13:15 +0300)
source/xinestream.cpp
source/xinestream.h

index 1d7433e5e5807eacfe5ae799f3d12fb84c02ec32..8099f3b3eb453b0fd4f8ccf9b661b19166d420d9 100644 (file)
@@ -31,26 +31,6 @@ XineStream::~XineStream()
        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)
@@ -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<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))
index c4df85ded5383b1dd6af54f7b7116a6adf9a92b3..254b84d66ec5030d922a975f1cdbd186c11a5623 100644 (file)
@@ -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<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 &);
@@ -73,6 +67,13 @@ private:
        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();