Change media default profile - onvif

Is that possible to change the default media profile manually?
I've checked out documentation:
media onvif docs
And due to the docs, "default profile" is chosen via device capabilities:
Real-time video and audio streaming configurations are controlled
using media profiles. A media profile maps a video and/or audio source
to a video and/or an audio encoder, PTZ and analytics configurations.
An ONVIF compliant device supporting the media service presents
different available profiles depending on its capabilities (the set of
available profiles might change dynamically though).
Which profile will be chosen, if the couple of them fulfill the capabilities?
Can I change the default profile by onvif's media API? If not: How can I simulate capabilities' change?
Any help would be greatly appreciated.

I have tested with several brands of cameras. They all have some 'default' profiles mostly a mainstream(high quality) and substream(low(er) quality). I found out that the order of the profiles on the devices are random but can be set manually with the device software interface. So if you want for example the mainstream first you can confige this on the device software. Then the next time you connect to the first available profile it will be the one of your choise.
Setting the profile after getting them through the media client (with GetProfiles) can be done as suggested by LoukMo's comment.

Related

Create MediaSource from AudioPlaybackConnection

I'm trying to make my windows computer a valid output for bluetooth audio from my phone. Enabling the actual audio was easy enough using the winrt AudioPlaybackConnection, but I'm trying to get metadata working and running into dead ends in the Windows UWP documentation. I'm familiar with the MediaPlayer class, but I can't see how to set the source to the AudioPlaybackConnection. My next thought was to create a MediaPlayer and handle the controls/metadata myself, but I can't see how to access the metadata for the AudioPlaybackConnection either. I tried getting the BluetoothDevice matching the same phone since I see the properties for the actual device list AVRCP Transport and A2DP SNK as two separate hardware "devices" making up the phone device, but I have no more luck accessing metadata with the BluetoothDevice. I know Windows 10 supports Bluetooth's AVRCP and can handle metadata/controls (source), but I'm beginning to think it's under a different device in winrt and I don't have the winrt know-how to track it down.
I've consulted the Bluetooth team about this. But currently, control like this is not supported in Windows at this time. You could submit a feature request about this in the Feedback Hub. Please select Developer Platform->API Feedback as the category when you submit your request. The related team will check the request.

Use ONVIF to determine if a camera supports dewarping

Using ONVIF, how can I determine if the device has a fisheye camera and subsequently if it supports dewarping stream?
In ONVIF, For any feature to be confirmed as supported by the device usually can be done in one or more ways (including but not limited to the list) listed below
Reading the device/service capabilities using GetServiceCapabilities interface provided by every service
Reading the configurations provided by device using 'Get[entity]Configurations' interface
Reading the configuration parameter options using Get[entity]ConfigurationOptions interface
The "entity" varies depends on the feature, Check the entities list here
https://www.onvif.org/specs/srv/media/ONVIF-Media2-Service-Spec.pdf Section 4.1 Media profile)
For your query about dewarp feature support, option 2 has to be checked. So you have to read VideoSourceConfiguration from the device via 'GetVideoSourceConfiguration' interface and check the response.
The response from device shall adhere to the specification as quoted below
Ref: https://www.onvif.org/specs/srv/media/ONVIF-Media2-Service-Spec-v1712.pdf
Section : 5.2.2 Video source configuration
View Mode
Fisheye – Undewarped viewmode from a device supporting fisheye lens
Dewarp – Dewarped view mode for device supporting fisheye lens

How do you build a BLE app when you don't have access to the official GATT XML files?

To build a BLE app, you need
service UUID
the service's characteristic UUIDs
the characteristic's permissions (read / write / notify ...)
If you are sending any data, you need to know the value type (uint8_t, uint16_t ...)
For an instance, if it was environment sensing service, I can read this PDF from this page, and find Environmental Sensing under GATT Service and the UUID is 0x181A. Then I can go on reading the same PDF and find Temperature (although it's T emperature in text for some reasons, and it can't be searched by Temperature) under GATT Characteristic and Object Type, and the UUID is 0x2A6E.
OK, so far so good. Then I hit a wall. How about the data size (e.g. uint16_t or whatever) to notify or which permissions are allowed (e.g. read / write ...)?
After hours of googling, I finally found this github and this github. But this is not official, somebody copied and evacuated them.
How do you efficiently program a BLE app when you don't have official XML files to look up?
From the GATT Specification page there is the GATT Specification Supplement document where it has the information on the structure of the temperature characteristic:
Environmental Sensing Service document also on GATT Specification page details if a characteristic can have notifications:
I also found the XML documents presented the information in a more compact manner and I have bought this to the attention of the Bluetooth SIG but the links don't seem to get fixed. The data is still there on the site if you can workout the URL. I have no idea if that data is being maintained.
https://www.bluetooth.com/wp-content/uploads/Sitecore-Media-Library/Gatt/Xml/Services/org.bluetooth.service.environmental_sensing.xml
https://www.bluetooth.com/wp-content/uploads/Sitecore-Media-Library/Gatt/Xml/Characteristics/org.bluetooth.characteristic.temperature.xml
All of the GATT xml specifications can be found here:
https://github.com/oesmith/gatt-xml

Create a video or folder which will be available for particular time only

We want to develop one video or folder containing videos/images/content to be played on TV (not smart TV) in offline mode. But it should be played for some particular time only lets say a year. After that user need to contact admin or subscribe to view the same again. Is it possible to do the same and if yes what are the ways to achieve that?
Most DRM systems, such as Widevine, PlayReady and FPS support what you are asking for - offline playback with a limit on the duration.
When the client requests the license, the response it receives includes the decryption key and some metadata about the entitlements. This metadata allows the client be granted entitlements such as offline playback and allows a time limit be set for that capability.
As an example, look at the PlayReady license template information here and at the linked 'Compliance Rules for PlayReady Products' document which is publicly available online:
https://learn.microsoft.com/en-us/azure/media-services/media-services-playready-license-template-overview

Bluetooth: how to send large files

I need to make an Android application that sends large files (100-500 KB) over Bluetooth.
It is very important to preserve the integrity of the data, avoid any corruption of the files sent.
Please should I implement my own protocol?
Is there a suitable profile that I can use? (it seems profiles support is limited in Android...)
Any third party library?
This depends on the profiles that are implemented.
OPP - Object Push Profile can send files, but this is often limited to V-cards and in some case images.
FTP - File Transfer Profile can send larger files.
There is no specific application needed, you should be able to do it from native android as long as both devices supports the profile in question.
For example, enter the gallery and choose to share an image over Bluetooth, then select the receiving party.
Or enter file manager and choose to share file over Bluetooth.
If you want to write your own program that sends files, you can find the specifications for the profiles and protocols on Bluetooth.org or developer information on Bluetooth.com

Resources