1

我正在尝试将 C 代码转换为此处: http : //wiki.videolan.org/Stream_to_memory_(smem)_tutorial 为 C#,用于开源项目 (ispy)。

我目前的主要问题是转换方法签名:

void handleStream(void* p_audio_data, uint8_t* p_pcm_buffer, unsigned int channels, unsigned int rate, unsigned int nb_samples, unsigned int bits_per_sample, unsigned int size, int64_t pts )

转换为 C# 等价物。有任何想法吗?

4

3 回答 3

0

还有Vlc.DotNet

该项目有 Vlc.DotNet.Core.Interops 库,为所有版本的 VLC >= 1.1 提供 VLC 互操作

于 2011-11-18T13:06:02.897 回答
0

如果那是一个回调,我会将其设为 C#委托

public delegate void handleStream (byte[] p_audio_data, uint[] p_pcm_buffer, 
                                   uint channels, uint rate, uint nb_samples, 
                                   uint bits_per_sample, uint size, ulong pts);
于 2011-04-13T05:04:27.970 回答
0

在http://sourceforge.net/projects/libvlcnet/有一个 libvlc 的 .NET 包装器,您应该使用它并让它处理 P/Invoke 的详细信息。

于 2011-04-13T05:12:45.347 回答