How to add my MFT at the end of the topology resolved by the media session? - ms-media-foundation

I need to insert my MFT before the EVR and after the very last MFT that the media session resolved. I want to take uncompressed/decoded input and apply a blur filter to it and send it to the EVR/window to be displayed. I need to take advantage of the job media session already did, I don't want to resolve dependencies myself. I need to know what options I have in order to further investigate on google?

You can create a partial topology. After that you need to implement a custom topology loader. In Load method after loading the topology you can insert your MFT and insert it between the last MFT and EVR. Disconnect tem first.
Check here: https://msdn.microsoft.com/en-us/library/windows/desktop/bb250372(v=vs.85).aspx

Related

How Swift response for the scenario that file overwriting and deletion are happened simultaneously(overwriting first then deletion)

Under the condition of "allow_versions" set to "FALSE" or "TRUE", for both cases, how Swift response for the scenario that a file is under overwriting while delete request come in simultaneously(with the order of overwriting first then deletion)?
Please share your thoughts.
Many thanks!
The timestamp assigned to the request coming in to the proxy is what will ultimately decide which "last" write wins.
If you have a long running upload and issue the delete during, the tombstone will have a later timestamp and will eventually take precedence even if the upload finishes after.
When using the container versioning feature, overwriting in a versioned container will cause the object data to be COPY'd off the current tip before the PUT data is sent to the storage node with the assigned timestamp. For deletes in a versioned container the "previous version" is discovered at the time the overwriting request is made and subject to eventual consistency in the container listing, but is only deleted once it has been copied into the current location for the object.
More information about object versioning is available here:
http://docs.openstack.org/developer/swift/overview_object_versioning.html
Well, a quick summary comes, though still a very high level view but hope it helps understanding how it works under the hood.
The diagram(below link) sets two simultaneous scenarios(A and B) against the enable/disable of the Swift object versioning feature. The outcome for each scenario is shown in the diagram.
Download the diagram.
Please share your thoughts if any.

Open multiple files with an application using QDesktopServices

Currently a user can select a song on my Qt application and play it using his default media player. I have implemented this using QDesktopServices::openUrl().
However I want the user to be able to select multiple songs and enque them in his media player. With the current implementation as soon as the user selects the second song the first song stops and the second one starts to play.
What would be the best way to do this?
I'm afraid, enqueueing songs cannot be done, using QDesktopServices::openUrl() only. I see two main ways to do that:
You can adjust your player to enqueue all songs, opened with QDesktopServices::openUrl() (which is practically equivalent to double clicking in your file magager).
Most players I know have parameters, which tell them to enqueue listed file(s). For example, deadbeef can be launched with parameter --queue. You can use QProcess::startDetached to launch the player with parameters.
In both ways you need to know the exact player, you are using.
If your player supports MPRIS (if it's a media player which is expected to be integrated to a modern Unix desktop, it does), the addTrack method of the D-BUS MPRIS interface for track list manipulation should help you. You might want to call QDesktopServices::openUrl on the first file to make sure that a player is running before you invoke that.

Specifying a full topology with MediaFoundation

I've created a topology for a video file which contains just one stream (no audio).
It contains three nodes which are connected in order:
a source stream node
an Mpeg4Part2VideoDecoder as transform node
an activate object for the EVR as output node
Calling SetTopology(), allowing for a partial topology results in working playback. However, I am trying to resolve the full topology myself.
Therefore, I first need to bind my output node to a media sink. I followed the guidelines specified in the manual, and all the required calls seem to succeed. When setting the full topology, I receive the MESessionTopologySet event.
Unfortunately, playback doesn't work, but I don't get any errors.
Is there anything else required when creating a full topology?
I recall reading somewhere in the msdn docs that the topology loader which is used when setting a partial topology also sets media types. Is this required, and if so where can I find more information on this?
Matt Andrews answered this one for me on the msdn forums.
You definitely need to negotiate your own media types if you are
bypassing the topology loader. This means obtaining the source's
media type from IMFMediaTypeHandler, setting it on the downstream
transform, and then for each node down the chain, querying the
available input and output types to find a compatible media type. It
is much easier to use the topoloader unless you have a specific need
to avoid it.

How to process Asterisk's queue_log file

I am setting up a contact center and need some data for management. Since we are using Asterisk queues, the place to get them is from queue_log, I believe. So, for avoiding eventual future errors, I would like to know some points about processing this file.
What do you use to do? Parse the file and insert the data on a relational database? Or parse it everytime you need a report?
Do you use some type of log rotating on it, to avoid it to become too big?
You might want to use a mode called Realtime, which stores the data right in a database

Datasource best practices question

This is probably not a difficult project, but I'm not sure of the best way to handle it.
I have an ASP.Net page that needs to query a db for some info (a list of about 12 email addresses) that are used throughout the single-page application (basically a set of 8 buttons, each of which puts an entry into another DB table which includes a message [different for each button] and the email address [from the first db] the message should be sent to).
The list of addresses rarely changes. At what point should my application query the DB for the addresses? Doing it at the button press seems like a waste, since I'll be making the same query and obtaining the same results over and over. I was thinking of opening my datasource and using a SqlDataReader and storing the list of email addresses into a string array, but where is the best place to do that so the data is persisted, yet not queried repeatedly (as you may be able to tell, I am not great at ASP, and I'm still fuzzy on what the lifetime of variables are - application, session, or just while the page is processing).
Any help is appreciated.
Thanks
Adam
Use Cache. Look for GetProductData() method implementation in this page
In your data layer, put the results of the query into the cache.
In the method, you first check if the cache entry exists, if not, you call the DB and populate the cache with the results. If it does, you return the cached values.
You need to looking into using the Cache.
The Cache is most likely what you need:
http://msdn.microsoft.com/en-us/library/6hbbsfk6.aspx
Short version is that you can stick an object in there and set expiration conditions. Such as having it expire after a fixed amount of time, after a certain amount of time goes by without it being accessed, when another value in the cache changes, or when the underlying data in the database changes.
I usually wrap my caching in properties/methods that will attempt to get the value from cache if it is present and then go back to the database if it is not (either has never been read before or has expired).

Resources