-
Notifications
You must be signed in to change notification settings - Fork 35
/
IContainerReader.cs
62 lines (54 loc) · 2.39 KB
/
IContainerReader.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/****************************************************************************
* NVorbis *
* Copyright (C) 2014, Andrew Ward <[email protected]> *
* *
* See COPYING for license terms (Ms-PL). *
* *
***************************************************************************/
using System;
namespace Concentus.Oggfile
{
/// <summary>
/// Provides a interface for a Vorbis logical stream container.
/// </summary>
internal interface IContainerReader : IDisposable
{
/// <summary>
/// Gets the list of stream serials found in the container so far.
/// </summary>
int[] StreamSerials { get; }
/// <summary>
/// Gets whether the container supports seeking.
/// </summary>
bool CanSeek { get; }
/// <summary>
/// Gets the number of bits in the container that are not associated with a logical stream.
/// </summary>
long WasteBits { get; }
/// <summary>
/// Gets the number of pages that have been read in the container.
/// </summary>
int PagesRead { get; }
/// <summary>
/// Event raised when a new logical stream is found in the container.
/// </summary>
event EventHandler<NewStreamEventArgs> NewStream;
/// <summary>
/// Initializes the container and finds the first stream.
/// </summary>
/// <returns><c>True</c> if a valid logical stream is found, otherwise <c>False</c>.</returns>
bool Init();
/// <summary>
/// Finds the next new stream in the container.
/// </summary>
/// <returns><c>True</c> if a new stream was found, otherwise <c>False</c>.</returns>
/// <exception cref="InvalidOperationException"><see cref="CanSeek"/> is <c>False</c>.</exception>
bool FindNextStream();
/// <summary>
/// Retrieves the total number of pages in the container.
/// </summary>
/// <returns>The total number of pages.</returns>
/// <exception cref="InvalidOperationException"><see cref="CanSeek"/> is <c>False</c>.</exception>
int GetTotalPageCount();
}
}