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
 MediaFoundationSourceReader: wrong format
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

uko

Germany
31 Posts

Posted - Dec 02 2016 :  07:41:17  Show Profile  Reply
Hi,

I have a problem when using MediaFoundationSourceReader to capture images from Surface Pro cameras:

- when holding the tablet on landscape mode, everything is fine. But when I rotate the tablet to portrait orientation, the captured image itself is again fine, but the total captured image has left and right black borders. How can I avoid them so that it acts as the Microsoft camera app?

- Also when using the Rear Camera of Surface and rotate tablet to portrait, the output is rotated by 180 degrees. How to avoid this?

Here is the used code for Delphi XE and ImageEN 6.3.2:
with imgPreview.IO.MediaFoundationSourceReader do
begin
  if VideoInputs.Count > 0 then
  begin
    SetSelectedStreams(mmf_VIDEO_STREAM, true);
    SelectMediaType(mmf_VIDEO_STREAM, cbModes.ItemIndex);

    // auto-rotation (win8 only!)
    if goIsWindows8OrHigher then
    begin
      VideoProcessor.SetMirror(mfpmNone);
      VideoProcessor.SetRotation(mfprNormal);
    end;

    //  ...

    // start capturing
    StartCapturing;

    // ....
  end;  
end;

xequte

38615 Posts

Posted - Dec 06 2016 :  17:11:17  Show Profile  Reply
Hi

We'll need to look into this issue when we do the next MMF update.



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