Identify 4k capability from Roku user agent - user-agent

I have a use case where given a Roku user agent string like "Roku/DVP-9.10 (519.10E04111A)", I want to determine whether this user agent came from a Roku device that supports 4k resolution video.
From Roku developer posts I see that 9.10 is the firmware version, and 4111 is the build. I know that Roku version 4 supports 4k, but Roku version 3 and below don't. However I don't know what part of the user agent string indicates whether the Roku device is Roku 4, Ultra, Premiere/+ or Stick + (which all support 4k). I want to filter out older Roku devices so that I don't show these older devices any 4k videos.

Related

UWP Mediabox - a few questions

I have a question to you and I really hope you can provide me some information.
I wish to build a media center because I have not found any possibilities to cast my stuff straight to the big screen from my Windows mobile phone.
Off course there is the wireless display adapter from Microsoft but I wish not to cast my whole display to my tv.
After testing a few product (Amazon fire tv box, apple tv 3, display dock and the wireless dock) I came to the conclusion that I can not have an all in one solution which fits my perceptions.
From that point I thought that I have to build my own "tv application".
Ok ok... There is kodi(xbmc) and so on... But I think this is just making a detour.
Following features must be included:
running on Windows 10
Cast music, videos and pictures.
Ability to launch and download windows store apps.
Project Rome implementation to share data across devices.
Seems possible but here´s one big problem...
If we are talking about mediaboxes, we do talk about those small boxes besides your tv. Instead off building a micro ATX setup, I want to take this to the next level... using IoT (Raspberry Pi 3).
Using IoT may have some advantages but there are a few disadvantages I have to worry about.
Will Windows 10 work properly on IoT (advantages - disadvantages)
Media streaming?
ARM architecture
Bluetooth, WIFI, Ethernet connectivity
I have never ever worked on IoT before, so I am kinda noob again. I´am asking for some advices to make this possible.
[UWP] How can I stream data (e.g. video, music, images) to another application?
[UWP] Implement a remote control - just like the amazon fire tv controler ?
Advantages - Disadvantages of using Windows 10 on a Raspberry Pi ?
Using windows 10 default applications (Groove Music, Images, Videos - Application) to play incomming data?
What do you think? Is it possible to create a Mediacenter which is running on a raspberry pi using windows 10?
Thank you in advance.
The most straightforward idea would be to create an always-running app with a MediaPlayerElement with a Source property that can be set programmatically by a remote control app. A remote control app could also control the pause, play, next, previous actions.
Be aware that there is no hardware video acceleration support for Raspberry Pi on Windows IoT Core yet, and probably that also won't come soon. There are other devices that do have proper video drivers (look at the hardware support page of Windows IoT Core).
Also be aware that there is no Windows Store on Windows IoT Core, unless you are an OEM (then you can publish your properly signed apps in an official way to devices that are managed by you).
A simpler way would be to buy a Windows 10 box from aliexpress. Then you can use Miracast to stream your screen, install apps from the App Store and play films directly on it, for example using Kodi for which remote control apps exist.

Chrome Bluetooth Low Energy API - Cross-Platform Support

I accessed the Chrome BLE API page (5/7/2016). there seem to be conflicting information messages (see image below). Does this work on Chrome OS only, or OS X and Windows also?
EDIT/UPDATE:
I tried the demo application (demo BLE API) on Windows 10. It was able to see paired devices, but not unpaired devices. I got an error message: Battery device not supported on this platform. I'm not sure if this is because of the test vector I used (LightBlue), or another issue.
System:
Windows 10 64 bit
Surface Pro 3
The chrome.bluetoothLowEnergy API works only for paired devices on Windows as it still uses (at that time) Windows 8 APIs to retrieve paired devices only: https://chromium.googlesource.com/chromium/src/+/08c9d69b0c0d625d2ce38e3d8402f36e1226f0fc/device/bluetooth/bluetooth_low_energy_win.h#117
For info, the Web Bluetooth team plans to support Windows 10 as much as feasible: https://github.com/WebBluetoothCG/web-bluetooth/blob/gh-pages/implementation-status.md#chrome
Reading through your given documentation wherein you referenced the use of navigator.bluetooth, Interact with BLE devices on the Web also states that:
Web Bluetooth API is at the time of writing partially implemented in Chrome OS and Chrome Dev for Android behind an experimental flag.
Hence, you got undefined as a return value.
Functionalities were provided by Bluetooth Low Energy (BLE) through key/value pairs provided by the Generic Attribute Profile (GATT).

OpenCV 2.3 (C++,QtGui), Problem Initializing some specific USB Devices and Setups

I'm playing around with OpenCV since a while and I found some strange behavior of some specific capturing devices (PS3 Eye, Logitech C940, iSight) even on different Platforms.
Using OpenCV in Windows: All cams mentioned above work well. But when I want to use 2 cams and therefore create a second capture it will depend on the devices that I use in my Dual Cam Setup.
PS3 Eye + C940: no problems
2x C940: no problems
2x PS3 Eye: No chance, only the specific device that was connected first will initialize. The other PS3 Eye cannot be used the same time...No error events and no information about the problem is shown.
Now using OpenCV in MacOSX 10.7 (same for 10.6.x) there's different problems using the same devices and even the same QtGui-Application with 2 independent GLWidgets for displaying cv output in the QtGui.
Every Setup is great as long as it doesn't use a PS Eye in Mac OS. I tried macam and several other tools, but I just cannot get OpenCV to init this cam in OSX (I bought 3 for my project so hardware probs not very likely).
I'm still wondering where the problem is...Maybe 2 PS Eye's would work in OSX if a single one did? I can't tell.
I can even capture from 2x Logitech FULL HD Webcams simultaniously with nice performance.
Any Idea where Limitation could be with Dual PS Eye in Windows? Perhaps USB? And why can't OpenCV in OSX Capture from PSEye but macam can access the cam?
I just want to understand what's happening. Perhaps anyone of you found a way to use at least a singe PS Eye in OSX? Or is this just not possible? Can't opencv somehow use the macam component?
Video capturing is very platform-dependent area. So difference between Windows and OS X is rather expected than wondering. OpenCV utilizes a lot of video capturing APIs to support as many device models as possible. At the moment (OpenCV 2.3.1) it uses following libs/APIs on the back-end:
Windows:
DirectShow (thought VideoInput library)
Microsoft's Video for Windows (VfW) API
CMU 1394 Digital Camera Driver
Matrox Imaging Library (MIL) (opt)
OpenNI camera drivers (opt)
XIMEA API for XIMEA devices (opt)
Linux:
libdc1394 (API v1 or API v2) - IIDC standard compliant cameras (opt)
PvAPI for Prosilica GigE Vision cameras (opt)
unicap - The uniform API for image acquisition devices (opt)
video4linux (V4L or V4L2) (opt)
OpenNI camera drivers (for Kinect) (opt)
XINE (opt)
XIMEA API for XIMEA devices (opt)
OS X:
QuickTime (opt)
QTKit (if no QuickTime, these two are mutually exclusive in OpenCV)
OpenNI camera drivers (opt)
XIMEA API for XIMEA devices (opt)
Android:
builtin Android camera
* (opt) - these interfaces are optional - can be turned on or off during the OpenCV build and may require some additional SDK.
About PS3 Eye - on Windows, it is most probably some limitation of VideoInput library or installed driver. On OS X - first, ensure that your OpenCV is built with QuickTime support. And second, ensure that macam.component is correctly installed into the QuickTime. Here is a quote from their FAQ:
Why can't I use my webcam with other applications?
You can. Please copy the macam.component into the
/Library/QuickTime/ directory (for access by all users on the system)
or into the ~/Library/QuickTime/ (for access by only that user). If
you have a previous copy, please delete it first. A restart is usually
not needed, but if you have trouble, it's a good thing to try. To
verify that your installation works, test with a simple program such
as HackTVCarbon, VideoViewer, or BTV.

QTKit does not enumerate my USB- and virtual cams in 64Bit mode. Is there a workaround?

I have a problem with Quicktime, that means, QTKit. A long time ago I wrote an app, which is using camera devices on Mac OS X. The user could select the camera using a popup box. I populated the device list into a popup box so the user could choose his preferred camera. Now I migrated to 64Bit code. And everything works fine with iSight cam. Audio devices are listed properly, too (including virtual drivers like Soundflower). For my surprise all camera-devices are missing. And QTKit never enumerates the existing cameras. Is there a workaround or does someone know something about this issue?
I encountered the same issue. Haven't found a workaround other than keeping it 32bit. The Quicktime API mailing list has already discussed this here basically stating that the camera device (your camera device) is a Quicktime Component and Quicktime Components are only supported with Quicktime 7 not Quicktime X if I understood this correctly.
So to put it bluntly: Quicktime Components are not supported in 64bit, for whatever reason I don't understand.
Update: another discussion on the quicktime-api-lists also covers this topic here. Search for vdig in the discussion and you'll find statements on the whole 32bit vs. 64bit complications:
Apple has never updated or replaced the VDIG/ SG / QuickTime Component
API to a 64 bit architecture and your VDIG will never show up as a
selectable device under 64 Bit. So your VDIG is screwed, just like
every other Mac 3rd party QT component developer is.
Also, the term QTKitServer pops up, which seems undocumented but is used by Quicktime X in 64bit mode to play movies in 32bit by using Quicktime components.
Maybe QTKitServer is the key?

Mac OS X public APIs for checking/requiring HDCP/DPCP protection?

Are there any public APIs in Mac OS X for checking the High-bandwidth Digital Content Protection (HDCP), and/or Display Port Content Protection (DPCP) compliance of connected displays, or for requiring that your application's output only be displayed on HDCP/DPCP-compliant displays?
I'd like my application to be able to refuse to play back certain content unless these kinds of protection are ensured on all relevant connected displays. I believe Apple is able to do this for iTunes store HD content, but I'm not sure if they are using a private API for this.
How can I guarantee that my application's output is HDCP- or DPCP-protected?
As far as I know (and I've done a lot of homework on it, I am lead engineer for a well known Mac/Win Media Player) Apple is being greedy and not sharing. There is plenty of evidence that newer macbook and mac pro HDMI and Display port connections support the full encryption protocol, and that iTunes is able to query and control it.
Apple appears to be purposely withholding the API, with the intention of preventing any possibility of Blu-ray support on Mac, in order to create leverage for getting the studios to allow HD content for iTunes.

Resources