[Webkit-unassigned] [Bug 125588] New: [GStreamer] MediaPlayerPrivateGStreamerBase should use GMutexLocker instead of g_mutex_lock

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 11 11:10:05 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=125588

           Summary: [GStreamer] MediaPlayerPrivateGStreamerBase should use
                    GMutexLocker instead of g_mutex_lock
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media Elements
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: b.long at cablelabs.com


This bit of code would be much simpler with GMutexLocker:

void MediaPlayerPrivateGStreamerBase::paint(GraphicsContext* context, const IntRect& rect)
{
#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS)
    if (client())
        return;
#endif

    if (context->paintingDisabled() || m_skipPainting)
        return;

    if (!m_player->visible())
        return;

    g_mutex_lock(m_bufferMutex);
    if (!m_buffer) {
        g_mutex_unlock(m_bufferMutex);
        return;
    }

    GRefPtr<GstCaps> caps = currentVideoSinkCaps();
    if (!caps) {
        g_mutex_unlock(m_bufferMutex);
        return;
    }

    RefPtr<ImageGStreamer> gstImage = ImageGStreamer::createImage(m_buffer, caps.get());
    if (!gstImage) {
        g_mutex_unlock(m_bufferMutex);
        return;
    }

    context->drawImage(reinterpret_cast<Image*>(gstImage->image().get()), ColorSpaceSRGB,
        rect, gstImage->rect(), CompositeCopy, ImageOrientationDescription(), false);
    g_mutex_unlock(m_bufferMutex);
}

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list