Exemplo n.º 1
0
        public void Initialize_LoadsLibaries()
        {
            FFmpegClient.Initialize();
            FFmpegClient.Initialize();

            NativeFFmpeg.av_version_info();
            Assert.True(FFmpegClient.LibraryHandles.Count > 0);
        }
Exemplo n.º 2
0
        public void ToReadOnlyDictionary_ReturnsDictionary()
        {
            var nativeDictionary = new NativeAVDictionary
            {
            };
            var ptr = (NativeAVDictionary **)new IntPtr(&nativeDictionary);

            NativeFFmpeg.av_dict_set(ptr, "foo", "bar", 0);
            var dict  = AVDictionaryHelpers.ToReadOnlyDictionary(*ptr);
            var entry = Assert.Single(dict);

            Assert.Equal("foo", entry.Key);
            Assert.Equal("bar", entry.Value);
        }