Skip to content

Conversation

@dcb-framatome
Copy link
Contributor

No description provided.

Copy link
Owner

@caspermeijn caspermeijn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution. Just out of curiosity, what are you using ONVIFViewer for?

m_cachedDeviceInformation(new OnvifDeviceInformation()),
m_cachedSnapshotDownloader(new OnvifSnapshotDownloader())
m_cachedDeviceInformation(new OnvifDeviceInformation(this)),
m_cachedSnapshotDownloader(new OnvifSnapshotDownloader(this))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was already merged, right? It would be great if you could rebase, so that this commit is not merged twice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snuck in somehow ... I'll have to create a new branch and cherry-pick.


void initByUrl(const QUrl& url);

QStringList profileNames() const;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the interface you are creating here. I think you this should be a list of OnvifMediaProfile, so that the application can make an educated decision and doesn't have to guess the correct profile based on the name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a bad idea. I'll look into it when I have time. This was a quick addition for a needed feature.

void ptzStop();
void ptzZoomIn();
void ptzZoomOut();
void selectMediaProfile(int index);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the argument should be something like a reference to OnvifMediaProfile, but I am not sure how this would work. I think the index it too much dependent on the actual implementation.

console.log(modelData.xAddr)
newDevice.hostName = modelData.host;
console.log(modelData.xAddr[0])
newDevice.hostName = modelData.host[0];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want a list of hostnames if you are just choosing the first?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not using this qml file. This was just a quick change to ensure that it continues to function. The previous implementation just chose the last host. This is something you'll have to rethink on your end. Ultimately I believe a host list should be returned since certain devices report more than one host interface.

errorString = "None of the authentication methods are available";
}
} else if (location.contains("OnvifPtzServicePrivate::getServiceCapabilitiesError") &&
fault.faultAsString().contains("not implemented")) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the problem here that getServiceCapabilities is not implemented or that whole PTZ functionality is not implemented. Because I believe that the getServiceCapabilities is a relative new call. So the message could mean that the PTZ is available, but you need to use a different method of determining capabilities.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case the device indeed has no PTZ capability but previous calls indicate that the service is available. Perhaps the firmware is shared on multiple devices where PTZ may or may not be present? In any case, I had to add this line in order to access the video from the camera. If not getServiceCapabilities what command is required?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, getServiceCapabilities doesn't return anything of my interest currently, so maybe it is not needed at all.

The longer term solution I want to work towards is some kind of feature detection, which will try all the different ONVIF calls and determine which features are supported and which are not supported. I think this is needed, because out of the four ONVIF cameras that I tried, three needed a workaround like this. It appears that the feature reporting of all these cameras are slightly off. But that will need a lot of work, before actually usable ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants