ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnView and OnDShowNewFrame and ShowModal?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
whisper1980 Posted - Sep 04 2019 : 19:05:11
I have a standalone app using DirectShow with TImageEnView and it shows the camera's video as expected. If I conditionally compile it as a form in my main app and show the form using ShowModal, nothing gets displayed in the TImageEnView because the OnDShowNewFrame event does not occur so I cannot update the view.

However, if I show the form using Show rather than ShowModal it works fine, i.e. the OnDShowNewFrame gets triggered and the TImageEnView shows the video.

What could I possibly be missing?? I can certainly code it using Show, but I just don't understand why ShowModal alone would break it. I would prefer to have it be Modal. It is probably something stupid on my part like a missing property value, but I just don't know what it is. ShowModal version still captures the video to a file, it just does not trigger that event to update the view.

Also, ShowPropertyPages does not work when using ShowModal, but works when using Show. Example:
ImageEnView1.IO.DShowParams.ShowPropertyPages(iepVideoInput, ietFilter, false);

Makes me wonder if the Modality is somehow preventing certain window messages from reaching ImageEnView when used in a Modal form if not the main form

Eric
4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jan 31 2021 : 18:26:23
Hi Eric

That's the problem with Windows API's. When they work well they provide a lot of functionality, but when they have weird issues...

Nigel
Xequte Software
www.imageen.com
whisper1980 Posted - Jan 29 2021 : 18:51:02
I am back on this again trying to debug an issue with FFmpeg. I can capture an AVI video with your tools and encode to an MP4 using FFVCL/FFmpeg multiple times with my standalone app. When I try to use that same form/code in my other project and use Show to open the form, it only captures and encodes once. If I try again, I get a Overflow error in avutil-56.dll (part of FFmpeg). Same friggin code.

So I went back to try ShowModal, and as mentioned over a year ago, it does not show or capture the video in the ImageEnView, nor does OnDShowNewFrame get invoked.

I know you have nothing to do with FFMpeg, but I am wondering if the same issue where OnDShowNewFrame does not get called is somehow related to why avutil-56.dll is getting an overflow error.

So my question is, have you figured out any other possibilities as to why OnDShowNewFrame does not get called on a Modal form? It might lend me some insight on my FFmpeg problem. Grasping at straws so-to-speak.

I could have sworn I could capture and encode multiple times until just recently. I suspect a recent Windows update has something to do with it because customers just started to report the problem and nothing else has changed.

Update:
I narrowed the overflow issue down to being due to a button click, but it only interfered when running the same exact code in my main app, not in a test app. My guess is some sort of 3rd party tool (not ImageEn at all) is interfering somehow. I found if I post a message to myself on the button click and then do the encoding on receipt of the message, it works fine. So very strange.

Eric
whisper1980 Posted - Sep 07 2019 : 19:48:29
Yes, it is being created at design time on a form (I did see that other post about dynamic creation of the view and for grins I tried setting the parent since it was in a panel on the form... no change in behavior).

I've since changed the logic to use the Show method since I had to move forward and wasn't a big deal and might be a better solution for me since that is what I was doing for doing snapshots in another form. However, I'll try to get you a demo since it is rather easy to convert back to ShowModal to include in a demo.

Eric
xequte Posted - Sep 07 2019 : 19:40:12
Hi Eric

If OnDShowNewFrame is not being called, it usually means that the TImageEnView does not have a valid handle (i.e. has no parent). So if you are creating it dynamically, ensure you set ImageEnView1.Parent := MyForm1;

If you have added the TImageEnView to a form (at design time), then I'm at a loss. Please email me a simple demo that reproduces it.



Nigel
Xequte Software
www.imageen.com