Beispiel #1
0
bool VideoPreview::showConfigDialog(QWidget *parent)
{
    VideoPreviewConfigDialog d(parent);

    d.setVideoFile(videoFile());
    d.setDVDDevice(DVDDevice());
    d.setCols(cols());
    d.setRows(rows());
    d.setInitialStep(initialStep());
    d.setMaxWidth(maxWidth());
    d.setDisplayOSD(displayOSD());
    d.setAspectRatio(aspectRatio());
    d.setFormat(extractFormat());
    d.setSaveLastDirectory(save_last_directory);

    if (d.exec() == QDialog::Accepted) {
        setVideoFile(d.videoFile());
        setDVDDevice(d.DVDDevice());
        setCols(d.cols());
        setRows(d.rows());
        setInitialStep(d.initialStep());
        setMaxWidth(d.maxWidth());
        setDisplayOSD(d.displayOSD());
        setAspectRatio(d.aspectRatio());
        setExtractFormat(d.format());
        save_last_directory = d.saveLastDirectory();

        return true;
    }

    return false;
}
	CudaVideoRender::CudaVideoRender(DirectX9Renderer* a_pRenderer, LPCWSTR a_pFilename)
		: CudaTextureRender(a_pRenderer)
	{
		m_bDone       = false;
		m_bAutoQuit   = false;
		m_bUseVsync   = false;
		m_bQAReadback = false;
		m_bFirstFrame = true;
		m_bLoop       = false;
		m_bUpdateCSC  = true;
		m_bUpdateAll  = false;
		m_bInterop    = true;
		m_bReadback   = false; // this flag enables/disables reading back of a video from a window
		m_bIsProgressive = true; // assume it is progressive, unless otherwise noted

		m_pDX9Texture2DField1=NULL;
		m_pDX9Texture2DField2=NULL;

		m_ppRegisteredResources[0]=NULL;
		m_ppRegisteredResources[1]=NULL;

		m_eVideoCreateFlags = cudaVideoCreate_PreferCUVID;
		m_CtxLock = NULL;

		m_cuModNV12toARGB  = 0;
		m_fpNV12toARGB    = 0;
		m_fpPassthru      = 0;

		m_ReadbackSID = 0;
		m_KernelSID = 0;

		m_eColorSpace = ITU601;
		m_nHue        = 0.0f;

		// System Memory surface we want to readback to
		m_bFrameData = new BYTE[2];
		m_bFrameData[0] = 0;
		m_bFrameData[1] = 0;
		m_pFrameQueue   = 0;
		m_pVideoSource  = 0;
		m_pVideoParser  = 0;
		m_pVideoDecoder = 0;

		m_pInteropFrame = new CUdeviceptr[2];
		m_pInteropFrame[0] = 0; // if we're using CUDA malloc
		m_pInteropFrame[1] = 0; // if we're using CUDA malloc


		m_nWindowWidth  = 0;
		m_nWindowHeight = 0;
		m_nVideoWidth  = 0;
		m_nVideoHeight = 0;
		m_nFrameCount = 0;
		m_nDecodeFrameCount = 0;

		setVideoFile(a_pFilename);
	}
Beispiel #3
0
bool DrawVideoElm::load_add(QDataStream &stream, QString projectPATH, float version)
{
    QDir dir(projectPATH);

    stream >> videPath;
    QFileInfo path(videPath);
    if(path.isRelative())
        videPath = dir.absoluteFilePath(videPath);
//    qDebug() << "videoPATH  " << videPath;
    key = videPath;
    setVideoFile(videPath);
}
Beispiel #4
0
void VideoPreview::loadSettings()
{
    qDebug("VideoPreview::loadSettings");

    set->beginGroup("videopreview");

    setCols(set->value("columns", cols()).toInt());
    setRows(set->value("rows", rows()).toInt());
    setInitialStep(set->value("initial_step", initialStep()).toInt());
    setMaxWidth(set->value("max_width", maxWidth()).toInt());
    setDisplayOSD(set->value("osd", displayOSD()).toBool());
    setExtractFormat((ExtractFormat) set->value("format", extractFormat()).toInt());
    save_last_directory = set->value("save_last_directory", save_last_directory).toBool();
    last_directory = set->value("last_directory", last_directory).toString();

    setVideoFile(set->value("filename", videoFile()).toString());
    setDVDDevice(set->value("dvd_device", DVDDevice()).toString());

    toggleInfoAct->setChecked(set->value("show_info", true).toBool());

    set->endGroup();
}