//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; }
//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 } }
AudioOutput* AVPlayer::setAudioOutput(AudioOutput* ao) { qDebug(">>>>>>>>>>%s", __FUNCTION__); return setAVOutput(_audio, ao, audio_thread); }