Changeset b5bed61


Ignore:
Timestamp:
07/18/14 07:50:39 (14 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2, releng/10.2
Children:
a584991
Parents:
0494142 (diff), a5f660c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • build-files/conf/port-make.conf

    r2cc1de2 ra5f660c  
    8484grub2-pcbsd_SET=MKFONT FUSE 
    8585gthumb_SET=EXIV2 
     86gwget_UNSET=EPIPHANY 
    8687hal_SET=FIXED_MOUNTPOINTS 
    8788hplip_SET=SNMP SCAN XSANE FAX 
     
    154155webfonts_SET=MSWINDOWS_LICENSE 
    155156weechat_SET=TCL ASPELL GNUTLS LUA PERL PYTHON RUBY COLOR256 
     157weechat-devel_SET=TCL ASPELL GNUTLS PERL PYTHON RUBY COLOR256 
     158weechat-devel_UNSET=LUA 
    156159wine_SET=HAL OPENAL CUPS 
    157160wine-devel_SET=HAL OPENAL CUPS GECKO MONO 
  • lumina/libLumina/LuminaXDG.cpp

    rd435362e r0494142  
    350350} 
    351351 
     352QStringList LXDG::findFilesForMime(QString mime){ 
     353  QStringList out; 
     354  QStringList mimes = LXDG::loadMimeFileGlobs2().filter(mime); 
     355  for(int i=0; i<mimes.length(); i++){ 
     356    out << mimes[i].section(":",2,2); // "*.<extension>" 
     357  } 
     358  //qDebug() << "Mime to Files:" << mime << out; 
     359  return out; 
     360} 
     361 
    352362QStringList LXDG::loadMimeFileGlobs2(){ 
    353363  //output format: <weight>:<mime type>:<file extension (*.something)> 
  • lumina/libLumina/LuminaXDG.h

    rb8c1be6 r0494142  
    8282        //Find the mime-type of a particular file extension 
    8383        static QString findAppMimeForFile(QString extension); 
     84        //Find the file extension for a particular mime-type 
     85        static QStringList findFilesForMime(QString mime); 
    8486        //Load all the "globs2" mime database files 
    8587        static QStringList loadMimeFileGlobs2(); 
  • lumina/lumina-fm/MainUI.cpp

    r4333764 r0494142  
    188188  connect(mediaObj, SIGNAL(tick(qint64)), this, SLOT(playerTimeChanged(qint64)) ); 
    189189  connect(mediaObj, SIGNAL(stateChanged(Phonon::State, Phonon::State)), this, SLOT(playerStateChanged(Phonon::State, Phonon::State)) ); 
    190    
     190  connect(mediaObj, SIGNAL(hasVideoChanged(bool)), this, SLOT(playerVideoAvailable(bool)) ); 
    191191  //Special Keyboard Shortcuts 
    192192  connect(nextTabLShort, SIGNAL(activated()), this, SLOT( prevTab() ) ); 
     
    387387  QDir dir(getCurrentDir()); 
    388388  if(multiFilter.isEmpty()){ 
    389     //hard-code the multimedia filter at the moment - need to find a way to read this from Phonon directly later 
    390     multiFilter << "*.mp3" << "*.ogg" << "*.mp4" << "*.mp4a" << "*.wmv" << "*.mov" << "*.flv"; 
     389    QStringList mimes = Phonon::BackendCapabilities::availableMimeTypes(); 
     390    mimes = mimes.filter("audio/") + mimes.filter("video/"); 
     391    for(int i=0; i<mimes.length(); i++){ 
     392      multiFilter << LXDG::findFilesForMime(mimes[i]); 
     393    } 
     394    multiFilter.removeDuplicates(); 
    391395    qDebug() << "Supported Multimedia Formats:" << multiFilter; 
    392396  } 
     
    977981void MainUI::playerStart(){ 
    978982  if(ui->stackedWidget->currentWidget()!=ui->page_audioPlayer){ return; } //don't play if not in the player 
    979   if(mediaObj->state()==Phonon::StoppedState || mediaObj->state()==Phonon::ErrorState || (playerFile->fileName().section("/",-1) != ui->combo_player_list->currentText()) || playerFile->isOpen() ){ 
     983   
     984  if(mediaObj->state()==Phonon::PausedState){ 
     985    mediaObj->play(); 
     986  }else if(mediaObj->state()==Phonon::StoppedState || mediaObj->state()==Phonon::ErrorState || (playerFile->fileName().section("/",-1) != ui->combo_player_list->currentText()) || playerFile->isOpen() ){ 
    980987    mediaObj->stop(); 
    981988    //Get the selected file path 
     
    990997      mediaObj->play(); 
    991998    } 
    992   }else if(mediaObj->state()==Phonon::PausedState){ 
    993     mediaObj->play(); 
    994   } 
    995  
     999  } 
    9961000} 
    9971001 
     
    10251029  bool running = false; 
    10261030  bool showVideo = false; 
     1031  QString msg; 
    10271032  switch(newstate){ 
    10281033    case Phonon::LoadingState: 
     
    10321037    case Phonon::PlayingState: 
    10331038        running=true; 
    1034         if(mediaObj->hasVideo()){  
    1035           showVideo=true; 
    1036         }else{ 
    1037           QString msg = mediaObj->metaData(Phonon::TitleMetaData).join(" "); 
    1038           if(msg.simplified().isEmpty()){ msg = playerFile->fileName().section("/",-1); } 
    1039           ui->label_player_novideo->setText(tr("Playing:")+"\n"+msg); 
    1040         } 
     1039        showVideo = mediaObj->hasVideo(); 
     1040        msg = mediaObj->metaData(Phonon::TitleMetaData).join(" "); 
     1041        if(msg.simplified().isEmpty()){ msg = playerFile->fileName().section("/",-1); } 
     1042        ui->label_player_novideo->setText(tr("Playing:")+"\n"+msg); 
    10411043        break; 
    10421044    case Phonon::BufferingState: 
     
    10621064} 
    10631065 
     1066void MainUI::playerVideoAvailable(bool showVideo){ 
     1067  ui->label_player_novideo->setVisible(!showVideo); 
     1068  videoDisplay->setVisible(showVideo);   
     1069} 
     1070 
    10641071void MainUI::playerTimeChanged(qint64 ctime){ 
    1065   //qDebug() << "Time:" << msToText(ctime) << msToText(mediaObj->totalTime()) << msToText(mediaObj->remainingTime()) << mediaObj->isSeekable(); 
    1066   ui->label_player_runstats->setText( msToText(ctime)+"/"+msToText(mediaObj->totalTime()) ); 
     1072  if(playerTTime=="0:00" || playerTTime.isEmpty()){ playerTTime = msToText(mediaObj->totalTime()); } //only calculate as necessary 
     1073  //qDebug() << "Time:" << msToText(ctime) << playerTTime << mediaObj->isSeekable() << mediaObj->hasVideo(); 
     1074  ui->label_player_runstats->setText( msToText(ctime)+"/"+playerTTime ); 
    10671075} 
    10681076 
  • lumina/lumina-fm/MainUI.h

    r4333764 r0494142  
    3636 
    3737//Phonon widgets 
     38#include <Phonon/BackendCapabilities> 
    3839#include <Phonon/MediaObject> 
    3940#include <Phonon/VideoWidget> 
     
    7879        Phonon::SeekSlider *playerSlider; 
    7980        QFile *playerFile; 
     81        QString playerTTime; //total time - to prevent recalculation every tick 
    8082 
    8183        //Internal variables 
     
    172174        void playerNext(); 
    173175        void playerPrevious(); 
    174         void playerFinished(); 
    175         void playerStateChanged(Phonon::State newstate, Phonon::State oldstate); 
    176         void playerTimeChanged(qint64 ctime); 
     176        void playerFinished(); //automatically called by the media object 
     177        void playerStateChanged(Phonon::State newstate, Phonon::State oldstate); //automatically called by the media object 
     178        void playerVideoAvailable(bool showVideo); //automatically called by the media object 
     179        void playerTimeChanged(qint64 ctime); //automatically called by the media object 
    177180        void playerFileChanged(); 
    178181         
Note: See TracChangeset for help on using the changeset viewer.