Changeset 846 for trunk/src/3rdparty/phonon/qt7/videoframe.mm
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/3rdparty/phonon/qt7/videoframe.mm
r561 r846 20 20 #import <QuartzCore/CIFilter.h> 21 21 #import <QuartzCore/CIContext.h> 22 23 //#define CACHE_CV_TEXTURE24 22 25 23 QT_BEGIN_NAMESPACE … … 73 71 void VideoFrame::copyMembers(const VideoFrame& frame) 74 72 { 75 #ifdef CACHE_CV_TEXTURE76 73 m_cachedCVTextureRef = frame.m_cachedCVTextureRef; 77 #endif78 74 m_cachedCIImage = frame.m_cachedCIImage; 79 75 m_cachedQImage = frame.m_cachedQImage; … … 110 106 CVOpenGLTextureRef VideoFrame::cachedCVTexture() const 111 107 { 112 #ifdef CACHE_CV_TEXTURE113 108 if (!m_cachedCVTextureRef && m_videoPlayer){ 114 109 m_videoPlayer->setColors(m_brightness, m_contrast, m_hue, m_saturation); 115 110 (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = m_videoPlayer->currentFrameAsCVTexture(); 116 CVOpenGLTextureRetain((const_cast<VideoFrame *>(this))->m_cachedCVTextureRef);117 111 } 118 112 return m_cachedCVTextureRef; 119 #else120 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 #endif126 113 } 127 114 … … 343 330 void VideoFrame::invalidateImage() const 344 331 { 345 #ifdef CACHE_CV_TEXTURE346 332 if (m_cachedCVTextureRef){ 347 333 CVOpenGLTextureRelease(m_cachedCVTextureRef); 348 334 (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = 0; 349 335 } 350 #endif351 336 if (m_cachedCIImage){ 352 337 [(CIImage *) m_cachedCIImage release]; … … 362 347 void VideoFrame::retain() const 363 348 { 364 #ifdef CACHE_CV_TEXTURE365 349 if (m_cachedCVTextureRef) 366 350 CVOpenGLTextureRetain(m_cachedCVTextureRef); 367 #endif368 351 if (m_cachedCIImage) 369 352 [(CIImage *) m_cachedCIImage retain]; … … 376 359 void VideoFrame::release() const 377 360 { 378 #ifdef CACHE_CV_TEXTURE 379 if (m_cachedCVTextureRef){ 361 if (m_cachedCVTextureRef) 380 362 CVOpenGLTextureRelease(m_cachedCVTextureRef); 381 (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = 0;382 }383 #endif384 363 if (m_cachedCIImage) 385 364 [(CIImage *) m_cachedCIImage release]; … … 390 369 391 370 (const_cast<VideoFrame *>(this))->m_backgroundFrame = 0; 371 (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = 0; 392 372 (const_cast<VideoFrame *>(this))->m_cachedCIImage = 0; 393 373 (const_cast<VideoFrame *>(this))->m_cachedNSBitmap = 0;
Note:
See TracChangeset
for help on using the changeset viewer.