Skip to content

Commit b4d03fa

Browse files
zamgizamgi
zamgi
authored and
zamgi
committed
...
1 parent 116212b commit b4d03fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1993
-337
lines changed
-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
using System.Reflection;
22
using System.Runtime.InteropServices;
33

4-
// General Information about an assembly is controlled through the following
5-
// set of attributes. Change these attribute values to modify the information
6-
// associated with an assembly.
74
[assembly: AssemblyTitle("m3u8.client")]
85
[assembly: AssemblyDescription("")]
96
[assembly: AssemblyConfiguration("")]
@@ -12,12 +9,6 @@
129
[assembly: AssemblyCopyright("Copyright © zamgi 2018")]
1310
[assembly: AssemblyTrademark("")]
1411
[assembly: AssemblyCulture("")]
15-
16-
// Setting ComVisible to false makes the types in this assembly not visible
17-
// to COM components. If you need to access a type in this assembly from
18-
// COM, set the ComVisible attribute to true on that type.
1912
[assembly: ComVisible(false)]
20-
21-
// The following GUID is for the ID of the typelib if this project is exposed to COM
2213
[assembly: Guid("46961224-7b51-4115-ba59-53f8537cf7c4")]
2314

m3u8.client/download_threads_semaphore.cs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Threading;
3+
using System.Threading.Tasks;
34

45
namespace m3u8
56
{
@@ -11,6 +12,7 @@ internal interface I_download_threads_semaphore : IDisposable
1112
bool UseCrossDownloadInstanceParallelism { get; }
1213

1314
void Wait( CancellationToken ct );
15+
Task WaitAsync( CancellationToken ct );
1416
void Release();
1517
}
1618
}

m3u8.client/m3u8.client.cs

-5
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,6 @@ private HttpRequestMessage CreateRequstGet( Uri url )
466466
throw (new m3u8_Exception( $"No content found while {_AttemptRequestCount} attempt requests." ));
467467
}
468468

469-
//public async Task< m3u8_file_t__v2 > DownloadFile__v2( Uri url, CancellationToken ct = default )
470-
//{
471-
// var mf = await DownloadFile( url, ct ).CAX();
472-
// return (m3u8_file_t__v2.Parse( mf ));
473-
//}
474469
public async Task< m3u8_part_ts__v2 > DownloadPart__v2( m3u8_part_ts__v2 part, Uri baseAddress, CancellationToken ct = default )
475470
{
476471
if ( baseAddress == null ) throw (new m3u8_ArgumentException( nameof(baseAddress) ));

m3u8.client/m3u8.client.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<Compile Include="m3u8_processor.cs" />
4545
<Compile Include="m3u8_processor_adv.cs" />
4646
<Compile Include="m3u8_processor_adv__v2.cs" />
47+
<Compile Include="m3u8_processor_next.cs" />
4748
<Compile Include="m3u8_processor__v2.cs" />
4849
<Compile Include="obj_pool.cs" />
4950
<Compile Include="Properties\AssemblyInfo.cs" />

m3u8.client/m3u8.client.factory.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,11 @@ static void set_Protocol( SslClientAuthenticationOptions sslOptions, SslProtocol
288288
return (h);
289289
};
290290

291-
var handler = CreateSocketsHttpHandler( in timeout );
291+
var handler = CreateSocketsHttpHandler( in timeout );
292292
var httpClient = new HttpClient( handler, true );
293293
#else
294294
var httpClient = new HttpClient();
295-
#endif
295+
#endif
296296
if ( timeout.HasValue )
297297
{
298298
httpClient.Timeout = timeout.Value;

m3u8.client/m3u8_processor_adv__v2.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ private static IEnumerable< m3u8_part_ts__v2 > download_m3u8File_parts_parallel(
130130
for ( var localReadyParts = new Queue< m3u8_part_ts__v2 >( Math.Min( 0x1000, ip.MaxDegreeOfParallelism ) );
131131
expectedPartNumber <= maxPartNumber; )
132132
{
133-
var idx = WaitHandle.WaitAny( new[] { canExtractPartEvent /*0*/, /*ct*/ joinedCts.Token.WaitHandle /*1*/, } );
133+
var idx = WaitHandle.WaitAny( [canExtractPartEvent /*0*/, /*ct*/ joinedCts.Token.WaitHandle /*1*/] );
134134
if ( idx == 1 ) //[ct.IsCancellationRequested := 1]
135135
break;
136136
if ( idx != 0 ) //[canExtractPartEvent := 0]

0 commit comments

Comments
 (0)