summaryrefslogtreecommitdiffstats
path: root/gtk/src
Commit message (Collapse)AuthorAgeFilesLines
* hw-encoder-vaapi: Enables VAAPI if available and supported for h264 (tested ↵Sven Gothel2021-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | w/ AMD NAVI10), untested: h265, vp8 and vp9 Tested using lates mesa master branch patched with - contrib/mesa/A00-gallium_vaapi_encpackedheader01-commit-5e10db6.patch to enable Matroska and correct packed header in general using ffmpeg. Test hardware and configuration: - Mesa Gallium driver 20.2.0-devel for AMD Radeon RX 5700 XT (NAVI10, DRM 3.37.0, 5.7.0-1-amd64, LLVM 9.0.1) Codev h264_vaapi, avcodec_open options: rc_mode=CQP,qp=24,b_depth=2,profile=100,level=40 (profile high, level 4.0) HD1080 source ~45min with 212fps PSNR and SSIM difference to x264 below 1%, having x264 using profile high, level 4.0, preset fast, rc 23. Both using constant-quality w/ variable bitrate. ++++ If FEATURE vaapi is enable (autodetected), the following libraries are linked: X11 va va-drm va-x11. - hb.c: - Adding global static 'vaapi_device_ctx0' default device initialized via hb_avcodec_init() and released via hb_avcodec_free(). The 'vaapi_device_ctx0' is used in vaa_common hb_avcodec_vaapi_set_hwframe_ctx(..). - hb_avcodec_vaapi_set_hwframe_ctx() attaches the new AVHWFramesContext to the AVCodecContext at initializing the encoder. This is the final sink for the vaapi hw-encoder and Encode(..) performs the frame conversion into it. - hb_avcodec_test_encoder(..) adds VAAPI branch, needs refinement - encavcodec.c - adding VAAPI branches, enabling available, needs refinement. Currently profile and level are set to the user preferences, additionally 'b_depth=2' is being passed. - added hb_avcodec_test_encoder*(..) functions, currently only used to check vaapi-*codec*-availability. We used this codefragment regularly in an earlier HB version. +++ Discussion: Previous version of this patch of mine worked well on Intel hardware, as described above - AMD NAVI10 also performs quite well. VAAPI Workflow: - It uses hardware frames on the target device, which are being transported from the software device. The frame transport implicitly converts the pix_fmt. - AVCodecContext's pix_fmt uses AV_PIX_FMT_VAAPI - AVHWFramesContext: format uses AV_PIX_FMT_VAAPI and sw_format AV_PIX_FMT_NV12, the latter hinting on the actual hw-frame's target format. - AV_PIX_FMT_NV12 uses interleaved UV data, where AV_PIX_FMT_YUV420P uses seperated planes. Both use a separated Y plane upfront. Therefor both formats are not picture compatible, memory requirements are same. - Encode(..) allocates a hw_frame and the source frame is being transported to the hw-frame target using the pic_fmt conversion to NV12. Finally the hw_frame is being sent 'avcodec_send_frame' and the code-path re-aligns with non VAAPI. Further fixes to do: Validate whether 'b_depth=2' (b-frames) works for all vaapi implementations, add custom extra-video-encoder field!
* LinGui: use new api hb_get_preview3 for previewsJohn Stebbins2021-04-125-270/+78
| | | | Enables display of effects of filters on preview images
* LinGui: Fix typo in messageAndrew Lewis2021-03-142-2/+2
|
* Update copyright dates to 2021.Bradley Sepos2021-01-0142-42/+42
|
* LinGui: fix fastdecode tune error with x265John Stebbins2020-07-131-7/+11
| | | | | | | If fastdecode was set while encoder was x264, the value would be used when the codec was changed to x265. Fixes https://github.com/HandBrake/HandBrake/issues/3005
* gtk: Skip building the metainfo xml when targeting windowsMartin Storsjö2020-06-171-0/+2
| | | | | | | | This file is only supposed to be used by desktop managers to get info about the app. On windows, the file is unused. Since 368576dc9aa94c792a309e227c9a893776d8cdd1, the translation step for this file requires gettext 0.20 or newer.
* gtk: Remove unnecessary linker flags when targeting mingwMartin Storsjö2020-06-171-1/+1
| | | | | | | | | | | | | The --export-dynamic flag is a no-op when targeting mingw; when used, binutils ld prints this warning: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols? The "--exclude-libs ALL" flag also is unnecessary; as this is an exe, there's no symbols being exported automatically, so there's no need to exclude anything. LLD's COFF/mingw backend doesn't implement these flags, and this fixes linking ghb.exe with it.
* LinGui: tweak About dialog so Close button worksEvangelos Foutras2020-06-171-1/+2
| | | | | | | | Clicking on "Close" emits a "response" signal which was ignored. Make the button work by calling gtk_dialog_run(), as it's done for similar dialogs in callbacks.c. Fixes https://github.com/HandBrake/HandBrake/issues/2405
* flatpak: conform to freedesktop metainfo standardsJohn Stebbins2020-05-082-8/+8
|
* LinGui: delete preset category when last preset deletedJohn Stebbins2020-04-291-24/+77
| | | | Also, allow deleteion of categories from the presets window
* LinGui: add title and chapter range to queue summaryJohn Stebbins2020-03-155-23/+158
|
* LinGui: fix PtoP fractional end times in secondsJohn Stebbins2020-02-081-5/+5
| | | | oops, previous commit only handled start times correctly
* LinGui: fix PtoP fractional second timesJohn Stebbins2020-02-081-5/+5
|
* Update copyright dates to 2020.Bradley Sepos2020-01-0142-42/+42
|
* LinGui: fix small memory leak in audio list displayJohn Stebbins2019-12-101-0/+1
|
* LinGui: fix display of chapter start timeJohn Stebbins2019-12-101-1/+1
| | | | they were all showing 0:00 start time :(
* LinGui: fix gui internationalization supportJohn Stebbins2019-11-181-1/+1
| | | | | | | | When converting from using intltool to gnu gettext, the definition of DATADIRNAME was lost and resulted in an incorrect base directory in the call to bindtextdomain. Fixes https://github.com/HandBrake/HandBrake/issues/2438
* LinGui: cleanup lib and cppflatgs generationJohn Stebbins2019-11-121-2/+2
| | | | fixes https://github.com/HandBrake/HandBrake/issues/2411
* LinGui: update license per BradleyS suggestionJohn Stebbins2019-11-0743-84/+84
|
* LinGui: fix license and po file mergesJohn Stebbins2019-11-0643-84/+43
|
* Gardening: Clean up trailing whitespaceNomis1012019-11-041-5/+5
| | | | Remove trailing whitespace in "*.c", "*.m", "*.h" and "*.cpp" files.
* LinuxGUI: Bring all locales from Transifex to github, add new localesNomis1012019-10-311-1/+1
| | | | Migrate all locales (also < 100% status) to github. Many many thanks to victorr2007.
* LinGui: remove intltool tags in appdataJohn Stebbins2019-09-131-12/+12
|
* LinGui: use gettext instead of intltoolJohn Stebbins2019-09-132-2/+4
| | | | | gettext can do the whole translation parsing job now and intltool is deprecated. it is not available in flatpak's gnome sdk
* libhb: resolve header conflicts with pango/harfbuzzJohn Stebbins2019-09-1212-15/+15
| | | | | | | Newest versions appear to have a "common.h" somewhere that is interfering with libhb/common.h. move headers into "handbrake" subdirectory
* Resolve conflict with harfbuzz include file hb.hJohn Stebbins2019-09-1011-11/+11
| | | | Rename hb.h to handbrake.h
* Create separate fake iso639 "any" entryJohn Stebbins2019-09-101-15/+10
| | | | | | | Allows us to distinguish a selection of "any" which means match any language from "und" which means the language is not known. Fixes https://github.com/HandBrake/HandBrake/issues/731
* LinGui: plug memory leaksJohn Stebbins2019-08-265-6/+15
|
* LinGui: Fix null subtitle nameJohn Stebbins2019-08-151-1/+4
| | | | Fixes https://github.com/HandBrake/HandBrake/issues/2244
* add subtitle track name read/writeJohn Stebbins2019-08-113-398/+507
| | | | | | | | | | | | | | | | Works similar to audio track names. If source has a subtitle track name, hb_subtitle_t.name is set. To set output subtitle track name, set hb_subtitle_config_t.name. Source track names are available in title returned by hb_title_to_dict and hb_title_to_json in SubtitleList[].Name In job dict it is also SubtitleList[].Name hb_preset_job_init and hb_preset_job_init_json initialize output tracks with the source track name. Also adds subtitle name support to LinGui
* libhb: make source audio track name available to frontendsJohn Stebbins2019-08-118-43/+71
| | | | | | | | | | | | | It gets stored in new hb_audio_config_t.in.name field. It is available in the title dict read through hb_title_to_dict() or hb_title_to_json() in AudioList[].Name. When a job is initialized with hb_preset_job_init or hb_preset_job_init_json(), output audio tracks are initialized with the source track name. Also adds output track name initialization to LinGui.
* LinGui: make selection of gtk3/gtk4 configure-ableJohn Stebbins2019-07-311-10/+0
|
* LinGui: only show progress bar on active queue entryJohn Stebbins2019-07-312-1/+2
|
* LinGui: make chapter list rows non-selectableJohn Stebbins2019-07-302-0/+2
| | | | I.e. do not highlight the entire row when clicked with the mouse
* LinGui: change chapter list to GtkListBoxJohn Stebbins2019-07-3012-2430/+506
| | | | | | | | | GtkListBox is more flexible than GtkTreeView. It is possible now to process key press events without creating a custom text cell renderer. Also due to the way event handling changes in GTK4, it was no longer even possible to create a custom cell renderer that can process key events. So this GtkListBox implementation is compatible with GTK4.
* LinGui: fix build error on ubuntu bionicJohn Stebbins2019-07-301-23/+20
|
* LinGui: gtk4 port, use rotation transform in settings stackJohn Stebbins2019-07-291-1/+1
| | | | Because we can :*p
* LinGui: gtk4 port, fix reading/writing GtkSpinButton textJohn Stebbins2019-07-296-49/+25
| | | | | In GTK4, GtkSpinButton is no longer a subclass of GtkEntry. Must use GtkEditable APIs in GTK4
* LinGui: gtk4 port, minimize appearence of tool bar separatorsJohn Stebbins2019-07-291-14/+6
| | | | | | | These are not supposed to be visible, but gtk4 is not respecting the "draw" property of GtkSeparatorToolItem. When this is fixed, I can restore proper spacing between "Open Source" and "Add To Queue" toolbar buttons.
* LinGui: gtk4 port, fix summary tab preview image scalingJohn Stebbins2019-07-294-42/+57
| | | | | | | | | | | | GTK4 added a new widgit GtkPicture that is almost identical to GtkImage. The main difference appears to be that GtkImage now scales down the size of the given pixbuf using some undocumented algorithm. It's filling some of the space available, but not all of it. But it isn't a hard size limit because making the window bigger continues to make the image bigger. GtkPicture shows the pixbuf unscaled as expected. So use GtkPicture for the preview image :*(
* LinGui: gtk4 port, fix search in language combo boxJohn Stebbins2019-07-292-9/+57
| | | | language search requires key-press handling which changed in gtk4
* LinGui: disable gtk4 key-press handling for chapter listJohn Stebbins2019-07-292-2/+9
| | | | | | | | | gtk4 makes it very difficult to handle key-press in a GtkCellRenderer I will need to rewrite the capter list as a GtkListBox instead of a GtkTreeView to re-enable this. key-press handling is used here to automatically move to the next chapter when finished editing the current
* LinGui: add queue row delete key handling for gtk4John Stebbins2019-07-291-0/+38
| | | | | Event handling in gtk4 is substantially different than gtk3. This restores handling of delete key on queue rows in gtk4 port
* LinGui: use GtkNotebookPage in gtk4 ui descriptionJohn Stebbins2019-07-291-383/+379
| | | | This is the modern gtk4 way...
* LinGui: WIP gtk4 supportJohn Stebbins2019-07-2614-1102/+9120
| | | | | | | | | | | | | | | | Known issues and todo: notebooks, use GtkNotebookPage semantics in ui file fix keypress delete in queue_list fix dest_file grab-focus? (highlight of filename for editing) focus-in/out with GtkEventControllerKey preview_state_cb how to handle icon-ified preview? preview_configure_cb, saving preview window size? accelerator alt-d grab-focus destination key-press-event in chapter list, ghbcellrenderertext -> GtkEventControllerKey Why doesn't summary preview image scale correctly? "System" in about dialog? why is the tab there when "system" prop not set? GtkSeparatorToolitem seems to ignore "draw" prop?
* LinGui: fix build error when update checks enabledJohn Stebbins2019-07-221-1/+2
| | | | Fixes https://github.com/HandBrake/HandBrake/issues/2207
* LinGui: fix spacing between preset menu button and settings stackJohn Stebbins2019-07-181-0/+1
|
* LinGui: make "clear completed queue items" pref consistent with WinGuiJohn Stebbins2019-07-171-20/+18
| | | | | move to "General" preferences pane make text consistent
* LinGui: Reduce disk monitoring free space limit to 2GBJohn Stebbins2019-07-151-1/+1
|
* LinGui: update preset save dialog "Dimensions" labelJohn Stebbins2019-07-121-1/+1
| | | | | Make it consistent with other UIs Fixes https://github.com/HandBrake/HandBrake/issues/1309