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
 MediaFoundationSourceReader: wrong format

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
uko Posted - Dec 02 2016 : 07:41:17
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;
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 06 2016 : 17:11:17
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