fixed audio and video issue created during merge with 1.40

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent e5d4f87bda
commit c7abe50538
  1. 16
      src/board/UBBoardController.cpp
  2. 2
      src/domain/UBGraphicsMediaItem.cpp

@ -1847,13 +1847,7 @@ UBGraphicsMediaItem* UBBoardController::addVideo(const QUrl& pSourceUrl, bool st
QUuid uuid = QUuid::createUuid();
QUrl concreteUrl = pSourceUrl;
#ifdef Q_WS_X11
concreteUrl = QUrl::fromLocalFile(selectedDocument()->persistencePath() + "/" + UBPersistenceManager::persistenceManager()
->addVideoFileToDocument(selectedDocument(), pSourceUrl.toLocalFile(), uuid));
#else
concreteUrl = QUrl::fromLocalFile(UBPersistenceManager::persistenceManager()
->addVideoFileToDocument(selectedDocument(), pSourceUrl.toLocalFile(), uuid));
#endif
concreteUrl = QUrl::fromLocalFile(UBPersistenceManager::persistenceManager()->addVideoFileToDocument(selectedDocument(), pSourceUrl.toLocalFile(), uuid));
UBGraphicsMediaItem* vi = mActiveScene->addMedia(concreteUrl, startPlay, pos);
selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
@ -1872,13 +1866,7 @@ UBGraphicsMediaItem* UBBoardController::addAudio(const QUrl& pSourceUrl, bool st
QUuid uuid = QUuid::createUuid();
QUrl concreteUrl = pSourceUrl;
#ifdef Q_WS_X11
concreteUrl = QUrl::fromLocalFile(selectedDocument()->persistencePath() + "/" + UBPersistenceManager::persistenceManager()
->addAudioFileToDocument(selectedDocument(), pSourceUrl.toLocalFile(), uuid));
#else
concreteUrl = QUrl::fromLocalFile(UBPersistenceManager::persistenceManager()
->addAudioFileToDocument(selectedDocument(), pSourceUrl.toLocalFile(), uuid));
#endif
concreteUrl = QUrl::fromLocalFile(UBPersistenceManager::persistenceManager()->addAudioFileToDocument(selectedDocument(), pSourceUrl.toLocalFile(), uuid));
UBGraphicsMediaItem* ai = mActiveScene->addMedia(concreteUrl, startPlay, pos);
selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));

@ -38,8 +38,6 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
{
update();
QString s = pMediaFileUrl.toLocalFile();
mMediaObject = new Phonon::MediaObject(this);
if (pMediaFileUrl.toLocalFile().contains("videos"))
{

Loading…
Cancel
Save