#include "videoview1.h"

///
CVideoView1::CVideoView1(QWidget* parent)
: CVideoViewHost(parent), m_videoRenderer(0) {
}
CVideoView1::~CVideoView1() {
	if (m_videoRenderer) {
		avd_render_destory(m_videoRenderer);
		m_videoRenderer = 0;
	}
}
bool CVideoView1::setScalingType(AVDScalingType type) {
	return avd_render_setScalingType(m_videoRenderer, type);
}
void CVideoView1::onCreateWnd(HWND hwnd) {
	if (0 != m_videoRenderer) {
		return;
	}
	avd_render_create(m_videoRenderer, hwnd, false, false);
}
void CVideoView1::resizeEvent(QResizeEvent* event) {
	CVideoViewHost::resizeEvent(event);
	if (m_videoRenderer) {
		avd_render_updateSize(m_videoRenderer);
	}
}
