Why EC_DISPLAY_CHANGED is sent even though a monitor change / switch didn't occur? - directshow

On the initial graph start, appoxly after 10 video samples, i keep receiving from the GraphManager the EC_DISPLAY_CHANGE event, even though, i didn't physically move the graph from one monitor to another, I only started it on the secondary monitor.
I tried to search for additional information regarding the causes the cause CGraphManager to send it but couldn't find any.
I've additionally used the following code snippet to handle the particular event by myself.
if (FAILED(hr = m_spMediaEventEx->CancelDefaultHandling(EC_DISPLAY_CHANGED)))
return hr;
Thanks for the help

EC_DISPLAY_CHANGE on MSDN:
If the display mode changes, the video renderer might need to choose another format. By sending this message, the renderer signals to the filter graph manager that it needs to be reconnected. During the reconnection, the renderer can select a new format.
The typical scenario is a video renderer expecting to be shown up on primary monitor, and then positioned onto secondary. The renderer generates the event in order to update itself through filter graph transition. You see the event after a few samples are already streamed because the event is handled asynchronously. To work this around, use IVMRMonitorConfig::SetMonitor and friends to position the renderer correctly well in advance.
Note that under normal circumstances, the event and reconnected is just a small delay and should be handled transparently.
By canceling default behavior, you are canceling the following exactly. And you are expected to take care yourself of what default action is trying to fix.
Default Action
The filter graph manager temporarily stops the graph, and then disconnects and reconnects the video renderer. It does not pass the event to the application.

Related

Is it possible to change contents dynamically which Alexa skill shows without any user actions?

I want to create a Photo Frame Skill for Echo Show.
I want to change photos triggered by external server (such as Firebase and so on).
Is it possible to change it dynamically without any user actions?
I saw Notification API and Proactive Events API.
But, These show notifications to user. I don't want to show anythings to user.
I want just trigger controlled from external server to change contents.
The answer depends a lot on the type of skill (for example if it is based on Alexa Conversations or not). But you can try exploring something along this line:
Keep the token of last rendered APL document
Send an APL ExecuteCommand directive from your skill server (https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-interface.html#executecommands-directive)
You can use one of the standard APL commands, depending upon your use case. One option is SetValue command (https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-standard-commands.html#setvalue-command) to modify the background image.
I want to create a Photo Frame Skill for Echo Show
Technically, a skill can last for a maximum of 5min30sec without any user interaction. Only if you provide a prompt that last for 4min then a reprompt that last for 90sec. It could be a blank audio. But Alexa is not suited for custom skills that stays live for a long time without user interactions.

Metrics and dimensions are not showing up for hits of type 'event'

I have a fully functional and working code (written in C#) which purpose is to track some hits to the specified GA property. This code has been tested and still works successfully. It adds some predefined dimensions (like App Version) to each hit and a several custom metrics to a certain hit types (like event with a certain Event Action).
So far so good everything works flawlessly when taking into account the first property to which these hits are being sent. Also everything is fine when I set up a brand new GA property and track my hits to it - that is, I'm able to see events in Realtime reports, and events show up in custom reports after a while so that I can see my custom metrics.
The issue is that when I try to send absolutely the same hits to the existing property which had been created and configured ages ago - there is no both dimensions (even predefined) and custom metrics in my custom reports. I see these events in realtime and behavior reports, and I'm even able to create a custom report against events count - but that's it. I'm able to use for example Day of the month as a primary dimension, but when I try to use App Version as a dimension or my custom metrics as report metrics - it says "There is no data for this view.".
I've already tried everything I could, have read almost every post about custom definitions in Google and viewed almost each related SO question and answer - still with no luck.
We use measurement protocol
There is a correct User Agent being sent with each hit
17 days has passed since my first attempt to track these hits with existing property
There is no filters and segments at all
There is only one view
For me it looks like a property misconfiguration, but I've inspected each configuration page (I have all possible rights granted) and have not found anything related.
Will appreciate any help with this issue.
UPD: The hit itself (with the sensitive data replaced):
t=event&ec=session&ea=connection_end&el=b225d53a-6bb2-8021-f7b5-ae7004ae0a00&cm1=174960&cm2=1751494&cm3=479033&tid=UA-XXXXXXX-X&cid=4119e77f-be87-4530-04d3-33882f8eea77&v=1&av=XX.XX.99.555&an=my-awesome-app&aid=app.awesome.my
UPD: Here is what I'm trying to achieve (screenshot was made at the test property, where everything works like a charm):

GA Measurement Protocol does not fire event for just one of the views

I've setup a Zapier automation to fire an event every time a new deal is made on a 3rd party CRM. The automation triggers fine, and retrieves the GA Client ID stored in the CRM. The goal of this automation is to add the value of the deal to the client's session history. This works completely fine on a new test GA View I made as well as the original one (the one left without any filters).
However, there's one GA View which has both, anti-bot/spider setting and 3 filters set up. I tried disabling all four of them, yet the event still wasn't being fired - not in real-time, nor User Explorer. Wondering what could be the cause of this. All views are, of course, of the same property. Are there any other filters (besides the anti-bot/spider setting and view filters) or options I may have missed that are view-specific that would cause events sent by Zapier not to fire on just this one view?
Any help is appreciated!
The update of the settings, in the specific case relating to the filters, may not be immediate. If you leave the filters disabled, you can certainly check if after midnight (or after a few hours after midnight) you see that data in the reports.
This happens because after midnight the data is reprocessed again, so for that day (which has therefore become the previous one), if you have removed the filters, you should find all the data.

No custom metrics being logged?

I am logging custom metrics using TrackMetric:
var telemetry = new TelemetryClient();
telemetry.TrackMetric($"Cache Size", cache.Count());
But nothing appears in the portal:
The output window when debugging shows the metrics being sent. I'm not sure how else to debug this.
There can be several things that make new items show up later than you'd like:
latency in AI pipeline itself, which is usually just a couple minutes or less (you can always check http://aka.ms/aistatus to see if there's any non-normal latency going on)
if you added a new custom property or new custom metric, it might take time for that new field to show up as a field in the metadata that the charts/etc use to build themselves. depending on timing here, especially if this is a brand new app, it can take up to ~15 minutes for a new property to show up in metadata if the stars are all unaligned... but normally much less than that.
once it is available in metadata, you might need to refresh in the portal if you've already opened Metrics Explorer for that AI resource for it to re-request metadata to see your field (normally just the "refresh" command on Metrics Explorer or an Overview blade is good enough to get that working, but doing a full refresh in the browser works as a last resort)

How to graphically connect nodes by drawing on canvas and tracking the new connection in the events in vis.js?

E.g. I may want to connect "Audi' node with existing "Cars" node to make a connection between the two. This should fire an event so that the underlying data source can be updated.
VIS.js provide some good examples on its page. Check this link and you should find everything you need.
Example: http://visjs.org/examples/network/other/manipulation.html
The important element is the "manipulation" configuration of the network with its callbacks for addNode, editNode, etc.
Dokumentation http://visjs.org/docs/network/manipulation.html

Resources