mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Added support for VobSub subtitles including their compression options. Made the input boxes for file names (tags and chapters) editable so that their contents can be deleted.
This commit is contained in:
parent
ceb9e092c6
commit
2ea041bfba
@ -1,5 +1,12 @@
|
||||
2003-10-22 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mmg: Added support for VobSub subtitles including their
|
||||
compression options. Added the .m4a extension to the 'add file'
|
||||
dialog.
|
||||
|
||||
* mmg: bug fix: Made the input boxes for file names (tags and
|
||||
chapters) editable so that their contents can be deleted.
|
||||
|
||||
* mkvmerge: Adjusted the compression handling to the final content
|
||||
encoding specs.
|
||||
|
||||
|
@ -673,6 +673,11 @@ void mmg_dialog::update_command_line() {
|
||||
clargs.Add(*t->fourcc);
|
||||
}
|
||||
|
||||
if (t->compression->Length() > 0) {
|
||||
cmdline += "--compression " + sid + ":" + *t->compression + " ";
|
||||
clargs.Add("--compression");
|
||||
clargs.Add(sid + ":" + *t->compression);
|
||||
}
|
||||
}
|
||||
|
||||
if (aids.length() > 0) {
|
||||
|
@ -122,6 +122,7 @@ using namespace libmatroska;
|
||||
#define ID_B_COPYTOCLIPBOARD 10075
|
||||
#define ID_CB_ENABLEDURATIONS 10076
|
||||
#define ID_CB_ENABLETIMESLICES 10077
|
||||
#define ID_CB_COMPRESSION 10078
|
||||
|
||||
#define ID_M_FILE_LOAD 20000
|
||||
#define ID_M_FILE_SAVE 20001
|
||||
@ -164,7 +165,7 @@ typedef struct {
|
||||
|
||||
bool default_track, aac_is_sbr;
|
||||
wxString *language, *track_name, *cues, *delay, *stretch, *sub_charset;
|
||||
wxString *tags, *fourcc, *aspect_ratio;
|
||||
wxString *tags, *fourcc, *aspect_ratio, *compression;
|
||||
} mmg_track_t;
|
||||
|
||||
typedef struct {
|
||||
@ -204,6 +205,7 @@ protected:
|
||||
wxComboBox *cob_language, *cob_cues, *cob_sub_charset;
|
||||
wxComboBox *cob_aspect_ratio, *cob_fourcc;
|
||||
wxTextCtrl *tc_delay, *tc_track_name, *tc_stretch, *tc_tags;
|
||||
wxComboBox *cob_compression;
|
||||
|
||||
wxTimer value_copy_timer;
|
||||
|
||||
@ -226,11 +228,13 @@ public:
|
||||
void on_cues_selected(wxCommandEvent &evt);
|
||||
void on_subcharset_selected(wxCommandEvent &evt);
|
||||
void on_browse_tags(wxCommandEvent &evt);
|
||||
void on_tags_changed(wxCommandEvent &evt);
|
||||
void on_delay_changed(wxCommandEvent &evt);
|
||||
void on_stretch_changed(wxCommandEvent &evt);
|
||||
void on_track_name_changed(wxCommandEvent &evt);
|
||||
void on_aspect_ratio_changed(wxCommandEvent &evt);
|
||||
void on_fourcc_changed(wxCommandEvent &evt);
|
||||
void on_compression_selected(wxCommandEvent &evt);
|
||||
void on_value_copy_timer(wxTimerEvent &evt);
|
||||
|
||||
void no_track_mode();
|
||||
|
@ -141,7 +141,7 @@ tab_global::tab_global(wxWindow *parent):
|
||||
wxDefaultSize, 0);
|
||||
tc_chapters =
|
||||
new wxTextCtrl(this, ID_TC_CHAPTERS, _(""), wxPoint(100, 240 + YOFF),
|
||||
wxSize(290, -1), wxTE_READONLY);
|
||||
wxSize(290, -1));
|
||||
tc_chapters->SetToolTip(_T("mkvmerge supports two chapter formats: The "
|
||||
"OGM like text format and the full featured "
|
||||
"XML format."));
|
||||
@ -191,7 +191,7 @@ tab_global::tab_global(wxWindow *parent):
|
||||
wxDefaultSize, 0);
|
||||
tc_global_tags =
|
||||
new wxTextCtrl(this, ID_TC_GLOBALTAGS, _(""), wxPoint(100, 320 + YOFF),
|
||||
wxSize(290, -1), wxTE_READONLY);
|
||||
wxSize(290, -1));
|
||||
tc_global_tags->SetToolTip(_T("The difference between tags associated with "
|
||||
"a track and global tags is explained in "
|
||||
"mkvmerge's documentation. Most of the time "
|
||||
|
@ -206,16 +206,30 @@ tab_input::tab_input(wxWindow *parent):
|
||||
"or for QuickTime video tracks. This option "
|
||||
"CANNOT be used to change Matroska's CodecID."));
|
||||
|
||||
new wxStaticText(this, -1, _("Compression:"), wxPoint(5, 385),
|
||||
wxDefaultSize, 0);
|
||||
cob_compression =
|
||||
new wxComboBox(this, ID_CB_COMPRESSION, _(""), wxPoint(90, 385 + YOFF),
|
||||
wxSize(130, -1), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY);
|
||||
cob_compression->Append("");
|
||||
cob_compression->Append("none");
|
||||
cob_compression->Append("zlib");
|
||||
cob_compression->SetToolTip(_T("Sets the compression used for VobSub "
|
||||
"subtitles. If nothing is chosen then the "
|
||||
"VobSubs will be automatically compressed "
|
||||
"with zlib. 'none' results is files that "
|
||||
"are a lot larger."));
|
||||
|
||||
cb_default =
|
||||
new wxCheckBox(this, ID_CB_MAKEDEFAULT, _("Make default track"),
|
||||
wxPoint(5, 385), wxSize(200, -1), 0);
|
||||
wxPoint(5, 410), wxSize(200, -1), 0);
|
||||
cb_default->SetValue(false);
|
||||
cb_default->SetToolTip(_("Make this track the default track for its type "
|
||||
"(audio, video, subtitles). Players should prefer "
|
||||
"tracks with the default track flag set."));
|
||||
cb_aac_is_sbr =
|
||||
new wxCheckBox(this, ID_CB_AACISSBR, _("AAC is SBR/HE-AAC/AAC+"),
|
||||
wxPoint(255, 385), wxSize(200, -1), 0);
|
||||
wxPoint(255, 410), wxSize(200, -1), 0);
|
||||
cb_aac_is_sbr->SetValue(false);
|
||||
cb_aac_is_sbr->SetToolTip(_("This track contains SBR AAC/HE-AAC/AAC+ data. "
|
||||
"Only needed for AAC input files, because SBR "
|
||||
@ -223,13 +237,13 @@ tab_input::tab_input(wxWindow *parent):
|
||||
"these files. Not needed for AAC tracks read "
|
||||
"from MP4 or Matroska files."));
|
||||
|
||||
new wxStaticText(this, wxID_STATIC, _("Tags:"), wxPoint(5, 415),
|
||||
new wxStaticText(this, wxID_STATIC, _("Tags:"), wxPoint(5, 435),
|
||||
wxDefaultSize, 0);
|
||||
tc_tags =
|
||||
new wxTextCtrl(this, ID_TC_TAGS, _(""), wxPoint(90, 415 + YOFF),
|
||||
wxSize(280, -1), wxTE_READONLY);
|
||||
new wxTextCtrl(this, ID_TC_TAGS, _(""), wxPoint(90, 435 + YOFF),
|
||||
wxSize(280, -1));
|
||||
b_browse_tags =
|
||||
new wxButton(this, ID_B_BROWSETAGS, _("Browse"), wxPoint(390, 415 + YOFF),
|
||||
new wxButton(this, ID_B_BROWSETAGS, _("Browse"), wxPoint(390, 435 + YOFF),
|
||||
wxDefaultSize, 0);
|
||||
|
||||
no_track_mode();
|
||||
@ -253,6 +267,7 @@ void tab_input::no_track_mode() {
|
||||
b_browse_tags->Enable(false);
|
||||
cob_aspect_ratio->Enable(false);
|
||||
cob_fourcc->Enable(false);
|
||||
cob_compression->Enable(false);
|
||||
}
|
||||
|
||||
void tab_input::audio_track_mode() {
|
||||
@ -268,6 +283,7 @@ void tab_input::audio_track_mode() {
|
||||
b_browse_tags->Enable(true);
|
||||
cob_aspect_ratio->Enable(false);
|
||||
cob_fourcc->Enable(false);
|
||||
cob_compression->Enable(false);
|
||||
}
|
||||
|
||||
void tab_input::video_track_mode() {
|
||||
@ -283,6 +299,7 @@ void tab_input::video_track_mode() {
|
||||
b_browse_tags->Enable(true);
|
||||
cob_aspect_ratio->Enable(true);
|
||||
cob_fourcc->Enable(true);
|
||||
cob_compression->Enable(false);
|
||||
}
|
||||
|
||||
void tab_input::subtitle_track_mode() {
|
||||
@ -298,6 +315,7 @@ void tab_input::subtitle_track_mode() {
|
||||
b_browse_tags->Enable(true);
|
||||
cob_aspect_ratio->Enable(false);
|
||||
cob_fourcc->Enable(false);
|
||||
cob_compression->Enable(true);
|
||||
}
|
||||
|
||||
void tab_input::on_add_file(wxCommandEvent &evt) {
|
||||
@ -387,6 +405,7 @@ void tab_input::on_add_file(wxCommandEvent &evt) {
|
||||
track.tags = new wxString("");
|
||||
track.aspect_ratio = new wxString("");
|
||||
track.fourcc = new wxString("");
|
||||
track.compression = new wxString("");
|
||||
|
||||
file.tracks->push_back(track);
|
||||
|
||||
@ -465,6 +484,7 @@ void tab_input::on_remove_file(wxCommandEvent &evt) {
|
||||
delete t->tags;
|
||||
delete t->aspect_ratio;
|
||||
delete t->fourcc;
|
||||
delete t->compression;
|
||||
}
|
||||
delete f->tracks;
|
||||
delete f->file_name;
|
||||
@ -642,6 +662,14 @@ void tab_input::on_browse_tags(wxCommandEvent &evt) {
|
||||
}
|
||||
}
|
||||
|
||||
void tab_input::on_tags_changed(wxCommandEvent &evt) {
|
||||
if ((selected_file == -1) || (selected_track == -1))
|
||||
return;
|
||||
|
||||
*(*files[selected_file].tracks)[selected_track].tags =
|
||||
tc_tags->GetValue();
|
||||
}
|
||||
|
||||
void tab_input::on_delay_changed(wxCommandEvent &evt) {
|
||||
if ((selected_file == -1) || (selected_track == -1))
|
||||
return;
|
||||
@ -682,6 +710,14 @@ void tab_input::on_fourcc_changed(wxCommandEvent &evt) {
|
||||
cob_fourcc->GetStringSelection();
|
||||
}
|
||||
|
||||
void tab_input::on_compression_selected(wxCommandEvent &evt) {
|
||||
if ((selected_file == -1) || (selected_track == -1))
|
||||
return;
|
||||
|
||||
*(*files[selected_file].tracks)[selected_track].compression =
|
||||
cob_compression->GetStringSelection();
|
||||
}
|
||||
|
||||
void tab_input::on_value_copy_timer(wxTimerEvent &evt) {
|
||||
mmg_track_t *t;
|
||||
|
||||
@ -736,6 +772,7 @@ void tab_input::save(wxConfigBase *cfg) {
|
||||
cfg->Write("tags", *t->tags);
|
||||
cfg->Write("aspect_ratio", *t->aspect_ratio);
|
||||
cfg->Write("fourcc", *t->fourcc);
|
||||
cfg->Write("compression", *t->compression);
|
||||
|
||||
cfg->SetPath("..");
|
||||
}
|
||||
@ -775,6 +812,7 @@ void tab_input::load(wxConfigBase *cfg) {
|
||||
delete t->stretch;
|
||||
delete t->aspect_ratio;
|
||||
delete t->fourcc;
|
||||
delete t->compression;
|
||||
}
|
||||
delete f->tracks;
|
||||
}
|
||||
@ -839,6 +877,8 @@ void tab_input::load(wxConfigBase *cfg) {
|
||||
tr.aspect_ratio = new wxString(s);
|
||||
cfg->Read("fourcc", &s);
|
||||
tr.fourcc = new wxString(s);
|
||||
cfg->Read("compression", &s);
|
||||
tr.compression = new wxString(s);
|
||||
|
||||
fi.tracks->push_back(tr);
|
||||
cfg->SetPath("..");
|
||||
@ -981,6 +1021,7 @@ BEGIN_EVENT_TABLE(tab_input, wxPanel)
|
||||
EVT_BUTTON(ID_B_ADDFILE, tab_input::on_add_file)
|
||||
EVT_BUTTON(ID_B_REMOVEFILE, tab_input::on_remove_file)
|
||||
EVT_BUTTON(ID_B_BROWSETAGS, tab_input::on_browse_tags)
|
||||
EVT_TEXT(ID_TC_TAGS, tab_input::on_tags_changed)
|
||||
|
||||
EVT_LISTBOX(ID_LB_INPUTFILES, tab_input::on_file_selected)
|
||||
EVT_LISTBOX(ID_CLB_TRACKS, tab_input::on_track_selected)
|
||||
@ -1001,6 +1042,7 @@ BEGIN_EVENT_TABLE(tab_input, wxPanel)
|
||||
EVT_TEXT(ID_TC_DELAY, tab_input::on_delay_changed)
|
||||
EVT_TEXT(ID_TC_STRETCH, tab_input::on_stretch_changed)
|
||||
EVT_TEXT(ID_TC_TRACKNAME, tab_input::on_track_name_changed)
|
||||
EVT_COMBOBOX(ID_CB_COMPRESSION, tab_input::on_compression_selected)
|
||||
|
||||
EVT_TIMER(ID_T_INPUTVALUES, tab_input::on_value_copy_timer)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user