noobs 0.0.64 → 0.0.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/noobs.node +0 -0
- package/package.json +1 -1
- package/src/obs_interface.cpp +12 -11
- package/src/obs_interface.h +2 -2
package/dist/noobs.node
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/obs_interface.cpp
CHANGED
|
@@ -265,10 +265,10 @@ void ObsInterface::setRecordingDir(const std::string& recordingPath) {
|
|
|
265
265
|
obs_data_release(settings);
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
void ObsInterface::
|
|
268
|
+
void ObsInterface::create_video_encoders() {
|
|
269
269
|
blog(LOG_INFO, "Create video encoder");
|
|
270
270
|
|
|
271
|
-
file_video_encoder = obs_video_encoder_create("obs_x264", "
|
|
271
|
+
file_video_encoder = obs_video_encoder_create("obs_x264", "h264_stream_file", NULL, NULL);
|
|
272
272
|
|
|
273
273
|
|
|
274
274
|
if (!file_video_encoder) {
|
|
@@ -276,7 +276,7 @@ void ObsInterface::configure_video_encoder() {
|
|
|
276
276
|
throw std::runtime_error("Failed to create video encoder!");
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
buffer_video_encoder = obs_video_encoder_create("obs_x264", "
|
|
279
|
+
buffer_video_encoder = obs_video_encoder_create("obs_x264", "h264_stream_buffer", NULL, NULL);
|
|
280
280
|
|
|
281
281
|
if (!buffer_video_encoder) {
|
|
282
282
|
blog(LOG_ERROR, "Failed to create buffer video encoder!");
|
|
@@ -301,11 +301,11 @@ void ObsInterface::configure_video_encoder() {
|
|
|
301
301
|
obs_encoder_set_video(buffer_video_encoder, obs_get_video());
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
void ObsInterface::
|
|
304
|
+
void ObsInterface::create_audio_encoders() {
|
|
305
305
|
blog(LOG_INFO, "Create audio encoder");
|
|
306
306
|
|
|
307
307
|
// if (!output) {
|
|
308
|
-
// blog(LOG_ERROR, "No output on
|
|
308
|
+
// blog(LOG_ERROR, "No output on create_audio_encoders");
|
|
309
309
|
// throw std::runtime_error("Failed to create audio encoder!");
|
|
310
310
|
// }
|
|
311
311
|
|
|
@@ -315,14 +315,14 @@ void ObsInterface::configure_audio_encoder() {
|
|
|
315
315
|
// audio_encoder = nullptr;
|
|
316
316
|
// }
|
|
317
317
|
|
|
318
|
-
file_audio_encoder = obs_audio_encoder_create("ffmpeg_aac", "
|
|
318
|
+
file_audio_encoder = obs_audio_encoder_create("ffmpeg_aac", "aac_file", NULL, 0, NULL);
|
|
319
319
|
|
|
320
320
|
if (!file_audio_encoder) {
|
|
321
321
|
blog(LOG_ERROR, "Failed to create audio encoder!");
|
|
322
322
|
throw std::runtime_error("Failed to create audio encoder!");
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
buffer_audio_encoder = obs_audio_encoder_create("ffmpeg_aac", "
|
|
325
|
+
buffer_audio_encoder = obs_audio_encoder_create("ffmpeg_aac", "aac_buffer", NULL, 0, NULL);
|
|
326
326
|
|
|
327
327
|
if (!buffer_audio_encoder) {
|
|
328
328
|
blog(LOG_ERROR, "Failed to create buffer audio encoder!");
|
|
@@ -575,7 +575,7 @@ void draw_callback(void* data, uint32_t cx, uint32_t cy) {
|
|
|
575
575
|
}
|
|
576
576
|
|
|
577
577
|
void ObsInterface::initPreview(HWND parent) {
|
|
578
|
-
blog(LOG_INFO, "ObsInterface::
|
|
578
|
+
blog(LOG_INFO, "ObsInterface::initPreview");
|
|
579
579
|
|
|
580
580
|
if (!preview_hwnd) {
|
|
581
581
|
blog(LOG_INFO, "Creating preview child window");
|
|
@@ -638,7 +638,7 @@ void ObsInterface::showPreview(int x, int y, int width, int height) {
|
|
|
638
638
|
NULL, // No Z-order change
|
|
639
639
|
x, y, // New position (x, y)
|
|
640
640
|
width, height, // New size (width, height)
|
|
641
|
-
|
|
641
|
+
SWP_NOACTIVATE // Flags
|
|
642
642
|
);
|
|
643
643
|
|
|
644
644
|
if (!success) {
|
|
@@ -646,6 +646,7 @@ void ObsInterface::showPreview(int x, int y, int width, int height) {
|
|
|
646
646
|
return;
|
|
647
647
|
}
|
|
648
648
|
|
|
649
|
+
obs_display_resize(display, width, height);
|
|
649
650
|
ShowWindow(preview_hwnd, SW_SHOW);
|
|
650
651
|
obs_display_set_enabled(display, true);
|
|
651
652
|
}
|
|
@@ -683,8 +684,8 @@ ObsInterface::ObsInterface(
|
|
|
683
684
|
create_output();
|
|
684
685
|
create_scene();
|
|
685
686
|
|
|
686
|
-
|
|
687
|
-
|
|
687
|
+
create_video_encoders();
|
|
688
|
+
create_audio_encoders();
|
|
688
689
|
}
|
|
689
690
|
|
|
690
691
|
ObsInterface::~ObsInterface() {
|
package/src/obs_interface.h
CHANGED