Esempio n. 1
0
 private static extern int FFMS_WriteIndex(string IndexFile, IntPtr TrackIndices, ref FFMS_ErrorInfo ErrorInfo);
Esempio n. 2
0
 private static extern IntPtr FFMS_DoIndexing(IntPtr Indexer, int IndexMask, int DumpMask,
     CallBack TAudioNameCallback, IntPtr ANCPrivate, bool IgnoreDecodeErrors, CallBack2 TIndexCallback, IntPtr ICPrivate,
     ref FFMS_ErrorInfo ErrorInfo);
Esempio n. 3
0
 private static extern IntPtr FFMS_ReadIndex(string IndexFile, ref FFMS_ErrorInfo ErrorInfo);
Esempio n. 4
0
 private static extern IntPtr FFMS_CreateIndexer(string SourceFile, ref FFMS_ErrorInfo Error);
Esempio n. 5
0
 private static extern IntPtr FFMS_CreateVideoSource(string SourceFile, int Track, IntPtr Index,
     int Threads, int SeekMode, ref FFMS_ErrorInfo ErrorInfo);
Esempio n. 6
0
        /**
         *
         * Dado un fichero multimedia rellenará el atributo público SourceData con los datos del fichero.
         * Aparte se inicializará la precarga de los codecs.
         *
         * */
        public void FFMSIndexer(string SourceFile)
        {
            FFMS_ErrorInfo ErrorInd = new FFMS_ErrorInfo();
            int tracks = 0;

            unsafe
            {
                Indexer = FFMS_CreateIndexer(SourceFile, ref ErrorInd);
                tracks = FFMS_GetNumTracksI(Indexer);
            }

            if (Indexer == IntPtr.Zero)
                Error = ErrorInd;
            SourceData.NumTracks = tracks;
            SourceData.Source = SourceFile;
            ArrayList TrackData = new ArrayList();
            if (this.OnlyVideo)
            {
                for (int i = 0; i < tracks; i++)
                {
                    try
                    {
                        int type = FFMS_GetTrackTypeI(Indexer, i);
                        if (type == (int)FFMS_TrackType.FFMS_TYPE_VIDEO)
                        {
                            string codec = Marshal.PtrToStringAnsi(FFMS_GetCodecNameI(Indexer, i));
                            TrackData data = new TrackData();
                            data.Codec = codec;
                            data.TrackType = type;
                            TrackData.Add(data);
                        }
                    }
                    catch (System.AccessViolationException) { }
                }
            }
            else
            {
                for (int i = 0; i < tracks; i++)
                {
                    try
                    {
                        int type = FFMS_GetTrackTypeI(Indexer, i);
                        string codec = Marshal.PtrToStringAnsi(FFMS_GetCodecNameI(Indexer, i));
                        TrackData data = new TrackData();
                        data.Codec = codec;
                        data.TrackType = type;
                        TrackData.Add(data);
                    }
                    catch (System.AccessViolationException) { }
                }
            }
            SourceData.Tracks = TrackData;
        }
 private static extern int FFMS_SetOutputFormatV(IntPtr VideoSource, Int64 TargetFormats, int Width, int Height, int Resizer, ref FFMS_ErrorInfo ErrorInfo);
 private static extern IntPtr FFMS_GetFrame(IntPtr VideoSource, int n, ref FFMS_ErrorInfo ErrorInfo);
 private static extern IntPtr FFMS_CreateAudioSource(string SourceFile, int Track, IntPtr Index, ref FFMS_ErrorInfo ErrorInfo);
 public FFMS2Track(FFMS_SourceData Data)
 {
     this.Data = Data;
     TrackList = new ArrayList();
     this.Error = new FFMS_ErrorInfo();
 }