Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
3c2d73d1
Commit
3c2d73d1
authored
Oct 02, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/flac: add method FLACMetadataChain::Scan()
Merge common code.
parent
343de8b8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
FLACDecoderPlugin.cxx
src/decoder/FLACDecoderPlugin.cxx
+1
-9
FLACMetaData.cxx
src/decoder/FLACMetaData.cxx
+9
-3
FLACMetaData.hxx
src/decoder/FLACMetaData.hxx
+2
-0
No files found.
src/decoder/FLACDecoderPlugin.cxx
View file @
3c2d73d1
...
@@ -373,15 +373,7 @@ oggflac_scan_file(const char *file,
...
@@ -373,15 +373,7 @@ oggflac_scan_file(const char *file,
return
false
;
return
false
;
}
}
FLACMetadataIterator
iterator
(
chain
);
chain
.
Scan
(
handler
,
handler_ctx
);
do
{
FLAC__StreamMetadata
*
block
=
iterator
.
GetBlock
();
if
(
block
==
nullptr
)
break
;
flac_scan_metadata
(
block
,
handler
,
handler_ctx
);
}
while
(
iterator
.
Next
());
return
true
;
return
true
;
}
}
...
...
src/decoder/FLACMetaData.cxx
View file @
3c2d73d1
...
@@ -250,7 +250,15 @@ flac_scan_file2(const char *file,
...
@@ -250,7 +250,15 @@ flac_scan_file2(const char *file,
return
false
;
return
false
;
}
}
FLACMetadataIterator
iterator
(
chain
);
chain
.
Scan
(
handler
,
handler_ctx
);
return
true
;
}
void
FLACMetadataChain
::
Scan
(
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
)
{
FLACMetadataIterator
iterator
(
*
this
);
do
{
do
{
FLAC__StreamMetadata
*
block
=
iterator
.
GetBlock
();
FLAC__StreamMetadata
*
block
=
iterator
.
GetBlock
();
if
(
block
==
nullptr
)
if
(
block
==
nullptr
)
...
@@ -258,6 +266,4 @@ flac_scan_file2(const char *file,
...
@@ -258,6 +266,4 @@ flac_scan_file2(const char *file,
flac_scan_metadata
(
block
,
handler
,
handler_ctx
);
flac_scan_metadata
(
block
,
handler
,
handler_ctx
);
}
while
(
iterator
.
Next
());
}
while
(
iterator
.
Next
());
return
true
;
}
}
src/decoder/FLACMetaData.hxx
View file @
3c2d73d1
...
@@ -58,6 +58,8 @@ public:
...
@@ -58,6 +58,8 @@ public:
const
char
*
GetStatusString
()
const
{
const
char
*
GetStatusString
()
const
{
return
FLAC__Metadata_ChainStatusString
[
GetStatus
()];
return
FLAC__Metadata_ChainStatusString
[
GetStatus
()];
}
}
void
Scan
(
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
);
};
};
class
FLACMetadataIterator
{
class
FLACMetadataIterator
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment