blob: 3576707e703b572679ede42e813a79fd292c5bb4 (
plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license that can
* be found in the License.html file in the root of the source tree.
*/
//---------------------------------------------------------------------------
// Pre-compilation
#include "MediaInfo/PreComp.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "MediaInfo/Setup.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#if defined(MEDIAINFO_LYRICS3_YES)
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "MediaInfo/Tag/File_Lyrics3.h"
//---------------------------------------------------------------------------
namespace MediaInfoLib
{
//***************************************************************************
// Constructor/Destructor
//***************************************************************************
//---------------------------------------------------------------------------
File_Lyrics3::File_Lyrics3()
:File__Analyze()
{
//Configuration
TotalSize=(int64u)-1;
}
//***************************************************************************
// Format
//***************************************************************************
//---------------------------------------------------------------------------
void File_Lyrics3::Read_Buffer_Continue()
{
if (TotalSize==(int64u)-1)
TotalSize=Buffer_Size;
//Coherency
if (TotalSize<20)
{
Reject("Lyrics3");
return;
}
//Buffer size
if (Buffer_Size<TotalSize)
return;
//Parsing
Element_Offset=0;
Element_Size=TotalSize;
Skip_Local(11, "Signature");
Skip_Local(TotalSize-20, "Lyrics");
Skip_Local(9, "Signature");
//Filling
Accept("Lyric3");
Stream_Prepare(Stream_Text);
Fill(Stream_Text, 0, Text_Codec, "Lyrics3");
Finish("Lyrics3");
}
//***************************************************************************
// C++
//***************************************************************************
} //NameSpace
#endif //MEDIAINFO_LYRICS3_YES
|