User Activity

  • Posted a comment on discussion Open Discussion on Media Foundation .NET

    Hi Jose Luis, On the usb camera, there will have several types of media. Use this tool to verify your camera https://alax.info/blog/1579 Then, you can use SetCurrentMediaType to setup the current media type for camera. And read out the sample as the media type you set up. Other method is skip frame, because of all sample you read from camera is uncompress sample. Then you just skip a half of frame in a second and write it to sink.

  • Posted a comment on discussion Open Discussion on Media Foundation .NET

    Great! Your code do very well and also spend less CPU, It help me so much for my task. And your explanation make me more clear in some problems. However, I still wondering about 1088 problem. 1) for the "1088" problem. When I try the custom transform (using IMFTransform) to decode the H264 -> YuY2 and JPEG->YUY2 from 1920x1080 rtsp stream of camera I saw that the size of JPEG package is always higher than the normal of my calculation. It means that 1088 (not 1080) as you talk above. But in case of...

  • Posted a comment on discussion Open Discussion on Media Foundation .NET

    Thank you so much for your support! your code lanch verry well and without the increase of memory I try to minimize your code and found the exactly of problem why the memonry is increase When we use streamsink, we HAD TO register an media event handler IMFMediaEventGenerator pstreamSinkEventGenerator = (IMFMediaEventGenerator)pStreamSink; streamSinkMediaEvtHandler = new SinkEventHandler(pstreamSinkEventGenerator); and try to relase the pAsyncResult in side the Invoke function of handler. This is...

  • Modified a comment on discussion Open Discussion on Media Foundation .NET

    I build an EVR to render data from decoder that similar to below code. When I push data to streamsink for a long time, the memory increase. If I remove a line “hr = pStreamSink.ProcessSample(pSample);” the memory leak not happen. Init EVR Render public EVRRender(IntPtr hwnd) { displayTarget = hwnd; HResult hr = HResult.S_OK; object serviceObject = null; // setup video display lock (syncObject) { hr = MFExtern.MFCreateVideoRendererActivate(displayTarget, out pActivate); MFError.ThrowExceptionForHR(hr);...

  • Posted a comment on discussion Open Discussion on Media Foundation .NET

    Hi snarfle, Did you try to run with long video?

  • Posted a comment on discussion Open Discussion on Media Foundation .NET

    Yeb, I checked the memory of player process in task mamager. You can run two player process at the same time that one process have "pStreamSink.ProcessSample(pSample)" to render the frame, and another process without "pStreamSink.ProcessSample(pSample)". You will see the process without "pStreamSink.ProcessSample(pSample)" that will have stable memory(not increase). For another, it increase so much. Download video here: https://www.ssyoutube.com/watch?v=WNCl-69POro Just add ss before youtube.com...

  • Posted a comment on discussion Open Discussion on Media Foundation .NET

    You can download a longer clip aound 4-5 hours, then you will see the problem https://www.youtube.com/watch?v=WNCl-69POro

  • Posted a comment on discussion Open Discussion on Media Foundation .NET

    My sample just follow the flow of code in the sample of C++ https://github.com/sipsorcery/mediafoundationsamples/tree/master/MFVideoEVR and try to write by C# code

View All

Personal Data

Username:
sinhngoc2008
Joined:
2020-10-16 06:19:06

Projects

  • No projects to display.

Personal Tools

MongoDB Logo MongoDB