DatagramSocket's MessageReceived event with MF MediaSource strategies?

I'm trying to integrate sending and receiving data over UDP sockets using Media Foundation.  I've already got my MF MediaSink setup to send data out over a UDP socket.  However, I can't figure out how to get an MF MediaSource to receive data. 
I'm using a Multicast setup and want to just listen at a single port.  I know how to bind to a service (and I know about the overload for store apps to handle the error with some NICs).  What I don't know how to do is handle the MessageReceived event of
DatagramSocket via the MF MediaSource.
From what I can tell, I can't handle it from the MF MediaSource because the MediaSource is a COM class, not a WinRT class... correct?
So what strategy should I be using?
1.  I've very briefly tried using a task_completion_event that gets triggered when the message is received.  The MFMediaSource waits for an async method on the UDPClient class I've created to continue after receiving this task_completion_event. 
I was trying to do something very similar to how the "Simple Communication" sample works for initialiating a connection using a StreamSocket.  However, that was done once and I need my event to loop.  I couldn't get it to work without throwing
an exception (with not much information).  I'm not sure if it's a deadend.
2.  Should I create a MemoryStream (whatever the C++ equivalent is) within my UDPClient class, then copy data received over UDP from the IInputStream to my new stream?  I guess I'd have to emply some kind of lock and then poll the new stream
in a loop from the MF MediaSource. 
I'm still very much a novice at C++ (trying to learn by example), but I would very much appreciate some help on how to proceed.  Thanks!
Lee McPherson

This has helped quite a bit. Thanks for pointing me in the right direction!
FYI, it would help to create a primer on the history of C++ as it pertains to Microsoft technologies.  I think a lot of people who learn to program now don't necessarily have a formal background in computer programming (mine is in chemistry). 
I learn from examples and there are plenty of great C++ samples for Windows Store apps, but they are all pretty high level.  I didn't really know until now that they use C++/Cx. I've seen the term before but couldn't make the connection
as to what it was out of the C++ I was being shown.  I didn't know what WRL was or MFC or any of the other names applied to a flavor of C++.
The hardest thing about learning over the internet is that you'll get examples written using any number of these... whatever they are called.  Books tend to focus on console apps if they explain COM or WRL.  The ones that use store apps tend to
focus on C++/Cx and WinRT only.
All I'm saying is that someone should write a book that explains the non-C++/Cx (and relevant) portions of C++ for Win8.1/WP8.1 to a C# or JavaScript Windows Store app writer . 
Lee McPherson

Similar Messages

  • In ical I just added new calendars to a pre-existing calendar group, I can make events with these calendars, but not reminders, any suggestions?

    in ical I just added new calendars to a pre-existing calendar group, I can make events with these calendars, but not reminders, any suggestions?

    Hi,
    Lion has changed the way reminders (todos as was) work. They now seem to need to be in a seperate calendar.
    In iCal open the File menu and select New Reminder List... and select where to put it.
    Best wishes
    John M

  • Is there a way to delete all events with the same title (not added as reoccurring) without deleting one at a time?

    i currently have a calendar synced that has events scheduled in perpetuity, scheduled as individual events.  I would like to delete all events with the same title.  I do not want to delete the entire calendar nor do I want to go into every event and delete individually.  These were not scheduled by me so I do not know how they were added one by one and go on forever but they are NOT scheduled as reoccurring and thus must be modified individually.
    I can do a search and find all events, is there a way to just delete all events with the same title all at once?
    this is a Microsoft outlook synced calendar and I am seemingly unable to delete the events all at one time from Microsoft as well. 
    Please help!

    If you still have access to the Outlook calendar in Outlook, I would delete them from there. There are a number of ways to do that, but if you open the individual event in Outlook, does it show a repeating pattern? If not, then you may have to delete them individually, but that is not that difficult either. Go into the calendar and then change the view to a list view. From there you can sort the view according to subject. This should bring all of these same appointments together in the list and you can select the group in Outlook and delete them. Once you do that, you can change your view back and then sync the phone. That will remove the events from the phone.

  • HT4890 Can I share a specific event with friends on iCloud via Photostream?

    Can I share a specific event with friends on iCloud via Photostream?

    No, not until iOS 6 comes out.

  • How to move Projects and Events with iPhoto video included in iMovie '11?

    I work with a group of educators using iPads for video. One method for getting their clips into iMovie '11 is via iPhoto and then using the iPhoto Video link in iMovie to get the footage on a timeline (trying to import directly into iMovie '11, using the iPad as a "camera", has proved inconsistent, especially with footage from iStopMotion or Filmic Pro 1 and 2).
    The problem is, when it comes time to copy or move an event and project, the iPhoto clips don't come along; they are dependent on the iPhoto library, so you can't continue editing on a different machine. I tried File > Consolidate Media, but it was inactive (in my test project, all clips came from iPhoto). If I look at Reveal in Browser, it goes to the bowels of the iPhoto library. If I copy the project to another drive, it too, points to the iPhoto library (if I'm on the same machine; otherwise it doesn't see it). I also tried optimizing the footage in the hope that it would create an Event with optimized clips that I could then transfer.
    Am I missing something? It seems nuts that you can't transfer work to another machine without manually picking through the bowels of iPhoto. These days, lots of shooting is done on iPads and iPhones. Any help would be appreciated.

    My suggestion would be that in the future, they upload photos only to iphoto, and upload video clips directly to iMovie. In the early days of iOS, going through iPhoto was the only way, so it is a habit that I have had to break.
    With iOS 5 and 6, iMovie now recognizes the iPhone and the iPad as cameras.
    I agree that the Consolidate Media command should bring over iPHoto movies along with the photos. I suggest that you go to iMovie/Provide Feedback and let the developers know that you would like this feature.

  • How do I split a single event with many clips into multiples events, one event per date?

    I archived the video from my AVCHD camera into a Final Cut video archive. Later I imported this into iMovie. All the clips from this archive (spanning several months) are dumped into a single event. If I recall, older versions of iMovie would import video into separate events for each day. Then I would go through and give each event a meaningful name (e.g., "Mary's Birthday").
    This is what I would like. Is there a way to split this very long event into multiple events, one for each day that is present in the event?

    Not automatically but with imovie 10 you can create new events with any name you like then move clips into them from other events  (Just like FCP 10.1).   See:
    http://help.apple.com/imovie/mac/10.0/#mov1d890f00b
    You can also choose to display clips in an event grouped by date.
    Geoff

  • I made a movie in iMovie then deleted the clips in it. I have reimported the clips in an event with the same name as previously and some clips in the movie are still saying source slip missing even though they are there. What can I do?

    I made a movie in iMovie then deleted the clips in it. I have reimported the clips in an event with the same name as previously and some clips in the movie are still saying source slip missing even though they are there. Some clips are fine in the movie, but most are just black and when I hover over them, it says source clip missing. How to I fix this? Thank You

    I did that too, then I did a migration assistant to a new Mac and ALL of my movies have Source Clip Missing now, even though the original clips are still in the iPhoto Videos.  I can stand to re edit one or two projects, but not ALL.

  • Can I set up new events with leaps?

    I've tried to set up some Maya calendars on iCal without success. My idea has been creating a group of calendars made up by "full day" events, in which every event represents a day, and every calendar, a count. The point is that in those calendars there are always leaps that are repeated every while, and as far as I've done, after a leap happens, I must re-start to create the same events. Am I clear?
    Let's make an example. Imaging a calendar made up by four days (too short, but its for the example). I have created an iCal calendar with four events, and each one is set up to be repeated every four days; till this point it works as desired. But there's a leap of one day that happens every year, and I haven't been able to set it up; after erasing the event of that day, I must re-start to set up the future (four, for this example) events... Can't I set events with leaps on iCal?
    I've also thought about another possible way to set a calendar like that. I found a table for finding out the correspondence between Gregorian calendar and a 260 days Maya Calendar, by making an adding. There's a number for each month of the year, and also every year has a number. You have to add the number of the month plus the number of the year plus the number of the day of the month, and only if it is higher than 260, you will need to subtract 260; thus you will know which of those 260 days is today (or another date).
    So, if I can set an iCal calendar using something like "if today is 2nd =2, of June =151,  2011 = 7; add 2+151+7; and if answer is higher than 260 subtract 260; so day number is 160". I could also set some other calendars from that one, like "if answer is 109 or 110 or 111 or 112, then "codon" number is X. Any suggestion for creating an iCal calendar like that from other way, like Developer Apps? Or if not for creating an iCal Calendar, maybe for making a Widget?
    Thanks for your attention.

    Am I not clear? I guess I got excited trying to be clear explaining details... But got dark!
    And if I just say, Can I create an iCal Calendar event, set up to be repeated every monday, but after a specific date, be repeated weekly every tuesday? If not on iCal, another advice?
    Thanks in advance!

  • Moving event with mouse in iCal gives me problems on Nokia N96

    When I move an item (event) with mouse in iCal, and then iSync to my Nokia N96, I get multiple events in the Nokia Calendar. As if I copy-pasted the item too many times.
    The multiple events are on the hours, on which I have dragged around the event.
    Somebody having similar issues?

    i've been having the same prob as u with my N96 however after i reverted back to factory settings and it's behaving for the time being (touchwood) i've read on posts here that people r having the same prob with their 2nd even 3rd phones so unless u r planning to change ur's for a diff model i'm not sure how helpful replacing the phone will be. I along with many others 'am sure r waiting for the new firmware to come out which hopefully will sort out most of the stability issues. i contacted Nokia and they advised me to wait till the firmware update as well.
    i hope this helps.
    BE THE CHANGE YOU WISH TO SEE IN THE WORLD - MAHATMA GANDHI
    N96-1, Ver. 12.043, Unbranded, Made in Finland.

  • Unable to edit "calendar" field of events with invitees

    I am having a couple problems with the "calendar" drop-down field on calendar events.
    This is on a 4S, iOS5, syncing calendars with iCloud.
    If I create an event with an "invitee" (or add an invitee to an existing event), I can no longer change the "calendar" field of that event.  In fact, the "calendar" drop-down doesn't even appear on the iPhone calendar app's "Edit" dialog for events that have an invitee.  I can still change it via the web interface at www.icloud.com, and the change is even pushed to the iPhone.  But on the iPhone itself, I cannot find a way to change the "calendar" field on an event that contains one or more "invitees".
    Second, if I receive an "invitation" from someone else, I cannot find a way specify which of my calendars I want the event on when accepting it.  I would expect it to go to the calendar I have defined as "default" in Settings, but it seems instead to go to the last calendar I created.  And after accepting it, I cannot change it because the "Edit" dialog doesn't display the "calendar" field, as mentioned above.  Again, I can change it via the web interface at www.icloud.com, but cannot find a way to change it directly on the iPhone.
    Am I missing some way to edit/change the "calendar" field of an event with invitees?  Or to select which calendar I want events to be on when I "accept" invitations from others?

    I have the same problem.  I recently updated to iOS5 and set up syncing through iCloud. 
    I was able to add one event into my iphone calendar app, but for the next event that I tried to add, there was no longer the option to choose a calendar and when I tried to add it by tapping "Done," an error message came up: "No calendar is set". and there was no way to select a calendar.
    I was able to add the event on my Google Calendar on my laptop (PC), and it synced automatically, but I wasn't able to add any events from the iphone itself because "no calendar is set". 
    I tried turning off and on the phone and syncing back to my laptop, but the problem persisted.
    I deleted the iCloud account on my iphone, and that seemed to fix the problem; I'm able to add events again from the iphone and it's syncing to my Google Calendar.
    I then signed on to iCloud and setup syncing again, but turned off syncing everything except photostream, documents&data, and find my iphone since everything else would sync to outlook or internet explorer, neither of which I use.
    That might have been the problem.  For PC, iCloud will only sync to Outlook and Internet Explorer, and I don't have Outlook setup (can't connect to my work's email server with my account and the IT guys don't know how to fix it or they're too lazy to troubleshoot) and I only use Firefox and Chrome.  Since iCloud isn't syncing to any calendars on Outlook, there aren't any calendars set...
    I just did this a minute ago and everything seems to be back to normal, including the ability to choose a calendar when adding events.
    I'll have to see if it the problem comes back

  • Creative ZEN 4gb compatible with Creative MediaSource

    Hi,
    I was just wondering if I can use my new Creative Zen 4gb with Creative MediaSource. I really like MediaSource and I would prefer to use it the only problems is when ever I connect it its keep locking up and crashing especially when I go to creative playlists. I used to use mediasource for my Zen Micro. Any suggestion? or does creative no longer support MediaSource with there new players?Thanks!

    Strife04 asked the following:"Hi, does anyone know which Creative MediaSource Player/ Organizer is compatible with the new 4gb ZEN and if there is one, where it can be downloaded? thanks in advance.":?My reply:Which 4gb Zen?I have the Zen V Plus 4 gig and MediaSource Player/Orginizer running on a?Windows XP SP2enabled Dell.
    This works fine for me.

  • HT202297 iCloud calendar unable to set events with reminders that work, despite ignoring the error message

    I am using Outlook 2007, Windows 7, updated iCloud Control Panel. 2 office computers and multiple mobile devices are sharing Calendar/Contacts/Tasks. One office computer, and the mobile devices seem to have no issue setting up a new calendar event with a reminder - the reminder goes off as planned, syncs with iCloud, and is picked up by the other office computer and mobile devices.
    My office computer can create iCloud calendar events, but when i attempt to set a reminder it gives me the 'The reminder for xxx will not appear because the item is in a folder that doesn't support reminders. Is this OK?' message. The help section on this site states that I can just ignore that, and the reminders will still be set up and work nonetheless. They don't. I also notice that despite being inside the iCloud calendar, as opposed to the local Outlook calendar on my PC, it still gives me the option to 'Move to iCloud,' as if I wasn't creating the event in iCloud. Yet if I set a new reminder, the event sticks, syncs with iCloud and will pop up on other devices. If I click the 'Move to iCloud' option that oddly appears in the created calendar event, it glitches out and crashes outlook. Tried this multiple times, and, oddly enough, one time it rebooted Outlook and seemed to be creating iCloud calendar events with reminders just fine. The 'Move to iCloud' option had disappeared and the reminders would stick. After the next computer restart, I was back to square one and it would no longer accept calendar reminders and the 'Move to iCloud option was back.
    The reminder seems to the the only function that doesn't work. I've re-installed iCloud Control Panel, restarted all involved applications and the computer. There seems to be a partial disconnect from the iCloud calendar in my Outlook and the iCloud calendar; some functions work fine and sync, some are glitchy and do not function properly, and it is only this one device out of 2 PCs, an iPhone, and an iPad that has issues.
    Any ideas?

    paule54600 wrote:
    yes but if you don't have a gmail calender setup when you install the account for the first time I don't think it sees the calender if you  try to access it later. Either way I can't get it to work on my newly updated droid 2.  How do I "reset" the phone and what will I have to reconfigure once I do that?
    Hi Paul,
       I don't know about your phone, but on my Droid Pro, there is a little round white button underneath the battery, press that with a stylus, or the tip of a pen, then reassemble the phone and turn it on.  That's all there is to it.  I didn't have to re-configure anything.  Check your user manual for your reset button location, it's probably in the section on troubleshooting.

  • I am trying to sync my iphoto events with my iphone, but when i do, it says the required file cannot be found.. how do i solve this problem?

    i am trying to sync my iphoto events with my iphone, but when i do, it says the required file cannot be found.. how do i solve this problem?

    Try erasing the iPod photo cache.
    http://support.apple.com/kb/ts1314

  • Splitting an event with only only clip

    Is it possible to split an event that contains only one clip into two events?
    Documentation indicates that in an event with at least two clips it is possible, but with only one clip selecting a thumbnail where the split is desired leaves the 'split at clip' option under the file menu grayed out.

    If you can find a single frame or group of frames that can be rejected (and are near the point where you want to split), reject them and move to trash. Now you will have two clips, and it can be split into two events.
    If you don't want to lose any frames, best option is Quicktime Pro.

  • Associating two events with submit button using  javascript in jsp

    Hi
    How can i Associate two events with submit button using javascript in jsp. Firstly it should insert the data to database and secondly it should close the same pop-up window

    Have something like :
    <input type="submit" name="submitbtn" value="Click me" onClick="function1(); function2(); " />
    You just call both functions sequentially, it's that simple. Although using javascript to work with a database, that seems a bit tricky.

Maybe you are looking for