Roku cast sample code for handling player controls - casting

I wanted to implement roku cast for one of channel.
I found little information for roku casting using DIAL protocol. Using DIAL Protocol documentation I can implement channel launch and stop.
But I want to know how to handle player controls(pause, volume controls etc) from the second screen application(Mobile). It would be so helpful if I get documentation and sample code.

You should be able to do this using ROKU ECP:
ROKU ECP: The External Control Protocol (ECP) enables a Roku device to be controlled over a local area network by providing a number of external control services.
I think the ROKU documentation contains all necessary information for You to implement external ROKU controls.
In the docs You can also find small snippets of code and CURL examples.
ROKU ECP DOCUMENTATION.

Related

Proxy in AWS to catch specific messages and reply?

Problem:
our system, running on AWS, uses an external service and we need to test specific flows/APIs of it. There is no way to completely mock this external service.
Desired solution:
we need an entity on the network which would monitor, catch specific messages from internal services and reply back in the name of the external service. I don't know if this is feasible at all. What i've found so far is that we probably need a transparent proxy. Maybe Squid...
Question:
can you recommend a solution(framework, tool, etc) that could do the above described tasks? If you can give details how to implement that would be great too.

Trying to determine proper notification design

We are building an internal application which will do the following:
Run as a Windows Service
Scan various server/platform types to confirm they are up and running
Call the HeartBeat() method on all of our WCF services
What we want to do is then (for each server) send a notification broadcast so that a listener can pick up the data and display the realtime results in a dashboard environment.
In addition, the data will be collected by the listener for drilldown or reporting purposes.
I'm having a hard time determining what is the proper approach for broadcasting results. SNMP seems like a good fit but I'm not sure how easy it would be to implement in C#. I've looked at WMI and SNMP at the moment.
I'm looking for input on alternatives to either SNMP or WMI for the broadcast approach.
If you're programming exclusively in C#, then your best bet is to find some C# SNMP library that you will probably have to purchase.
If you're wanting to go with portability and standards, then go with SNMP.
If you're always going to be using Win32 C# then go with a WMI solution.
If you don't mind coding outside of C# and instead C or C++ and want to make things compatible with other systems, then I would highly recommend working with Net-SNMP and building an SNMP agent from that.

Implement a secure connection using SSPI in C++ - clarify some terms

I have to write an application that implements a secure connection between client and server using Microsoft API .
Google give me a lot of results, and I have a big mess -need someone to make me some order in my head:
Questions:
what is SSPI interface? what is Schannel.dll library? what are the diffrents? (I see that I can include "SSPI.h" and "Schannel.h" and "security32.h" - which header file do I really need?)
How can I find a real simple sample that explains me how to create secure sockets?
Do you have some guidelines that I have to know before I start?
I would appreciate very much if you can help.
SSPI allows an application to use various security models available on a computer or network without changing the interface to the security system.
To paraphrase, it allows you to use a single set of API with different authentication or verification mechanisms, thus hiding complexity.
For your second question, have a look at this: Creating a Secure Connection Using Schannel with related sample code here.

Creating a service that streams video: Where to start?

I want to create a service that streams live traffic video to either a client browser or a client processor (which will actually process the video). I want real video, not just images that update periodically. Assume I know the basic concepts of web design (both front and back end). But assume I know nothing about streaming media.
Can someone point me in the direction to get started?
I need information concerning software, frameworks (especially if it's compatible with Ruby on Rails), encoders, converters, protocols, ... - thanks!
What about something like tokbox?
http://www.tokbox.com/
I havent personally used it. However I have visited an on line video podcast that uses this technology. Good quality streaming.

Capturing network status change event

I am trying to get events when the internet connection is reestablished after it is lost. It is for a data transfer software that I am developing. If I lose the network during data transfer, I would like to be notified when it is back and continue the transfer automatically.
I can of course create a separate thread and check the network once in a while with a timer, but maybe there is a better option out there.
I am developing for windows mainly, in C++ (not .net).
I can also use wxwidgets (I use it for GUI) but I doubt it offers any related functionality.
You might want to check out the System Event Notification Server (SENS) API http://msdn.microsoft.com/en-us/library/cc185680(VS.85).aspx
I have not actually used it, but it seems like it supplies the events your looking for.
EDIT:
WMI appears to have all the information you need about various network connectivity and state changes. It also has an asynchronous event model that can be used to get notifications. The trick is, i suppose, generating the proper WMI query to get the information you want. This blog looks like the right type of query, and this MSDN explains how to handle the events asynchronously.
I don't know which protocol you use and whether you can control the destination, but in that case, the destination can poll for a retry. The destination knows best what it has received, so it can give the received number of bytes as offset for the retransmission.
This MSDN link gives a very detailed example of how to capture events on WMI with COM. The example doesn't actually capture network events - but I believe that if you plug the right query in, it would work.
(lots of code here, so I'm not copying it into the answer)
http://msdn.microsoft.com/en-us/library/aa390425%28v=vs.85%29.aspx
this Codeproject link gives detail on
How to use the Windows NLM API to get notified of new network
connectivity
And maybe helpful to any challenge related to this one.
An application often needs to know if the machine has internet
connectivity and take actions depending on that. In this sample, we
are looking at the usage of the Windows NLM API in managed code so
that an application can choose to respond to internet connectivity
changes. There are many other specific NLM APIs for checking domain
connectivity, network adapter interfaces etc., that haven't been
mentioned in this article; you can refer to this link for further
details. The downloadable zip file has the source code.
more reading here
https://www.codeproject.com/Articles/34650/How-to-use-the-Windows-NLM-API-to-get-notified-of