Commit fececcea authored by Warren Dukes's avatar Warren Dukes

parse metadata and send to output when playing another stream

git-svn-id: https://svn.musicpd.org/mpd/trunk@2338 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent ce10ba4b
...@@ -405,8 +405,6 @@ static void shout_sendMetadata(AudioOutput * audioOutput, MpdTag * tag) { ...@@ -405,8 +405,6 @@ static void shout_sendMetadata(AudioOutput * audioOutput, MpdTag * tag) {
} }
DEBUG("shout: got tag\n");
vorbis_analysis_headerout(&(sd->vd), &(sd->vc), &(sd->header_main), vorbis_analysis_headerout(&(sd->vd), &(sd->vc), &(sd->header_main),
&(sd->header_comments), &(sd->header_codebooks)); &(sd->header_comments), &(sd->header_codebooks));
......
...@@ -159,9 +159,7 @@ int waitOnDecode(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb, ...@@ -159,9 +159,7 @@ int waitOnDecode(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb,
if((tag = metadataChunkToMpdTagDup(&(pc->fileMetadataChunk)))) { if((tag = metadataChunkToMpdTagDup(&(pc->fileMetadataChunk)))) {
sendMetdataToAudioDevice(tag); sendMetdataToAudioDevice(tag);
printMpdTag(stdout, tag);
freeMpdTag(tag); freeMpdTag(tag);
tag = NULL;
} }
pc->totalTime = pc->fileTime; pc->totalTime = pc->fileTime;
...@@ -428,7 +426,15 @@ void handleMetadata(OutputBuffer * cb, PlayerControl * pc, int * previous, ...@@ -428,7 +426,15 @@ void handleMetadata(OutputBuffer * cb, PlayerControl * pc, int * previous,
if(!(*currentChunkSent) && pc->metadataState == if(!(*currentChunkSent) && pc->metadataState ==
PLAYER_METADATA_STATE_WRITE) PLAYER_METADATA_STATE_WRITE)
{ {
MpdTag * tag = NULL;
*currentChunkSent = 1; *currentChunkSent = 1;
if((tag = metadataChunkToMpdTagDup(currentChunk))) {
sendMetdataToAudioDevice(tag);
freeMpdTag(tag);
}
memcpy(&(pc->metadataChunk), currentChunk, memcpy(&(pc->metadataChunk), currentChunk,
sizeof(MetadataChunk)); sizeof(MetadataChunk));
pc->metadataState = PLAYER_METADATA_STATE_READ; pc->metadataState = PLAYER_METADATA_STATE_READ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment