Exemple #1
0
        private MediaStreamSource CreateMSSFromStream(IRandomAccessStream stream, FFmpegInteropMSSConfig config)
        {
            // Create the MSS
            IActivationFactory mssFactory = WindowsRuntimeMarshal.GetActivationFactory(typeof(MediaStreamSource));
            MediaStreamSource  mss        = mssFactory.ActivateInstance() as MediaStreamSource;

            // Create the FFmpegInteropMSS from the provided stream
            FFmpegInteropMSS.CreateFromStream(stream, mss, config);

            return(mss);
        }
Exemple #2
0
        private async void OpenFile(StorageFile file)
        {
            // Populate the URI box with the path of the file selected
            uriBox.Text = file.Path;

            IRandomAccessStream stream = await file.OpenReadAsync();

            OpenMedia((mss, config) =>
            {
                FFmpegInteropMSS.CreateFromStream(stream, mss, config);
            });
        }