Results 1 to 7 of 7

Thread: eFrameReady event for MediaStreamSink

  1. #1
    Join Date
    Mar 2016
    Posts
    4

    Question eFrameReady event for MediaStreamSink

    Hello,

    I have found some other questions related to this problem but I was not able to implement the solutions. My main objective is to be able to display the frames (for now using the grabber listener and eFrameReady event) while they are saved to an avi file with the MediaStreamSink. The problem is that the eFrameReady event seems not to be emitted when using the MediaStreamSink.

    What would be the proper way to achieve that? Would it be to use the FrameHandlerSink and save each images to an avi file, or to use the MediaStreamSink to save, and to somehow trigger or output the frame data so that they can be displayed?

    For the latter option, it seems that the FrameFilter could be used to copy a frame, but I do not know/understand how to write the proper Filter, and how to send the copied frame to the listener.

    Best,
    Olivier

  2. #2
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,862

    Re: eFrameReady event for MediaStreamSink

    Hello Olivier

    Callback and AVI Capture is not possible with IC Imaging Control at the same point of time. But there is solution for this at
    http://www.theimagingsource.com/en_U...vi-capture.htm

    However, this sample is for saving images.

    Another approach is using the OverlayUpdate event of the Grabberlistener, which is called even on AVI Capture.

    However, I wonder, why you need such a complicated approach showing the live stream while AVI Capture, since the live stream can be displayed by default during AVI Capture. Simply have a look into the sample provided with IC Imaging Control.
    Best regards
    Stefan
    IC Imaging Control Support

  3. #3
    Join Date
    Mar 2016
    Posts
    4

    Re: eFrameReady event for MediaStreamSink

    Thank you Stefan for your fast reply.

    I need access to the frame data when acquiring an AVI capture because we are doing live image processing while recording (and not only displaying the data). For the processing (and the display), we use OpenCV. Everything works perfectly fine with the FrameHandlerSink, but not with the MediaStreamSink, since the processing is done in the eFrameReady event.

    I will try to get the frame data from inside the OverlayCallback event.

  4. #4
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,862

    Re: eFrameReady event for MediaStreamSink

    ok, I see

    what about using the standard callback and save the images from there into an AVI file? I am sure there are libraries fort his.

    Also, have a look on the Overlay Update Event handler, may be you can do the image processing in there too, instead of frameReady

    Or... as shown in the Image and AVI Capture sample, you use a frame filter for image processing! So you simply create a new frame filter with the IC Project wizard and do the image processing in there. Please look at
    http://www.theimagingsource.com/en_U...ilterclass.htm
    Best regards
    Stefan
    IC Imaging Control Support

  5. #5
    Join Date
    Mar 2016
    Posts
    4

    Re: eFrameReady event for MediaStreamSink

    Thank you again for your answers. I've finally decided to always use the eFrameReady event, and to save the frame to an avi file using the OpenCV VideoWriter utility.

  6. #6
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,862

    Re: eFrameReady event for MediaStreamSink

    Hi Olivier

    That is an interesting solution. Is the OpenCV DirectSow or VideoForWindows based?
    Best regards
    Stefan
    IC Imaging Control Support

  7. #7
    Join Date
    Mar 2016
    Posts
    4

    Re: eFrameReady event for MediaStreamSink

    From the docs, I think both are/can be used. The codec can also be specified as the FOURCC code.

Similar Threads

  1. trigger-event?
    By Slaughter1387 in forum IC Imaging Control .NET
    Replies: 1
    Last Post: November 13, 2013, 14:08:19
  2. Mousedown Event
    By Unregistered in forum IC Imaging Control .NET
    Replies: 1
    Last Post: May 26, 2005, 15:54:11
  3. Problem with GrabberListener::eFRAMEREADY
    By DirkM in forum IC Imaging Control C++ Class Library
    Replies: 5
    Last Post: November 16, 2004, 13:40:41
  4. Event Not Trigger
    By Unregistered in forum IC Imaging Control ActiveX
    Replies: 9
    Last Post: August 4, 2004, 14:29:30
  5. Mousedown event
    By Unregistered in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: March 14, 2002, 19:58:53

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •