equal
deleted
inserted
replaced
45 #include <QXmlStreamReader> |
45 #include <QXmlStreamReader> |
46 |
46 |
47 #include "hwconsts.h" |
47 #include "hwconsts.h" |
48 #include "pagevideos.h" |
48 #include "pagevideos.h" |
49 #include "igbox.h" |
49 #include "igbox.h" |
50 #include "libav_iteraction.h" |
50 #include "LibavInteraction.h" |
51 #include "gameuiconfig.h" |
51 #include "gameuiconfig.h" |
52 #include "recorder.h" |
52 #include "recorder.h" |
53 #include "ask_quit.h" |
53 #include "ask_quit.h" |
54 #include "upload_video.h" |
54 #include "upload_video.h" |
55 |
55 |
126 pOptLayout->addWidget(labelFormat, 0, 0); |
126 pOptLayout->addWidget(labelFormat, 0, 0); |
127 |
127 |
128 // list of supported formats |
128 // list of supported formats |
129 comboAVFormats = new QComboBox(pOptionsGroup); |
129 comboAVFormats = new QComboBox(pOptionsGroup); |
130 pOptLayout->addWidget(comboAVFormats, 0, 1, 1, 4); |
130 pOptLayout->addWidget(comboAVFormats, 0, 1, 1, 4); |
131 LibavIteraction::instance().fillFormats(comboAVFormats); |
131 LibavInteraction::instance().fillFormats(comboAVFormats); |
132 |
132 |
133 // separator |
133 // separator |
134 QFrame * hr = new QFrame(pOptionsGroup); |
134 QFrame * hr = new QFrame(pOptionsGroup); |
135 hr->setFrameStyle(QFrame::HLine); |
135 hr->setFrameStyle(QFrame::HLine); |
136 hr->setLineWidth(3); |
136 hr->setLineWidth(3); |
372 // clear lists of codecs |
372 // clear lists of codecs |
373 comboVideoCodecs->clear(); |
373 comboVideoCodecs->clear(); |
374 comboAudioCodecs->clear(); |
374 comboAudioCodecs->clear(); |
375 |
375 |
376 // get list of codecs for specified format |
376 // get list of codecs for specified format |
377 LibavIteraction::instance().fillCodecs(comboAVFormats->itemData(index).toString(), comboVideoCodecs, comboAudioCodecs); |
377 LibavInteraction::instance().fillCodecs(comboAVFormats->itemData(index).toString(), comboVideoCodecs, comboAudioCodecs); |
378 |
378 |
379 // disable audio if there is no audio codec |
379 // disable audio if there is no audio codec |
380 if (comboAudioCodecs->count() == 0) |
380 if (comboAudioCodecs->count() == 0) |
381 { |
381 { |
382 checkRecordAudio->setChecked(false); |
382 checkRecordAudio->setChecked(false); |
649 setName(item, newName); |
649 setName(item, newName); |
650 } |
650 } |
651 } |
651 } |
652 #ifdef Q_WS_WIN |
652 #ifdef Q_WS_WIN |
653 // there is a bug in qt, QDir::rename() doesn't fail on such names but damages files |
653 // there is a bug in qt, QDir::rename() doesn't fail on such names but damages files |
654 if (newName.contains(QRegExp("[\"*:<>?\/|]"))) |
654 if (newName.contains(QRegExp("[\"*:<>?\\/|]"))) |
655 { |
655 { |
656 setName(item, oldName); |
656 setName(item, oldName); |
657 return; |
657 return; |
658 } |
658 } |
659 #endif |
659 #endif |
747 desc += tr("Size: ") + FileSizeStr(path) + '\n'; |
747 desc += tr("Size: ") + FileSizeStr(path) + '\n'; |
748 if (item->desc.isEmpty()) |
748 if (item->desc.isEmpty()) |
749 { |
749 { |
750 // Extract description from file; |
750 // Extract description from file; |
751 // It will contain duration, resolution, etc and also comment added by hwengine. |
751 // It will contain duration, resolution, etc and also comment added by hwengine. |
752 item->desc = LibavIteraction::instance().getFileInfo(path); |
752 item->desc = LibavInteraction::instance().getFileInfo(path); |
753 |
753 |
754 // extract prefix (original name) from description (it is enclosed in prefix[???]prefix) |
754 // extract prefix (original name) from description (it is enclosed in prefix[???]prefix) |
755 int prefixBegin = item->desc.indexOf("prefix["); |
755 int prefixBegin = item->desc.indexOf("prefix["); |
756 int prefixEnd = item->desc.indexOf("]prefix"); |
756 int prefixEnd = item->desc.indexOf("]prefix"); |
757 if (prefixBegin != -1 && prefixEnd != -1) |
757 if (prefixBegin != -1 && prefixEnd != -1) |