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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Does ImageEn write into the Windows registry ?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mastinf

Italy
33 Posts

Posted - Oct 31 2024 :  02:55:58  Show Profile  Reply
I have found that executing some code based on ImageEn a new entry is added to the Windows registry:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Direct3D\Shims\EnableOverlays (the value is set to 1)

Is ImagenEn code that is creating it ?

thanks

Roberto
ImageEn 7.5

Roberto Nicchi
Master Informatica
Italy

xequte

38608 Posts

Posted - Oct 31 2024 :  03:38:31  Show Profile  Reply
Hi Roberto

ImageEn will not directly write anything to the registry (registry unit is not even added if you only include standard ImageEn units). However if you use DirectShow then they might write registry entries. Do you use any DirectShow function in ImageEn? e.g. ImageEnView1.IO.DShowParams:

http://www.imageen.com/help/TImageEnIO.DShowParams.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

mastinf

Italy
33 Posts

Posted - Oct 31 2024 :  05:36:29  Show Profile  Reply
Thanks,

This is the code

var
  w, h: Integer;
begin
  with ImageEnView1.IO.DShowParams do
  begin
    begin
      disconnect;
      // set video source as index of IO.DShowParams.VideoInputs
      SetVideoInput(ComboBox1.ItemIndex, StrToIntDef('0', 0));
      // set the second parameter if you have more than one camera with same name
      connect;
      w := VideoFormats[0].MaxWidth;
      h := VideoFormats[0].MaxHeight;
      SetVideoInput(ComboBox1.ItemIndex, StrToIntDef('0', 0), w, h);
      // set the second parameter if you have more than one camera with same name
      // enable video and audio rendering
      RenderAudio := True;
      RenderVideo := True;

      // ReferenceClock:=rcAudioOutput;
      // ClockErrorTolerance:=40;
      // ReferenceClock:=rcSystemClock;

      // Connect to the video input
      connect;

      // Set bitmap size
      GetVideoRenderNativeSize(w, h);
      ImageEnView1.Proc.ImageResize(w, h);
    end;
    // start capture
    Run;
  end;
end;

Combobox1 has been filled with the code:

ComboBox1.Items.Assign(ImageEnView1.IO.DShowParams.VideoInputs);


Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

xequte

38608 Posts

Posted - Oct 31 2024 :  06:10:12  Show Profile  Reply
Hi

In that case, DirectShow may create Registry entries. We can't control that, you'll need to ask Microsoft

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

mastinf

Italy
33 Posts

Posted - Oct 31 2024 :  06:54:34  Show Profile  Reply
Ok thanks

Roberto

Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

mastinf

Italy
33 Posts

Posted - Oct 31 2024 :  08:38:04  Show Profile  Reply
Only one thing more. DirectShow is the only possibility in ImageEn to connect to a usb camera (webcam) and get a frame, right ?

Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

xequte

38608 Posts

Posted - Oct 31 2024 :  18:11:49  Show Profile  Reply
Hi Roberto

Depending on the camera, it may also be possible with:

http://www.imageen.com/help/TIEMediaFoundationSourceReader.html

or WIA:

http://www.imageen.com/help/TIEWia.html


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

mastinf

Italy
33 Posts

Posted - Nov 01 2024 :  09:38:16  Show Profile  Reply
Nice thanks,

i'm trying with MediaFoundation but i have problem.

The video is visualized into a TImageEnView component using this code (from the demo app):

ImageEnView1.IO.MediaFoundationSourceReader.SelectMediaType(mmf_VIDEO_STREAM, 0);

    ImageEnView1.IO.MediaFoundationSourceReader.VideoProcessor.SetMirror(mfpmHorizontal);
    ImageEnView1.IO.MediaFoundationSourceReader.VideoProcessor.SetRotation(mfprNormal);

    ImageEnView1.IO.MediaFoundationSourceReader.StartCapture();


When a button is clicked i need to get the current frame and visualize it into another TImageEnView component.

With DirectShow i use this code:

with ImageEnView1.IO.DShowParams do
    begin
      GetSample(ImageEnView1.IEBitmap);
      ImageEnView1.Update;
      frame.IEBitmap.Assign(ImageEnView1.IEBitmap); // Frame is a TImageEnView component
      frame.IO.fParams.Assign(ImageEnView1.IO.fParams);
      frame.Update;
      modalresult := mrOk;
    end;



I need to do the same thing with MediaFoundation. I have tryed with this code but i guess it's only valid if used inside the ImageEnView1MediaFoundationNotify event:

with ImageEnView1.IO.MediaFoundationSourceReader do
    begin
      sample := GetNextSample();
      try
        if sample.StreamType = mmf_VIDEO_STREAM then
        begin
          sample.DecodeSample(ImageEnView1.IEBitmap);
          ImageEnView1.Update();
          frame.IEBitmap.Assign(ImageEnView1.IEBitmap);
          frame.IO.fParams.Assign(ImageEnView1.IO.fParams);
          frame.Update;
          modalresult := mrOk;
        end;
      finally
        sample.Free();
      end;
    end;


sample.StreamType is empty so the code is not executed.


Is there a solution ?

thanks

Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

xequte

38608 Posts

Posted - Nov 01 2024 :  22:45:13  Show Profile  Reply
Hi Roberto

I'll look into that next week.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

mastinf

Italy
33 Posts

Posted - Nov 02 2024 :  04:53:47  Show Profile  Reply
Seems i have found the solution.

I have removed the line

if sample.StreamType = mmf_VIDEO_STREAM then


And i was missing the code:

ImageEnView1.IO.MediaFoundationSourceReader.SetVideoInput(ComboBox1.ItemIndex);


Roberto



Roberto Nicchi
Master Informatica
Italy
Go to Top of Page

xequte

38608 Posts

Posted - Nov 02 2024 :  08:03:03  Show Profile  Reply
Thanks for letting us know, Roberto

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: