Closed DasLouis closed 8 years ago
I don't know precisely what is causing the exception, but I can answer another question from your code, which is how to set some of those attributes. FrameSize, FrameRate, and PixelAspectRatio are long
s, with 32 bits for each param (latter two are expressed as ratios, so the easiest thing is to use 1
for the right value, and do 10 << 32
for the left side, for example).
Greetings to all and sundry!
I may well get told off for this, buuut...
I'm trying to port this: https://code.msdn.microsoft.com/windowsapps/How-to-encode-several-to-a-053953d1#content into C#, specifically the PictureWriter class, for use in a .NET 4.6 application.
The problem I have occurs when I try to add a MediaType to the SinkWriter I have created - up until then, everything seemed fine, but this one line of code throws a SharpDXException. Perhaps I'm doing something daft, but I have tried to stay as faithful to the original code as possible. My code looks thusly:
which is my attempt to port the PictureWriter from the project linked above. The calling function looks like this:
The stream creates successfully - the file is created on the desktop.
Any help would be greatly appreciated!