aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-08-10 01:09:07 +0200
committerdec05eba <dec05eba@protonmail.com>2019-08-10 01:09:10 +0200
commit93e12b893cc4037a748b220d85d6eaa6a64c14b6 (patch)
tree02a641b311cfb05226696995606c937e5eacc944 /include
parentcdc1aaaf0da4534a106e6e56f0fb8c943f44cdc0 (diff)
Fix crash that happened in release mode (video player)
Diffstat (limited to 'include')
-rw-r--r--include/VideoPlayer.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp
index 2266a16..3839530 100644
--- a/include/VideoPlayer.hpp
+++ b/include/VideoPlayer.hpp
@@ -29,6 +29,7 @@ namespace QuickMedia {
UNEXPECTED_WINDOW_ERROR,
FAIL_TO_READ,
READ_TIMEOUT,
+ READ_RESPONSE_ERROR,
READ_INCORRECT_TYPE,
INIT_FAILED
};
@@ -48,9 +49,18 @@ namespace QuickMedia {
// Progress is in range [0..1]
Error get_progress(double *result);
+ Error get_time_remaining(double *result);
+ Error set_paused(bool paused);
+
// Progress is in range [0..1]
Error set_progress(double progress);
+
+ Error is_seekable(bool *result);
+
+ bool is_connected() const { return connected_to_ipc; }
private:
+ Error set_property(const std::string &property_name, const Json::Value &value);
+ Error get_property(const std::string &property_name, Json::Value *result, Json::ValueType result_type);
Error send_command(const char *cmd, size_t size);
Error launch_video_process(const char *path, sf::WindowHandle parent_window);
VideoPlayer::Error read_ipc_func();
@@ -71,5 +81,12 @@ namespace QuickMedia {
unsigned int request_id;
unsigned int expected_request_id;
Json::Value request_response_data;
+
+ enum ResponseDataStatus {
+ NONE,
+ OK,
+ ERROR
+ };
+ ResponseDataStatus response_data_status;
};
}