Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/3rdparty/phonon/qt7/videoframe.mm

    r561 r846  
    2020#import <QuartzCore/CIFilter.h>
    2121#import <QuartzCore/CIContext.h>
    22 
    23 //#define CACHE_CV_TEXTURE
    2422
    2523QT_BEGIN_NAMESPACE
     
    7371    void VideoFrame::copyMembers(const VideoFrame& frame)
    7472    {
    75 #ifdef CACHE_CV_TEXTURE
    7673        m_cachedCVTextureRef = frame.m_cachedCVTextureRef;
    77 #endif
    7874                m_cachedCIImage = frame.m_cachedCIImage;
    7975                m_cachedQImage = frame.m_cachedQImage;
     
    110106    CVOpenGLTextureRef VideoFrame::cachedCVTexture() const
    111107    {
    112 #ifdef CACHE_CV_TEXTURE
    113108        if (!m_cachedCVTextureRef && m_videoPlayer){
    114109            m_videoPlayer->setColors(m_brightness, m_contrast, m_hue, m_saturation);
    115110            (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = m_videoPlayer->currentFrameAsCVTexture();
    116             CVOpenGLTextureRetain((const_cast<VideoFrame *>(this))->m_cachedCVTextureRef);
    117111        }
    118112        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
    126113    }
    127114
     
    343330    void VideoFrame::invalidateImage() const
    344331    {
    345 #ifdef CACHE_CV_TEXTURE
    346332        if (m_cachedCVTextureRef){
    347333            CVOpenGLTextureRelease(m_cachedCVTextureRef);
    348334            (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = 0;
    349335        }
    350 #endif
    351336        if (m_cachedCIImage){
    352337                        [(CIImage *) m_cachedCIImage release];
     
    362347    void VideoFrame::retain() const
    363348    {
    364 #ifdef CACHE_CV_TEXTURE
    365349        if (m_cachedCVTextureRef)
    366350            CVOpenGLTextureRetain(m_cachedCVTextureRef);
    367 #endif
    368351                if (m_cachedCIImage)
    369352                        [(CIImage *) m_cachedCIImage retain];
     
    376359    void VideoFrame::release() const
    377360    {
    378 #ifdef CACHE_CV_TEXTURE
    379         if (m_cachedCVTextureRef){
     361        if (m_cachedCVTextureRef)
    380362            CVOpenGLTextureRelease(m_cachedCVTextureRef);
    381             (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = 0;
    382         }
    383 #endif
    384363                if (m_cachedCIImage)
    385364                        [(CIImage *) m_cachedCIImage release];
     
    390369
    391370        (const_cast<VideoFrame *>(this))->m_backgroundFrame = 0;
     371        (const_cast<VideoFrame *>(this))->m_cachedCVTextureRef = 0;
    392372        (const_cast<VideoFrame *>(this))->m_cachedCIImage = 0;
    393373        (const_cast<VideoFrame *>(this))->m_cachedNSBitmap = 0;
Note: See TracChangeset for help on using the changeset viewer.