Skip to content

Commit 6eb57b4

Browse files
committed
cleaning
1 parent 945f2d1 commit 6eb57b4

38 files changed

+214
-409
lines changed

CMakeLists.txt

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
# CMakeList.txt : Top-level CMake project file, do global configuration
2-
# and include sub-projects here.
3-
#
4-
cmake_minimum_required (VERSION 3.8)
5-
6-
# Enable Hot Reload for MSVC compilers if supported.
7-
if (POLICY CMP0141)
8-
cmake_policy(SET CMP0141 NEW)
9-
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
10-
endif()
11-
12-
project ("OpenH264Wrapper2")
13-
14-
# Include sub-projects.
1+
152
add_subdirectory ("H264SharpNative")
3+

Examples/AVRecord/AVRecord.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525

2626
<ItemGroup>
2727
<None Update="H264SharpNative-win64.dll">
28-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
28+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
2929
</None>
30-
<None Update="openh264-2.4.0-win64.dll">
30+
<None Update="openh264-2.4.1-win64.dll">
3131
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3232
</None>
3333
</ItemGroup>
-1.5 KB
Binary file not shown.

Examples/AVRecord/MainWindow.xaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,27 @@
1212
<Grid Grid.Row="0" Margin="10">
1313
<StackPanel>
1414
<ToggleButton Content="Capture" Click="Capture"
15-
Width="150" Height="40"></ToggleButton>
15+
Width="150" Height="40"></ToggleButton>
1616
<ToggleButton Content="Record" Click="BeginRecord"
17-
Width="150" Height="40"></ToggleButton>
17+
Width="150" Height="40"></ToggleButton>
1818
<Button Content="Stop" Click="Stop"
19-
Width="150" Height="40"></Button>
19+
Width="150" Height="40"></Button>
2020
<Label Content="BitRate"></Label>
21-
<Slider ValueChanged="Slider_ValueChanged" Minimum="10" Maximum="10000" Value="1000"></Slider>
21+
<Slider AutoToolTipPlacement="TopLeft" ValueChanged="Slider_ValueChanged" Minimum="10" Maximum="10000" Value="1000"></Slider>
2222
<TextBlock x:Name="DataRate"></TextBlock>
2323
<TextBlock x:Name="Fps"></TextBlock>
2424
<TextBlock x:Name="AvgEncoderTime"></TextBlock>
2525
<CheckBox Content="Enable Parallel Converter" Checked="ParallelConverterChecked" Unchecked="ParallelConverterUnChecked"></CheckBox>
26-
26+
2727
<Label Content="Num threads"></Label>
28-
<Slider ValueChanged="Slider_ValueChanged2" Minimum="0" Maximum="32" Value="4" ></Slider>
28+
<Slider AutoToolTipPlacement="TopLeft" ValueChanged="Slider_ValueChanged2" Minimum="0" Maximum="32" Value="4" ></Slider>
2929

30-
<CheckBox Content="Enable SSE" Checked="SSEChecked" Unchecked="SSEUnChecked"></CheckBox>
30+
<CheckBox Content="Enable SSE" IsChecked="True" Checked="SSEChecked" Unchecked="SSEUnChecked"></CheckBox>
3131
<CheckBox Content="CVConversion" Checked="CVChecked" Unchecked="CVUnChecked"></CheckBox>
3232
<CheckBox Content="Enable Loss" Checked="LossChecked" Unchecked="LossUnChecked"></CheckBox>
3333
<CheckBox Content="Enable Jitter" Checked="JitterChecked" Unchecked="JitterUnChecked"></CheckBox>
34-
3534
</StackPanel>
3635
</Grid>
37-
3836
</Grid>
3937
<Grid Margin="180,0,0,0">
4038
<Grid.RowDefinitions>
@@ -46,8 +44,6 @@
4644
<ColumnDefinition Width="auto"></ColumnDefinition>
4745
<ColumnDefinition Width="*"></ColumnDefinition>
4846
</Grid.ColumnDefinitions>
49-
50-
5147
<Grid Grid.Row="0" Grid.Column="1">
5248
<Border BorderBrush="DimGray" BorderThickness="0.1">
5349
<Grid>
@@ -60,7 +56,6 @@
6056
</Grid>
6157
<GridSplitter Grid.Row="1" Grid.Column="1" Background="Gray" Height="5" HorizontalAlignment="Stretch"></GridSplitter>
6258
<!--<GridSplitter Grid.Column="3" Background="Black" Width="5" ></GridSplitter>-->
63-
6459
<Grid Grid.Row="2" Grid.Column="1">
6560
<Border BorderBrush="DimGray" BorderThickness="0.1">
6661
<Grid>

Examples/AVRecord/MainWindow.xaml.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,14 @@
1-
using NAudio.Wave.SampleProviders;
2-
using NAudio.Wave;
1+
using NAudio.Wave;
32
using OpenCvSharp;
4-
using System.Numerics;
5-
using System.Text;
6-
using System.Text.RegularExpressions;
73
using System.Windows;
84
using System.Windows.Controls;
9-
using System.Windows.Data;
10-
using System.Windows.Documents;
11-
using System.Windows.Input;
125
using System.Windows.Media;
136
using System.Windows.Media.Imaging;
14-
15-
167
using OpenH264Sample;
178
using System.IO;
18-
using System.Drawing.Imaging;
19-
using System.Drawing;
209
using System.Diagnostics;
21-
using System.Windows.Media.Animation;
2210
using H264Sharp;
2311
using System.Collections.Concurrent;
24-
using System;
25-
using OpenCvSharp.ML;
26-
27-
2812

2913
namespace AVRecord
3014
{
@@ -111,7 +95,6 @@ public MainWindow()
11195
decoder = new H264Decoder();
11296
TagSVCDecodingParam decParam = new TagSVCDecodingParam();
11397
decParam.uiTargetDqLayer = 0xff;
114-
decParam.eEcActiveIdc = ERROR_CON_IDC.ERROR_CON_SLICE_MV_COPY_CROSS_IDR;
11598
decParam.eEcActiveIdc = ERROR_CON_IDC.ERROR_CON_FRAME_COPY_CROSS_IDR;
11699
decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_TYPE.VIDEO_BITSTREAM_SVC;
117100
decoder.Initialize(decParam);
-964 KB
Binary file not shown.
964 KB
Binary file not shown.

CrossPlatformTest/CrossPlatformTest.csproj renamed to Examples/CrossPlatformTest/CrossPlatformTest.csproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,22 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="H264Sharp-linux" Version="1.3.0" />
12+
<Reference Include="H264Sharp">
13+
<HintPath>H264Sharp.dll</HintPath>
14+
</Reference>
1315
</ItemGroup>
1416

1517
<ItemGroup>
18+
<None Update="H264Sharp.dll">
19+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
20+
</None>
21+
<None Update="H264SharpNative-linux64.so">
22+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
23+
</None>
1624
<None Update="H264SharpNative-win64.dll">
1725
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1826
</None>
19-
<None Update="openh264-2.4.1-win64.dll">
27+
<None Update="libopenh264-2.4.1-linux64.7.so">
2028
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
2129
</None>
2230
<None Update="RawBgr.bin">
27.5 KB
Binary file not shown.
113 KB
Binary file not shown.

0 commit comments

Comments
 (0)