protected MediaInfoWrapper ReadMediaInfo(IFileSystemResourceAccessor mediaItemAccessor)
    {
      MediaInfoWrapper result = new MediaInfoWrapper();

      ILocalFsResourceAccessor localFsResourceAccessor = mediaItemAccessor as ILocalFsResourceAccessor;
      if (ReferenceEquals(localFsResourceAccessor, null))
      {
        Stream stream = null;
        try
        {
          stream = mediaItemAccessor.OpenRead();
          if (stream != null)
            result.Open(stream);
        }
        finally
        {
          if (stream != null)
            stream.Close();
        }
      }
      else
      {
        using (localFsResourceAccessor.EnsureLocalFileSystemAccess())
          result.Open(localFsResourceAccessor.LocalFileSystemPath);
      }

      return result;
    }
 protected MediaInfoWrapper ReadMediaInfo(IResourceAccessor mediaItemAccessor)
 {
   MediaInfoWrapper result = new MediaInfoWrapper();
   Stream stream = null;
   try
   {
     stream = mediaItemAccessor.OpenRead();
     if (stream != null)
       result.Open(stream);
   }
   finally
   {
     if (stream != null)
       stream.Close();
   }
   return result;
 }