summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibVideo
diff options
context:
space:
mode:
authorZaggy1024 <zaggy1024@gmail.com>2023-02-07 15:53:34 -0600
committerAndreas Kling <kling@serenityos.org>2023-02-08 21:52:42 +0100
commita4c76728025e510d4be55bc8542e9b577de371fe (patch)
tree77be70f07cf85d2779fdb07d618b48e1ab95134c /Userland/Libraries/LibVideo
parent2ff11bac3d4042c72a645e75e5c762e346fd8343 (diff)
downloadserenity-a4c76728025e510d4be55bc8542e9b577de371fe.zip
LibVideo: Rename Status -> State in `PlaybackStatusChangeEvent` class
A bit of a bikeshed, but status sounds more like a result of an action, and state sounds more accurate to what the `PlaybackManager` does. The previous and current state fields of the `PlaybackStateChangeEvent` are now removed, since they were unused (for now). This is a lead-up to the refactoring of VideoPlaybackManager to make that diff more legible.
Diffstat (limited to 'Userland/Libraries/LibVideo')
-rw-r--r--Userland/Libraries/LibVideo/PlaybackManager.cpp2
-rw-r--r--Userland/Libraries/LibVideo/PlaybackManager.h17
2 files changed, 6 insertions, 13 deletions
diff --git a/Userland/Libraries/LibVideo/PlaybackManager.cpp b/Userland/Libraries/LibVideo/PlaybackManager.cpp
index 672bf4dbed..c60f83f582 100644
--- a/Userland/Libraries/LibVideo/PlaybackManager.cpp
+++ b/Userland/Libraries/LibVideo/PlaybackManager.cpp
@@ -57,7 +57,7 @@ void PlaybackManager::set_playback_status(PlaybackStatus status)
m_present_timer->stop();
}
- m_main_loop.post_event(m_event_handler, make<PlaybackStatusChangeEvent>(status, old_status));
+ m_main_loop.post_event(m_event_handler, make<PlaybackStateChangeEvent>());
}
}
diff --git a/Userland/Libraries/LibVideo/PlaybackManager.h b/Userland/Libraries/LibVideo/PlaybackManager.h
index abc26d0f03..c31a01b34d 100644
--- a/Userland/Libraries/LibVideo/PlaybackManager.h
+++ b/Userland/Libraries/LibVideo/PlaybackManager.h
@@ -165,7 +165,7 @@ private:
enum EventType : unsigned {
DecoderErrorOccurred = (('v' << 2) | ('i' << 1) | 'd') << 4,
VideoFramePresent,
- PlaybackStatusChange,
+ PlaybackStateChange,
};
class DecoderErrorEvent : public Core::Event {
@@ -199,20 +199,13 @@ private:
RefPtr<Gfx::Bitmap> m_frame;
};
-class PlaybackStatusChangeEvent : public Core::Event {
+class PlaybackStateChangeEvent : public Core::Event {
public:
- PlaybackStatusChangeEvent() = default;
- explicit PlaybackStatusChangeEvent(PlaybackStatus status, PlaybackStatus previous_status)
- : Core::Event(PlaybackStatusChange)
- , m_status(status)
- , m_previous_status(previous_status)
+ explicit PlaybackStateChangeEvent()
+ : Core::Event(PlaybackStateChange)
{
}
- virtual ~PlaybackStatusChangeEvent() = default;
-
-private:
- PlaybackStatus m_status;
- PlaybackStatus m_previous_status;
+ virtual ~PlaybackStateChangeEvent() = default;
};
inline StringView playback_status_to_string(PlaybackStatus status)