remove metadata debugging code
git-svn-id: https://svn.musicpd.org/mpd/trunk@1378 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
5b5dd126aa
commit
1760433061
|
@ -395,7 +395,6 @@ void handleMetadata(OutputBuffer * cb, PlayerControl * pc, int * previous,
|
||||||
int meta = cb->metaChunk[cb->begin];
|
int meta = cb->metaChunk[cb->begin];
|
||||||
if( meta != *previous ) {
|
if( meta != *previous ) {
|
||||||
if( meta >= 0 && cb->metaChunkSet[meta]) {
|
if( meta >= 0 && cb->metaChunkSet[meta]) {
|
||||||
printf("METADATA!, copying it.\n");
|
|
||||||
memcpy(currentChunk,
|
memcpy(currentChunk,
|
||||||
cb->metadataChunks+meta,
|
cb->metadataChunks+meta,
|
||||||
sizeof(MetadataChunk));
|
sizeof(MetadataChunk));
|
||||||
|
@ -408,7 +407,6 @@ void handleMetadata(OutputBuffer * cb, PlayerControl * pc, int * previous,
|
||||||
if(!(*currentChunkSent) && pc->metadataState ==
|
if(!(*currentChunkSent) && pc->metadataState ==
|
||||||
PLAYER_METADATA_STATE_WRITE)
|
PLAYER_METADATA_STATE_WRITE)
|
||||||
{
|
{
|
||||||
printf("copy metadata to player\n");
|
|
||||||
*currentChunkSent = 1;
|
*currentChunkSent = 1;
|
||||||
memcpy(&(pc->metadataChunk), currentChunk,
|
memcpy(&(pc->metadataChunk), currentChunk,
|
||||||
sizeof(MetadataChunk));
|
sizeof(MetadataChunk));
|
||||||
|
|
|
@ -368,7 +368,6 @@ static int getHTTPHello(InputStream * inStream) {
|
||||||
}
|
}
|
||||||
else if(0 == strncmp(cur, "\r\nicy-metaint:", 14)) {
|
else if(0 == strncmp(cur, "\r\nicy-metaint:", 14)) {
|
||||||
data->icyMetaint = atoi(cur+14);
|
data->icyMetaint = atoi(cur+14);
|
||||||
printf("icyMetaint: %i\n", data->icyMetaint);
|
|
||||||
}
|
}
|
||||||
else if(0 == strncmp(cur, "\r\nicy-name:", 11)) {
|
else if(0 == strncmp(cur, "\r\nicy-name:", 11)) {
|
||||||
int incr = 11;
|
int incr = 11;
|
||||||
|
@ -461,7 +460,6 @@ static void parseIcyMetadata(InputStream * inStream, char * metadata,
|
||||||
while(s) {
|
while(s) {
|
||||||
if(0 == strncmp(s, "StreamTitle=", 12)) {
|
if(0 == strncmp(s, "StreamTitle=", 12)) {
|
||||||
int cur = 12;
|
int cur = 12;
|
||||||
printf("StreamTitle: %s\n", s+cur);
|
|
||||||
if(inStream->metaTitle) free(inStream->metaTitle);
|
if(inStream->metaTitle) free(inStream->metaTitle);
|
||||||
if(*(s+cur) == '\'') cur++;
|
if(*(s+cur) == '\'') cur++;
|
||||||
if(s[strlen(s)-1] == '\'') {
|
if(s[strlen(s)-1] == '\'') {
|
||||||
|
|
|
@ -149,8 +149,6 @@ int copyMpdTagToOutputBuffer(OutputBuffer * cb, MpdTag * tag) {
|
||||||
int nextChunk;
|
int nextChunk;
|
||||||
static MpdTag * last = NULL;
|
static MpdTag * last = NULL;
|
||||||
|
|
||||||
printf("copyMpdTagToOB called\n");
|
|
||||||
|
|
||||||
if(!cb->acceptMetadata || !tag) {
|
if(!cb->acceptMetadata || !tag) {
|
||||||
sendMetaChunk = 0;
|
sendMetaChunk = 0;
|
||||||
if(last) free(last);
|
if(last) free(last);
|
||||||
|
@ -158,10 +156,7 @@ int copyMpdTagToOutputBuffer(OutputBuffer * cb, MpdTag * tag) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!last) printf("OH SHIT\n");
|
|
||||||
|
|
||||||
if(last && mpdTagsAreEqual(last, tag)) {
|
if(last && mpdTagsAreEqual(last, tag)) {
|
||||||
printf("same as last\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,8 +173,6 @@ int copyMpdTagToOutputBuffer(OutputBuffer * cb, MpdTag * tag) {
|
||||||
|
|
||||||
last = mpdTagDup(tag);
|
last = mpdTagDup(tag);
|
||||||
|
|
||||||
printMpdTag(stdout, last);
|
|
||||||
|
|
||||||
copyMpdTagToMetadataChunk(tag, &(cb->metadataChunks[currentMetaChunk]));
|
copyMpdTagToMetadataChunk(tag, &(cb->metadataChunks[currentMetaChunk]));
|
||||||
|
|
||||||
cb->metaChunkSet[nextChunk] = 1;
|
cb->metaChunkSet[nextChunk] = 1;
|
||||||
|
|
Loading…
Reference in New Issue