General: refactor continued again

This commit is contained in:
Stéphane L 2017-08-05 18:26:14 +02:00
parent dba599c127
commit 4b89464349
2 changed files with 214 additions and 469 deletions

View File

@ -260,7 +260,6 @@ const char* WSEvents::GetRecordingTimecode() {
} }
void WSEvents::OnSceneChange() { void WSEvents::OnSceneChange() {
// Implements an existing update type from bilhamil's OBS Remote
obs_data_t* data = obs_data_create(); obs_data_t* data = obs_data_create();
obs_source_t* current_scene = obs_frontend_get_current_scene(); obs_source_t* current_scene = obs_frontend_get_current_scene();
@ -332,7 +331,6 @@ void WSEvents::OnProfileListChange() {
} }
void WSEvents::OnStreamStarting() { void WSEvents::OnStreamStarting() {
// Implements an existing update type from bilhamil's OBS Remote
obs_data_t* data = obs_data_create(); obs_data_t* data = obs_data_create();
obs_data_set_bool(data, "preview-only", false); obs_data_set_bool(data, "preview-only", false);
@ -342,14 +340,12 @@ void WSEvents::OnStreamStarting() {
} }
void WSEvents::OnStreamStarted() { void WSEvents::OnStreamStarted() {
// New update type specific to OBS Studio
_stream_starttime = os_gettime_ns(); _stream_starttime = os_gettime_ns();
_lastBytesSent = 0; _lastBytesSent = 0;
broadcastUpdate("StreamStarted"); broadcastUpdate("StreamStarted");
} }
void WSEvents::OnStreamStopping() { void WSEvents::OnStreamStopping() {
// Implements an existing update type from bilhamil's OBS Remote
obs_data_t* data = obs_data_create(); obs_data_t* data = obs_data_create();
obs_data_set_bool(data, "preview-only", false); obs_data_set_bool(data, "preview-only", false);
@ -359,35 +355,29 @@ void WSEvents::OnStreamStopping() {
} }
void WSEvents::OnStreamStopped() { void WSEvents::OnStreamStopped() {
// New update type specific to OBS Studio
_stream_starttime = 0; _stream_starttime = 0;
broadcastUpdate("StreamStopped"); broadcastUpdate("StreamStopped");
} }
void WSEvents::OnRecordingStarting() { void WSEvents::OnRecordingStarting() {
// New update type specific to OBS Studio
broadcastUpdate("RecordingStarting"); broadcastUpdate("RecordingStarting");
} }
void WSEvents::OnRecordingStarted() { void WSEvents::OnRecordingStarted() {
// New update type specific to OBS Studio
_rec_starttime = os_gettime_ns(); _rec_starttime = os_gettime_ns();
broadcastUpdate("RecordingStarted"); broadcastUpdate("RecordingStarted");
} }
void WSEvents::OnRecordingStopping() { void WSEvents::OnRecordingStopping() {
// New update type specific to OBS Studio
broadcastUpdate("RecordingStopping"); broadcastUpdate("RecordingStopping");
} }
void WSEvents::OnRecordingStopped() { void WSEvents::OnRecordingStopped() {
// New update type specific to OBS Studio
_rec_starttime = 0; _rec_starttime = 0;
broadcastUpdate("RecordingStopped"); broadcastUpdate("RecordingStopped");
} }
void WSEvents::OnExit() { void WSEvents::OnExit() {
// New update type specific to OBS Studio
broadcastUpdate("Exiting"); broadcastUpdate("Exiting");
} }

File diff suppressed because it is too large Load Diff