Skip to content

Commit 8590e94

Browse files
committed
display error message in gui app
1 parent 9b779f2 commit 8590e94

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ endif()
4444

4545
set(TARGET_VERSION_MAJOR 0)
4646
set(TARGET_VERSION_MINOR 2)
47-
set(TARGET_VERSION_PATCH 8)
47+
set(TARGET_VERSION_PATCH 9)
4848
set(APP_VERSION "${TARGET_VERSION_MAJOR}.${TARGET_VERSION_MINOR}.${TARGET_VERSION_PATCH}")
4949

5050
add_subdirectory(src)

src/player.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,16 @@ Player::on_bus_message(const Glib::RefPtr<Gst::Bus>& /*bus*/, const Glib::RefPtr
115115
play_next_stream();
116116
} else if (message_type == Gst::MESSAGE_ERROR) {
117117
auto error_msg = Glib::RefPtr<Gst::MessageError>::cast_static(message);
118+
Glib::ustring e = "Error";
118119

119120
if (error_msg) {
120121
Glib::Error err = error_msg->parse();
121-
LOG(ERROR) << "Error: " << err.what();
122-
} else {
123-
LOG(ERROR) << "Error.";
122+
e.append(": ").append(err.what());
124123
}
125124

125+
LOG(ERROR) << e;
126+
em->broadcast_info_changed(current_station, e);
127+
126128
play_next_stream();
127129
} else if (message_type == Gst::MESSAGE_TAG) {
128130
auto msg_tag = Glib::RefPtr<Gst::MessageTag>::cast_static(message);

0 commit comments

Comments
 (0)