public async Task Initialize(System.IO.Stream input)
    {
      Focusable = true;

      try
      {
        if (false)
        {
          movie = Movie.DecodeStream(input);
          movieStart = 0;
        }
        else
        {
          var array = await ReadFully(input);
          movie = Movie.DecodeByteArray(array, 0, array.Length);
          var duration = movie.Duration();
        }
      }
      catch (Exception ex)
      {

      }

    }
Пример #2
0
 public async Task Initialise(System.IO.Stream input)
 {
     Focusable = true;
     try
     {
         if (false)
         {
             movie = Movie.DecodeStream(input);
             movieStart = 0;
         }
         else
         {
             var array = await ReadAllIn(input);
             movie = Movie.DecodeByteArray(array, 0, array.Length);
             var duration = movie.Duration();
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine("Exception thrown in Initialise - {0} -- {1}", ex.Message, ex.StackTrace);
     }
 }