QTfrontend/ui/page/pagevideos.cpp
changeset 7865 2edc88e9fcd6
parent 7794 ab7b94c03bc9
child 7867 a691fd5f98f8
equal deleted inserted replaced
7864:667b7583c389 7865:2edc88e9fcd6
    90         QString path()
    90         QString path()
    91         { return cfgdir->absoluteFilePath("Videos/" + name);  }
    91         { return cfgdir->absoluteFilePath("Videos/" + name);  }
    92 };
    92 };
    93 
    93 
    94 VideoItem::VideoItem(const QString& name)
    94 VideoItem::VideoItem(const QString& name)
    95     : QTableWidgetItem(name, UserType)
    95 : QTableWidgetItem(name, UserType)
    96 {
    96 {
    97     this->name = name;
    97     this->name = name;
    98     pRecorder = NULL;
    98     pRecorder = NULL;
    99     pUploading = NULL;
    99     pUploading = NULL;
   100     lastSizeUpdate = 0;
   100     lastSizeUpdate = 0;
   409     comboAudioCodecs->setEnabled(!!state);
   409     comboAudioCodecs->setEnabled(!!state);
   410 }
   410 }
   411 
   411 
   412 void PageVideos::setDefaultCodecs()
   412 void PageVideos::setDefaultCodecs()
   413 {
   413 {
       
   414     // VLC should be able to handle any of these configurations
       
   415     // Quicktime X only opens the first one
       
   416     // Windows Media Player TODO
       
   417     if (tryCodecs("mp4", "libx264", "aac"))
       
   418         return;
       
   419     if (tryCodecs("mp4", "libx264", "libfaac"))
       
   420         return;
   414     if (tryCodecs("mp4", "libx264", "libmp3lame"))
   421     if (tryCodecs("mp4", "libx264", "libmp3lame"))
   415         return;
       
   416     if (tryCodecs("mp4", "libx264", "libfaac"))
       
   417         return;
       
   418     if (tryCodecs("mp4", "libx264", "libvo_aacenc"))
       
   419         return;
       
   420     if (tryCodecs("mp4", "libx264", "aac"))
       
   421         return;
   422         return;
   422     if (tryCodecs("mp4", "libx264", "mp2"))
   423     if (tryCodecs("mp4", "libx264", "mp2"))
   423         return;
   424         return;
   424     if (tryCodecs("avi", "libxvid", "libmp3lame"))
   425     if (tryCodecs("avi", "libxvid", "libmp3lame"))
   425         return;
   426         return;
   440     tryCodecs("ogg", "libtheora", "flac");
   441     tryCodecs("ogg", "libtheora", "flac");
   441 }
   442 }
   442 
   443 
   443 void PageVideos::setDefaultOptions()
   444 void PageVideos::setDefaultOptions()
   444 {
   445 {
   445     framerateBox->setValue(25);
   446     framerateBox->setValue(30);
   446     bitrateBox->setValue(400);
   447     bitrateBox->setValue(1000);
   447     checkRecordAudio->setChecked(true);
   448     checkRecordAudio->setChecked(true);
   448     checkUseGameRes->setChecked(true);
   449     checkUseGameRes->setChecked(true);
   449     setDefaultCodecs();
   450     setDefaultCodecs();
   450 }
   451 }
   451 
   452