Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
ScreenToGif
提交
40c4dd70
S
ScreenToGif
项目概览
jobily
/
ScreenToGif
上一次同步 8 个月
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
ScreenToGif
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
40c4dd70
编写于
6月 18, 2017
作者:
N
Nicke Manarin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Memory leak fix. Also update translation.
上级
82bcb68a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
16 deletion
+29
-16
ScreenToGif/Readme.md
ScreenToGif/Readme.md
+2
-1
ScreenToGif/Resources/Localization/StringResources.de.xaml
ScreenToGif/Resources/Localization/StringResources.de.xaml
+2
-1
ScreenToGif/Windows/Editor.xaml.cs
ScreenToGif/Windows/Editor.xaml.cs
+6
-3
ScreenToGif/Windows/Other/VideoSource.xaml
ScreenToGif/Windows/Other/VideoSource.xaml
+3
-2
ScreenToGif/Windows/Other/VideoSource.xaml.cs
ScreenToGif/Windows/Other/VideoSource.xaml.cs
+16
-9
未找到文件。
ScreenToGif/Readme.md
浏览文件 @
40c4dd70
...
...
@@ -16,7 +16,8 @@ Fixed:
♦ Openning the Crop panel would cause a crash (if the new frame size was smaller).
♦ Getting new frames (by a new recording or by loading something else) while the Crop panel was open could throw an exception.
♦ Ocasionally, the playback buttons (play/pause, next, etc) would stay disabled (when it shouldn't).
♦ Ocasionally, the playback buttons (play/pause, next, etc) would stay disabled (when it shouldn't).
♦ The video importer was causing a memory leak.
Known Bugs:
...
...
ScreenToGif/Resources/Localization/StringResources.de.xaml
浏览文件 @
40c4dd70
...
...
@@ -434,7 +434,8 @@
<s:String x:Key="Editor.DragDrop.Invalid.Title">Ungültiges Ziehen und Ablegen</s:String>
<s:String x:Key="Editor.DragDrop.MultipleFiles.Instruction">Sie können nicht mehrere Dateien gleichzeitig importieren</s:String>
<s:String x:Key="Editor.DragDrop.MultipleFiles.Message">Wählen Sie immer nur eine Datei aus.</s:String>
<s:String x:Key="Editor.DragDrop.Invalid.Instruction">Datei kann nicht geladen werden</s:String>
<s:String x:Key="Editor.DragDrop.Invalid.Message">Datei kann wegen ungültigen Formats nicht geladen werden.</s:String>
<s:String x:Key="Editor.DragDrop.InvalidProject.Instruction">Sie können nicht mehrere Projektdateien gleichzeitig importieren</s:String>
<s:String x:Key="Editor.DragDrop.InvalidProject.Message">Wählen Sie immer nur eine Projektdatei aus.</s:String>
...
...
ScreenToGif/Windows/Editor.xaml.cs
浏览文件 @
40c4dd70
...
...
@@ -3840,7 +3840,7 @@ namespace ScreenToGif.Windows
foreach
(
var
frame
in
frameList
)
{
var
frameName
=
Path
.
Combine
(
pathTemp
,
$"
{
count
}
{
DateTime
.
Now
.
ToString
(
"hh-mm-ss-FFFF"
)
}
.png"
);
var
frameName
=
Path
.
Combine
(
pathTemp
,
$"
{
count
}
{
DateTime
.
Now
:
hh
-
mm
-
ss
-
FFFF
}
.png"
);
using
(
var
stream
=
new
FileStream
(
frameName
,
FileMode
.
Create
))
{
...
...
@@ -3853,12 +3853,15 @@ namespace ScreenToGif.Windows
var
frameInfo
=
new
FrameInfo
(
frameName
,
delay
);
frameInfoList
.
Add
(
frameInfo
);
GC
.
Collect
();
GC
.
Collect
(
1
,
GCCollectionMode
.
Forced
);
count
++;
UpdateProgress
(
count
);
}
frameList
.
Clear
();
GC
.
Collect
();
#
endregion
return
frameInfoList
;
...
...
@@ -5749,4 +5752,4 @@ namespace ScreenToGif.Windows
// }
//}
}
}
}
\ No newline at end of file
ScreenToGif/Windows/Other/VideoSource.xaml
浏览文件 @
40c4dd70
...
...
@@ -3,8 +3,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c="clr-namespace:ScreenToGif.Controls"
xmlns:u="clr-namespace:ScreenToGif.Util"
Title="{DynamicResource ImportVideo.Title}" Height="500" Width="800" MinHeight="400" MinWidth="500" SnapsToDevicePixels="True" UseLayoutRounding="True"
Icon="/ScreenToGif;component/Resources/Logo.ico" WindowStartupLocation="CenterOwner">
Title="{DynamicResource ImportVideo.Title}" Height="500" Width="800" MinHeight="400" MinWidth="500"
SnapsToDevicePixels="True" UseLayoutRounding="True" Icon="/ScreenToGif;component/Resources/Logo.ico" WindowStartupLocation="CenterOwner"
Closing="Window_Closing">
<Grid>
<Grid.RowDefinitions>
...
...
ScreenToGif/Windows/Other/VideoSource.xaml.cs
浏览文件 @
40c4dd70
...
...
@@ -15,8 +15,8 @@ namespace ScreenToGif.Windows.Other
private
bool
_cancelled
;
private
int
_playerLoadedCount
=
0
;
private
readonly
MediaPlayer
_lowerPlayer
=
new
MediaPlayer
()
{
Volume
=
0
,
ScrubbingEnabled
=
true
};
private
readonly
MediaPlayer
_upperPlayer
=
new
MediaPlayer
()
{
Volume
=
0
,
ScrubbingEnabled
=
true
};
private
MediaPlayer
_lowerPlayer
=
new
MediaPlayer
{
Volume
=
0
,
ScrubbingEnabled
=
true
};
private
MediaPlayer
_upperPlayer
=
new
MediaPlayer
{
Volume
=
0
,
ScrubbingEnabled
=
true
};
private
readonly
Queue
<
TimeSpan
>
_positions
=
new
Queue
<
TimeSpan
>();
private
int
_width
;
...
...
@@ -53,8 +53,6 @@ namespace ScreenToGif.Windows.Other
_loadVideoDel
.
BeginInvoke
(
new
Uri
(
fileName
),
LoadFramesCallback
,
null
);
}
#
region
Async
#
region
Load
private
delegate
bool
LoadVideo
(
Uri
file
);
...
...
@@ -100,9 +98,7 @@ namespace ScreenToGif.Windows.Other
}
#
endregion
#
endregion
#
region
Events
private
void
LowerMediaplayer_MediaOpened
(
object
sender
,
EventArgs
e
)
...
...
@@ -210,6 +206,8 @@ namespace ScreenToGif.Windows.Other
#
endregion
CaptureFrames
();
GC
.
Collect
();
}
private
void
CancelButton_Click
(
object
sender
,
RoutedEventArgs
e
)
...
...
@@ -223,6 +221,17 @@ namespace ScreenToGif.Windows.Other
DialogResult
=
false
;
}
private
void
Window_Closing
(
object
sender
,
System
.
ComponentModel
.
CancelEventArgs
e
)
{
_lowerPlayer
?.
Close
();
_upperPlayer
?.
Close
();
_lowerPlayer
=
null
;
_upperPlayer
=
null
;
GC
.
Collect
();
}
#
endregion
#
region
Methods
...
...
@@ -319,9 +328,7 @@ namespace ScreenToGif.Windows.Other
//Calculate all positions.
for
(
var
span
=
SelectionSlider
.
LowerValue
+
Delay
;
span
<=
SelectionSlider
.
UpperValue
;
span
+=
Delay
)
{
_positions
.
Enqueue
(
TimeSpan
.
FromMilliseconds
(
span
));
}
CaptureProgressBar
.
Maximum
=
_positions
.
Count
;
CaptureProgressBar
.
Value
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录