Beispiel #1
0
void
SliceRenderer::renderSlice(
	const soglu::GLViewSetup &aViewSetup,
	const soglu::GLTextureImageTyped<3> &aImage,
	const SliceConfiguration &aSlice,
	const SliceRenderingQuality &aRenderingQuality,
	const TRenderingOptions &aRenderingOptions
	)
{
	soglu::GLSLProgram &shaderProgram = getShaderProgram(aRenderingOptions, aRenderingQuality);

	int vertexLocation = shaderProgram.getAttributeLocation("vertex");
	auto programBinder = getBinder(shaderProgram);

	setViewSetup(shaderProgram, aViewSetup);
	setSliceRenderingImageData(shaderProgram, aImage, aRenderingQuality.enableInterpolation);

	setRenderingOptions(shaderProgram, aRenderingOptions);

	shaderProgram.use([&aImage, &aSlice, vertexLocation]() {
			soglu::drawVertexBuffer(
				generateVolumeSlice(aImage.getExtents().realMinimum, aImage.getExtents().realMaximum, aSlice.slice, aSlice.plane),
				GL_TRIANGLE_FAN,
				vertexLocation
				);
		});
}
	Dss1CallForGate::Dss1CallForGate(Utils::SafeRef<IDss1CallEvents> user,
		Dss1CallForGate::Profile &profile,
        ISDN::ILayerDss &dss1,
        boost::shared_ptr<ISDN::DssCallParams> dss1CallParams) : 
		MsgObject(profile.m_infra->Domain().getMsgThread()),
		m_checkProfile(profile),
		m_stat(profile.m_stat->OutgoingCall()),
		m_infra(*profile.m_infra),
		m_gate(*profile.m_owner),
		m_waitAnswerTimer(this, &T::WaitAnswerTimeout),
		m_isIncomingCall(false),
		m_isDeleted(false),
		m_isAddressComplete(true),
		m_isAllerted(false),
		m_addressCompleteSize(0),
		m_sendAlertingTone(profile.m_sendAlertingTone),
        m_calledNumber(dss1CallParams->GetCalled()),
        m_callingNumber(dss1CallParams->GetCalling()),
        m_server(m_infra.Domain(), this),
		m_dss1Call(*this),
		m_userCall(user),
		m_interfaceNumber(-1)
    {
		InitCallInfo();

		InitLog(*profile.m_logCreator.Clear());
        if(m_log->LogActive(m_infoTag))
        {
            *m_log << m_infoTag << "Created. Sip->Dss1." << iLogW::EndRecord;
        }
        dss1.CreateOutCall(ISDN::ILayerDss::CreateOutCallParametrs(getBinder(), dss1CallParams, m_log->NameStr()));

		if(profile.m_waitAnswerTimeout != 0) m_waitAnswerTimer.Start(profile.m_waitAnswerTimeout);
    }
int setHSIC(int dpy, const HSICData_t& hsic_data) {
    status_t err = (status_t) FAILED_TRANSACTION;
    sp<IQService> binder = getBinder();
    Parcel inParcel, outParcel;
    inParcel.writeInt32(dpy);
    inParcel.writeInt32(hsic_data.hue);
    inParcel.writeFloat(hsic_data.saturation);
    inParcel.writeInt32(hsic_data.intensity);
    inParcel.writeFloat(hsic_data.contrast);
    if(binder != NULL) {
        err = binder->dispatch(IQService::SET_HSIC_DATA, &inParcel, &outParcel);
    }
    if(err)
        ALOGE("%s: Failed to get external status err=%d", __FUNCTION__, err);
    return err;
}
int isExternalConnected(void) {
    int ret;
    status_t err = (status_t) FAILED_TRANSACTION;
    sp<IQService> binder = getBinder();
    Parcel inParcel, outParcel;
    if(binder != NULL) {
        err = binder->dispatch(IQService::CHECK_EXTERNAL_STATUS,
                &inParcel , &outParcel);
    }
    if(err) {
        ALOGE("%s: Failed to get external status err=%d", __FUNCTION__, err);
        ret = err;
    } else {
        ret = outParcel.readInt32();
    }
    return ret;
}
int getDisplayVisibleRegion(int dpy, hwc_rect_t &rect) {
    status_t err = (status_t) FAILED_TRANSACTION;
    sp<IQService> binder = getBinder();
    Parcel inParcel, outParcel;
    inParcel.writeInt32(dpy);
    if(binder != NULL) {
        err = binder->dispatch(IQService::GET_DISPLAY_VISIBLE_REGION,
                &inParcel, &outParcel);
    }
    if(!err) {
        rect.left = outParcel.readInt32();
        rect.top = outParcel.readInt32();
        rect.right = outParcel.readInt32();
        rect.bottom = outParcel.readInt32();
    } else {
        ALOGE("%s: Failed to getVisibleRegion for dpy =%d: err = %d",
              __FUNCTION__, dpy, err);
    }
    return err;
}
int setViewFrame(int dpy, int l, int t, int r, int b) {
    status_t err = (status_t) FAILED_TRANSACTION;
    sp<IQService> binder = getBinder();
    Parcel inParcel, outParcel;
    inParcel.writeInt32(dpy);
    inParcel.writeInt32(l);
    inParcel.writeInt32(t);
    inParcel.writeInt32(r);
    inParcel.writeInt32(b);

    if(binder != NULL) {
        err = binder->dispatch(IQService::SET_VIEW_FRAME,
                &inParcel, &outParcel);
    }
    if(err)
        ALOGE("%s: Failed to set view frame for dpy %d err=%d",
                            __FUNCTION__, dpy, err);

    return err;
}
int getDisplayAttributes(int dpy, DisplayAttributes_t& dpyattr) {
    status_t err = (status_t) FAILED_TRANSACTION;
    sp<IQService> binder = getBinder();
    Parcel inParcel, outParcel;
    inParcel.writeInt32(dpy);
    if(binder != NULL) {
        err = binder->dispatch(IQService::GET_DISPLAY_ATTRIBUTES,
                &inParcel, &outParcel);
    }
    if(!err) {
        dpyattr.vsync_period = outParcel.readInt32();
        dpyattr.xres = outParcel.readInt32();
        dpyattr.yres = outParcel.readInt32();
        dpyattr.xdpi = outParcel.readFloat();
        dpyattr.ydpi = outParcel.readFloat();
        dpyattr.panel_type = (char) outParcel.readInt32();
    } else {
        ALOGE("%s: Failed to get display attributes err=%d", __FUNCTION__, err);
    }
    return err;
}