Changeset 561 for trunk/src/3rdparty/phonon/qt7/videoframe.mm
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/3rdparty/phonon/qt7/videoframe.mm
r2 r561 20 20 #import <QuartzCore/CIFilter.h> 21 21 #import <QuartzCore/CIContext.h> 22 23 //#define CACHE_CV_TEXTURE 22 24 23 25 QT_BEGIN_NAMESPACE … … 71 73 void VideoFrame::copyMembers(const VideoFrame& frame) 72 74 { 75 #ifdef CACHE_CV_TEXTURE 73 76 m_cachedCVTextureRef = frame.m_cachedCVTextureRef; 77 #endif 74 78 m_cachedCIImage = frame.m_cachedCIImage; 75 79 m_cachedQImage = frame.m_cachedQImage; … … 106 110 CVOpenGLTextureRef VideoFrame::cachedCVTexture() const 107 111 { 112 #ifdef CACHE_CV_TEXTURE 108 113 if (!m_cachedCVTextureRef && m_videoPlayer){ 109 114 m_videoPlayer->setColors(m_brightness, m_contrast, m_hue, m_saturation); 110 115 (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = m_videoPlayer->currentFrameAsCVTexture(); 116 CVOpenGLTextureRetain((const_cast<VideoFrame *>(this))->m_cachedCVTextureRef); 111 117 } 112 118 return m_cachedCVTextureRef; 119 #else 120 if (m_videoPlayer){ 121 m_videoPlayer->setColors(m_brightness, m_contrast, m_hue, m_saturation); 122 return m_videoPlayer->currentFrameAsCVTexture(); 123 } 124 return 0; 125 #endif 113 126 } 114 127 … … 330 343 void VideoFrame::invalidateImage() const 331 344 { 345 #ifdef CACHE_CV_TEXTURE 332 346 if (m_cachedCVTextureRef){ 333 347 CVOpenGLTextureRelease(m_cachedCVTextureRef); 334 348 (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = 0; 335 349 } 350 #endif 336 351 if (m_cachedCIImage){ 337 352 [(CIImage *) m_cachedCIImage release]; … … 347 362 void VideoFrame::retain() const 348 363 { 364 #ifdef CACHE_CV_TEXTURE 349 365 if (m_cachedCVTextureRef) 350 366 CVOpenGLTextureRetain(m_cachedCVTextureRef); 367 #endif 351 368 if (m_cachedCIImage) 352 369 [(CIImage *) m_cachedCIImage retain]; … … 359 376 void VideoFrame::release() const 360 377 { 361 if (m_cachedCVTextureRef) 378 #ifdef CACHE_CV_TEXTURE 379 if (m_cachedCVTextureRef){ 362 380 CVOpenGLTextureRelease(m_cachedCVTextureRef); 381 (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = 0; 382 } 383 #endif 363 384 if (m_cachedCIImage) 364 385 [(CIImage *) m_cachedCIImage release]; … … 369 390 370 391 (const_cast<VideoFrame *>(this))->m_backgroundFrame = 0; 371 (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = 0;372 392 (const_cast<VideoFrame *>(this))->m_cachedCIImage = 0; 373 393 (const_cast<VideoFrame *>(this))->m_cachedNSBitmap = 0;
Note:
See TracChangeset
for help on using the changeset viewer.