Compare commits
2 Commits
main
...
sandbox/ma
Author | SHA1 | Date | |
---|---|---|---|
|
f031dc1731 | ||
|
274c641666 |
@ -13,6 +13,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample_muxer", "sample_muxe
|
||||
{7B1F12CA-0724-430B-B61A-1D357C912CBA} = {7B1F12CA-0724-430B-B61A-1D357C912CBA}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwebvtt", "libwebvtt.vcproj", "{9545310B-A6E6-4B42-BB00-655D66B6E3D5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@ -31,6 +33,10 @@ Global
|
||||
{B407561F-1F5E-4798-B9C2-81AB09CFBC16}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B407561F-1F5E-4798-B9C2-81AB09CFBC16}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B407561F-1F5E-4798-B9C2-81AB09CFBC16}.Release|Win32.Build.0 = Release|Win32
|
||||
{9545310B-A6E6-4B42-BB00-655D66B6E3D5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9545310B-A6E6-4B42-BB00-655D66B6E3D5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9545310B-A6E6-4B42-BB00-655D66B6E3D5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9545310B-A6E6-4B42-BB00-655D66B6E3D5}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
157
libwebvtt.vcproj
Normal file
157
libwebvtt.vcproj
Normal file
@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="libwebvtt_2008"
|
||||
ProjectGUID="{9545310B-A6E6-4B42-BB00-655D66B6E3D5}"
|
||||
RootNamespace="libwebvtt"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)..\lib\$(SolutionName)\$(ProjectName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(SolutionDir)..\obj\$(SolutionName)\$(ProjectName)\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
DebugInformationFormat="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath=".\webvttparser.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\webvttparser.hpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
23
webvttparser.cpp
Normal file
23
webvttparser.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include "webvttparser.hpp"
|
||||
|
||||
namespace WebvttParser
|
||||
{
|
||||
|
||||
IReader::IReader()
|
||||
{
|
||||
}
|
||||
|
||||
IReader::~IReader()
|
||||
{
|
||||
}
|
||||
|
||||
Parser::Parser(IReader* p) :
|
||||
m_pReader(p)
|
||||
{
|
||||
}
|
||||
|
||||
Parser::~Parser()
|
||||
{
|
||||
}
|
||||
|
||||
} //end namespace WebvttParser
|
60
webvttparser.hpp
Normal file
60
webvttparser.hpp
Normal file
@ -0,0 +1,60 @@
|
||||
#ifndef WEBVTTPARSER_HPP
|
||||
#define WEBVTTPARSER_HPP
|
||||
|
||||
namespace WebvttParser
|
||||
{
|
||||
|
||||
class IReader
|
||||
{
|
||||
protected:
|
||||
IReader();
|
||||
virtual ~IReader();
|
||||
|
||||
public:
|
||||
virtual int Read(char& c) = 0;
|
||||
|
||||
};
|
||||
|
||||
class Parser
|
||||
{
|
||||
private:
|
||||
Parser(const Parser&);
|
||||
Parser& operator=(const Parser&);
|
||||
|
||||
public:
|
||||
Parser(IReader*);
|
||||
~Parser();
|
||||
|
||||
int Parse();
|
||||
|
||||
//need to know kind:
|
||||
// caption, description, metadata, etc
|
||||
// is this a webvtt stream?
|
||||
//
|
||||
//cue identifier
|
||||
//timestamp (or defaults?) + cue settings
|
||||
//payload
|
||||
// preserve each line
|
||||
|
||||
//machine states:
|
||||
// parsing stream id ("webvtt")
|
||||
// parsing file-wide metadata
|
||||
// parsing cue
|
||||
//
|
||||
//within cue:
|
||||
// parsing line
|
||||
// is this a cue identifier or timestamp line?
|
||||
//
|
||||
// parsing cue id
|
||||
// parsing timestamp
|
||||
// parsing lines, looking for end-of-cue
|
||||
|
||||
private:
|
||||
IReader* const m_pReader;
|
||||
|
||||
};
|
||||
|
||||
|
||||
} //end namespace WebvttParser
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user