Ejemplo n.º 1
0
//TODO: check components compatiblity(also when change the filter chain)
VideoRenderer* AVPlayer::setRenderer(VideoRenderer *r)
{
    qDebug(">>>>>>>>>>%s", __FUNCTION__);
    VideoRenderer *old = setAVOutput(_renderer, r, video_thread);
    if (_renderer) {
        qDebug("resizeRenderer after setRenderer");
        _renderer->resizeRenderer(_renderer->rendererSize()); //IMPORTANT: the swscaler will resize
    }
    //old may be in stack. do not delete here
    return old;
}
Ejemplo n.º 2
0
//TODO: check components compatiblity(also when change the filter chain)
void AVPlayer::setRenderer(VideoRenderer *r)
{
    qDebug(">>>>>>>>>>%s", __FUNCTION__);
    if (_renderer && r) {
        VideoRenderer::OutAspectRatioMode oar = _renderer->outAspectRatioMode();
        r->setOutAspectRatioMode(oar);
        if (oar == VideoRenderer::CustomAspectRation) {
            r->setOutAspectRatio(_renderer->outAspectRatio());
        }
    }
    setAVOutput(_renderer, r, video_thread);
    if (_renderer) {
        qDebug("resizeRenderer after setRenderer");
        _renderer->resizeRenderer(_renderer->rendererSize()); //IMPORTANT: the swscaler will resize
    }
}
Ejemplo n.º 3
0
AudioOutput* AVPlayer::setAudioOutput(AudioOutput* ao)
{
    qDebug(">>>>>>>>>>%s", __FUNCTION__);
    return setAVOutput(_audio, ao, audio_thread);
}