本文整理汇总了C++中MediaPlayer::setSize方法的典型用法代码示例。如果您正苦于以下问题:C++ MediaPlayer::setSize方法的具体用法?C++ MediaPlayer::setSize怎么用?C++ MediaPlayer::setSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPlayer
的用法示例。
在下文中一共展示了MediaPlayer::setSize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updatePlayer
void RenderVideo::updatePlayer()
{
if (documentBeingDestroyed())
return;
bool intrinsicSizeChanged;
intrinsicSizeChanged = updateIntrinsicSize();
ASSERT_UNUSED(intrinsicSizeChanged, !intrinsicSizeChanged || !view().frameView().isInRenderTreeLayout());
MediaPlayer* mediaPlayer = videoElement().player();
if (!mediaPlayer)
return;
if (!videoElement().inActiveDocument()) {
mediaPlayer->setVisible(false);
return;
}
contentChanged(VideoChanged);
IntRect videoBounds = videoBox();
mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height()));
#if USE(HOLE_PUNCH_GSTREAMER) || USE(HOLE_PUNCH_EXTERNAL)
IntRect windowRect = document().view()->contentsToScreen(absoluteBoundingBoxRect(true));
mediaPlayer->setPosition(IntPoint(windowRect.x(), windowRect.y()));
#endif
mediaPlayer->setVisible(true);
mediaPlayer->setShouldMaintainAspectRatio(style().objectFit() != ObjectFitFill);
}
示例2: updatePlayer
void RenderVideo::updatePlayer()
{
if (documentBeingDestroyed())
return;
updateIntrinsicSize();
MediaPlayer* mediaPlayer = videoElement().player();
if (!mediaPlayer)
return;
if (!videoElement().inActiveDocument()) {
mediaPlayer->setVisible(false);
return;
}
#if USE(ACCELERATED_COMPOSITING)
contentChanged(VideoChanged);
#endif
IntRect videoBounds = videoBox();
mediaPlayer->setFrameView(&view().frameView());
mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height()));
mediaPlayer->setVisible(true);
mediaPlayer->setShouldMaintainAspectRatio(style().objectFit() != ObjectFitFill);
}
示例3: updatePlayer
void RenderVideo::updatePlayer()
{
MediaPlayer* mediaPlayer = player();
if (!mediaPlayer)
return;
if (!mediaElement()->inActiveDocument()) {
mediaPlayer->setVisible(false);
return;
}
IntRect videoBounds = videoBox();
mediaPlayer->setFrameView(document()->view());
mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height()));
mediaPlayer->setVisible(true);
}
示例4: updatePlayer
void RenderVideo::updatePlayer()
{
updateIntrinsicSize();
MediaPlayer* mediaPlayer = mediaElement()->player();
if (!mediaPlayer)
return;
if (!videoElement()->inActiveDocument()) {
mediaPlayer->setVisible(false);
return;
}
#if USE(ACCELERATED_COMPOSITING)
contentChanged(VideoChanged);
#endif
IntRect videoBounds = videoBox();
mediaPlayer->setFrameView(document()->view());
mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height()));
mediaPlayer->setVisible(true);
}