| @@ -87,9 +87,7 @@ static QTMovie* openMovieFromStream (InputStream* movieStream, File& movieFile) | |||
| QTMovie* movie = nil; | |||
| FileInputStream* const fin = dynamic_cast <FileInputStream*> (movieStream); | |||
| if (fin != nullptr) | |||
| if (FileInputStream* const fin = dynamic_cast <FileInputStream*> (movieStream)) | |||
| { | |||
| movieFile = fin->getFile(); | |||
| movie = [QTMovie movieWithFile: juceStringToNS (movieFile.getFullPathName()) | |||
| @@ -118,14 +116,12 @@ static QTMovie* openMovieFromStream (InputStream* movieStream, File& movieFile) | |||
| return movie; | |||
| } | |||
| bool QuickTimeMovieComponent::loadMovie (const File& movieFile_, | |||
| const bool isControllerVisible_) | |||
| bool QuickTimeMovieComponent::loadMovie (const File& movieFile_, const bool showController) | |||
| { | |||
| return loadMovie ((InputStream*) movieFile_.createInputStream(), isControllerVisible_); | |||
| return loadMovie ((InputStream*) movieFile_.createInputStream(), showController); | |||
| } | |||
| bool QuickTimeMovieComponent::loadMovie (InputStream* movieStream, | |||
| const bool controllerVisible_) | |||
| bool QuickTimeMovieComponent::loadMovie (InputStream* movieStream, const bool showController) | |||
| { | |||
| closeMovie(); | |||
| @@ -142,14 +138,15 @@ bool QuickTimeMovieComponent::loadMovie (InputStream* movieStream, | |||
| [theMovie retain]; | |||
| QTMovieView* view = (QTMovieView*) getView(); | |||
| [view setMovie: theMovie]; | |||
| [view setControllerVisible: controllerVisible_]; | |||
| controllerVisible = showController; | |||
| [view setControllerVisible: controllerVisible]; | |||
| setLooping (looping); | |||
| return movie != nil; | |||
| } | |||
| bool QuickTimeMovieComponent::loadMovie (const URL& movieURL, | |||
| const bool isControllerVisible_) | |||
| bool QuickTimeMovieComponent::loadMovie (const URL& movieURL,, const bool showController) | |||
| { | |||
| // unfortunately, QTMovie objects can only be created on the main thread.. | |||
| jassert (MessageManager::getInstance()->isThisTheMessageThread()); | |||
| @@ -172,6 +169,8 @@ bool QuickTimeMovieComponent::loadMovie (const URL& movieURL, | |||
| [theMovie retain]; | |||
| QTMovieView* view = (QTMovieView*) getView(); | |||
| [view setMovie: theMovie]; | |||
| controllerVisible = showController; | |||
| [view setControllerVisible: controllerVisible]; | |||
| setLooping (looping); | |||
| @@ -308,7 +307,7 @@ void QuickTimeMovieComponent::setBoundsWithCorrectAspectRatio (const Rectangle<i | |||
| int normalWidth, normalHeight; | |||
| getMovieNormalSize (normalWidth, normalHeight); | |||
| const Rectangle<int> normalSize (0, 0, normalWidth, normalHeight); | |||
| const Rectangle<int> normalSize (normalWidth, normalHeight); | |||
| if (! (spaceToFitWithin.isEmpty() || normalSize.isEmpty())) | |||
| setBounds (placement.appliedTo (normalSize, spaceToFitWithin)); | |||