~ubuntu-branches/ubuntu/utopic/dvdstyler/utopic-proposed

« back to all changes in this revision

Viewing changes to src/ProgressDlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-03-22 10:17:38 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20100322101738-221vbm516ygfnmfj
Tags: upstream-1.8.0.2
ImportĀ upstreamĀ versionĀ 1.8.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
// Purpose:     Progress of generation/burning dialog
4
4
// Author:      Alex Thuering
5
5
// Created:     14.08.2004
6
 
// RCS-ID:      $Id: ProgressDlg.cpp,v 1.88 2010/02/16 21:21:55 ntalex Exp $
 
6
// RCS-ID:      $Id: ProgressDlg.cpp,v 1.90 2010/03/16 21:01:26 ntalex Exp $
7
7
// Copyright:   (c) Alex Thuering
8
8
// Licence:     GPL
9
9
/////////////////////////////////////////////////////////////////////////////
208
208
  EVT_BUTTON(ICONIZE_BT_ID, ProgressDlg::OnMinimize)
209
209
END_EVENT_TABLE()
210
210
 
211
 
ProgressDlg::ProgressDlg(wxWindow* parent, Cache* cache, bool autoStart):
212
 
                wxDialog(parent, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize,
213
 
                wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxTHICK_FRAME) {
 
211
ProgressDlg::ProgressDlg(wxWindow* parent, Cache* cache, bool autoStart): wxDialog(parent, -1, wxEmptyString,
 
212
                wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) {
214
213
    // begin wxGlade: ProgressDlg::ProgressDlg
215
214
    m_summaryLabel = new wxStaticText(this, wxID_ANY, _("Summary:"));
216
215
    m_summaryText = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH);
261
260
    Centre();
262
261
    // end wxGlade
263
262
        m_panelSizer = panelSizer;
264
 
#ifdef __WXMSW__
265
 
        m_minimizeBt->Hide();
266
 
#endif
267
263
}
268
264
 
269
265
void ProgressDlg::OnHideDetails(wxCommandEvent& WXUNUSED(event)) {
985
981
        AddDetailMsg(_("Transcode video file: ") + mpegFile);
986
982
        bool disableAudio = streams.GetCount() > 1 + audioFiles.GetCount()
987
983
                && streams[1]->GetDestinationFormat() == afNONE;
988
 
        if (disableAudio)
 
984
        if (disableAudio) {
989
985
                wxLogMessage(wxT("disableAudio"));
 
986
        }
990
987
        wxFfmpegMediaTranscoder transcoder(s_config.GetThreadCount());
991
988
        if (!transcoder.AddInputFile(mpegFile, false, disableAudio)) {
992
989
                Failed(wxT("Error by transcoding of ") + mpegFile);
1020
1017
        }
1021
1018
        if (s_config.GetUseMplex()) {
1022
1019
                wxString videoFile = vobFile + wxT(".m2v");
1023
 
                if (wxFileExists(videoFile) && !wxRemoveFile(videoFile))
 
1020
                if (wxFileExists(videoFile) && !wxRemoveFile(videoFile)) {
1024
1021
                        wxLogError(wxString::Format(_("Can't remove file '%s'"), videoFile.c_str()));
 
1022
                }
1025
1023
                if (!transcoder.SetOutputFile(videoFile, videoFormat, afNONE, sfNONE,
1026
1024
                                videoBitrate, s_config.GetVbr(), s_config.GetAudioBitrate())) {
1027
1025
                        Failed(_("Error transcoding of ") + mpegFile);
1033
1031
                                continue;
1034
1032
                        wxString audioFile = vobFile + wxString::Format(wxT(".audio%d"), audioIdx);
1035
1033
                        audioFiles.Add(audioFile);
1036
 
                        if (wxFileExists(audioFile) && !wxRemoveFile(audioFile))
 
1034
                        if (wxFileExists(audioFile) && !wxRemoveFile(audioFile)) {
1037
1035
                                wxLogError(wxString::Format(_("Can't remove file '%s'"), audioFile.c_str()));
 
1036
                        }
1038
1037
                        if (!transcoder.SetOutputFile(audioFile, vfNONE, (AudioFormat) audioFormats[audioIdx], sfNONE,
1039
1038
                                                videoBitrate, s_config.GetVbr(), s_config.GetAudioBitrate())) {
1040
1039
                                Failed(_("Error transcoding of ") + mpegFile);