mftrace | Trace bitmaps in scalable fonts
kandi X-RAY | mftrace Summary
kandi X-RAY | mftrace Summary
Trace bitmaps in scalable fonts
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get fixp numbers
- Returns the fixp number
- Compute the number of tokens
- Compose a TmNumber from a sequence
- Convert a potrace path to a type1 operation
- Update bounding box with given point
- Unzip a list of pairs
- Return a list of tuples
- Create font files
- Create a new pipe
- Find a file
- Generate a pixel font
- Parse command line options
- Print an error message
- Prints the warranty
- Extract the chars from the header
- Reads a single byte
- Convert a file to a type1 opmap
- Interpolate string
mftrace Key Features
mftrace Examples and Code Snippets
Community Discussions
Trending Discussions on mftrace
QUESTION
This answer here - https://stackoverflow.com/posts/58483988/revisions (definitely worth reading to understand the ostensible regex rules for yara) - appears to work for about 20 of the given binaries I'm looking for, such as the following:
...ANSWER
Answered 2019-Oct-30 at 00:27Looks like you have an extra right parenthesis right here on line 28:
QUESTION
I'm writing a WMF custom media source. This source gets h264 packets from an RTSP stream(using FFMPeg 4.1), and sends them to a decoder and renders them to screen with an EVR. It also sends them to an encoder, and a file writer
For the first ~7 seconds video looks good after ~7 seconds FPS changes from ~30 to ~2 and the EVR shows an old image as an artifact (it is shown instead of the missing frames). The recorded video looks fine.
running MFTrace I found that the renderer stops sending the MEStreamSinkRequestSample, so the source that have data to send (and raises MEMediaSample as before) does not send the sample. The samples only reach the decoder’s ProcessInput, and I can’t see the ProcessOutput calls. According to my logs there are no B frames (pts == dts) and both are monotonic with normal looking timestamps
These are the log lines for the last frame that reached the EVR
...ANSWER
Answered 2018-Dec-18 at 09:38One of the ideas I tried to resolve the issue was to do the decoding with ffmpeg, and pass uncompressed images (I420) to media foundation. This resolved the issue for me. From this I conclude that the issue was with the h264 decoder, that didn't handle the live stream well.
QUESTION
We are seeing a strange issue on both DirectShow and MediaFoundation where the camera is giving black frames. On running MFTrace on both the apps, we see that CMemInputPinDetours::Receive is not getting called (when comparing with working scenario). On what cases & scenarios this can happen? Problem is seen only with Lenova laptops and only with Windows 10 1703 (i.e. creators update) on wards. Complete log of DirectShow app: Also the Microsoft samples MFCaptureD3D and SimpleCapture doesn't work! Not sure what we are missing here, can someone help?
Part of MFTrace log is listed at below:
...1252,D2C 14:16:36.74678 CGraphHelpers::Trace @000002CB48084CA0 >>>>>>>>>>>>> Run graph 1252,D2C 14:16:36.74679 CGraphBuilderDetours::EnumFilters @000002CB48084CA0 - enter 1252,D2C 14:16:36.74680 CGraphBuilderDetours::EnumFilters @000002CB48084CA0 - exit 1252,D2C 14:16:36.74681 CGraphHelpers::TraceFilter @ Filter @000002CB60D7BCF8, name 'SinkFilter', vendor '(null)' 1252,D2C 14:16:36.74684 CGraphHelpers::TracePin @ Input pin @000002CB6602BDD8 (IMemInputPin @000002CB6602BE98) name 'VideoCapture', connected to filter @000002CB48091158 pin @000002CB480C9228, MT: majortype=MEDIATYPE_Video;subtype=MFVideoFormat_YUY2;bFixedSizeSamples=1;bTemporalCompression=0;lSampleSize=1843200;formattype=FORMAT_VideoInfo;pUnk=@0000000000000000;cbFormat=88 1252,D2C 14:16:36.74684 CGraphHelpers::TraceFilter @ Filter @000002CB48091158, name 'VideoCaptureFilter', vendor '(null)' 1252,D2C 14:16:36.74686 CGraphHelpers::TracePin @ Output pin @000002CB480C9228 name 'Capture', connected to filter @000002CB60D7BCF8 pin @000002CB6602BDD8, MT: majortype=MEDIATYPE_Video;subtype=MFVideoFormat_YUY2;bFixedSizeSamples=1;bTemporalCompression=0;lSampleSize=1843200;formattype=FORMAT_VideoInfo;pUnk=@0000000000000000;cbFormat=88 1252,D2C 14:16:36.74687 CGraphHelpers::TracePin @ Input pin @000002CB48084A18 (IMemInputPin @000002CB48084AD8) name 'Video Camera Terminal', NOT CONNECTED(!!!) 1252,D2C 14:16:36.74687 CGraphHelpers::TracePin @ Output pin @000002CB480845F8 name 'Still', NOT CONNECTED(!!!) 1252,D2C 14:16:36.74687 CGraphHelpers::Trace @000002CB48084CA0 <<<<<<<<<<<<< Run graph 1252,D2C 14:16:36.74687 CGraphBuilderDetours::EnumFilters @000002CB48084CA0 - enter 1252,D2C 14:16:36.74688 CGraphBuilderDetours::EnumFilters @000002CB48084CA0 - exit 1252,D2C 14:16:36.74688 CMemInputPinDetours::Attach @00007FF80B790928 - enter 1252,D2C 14:16:36.74688 CInterfaceDetours::AttachVtbl @00007FF80B790928 - enter 1252,D2C 14:16:36.74688 CDetourHelpers::AttachInterface @ - enter 1252,D2C 14:16:36.74691 CDetourHelpers::AttachInterface @ - exit 1252,D2C 14:16:36.74691 CInterfaceDetours::AttachVtbl @00007FF80B790928 - exit 1252,D2C 14:16:36.74691 CMemInputPinDetours::Attach @00007FF80B790928 - exit 1252,D2C 14:16:36.74691 CMemInputPinDetours::Attach @00007FF8129B7D10 - enter 1252,D2C 14:16:36.74691 CInterfaceDetours::AttachVtbl @00007FF8129B7D10 - enter 1252,D2C 14:16:36.74692 CDetourHelpers::AttachInterface @ - enter 1252,D2C 14:16:36.74693 CDetourHelpers::AttachInterface @ - exit 1252,D2C 14:16:36.74693 CInterfaceDetours::AttachVtbl @00007FF8129B7D10 - exit 1252,D2C 14:16:36.74693 CMemInputPinDetours::Attach @00007FF8129B7D10 - exit 1252,D2C 14:16:36.74696 COle32ExportDetours::CoCreateInstance @ - enter 1252,D2C 14:16:36.74811 COle32ExportDetours::CoCreateInstance @ Created {E436EBB1-524F-11CE-9F53-0020AF0BA770} System Clock (C:\Windows\System32\quartz.dll) @000002CB4805CE68 - traced interfaces: 1252,D2C 14:16:36.74811 COle32ExportDetours::CoCreateInstance @ - exit 1252,D2C 14:16:36.74822 COle32ExportDetours::CoCreateInstance @ - enter 1252,D2C 14:16:36.74865 COle32ExportDetours::CoCreateInstance @ Created {877E4351-6FEA-11D0-B863-00AA00A216A1} Plug In Distributor: IKsClock (C:\Windows\System32\ksproxy.ax) @000002CB48090920 - traced interfaces: 1252,D2C 14:16:36.74865 COle32ExportDetours::CoCreateInstance @ - exit 1252,D2C 14:16:36.78381 CMediaControlDetours::Run @000002CB480C98E8 - exit 1252,D2C 14:16:36.78382 CMediaControlDetours::GetState @000002CB480C98E8 - enter 1252,D2C 14:16:36.78383 CMediaControlDetours::GetState @000002CB480C98E8 - exit 1252,1E08 14:16:54.49906 COle32ExportDetours::CoCreateInstance @ - enter 1252,1E08 14:16:54.49921 COle32ExportDetours::CoCreateInstance @ Created {9FC8E510-A27C-4B3B-B9A3-BF65F00256A8} (C:\WINDOWS\system32\dataexchange.dll) @000002CB4805BD40 - traced interfaces: 1252,1E08 14:16:54.49921 COle32ExportDetours::CoCreateInstance @ - exit 1252,D2C 14:16:54.57840 CMediaControlDetours::Pause @000002CB480C98E8 - enter 1252,D2C 14:16:54.58279 CMediaControlDetours::Pause @000002CB480C98E8 - exit 1252,D2C 14:16:54.58280 CMediaControlDetours::Stop @000002CB480C98E8 - enter 1252,D2C 14:16:54.79315 CMediaControlDetours::Stop @000002CB480C98E8 - exit
ANSWER
Answered 2017-Nov-02 at 04:27Found the root cause, Kaspersky antivirus was causing this problem, adding our application to trusted list solved the problem!
We see that Kaspersky 10 was being used on the machine, following the steps mentioned in the below link solved the problem: https://support.kaspersky.com/9398#block2
In case if there is Kaspersky 2015, then below link can be used to solve the problem: https://support.kaspersky.com/11157#block1
QUESTION
I'm trying to encode the ID3D11Texture2D to mp4 using MediaFoundation. Below is my current code.
Initializing Sink Writer
...ANSWER
Answered 2017-Jun-14 at 08:18There are a few potential problems that occur to me here. Roman mentioned the two big ones so I'll elaborate on those. I have a couple other critiques / suggestions for you as well.
Not usingIMFDXGIDeviceManager
In order to use hardware acceleration within Media Foundation, you need to create a DirectX device manager object, either an IDirect3DDeviceManager9
for DX9 or in your case an IMFDXGIDeviceManager
for DXGI. I strongly suggest reading all the MSDN documentation of that interface. The reason this is necessary is because the same DX device must be shared across all the cooperating hardware MF transforms being used, since they all need access to the shared GPU memory the device controls, and each one needs exclusive control of the device while it's working, so a locking system is needed. The device manager object provides that locking system, and is also the standard way of providing a DX device to one or more transforms. For DXGI, you create this using MFCreateDXGIDeviceManager
.
From there, you need to create your DX11 device, and call IMFDXGIDeviceManager::ResetDevice
with your DX11 device. You then need to set the device manager for the Sink Writer itself, which is not done in the code you provided above. That is accomplished like this:
QUESTION
I'm using MediaFoundation with SharpDX in order to encode video files from desktop duplication frames.
I'm creating a texture and capturing the screen. Then this texture is passed to MFCreateVideoSampleFromSurface
, which is called once.
ANSWER
Answered 2018-Jan-02 at 05:00It turns out that MFCreateVideoSampleFromSurface
did not properly set the length of the created buffer. The way I solved this is as follows:
- Call
MFCreateDXGISurfaceBuffer
, which creates a media buffer that supports theIMF2DBuffer
interface. - Query the
IMF2DBuffer
interface and set the length of the newly-created surface buffer to the contiguous length of theIMF2DBuffer
(another way would be setting the current buffer length to the maximum buffer length, and thus not requiring to query theIMF2DBuffer
interface, but the canonical way to achieve this is by querying the contiguous length of theIMF2DBuffer
, so I stick to that.) - Call
MFCreateVideoSampleFromSurface
with a null surface pointer—which I found to be pointless—or simply create aIMFSample
normally. - Add the surface buffer to the new sample and write it.
This is how I've got it to work with C#/SharpDX:
QUESTION
Which tools or code constructs (like defines) are the ones that should be used in this area and how to get them to work? Is there something I as a new person to media foundation should do before asking my question here to avoid simple mistakes?
The question is not "what is your favorite tool, lets fight over who is right" but simply, in regards to this media foundation framework, which options are according your expertise in the area worth considering for debugging and how do I use them?
Background to why I am asking thisLooking around on stackoverflow it seems that some questions are asked without knowledge of how to properly debug Media Foundation applications. I some cases a specific question gets an answer that states that OP should use MFTrace 1, 2. I also belive that my earlier questions here would have been helped out by using proper debugging tools or traces specific to media foundation.
Things I as someone new to this framework have encounteredI myself have not even been able to get MFTrace or Event Viewer to work, both tools that are mentioned in the official media foundation blog.
The documentation for how to get the MFTrace is lacking, is it only available in the old win 7 SDK on .NET 4.0 which is referred to here? Or can one use a newer SDK? Installing the older win 7 SDK involves some pain points on windows 10 (first change regedit values, how to do that, new error -> SO suggest to look at the log and maybe uninstall any existing Visual C++ 2010 redistrubutable.) It would be nice to know if this is something you have to go through, in which case I will, or if MFTrace can be found elsewhere.
I did not get any logs from the Event Viewer. But maybe one should skip that tool altogether and only use MFTrace since the official blog says the following?
However, MFTrace is much more powerful, and collects way more information, than Event viewer. source
Besides tools, is there no?
...ANSWER
Answered 2017-Jul-10 at 23:14Usually I use the following:
- VS Debugger, with debug logging via OutputDebugString for most work. It works quite well, even with the asynchronous nature of media foundation.
- MFTrace for detailed analysis in hard to analyze cases. This often involves looking up obscure GUIDS in MFAPI.h
- Occasionally TOPOEDIT is helpful in testing things out. It's not nearly as capable as GraphEdit though.
- Running the Microsoft Media Foundation SDK Samples, or have a look at MFNode. The samples from the Developing Microsoft Media Foundation book are also downloadable from the web. Be aware that some SDK samples have been obsoleted, if you need to look at those you may need to download older SDKs until you find them. There are more samples floating around. Find them.
- Look on Stack Overflow, or on the MSDN Media Foundation Forum. Pay close attention to any answers from Roman Ryltsov ;)
- If you are new to COM development, be sure to read The N habits of Highly Defective DirectShow Applications. Although it's direct Show specific, a lot of it still applies. In particular: Use and understand CCOMPtr and when you need to use mutexes.
Running MFTRACE:
MFTrace is not pretty, but it does not end up being hard after it gets figured out. The MS Blog entries referenced at the end helped a lot, as does the Text Analysis Tool.
- Start an ADMIN command prompt.
- run MFTRACEPATH.bat to add the MFTRACE.EXE location to the path
- cd {YourExecutableLoc}
- run MFTRACECALLER.BAT {YOUREXECUTABLENAME} (Without any Extension)
- load YOUREXECTUABLENAME.TXT into the Text Analysis tool to help filter the output.
- Occasionally MFTRACEParseTopologies.bat, mentioned in the MSDN blogs is useful.
I use these .bat scripts to run MFTRACE (Remember: Use ADMIN command prompt!)
MFTRACEPATH.BAT:
QUESTION
I've searched in Microsoft Website about MMFCreateDXGISurfaceBuffer but it was all written in c++. I'm trying to use MMFCreateDXGISurfaceBuffer in c# but can't find any reference to how to correctly used the method.
in c++ below is the code.
...ANSWER
Answered 2017-Jun-04 at 23:32I think this is your post (https://sourceforge.net/p/mfnet/discussion/711229/thread/9814e58b/#c149); I answered over there but saw your question on StackOverflow and thought I should reproduce my answer.
MFCreateDXGISurfaceBuffer
accepts an IUnknown
as the second parameter, so you can pass it anything that looks like a COM object, whether native or managed. However, internally MFCreateDXGISurfaceBuffer
is actually looking for an object that implements the ID3D11Texture2D
interface, which is why you have to pass the IID of that interface as the first parameter.
Your code is probably failing because you're passing in the SharpDX Texture2D
managed object itself to MFCreateDXGISurfaceBuffer
. You'd think this would fail on the .NET side (i.e. compiler or marshalling error), but the .NET interop marshaller actually makes the P/Invoke function call possible. This is because any .NET class can be casted to object
, and all .NET objects can be marshalled into a native IUnknown
COM object via a CCW (COM callable wrapper).
The reason you're getting an E_NOINTERFACE
from MFCreateDXGISurfaceBuffer
is because the .NET interop marshaller wraps the SharpDX Texture2D
object with a native CCW, hands the CCW off to that function, and then the function tries to see if the object (which it sees as a native IUnknown
) supports the ID3D11Texture2D
interface. MFCreateDXGISurfaceBuffer
does this by using the COM QueryInterface
function that IUnknown
provides. However, the SharpDX Texture2D
class does not implement the ID3D11Texture2D
interface, so when the marshalled version of Texture2D
is queried the lookup fails and QueryInterface
will return E_NOINTERFACE
.
To solve this problem you need to get the native COM pointer the SharpDX Texture2D
is encapsulating instead of passing in the SharpDX object itself. All the SharpDX objects are derived from a base ComObject
class that provides a NativePointer
property accessor, which gives you an IntPtr
to the actual wrapped COM object. This is the actual COM ID3D11Texture2D
pointer in your case, but now we need to get an object
out of it rather than an IntPtr
. That looks like this:
QUESTION
I am trying to create an instance of an audio renderer with a given GUID by calling MFCreateAudioRenderer
with the attributes pointer set. I've set all the required values, but the call returns E_INVALIDARG
and mftrace.exe
shows
ANSWER
Answered 2017-May-08 at 16:39Related MSDN bit is:
...If you specify a device role, the SAR uses whatever audio device has been assigned for that role. To specify the device role, set the
MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE
attribute.
You identify the device by either ID or ROLE, the two are mutually exclusive, hence E_INVALIDARG
when you provide both at a time.
QUESTION
I am using Windows Media Foundation for creating video playing app.
I have created custom EVR mixer using the IMFTransform
interface and few of the other mandatory Interfaces as mentioned in the below link.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms701624(v=vs.85).aspx
I have created custom mixer as a DLL and also successful registered it.
Then I have added this custom mixer using below code in the EVR:
...ANSWER
Answered 2017-Mar-22 at 10:19You try inject customized code in form of Mixer
into the object with IMFMediaSink
interface which is written by Microsoft and you have got MF_E_CANNOT_CREATE_SINK
- error message which generalize any error into the MediaSink. This error can have hundred reasons. For such situation Microsoft developed a special tool - MFTrace
. It logs calls inner of code which is developed by Microsoft. Also, it is impossible recognize the reason of errors, because you have not presented your code. For example - how many stream limits you set into the method GetStreamLimits
, or what ID you set into the method GetStreamIDs
, or how code process call method AddInputStreams
. Only IMFTransform
has 23 methods.
You question has so small information that it is impossible recommend something useful.
Regards.
QUESTION
I am getting stuck in this situation where I get conflicting information:
...ANSWER
Answered 2017-Feb-24 at 21:07As mentioned in the comments, after spending a bit of time with your code, I was able to reproduce the behavior you reported. However, this was also true when I used arbitrary files for input. Admittedly, I was surprised to see that the decoder reported a status of MFT_OUTPUT_STATUS_SAMPLE_READY
. Therefore, I agree with Ben regarding valid AAC data.
Instead of parsing the samples manually, perhaps you could simply use an IMFSourceReader
to provide the samples for you, which would look similar to the following:
ERROR checking omitted for brevity
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mftrace
You can use mftrace like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page