X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..71a09c3579dd5cb4cd8fa7fdc143561cbff74e12:/src/osx/carbon/mediactrl.cpp diff --git a/src/osx/carbon/mediactrl.cpp b/src/osx/carbon/mediactrl.cpp index 9d525f5b59..c3b00f5198 100644 --- a/src/osx/carbon/mediactrl.cpp +++ b/src/osx/carbon/mediactrl.cpp @@ -1,10 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/mediactrl.cpp +// Name: src/osx/carbon/mediactrl.cpp // Purpose: Built-in Media Backends for Mac // Author: Ryan Norton // Modified by: // Created: 11/07/04 -// RCS-ID: $Id$ // Copyright: (c) 2004-2006 Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -45,19 +44,7 @@ #include "wx/timer.h" #endif -// uma is for wxMacFSSpec -#include "wx/mac/uma.h" - -// standard QT stuff -#ifndef __DARWIN__ -#include -#include -#include -#else -#include -#endif - -#if !defined(__LP64__) +#if wxOSX_USE_CARBON #define USE_QUICKTIME 1 #else #define USE_QUICKTIME 0 @@ -65,6 +52,9 @@ #if USE_QUICKTIME +#include "wx/osx/private.h" +#include + //--------------------------------------------------------------------------- // Height and Width of movie controller in the movie control (apple samples) //--------------------------------------------------------------------------- @@ -95,6 +85,11 @@ public: virtual bool Load(const wxString& fileName); virtual bool Load(const wxURI& location); + virtual bool Load(const wxURI& location, + const wxURI& WXUNUSED(proxy)) + { + return Load(location); + } virtual bool Play(); virtual bool Pause(); @@ -190,7 +185,7 @@ public: private: wxQTMediaBackend *m_qtb; - DECLARE_NO_COPY_CLASS(wxQTMediaEvtHandler) + wxDECLARE_NO_COPY_CLASS(wxQTMediaEvtHandler); }; //=========================================================================== @@ -331,7 +326,7 @@ wxQTMediaBackend::~wxQTMediaBackend() // Dispose of the movie controller ::DisposeMovieController(m_mc); m_mc = NULL; - + // Dispose of offscreen GWorld ::DisposeGWorld(m_movieWorld); } @@ -439,7 +434,7 @@ bool wxQTMediaBackend::Load(const wxString& fileName) NULL); // wasChanged // Do not use ::GetMoviesStickyError() here because it returns -2009 - // a.k.a. invalid track on valid mpegs + // a.k.a. invalid track on valid mpegs if (err == noErr && ::GetMoviesError() == noErr) { ::CloseMovieFile(movieResFile); @@ -773,7 +768,8 @@ bool wxQTMediaBackend::SetPosition(wxLongLong where) { TimeRecord theTimeRecord; memset(&theTimeRecord, 0, sizeof(TimeRecord)); - theTimeRecord.value.lo = where.GetValue(); + theTimeRecord.value.lo = where.GetLo(); + theTimeRecord.value.hi = where.GetHi(); theTimeRecord.scale = ::GetMovieTimeScale(m_movie); theTimeRecord.base = ::GetMovieTimeBase(m_movie); ::SetMovieTime(m_movie, &theTimeRecord); @@ -878,11 +874,7 @@ wxMediaState wxQTMediaBackend::GetState() void wxQTMediaBackend::Cleanup() { m_bPlaying = false; - if (m_timer) - { - delete m_timer; - m_timer = NULL; - } + wxDELETE(m_timer); // Stop the movie: // Apple samples with CreateMovieControl typically @@ -1165,7 +1157,7 @@ pascal void wxQTMediaBackend::PPRMProc( //--------------------------------------------------------------------------- // wxQTMediaBackend::MCFilterProc (static) // -// Callback for when the movie controller recieves a message +// Callback for when the movie controller receives a message //--------------------------------------------------------------------------- pascal Boolean wxQTMediaBackend::MCFilterProc( MovieController WXUNUSED(theController),