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
b3435ae4
Commit
b3435ae4
authored
Dec 26, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/recorder: implement send_tag()
parent
a3112933
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
NEWS
NEWS
+1
-0
RecorderOutputPlugin.cxx
src/output/plugins/RecorderOutputPlugin.cxx
+22
-1
No files found.
NEWS
View file @
b3435ae4
...
...
@@ -14,6 +14,7 @@ ver 0.20 (not yet released)
* output
- jack: reduce CPU usage
- pulse: set channel map to WAVE-EX
- recorder: record tags
* mixer
- null: new plugin
* reset song priority on playback
...
...
src/output/plugins/RecorderOutputPlugin.cxx
View file @
b3435ae4
...
...
@@ -23,6 +23,7 @@
#include "encoder/EncoderPlugin.hxx"
#include "encoder/EncoderList.hxx"
#include "config/ConfigError.hxx"
#include "Log.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "system/fd_util.h"
...
...
@@ -75,6 +76,8 @@ struct RecorderOutput {
* Writes pending data from the encoder to the output file.
*/
bool
EncoderToFile
(
Error
&
error
);
void
SendTag
(
const
Tag
&
tag
);
};
static
constexpr
Domain
recorder_output_domain
(
"recorder_output"
);
...
...
@@ -243,6 +246,24 @@ recorder_output_close(AudioOutput *ao)
recorder
.
Close
();
}
inline
void
RecorderOutput
::
SendTag
(
const
Tag
&
tag
)
{
Error
error
;
if
(
!
encoder_pre_tag
(
encoder
,
error
)
||
!
EncoderToFile
(
error
)
||
!
encoder_tag
(
encoder
,
&
tag
,
error
))
LogError
(
error
);
}
static
void
recorder_output_send_tag
(
AudioOutput
*
ao
,
const
Tag
*
tag
)
{
RecorderOutput
&
recorder
=
*
(
RecorderOutput
*
)
ao
;
recorder
.
SendTag
(
*
tag
);
}
static
size_t
recorder_output_play
(
AudioOutput
*
ao
,
const
void
*
chunk
,
size_t
size
,
Error
&
error
)
...
...
@@ -264,7 +285,7 @@ const struct AudioOutputPlugin recorder_output_plugin = {
recorder_output_open
,
recorder_output_close
,
nullptr
,
nullptr
,
recorder_output_send_tag
,
recorder_output_play
,
nullptr
,
nullptr
,
...
...
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