From bb04d41e2befcce16623c40c1916222d82174130 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Sat, 11 Feb 2023 15:33:49 -0700 Subject: [PATCH] Credit Andrew added returns + vulkan patch --- cinelerra-5.1/cinelerra/videoconfig.C | 1 + cinelerra-5.1/cinelerra/videowindow.C | 13 +++++++ cinelerra-5.1/cinelerra/videowindowgui.C | 5 +++ .../thirdparty/src/ffmpeg-5.1.patchE | 34 +++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patchE diff --git a/cinelerra-5.1/cinelerra/videoconfig.C b/cinelerra-5.1/cinelerra/videoconfig.C index d6b4a192..842f8292 100644 --- a/cinelerra-5.1/cinelerra/videoconfig.C +++ b/cinelerra-5.1/cinelerra/videoconfig.C @@ -72,4 +72,5 @@ int VideoConfig::save_defaults(BC_Hash *defaults) defaults->update("VIDEO_CAPTURE_LENGTH", capture_length); defaults->update("VIDEO_OUT_DRIVER", video_out_driver); + return 0; } diff --git a/cinelerra-5.1/cinelerra/videowindow.C b/cinelerra-5.1/cinelerra/videowindow.C index 8461ee26..5b843633 100644 --- a/cinelerra-5.1/cinelerra/videowindow.C +++ b/cinelerra-5.1/cinelerra/videowindow.C @@ -54,12 +54,14 @@ int VideoWindow::load_defaults(BC_Hash *defaults) { video_visible = defaults->get("VIDEOVISIBLE", 1); video_window_w = defaults->get("PLAYVIDEOW", video_window_w); + return 0; } int VideoWindow::update_defaults(BC_Hash *defaults) { defaults->update("VIDEOVISIBLE", video_visible); defaults->update("PLAYVIDEOW", video_window_w); + return 0; } void VideoWindow::create_objects() @@ -89,6 +91,7 @@ int VideoWindow::show_window() gui->show_window(); mwindow->gui->mainmenu->set_show_video(1); } + return 0; } int VideoWindow::hide_window() @@ -99,6 +102,7 @@ int VideoWindow::hide_window() gui->hide_window(); mwindow->gui->mainmenu->set_show_video(0); } + return 0; } int VideoWindow::resize_window() @@ -118,12 +122,14 @@ int VideoWindow::resize_window() if(video_cropping) gui->canvas->draw_crop_box(); gui->flash(); } + return 0; } int VideoWindow::fix_size(int &w, int &h, int width_given, float aspect_ratio) { w = width_given; h = (int)((float)width_given / aspect_ratio); + return 0; } int VideoWindow::original_size() @@ -132,6 +138,7 @@ int VideoWindow::original_size() get_full_sizes(w, h); video_window_w = w; resize_window(); + return 0; } int VideoWindow::get_full_sizes(int &w, int &h) @@ -160,6 +167,7 @@ int VideoWindow::init_video() { gui->canvas->start_video(); } + return 0; } int VideoWindow::stop_video() @@ -168,6 +176,7 @@ int VideoWindow::stop_video() { gui->canvas->stop_video(); } + return 0; } int VideoWindow::update(BC_Bitmap *frame) @@ -178,6 +187,7 @@ int VideoWindow::update(BC_Bitmap *frame) // gui->canvas->draw_bitmap(frame, 1); gui->unlock_window(); } + return 0; } int VideoWindow::get_w() @@ -199,6 +209,7 @@ BC_Bitmap* VideoWindow::get_bitmap() int VideoWindow::reset() { + return 0; } int VideoWindow::start_cropping() @@ -210,6 +221,7 @@ int VideoWindow::start_cropping() gui->y2 = gui->get_h(); gui->canvas->draw_crop_box(); gui->canvas->flash(); + return 0; } int VideoWindow::get_aspect_ratio(float &aspect_w, float &aspect_h) @@ -222,6 +234,7 @@ int VideoWindow::get_aspect_ratio(float &aspect_w, float &aspect_h) new_h = (int)((float)(gui->y2 - gui->y1) / zoom_factor); mwindow->create_aspect_ratio(aspect_w, aspect_h, new_w, new_h); + return 0; } int VideoWindow::stop_cropping() diff --git a/cinelerra-5.1/cinelerra/videowindowgui.C b/cinelerra-5.1/cinelerra/videowindowgui.C index 351f544d..e0022103 100644 --- a/cinelerra-5.1/cinelerra/videowindowgui.C +++ b/cinelerra-5.1/cinelerra/videowindowgui.C @@ -105,6 +105,7 @@ int VideoWindowGUI::update_title() int VideoWindowGUI::close_event() { thread->hide_window(); + return 0; } @@ -153,6 +154,7 @@ int VideoWindowCanvas::button_press() gui->y_offset = y - gui->y1; } } + return 0; } int VideoWindowCanvas::button_release() @@ -162,6 +164,7 @@ int VideoWindowCanvas::button_release() button_down = 0; corner_selected = 0; } + return 0; } int VideoWindowCanvas::cursor_motion() @@ -199,6 +202,7 @@ int VideoWindowCanvas::cursor_motion() draw_crop_box(); flash(); } + return 0; } int VideoWindowCanvas::draw_crop_box() @@ -214,5 +218,6 @@ int VideoWindowCanvas::draw_crop_box() draw_box(gui->x2 - CROPHANDLE_W, gui->y1 + 1, CROPHANDLE_W, CROPHANDLE_H - 1); draw_rectangle(gui->x1, gui->y1, w, h); set_opaque(); + return 0; } diff --git a/cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patchE b/cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patchE new file mode 100644 index 00000000..444ab3af --- /dev/null +++ b/cinelerra-5.1/thirdparty/src/ffmpeg-5.1.patchE @@ -0,0 +1,34 @@ +From: Lynne +Date: Sun, 25 Dec 2022 00:03:30 +0000 (+0100) +Subject: hwcontext_vulkan: remove optional encode/decode extensions from the list +X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/7268323193d55365f914de39fadd5dbdb1f68976?hp=30d432f205538f6ef6c86ed0a90e27cdd735cd2b + +hwcontext_vulkan: remove optional encode/decode extensions from the list + +They're not currently used, so they don't need to be there. +Vulkan stabilized the decode extensions less than a week ago, and their +name prefixes were changed from EXT to KHR. It's a bit too soon to be +depending on it, so rather than bumping, just remove these for now. + +(cherry picked from commit eb0455d64690eed0068e5cb202f72ecdf899837c) +--- + +diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c +index 237caa4bc0..3bc0dc8a40 100644 +--- a/libavutil/hwcontext_vulkan.c ++++ b/libavutil/hwcontext_vulkan.c +@@ -354,14 +354,6 @@ static const VulkanOptExtension optional_device_exts[] = { + { VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, FF_VK_EXT_EXTERNAL_WIN32_MEMORY }, + { VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME, FF_VK_EXT_EXTERNAL_WIN32_SEM }, + #endif +- +- /* Video encoding/decoding */ +- { VK_KHR_VIDEO_QUEUE_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, +- { VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, +- { VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, +- { VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, +- { VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, +- { VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, + }; + + /* Converts return values to strings */ -- 2.26.2