Fixing Tao.FFmpeg bindings
Hi,
I am trying to use Tao.FFmpeg (svn) bindings on my Linux x86_64 machine and have various troubles. First of all my ffmpeg version has changes in the API (nothing new...) and also some issues with 64bit (long vs int), some build issues and also the way the structs are packed. (I posted on the mono devel list). According to the response the only way to get it reliably working is to use explicit strcut layout with offsets given.
How could I help in fixing those issues? Esp how could the bindings be made compatible to multiple ffmpeg versions? The headers have gems like
void *priv_data;
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
/* unused, FIXME remove*/
int rtp_mode;
#endif
int rtp_payload_size; /* The size of the RTP payload: the coder will */
The binding includes rtp_mode thus breaking on my machine...

Provide a link to a
Provide a link to a patchfile and I will take a look at it. Thanks. I am not an expert on FFMpeg so any help will be greatly appreciated!
The problem with patching
The problem with patching is, I am not sure what would be the right way. Do you just want to keep up with ffmpeg svn and ignore older versions? If yes, that is something I could handle.
Beside that I need this for runtime:
sed -e 's/1d/51/g' -e 's/ld/51/g' -i src/Tao.FFmpeg/Tao.FFmpeg.dll.config
And the example project doesn't compile for me with nant as the resx file has a relative file to the bitmap. I don't know what the fix would be here. Patching in the full path works...
Oh great, I just got
Oh great, I just got confirmed that Mono has a bug with struct layout:
"
This is indeed a mono bug. We align structures smaller than sizeof(void*) to
sizeof(void*) because the JIT memcpy/memset routines require it. So your
AVRational struct has an min alignment of 8 bytes. The workaround for now is to
declare AVRational as having explicit layout.
" - Zoltan Varga
(Sorry I made something
(Sorry I made something wrong while trying to edit above posting.)
delete me
delete me
Correction to the changes to
Correction to the changes to Tao.FFmpeg.dll.config:
--- Tao.FFmpeg.dll.config.old 2007-08-19 09:03:30.016180631 +0200
+++ Tao.FFmpeg.dll.config 2007-08-19 09:03:50.002131649 +0200
@@ -1,5 +1,5 @@
<configuration>
- <dllmap dll="avcodec-51.dll" target="libavcodec.so.1d" />
- <dllmap dll="avformat-51.dll" target="libavformat.so.ld" />
- <dllmap dll="avutil-49.dll" target="libavutil.so.1d" />
+ <dllmap dll="avcodec-51.dll" target="libavcodec.so.51" />
+ <dllmap dll="avformat-51.dll" target="libavformat.so.51" />
+ <dllmap dll="avutil-49.dll" target="libavutil.so.49" />
</configuration>