[utopian-io] Improved remux dialog for OBS Studio, with batch operation support and drag/drop support
OBS Studio is a widely-used free/open-source application for streaming and recording video.
The maintainers of OBS Studio strongly recommend that users record in MKV format for efficiency reasons. However, because many video editing applications do not support MKV, OBS Studio provides a convenience feature to remux recordings from an MKV container to an MP4 container.
The original dialog for remuxing recordings only had the ability to remux one file at a time. It also does not allow the user to drag files from an Explorer window, requiring them to use the "Browse..." button to navigate to the desired recording.
- Must allow the user to queue multiple files
- Must allow items to be removed from the queue
- Must populate the queue with dropped files/directories
- Must indicate the status of each queue item, in case of errors
- Must provide a convenient way to clear completed items from the queue
- Must display a progress bar
- Must do work on a background thread to avoid blocking the main UI
- Must support cancellation in the middle of an operation
- Must block modification of the queue during an operation
A Qt QTableView is used for presenting the queue. This required adding handling for QTableView in the included style sheets to ensure it fits in with the rest of the UI. A custom itemdelegate is also used for providing editable cells in the table, including "browse" and "delete" toolbar items in each. Standard Qt icons are used for indicating the state of each entry in a column to the left.
Data is provided to the tableview by a subclassed QAbstractTableModel. The tablemodel is used to store the state of the queue and enforce business rules about how the states of entries change.
The existing worker thread from the old dialog is reused in more or less the same form and continues to handle only one file at a time. The main window is responsible for receiving a signal from the worker thread on completion and starting the next queue entry from the model if necessary.