[xiph-cvs] cvs commit: vorbis-plugins/realplayer/render/make linux-2.0-libc6-i386.mak
Jack Moffitt
jack at xiph.org
Thu Feb 1 13:45:05 PST 2001
jack 01/02/01 13:45:05
Modified: realplayer/filefmt fvorbis.cpp
realplayer/filefmt/make linux-2.0-libc6-i386.mak
realplayer/render/make linux-2.0-libc6-i386.mak
Log:
title, artist, and copyright comments supported
Revision Changes Path
1.2 +65 -1 vorbis-plugins/realplayer/filefmt/fvorbis.cpp
Index: fvorbis.cpp
===================================================================
RCS file: /usr/local/cvsroot/vorbis-plugins/realplayer/filefmt/fvorbis.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- fvorbis.cpp 2001/01/31 04:58:49 1.1
+++ fvorbis.cpp 2001/02/01 21:45:04 1.2
@@ -505,11 +505,75 @@
// required property: StreamCount
pHeaderObj->SetPropertyULONG32("StreamCount", 1);
+ // do the vorbis comments
+ IRMABuffer *pTitle = NULL;
+ IRMABuffer *pAuthor = NULL;
+ IRMABuffer *pCopyright = NULL;
+ char *pTitleData;
+ char *pAuthorData;
+ char *pCopyrightData;
+
+ int i;
+ printf("Looking for vorbis comments.. We have %d to choose from...\n", m_initial_c.comments);
+ for (i = 0; i < m_initial_c.comments; i++) {
+ printf("Comment %d: %s...\n", i, m_initial_c.user_comments[i]);
+ if (!strncasecmp("title", m_initial_c.user_comments[i], 5)) {
+ char *pos = strchr(m_initial_c.user_comments[i], '=');
+ if (pos == NULL) continue;
+ pos++;
+
+ printf("adding title comment of %s\n", pos);
+
+ m_pClassFactory->CreateInstance(CLSID_IRMABuffer, (void **)&pTitle);
+ if (pTitle == NULL) continue;
+
+ pTitle->SetSize(strlen(pos) + 1);
+ pTitleData = (char *)pTitle->GetBuffer();
+ strcpy(pTitleData, pos);
+
+ pHeaderObj->SetPropertyBuffer("Title", pTitle);
+ } else if (!strncasecmp("artist", m_initial_c.user_comments[i], 6)) {
+ char *pos = strchr(m_initial_c.user_comments[i], '=');
+ if (pos == NULL) continue;
+ pos++;
+
+ printf("adding author comment of %s\n", pos);
+
+ m_pClassFactory->CreateInstance(CLSID_IRMABuffer, (void **)&pAuthor);
+ if (pAuthor == NULL) continue;
+
+ pAuthor->SetSize(strlen(pos) + 1);
+ pAuthorData = (char *)pAuthor->GetBuffer();
+ strcpy(pAuthorData, pos);
+
+ pHeaderObj->SetPropertyBuffer("Author", pAuthor);
+ } else if (!strncasecmp("copyright", m_initial_c.user_comments[i], 9)) {
+ char *pos = strchr(m_initial_c.user_comments[i], '=');
+ if (pos == NULL) continue;
+ pos++;
+
+ printf("adding copyright comment of %s\n", pos);
+
+ m_pClassFactory->CreateInstance(CLSID_IRMABuffer, (void **)&pCopyright);
+ if (pCopyright == NULL) continue;
+
+ pCopyright->SetSize(strlen(pos) + 1);
+ pCopyrightData = (char *)pCopyright->GetBuffer();
+ strcpy(pCopyrightData, pos);
+
+ pHeaderObj->SetPropertyBuffer("Copyright", pCopyright);
+ }
+ }
+
+
// step 6: notify rma core that header object is ready
m_pStatus->FileHeaderReady(PN_STATUS_OK, pHeaderObj);
// release object since we're done with it
pHeaderObj->Release();
+ if (pTitle) pTitle->Release();
+ if (pAuthor) pAuthor->Release();
+ if (pCopyright) pCopyright->Release();
}
//printf("Exiting CreateFileHeaderObj(%d)\n", m_instno);
@@ -554,7 +618,7 @@
pStreamHeaderObj->SetPropertyCString("MimeType", pStringObj);
pStringObj->Release();
}
-
+
// notify RMA core
m_pStatus->StreamHeaderReady(PN_STATUS_OK, pStreamHeaderObj);
1.2 +1 -1 vorbis-plugins/realplayer/filefmt/make/linux-2.0-libc6-i386.mak
Index: linux-2.0-libc6-i386.mak
===================================================================
RCS file: /usr/local/cvsroot/vorbis-plugins/realplayer/filefmt/make/linux-2.0-libc6-i386.mak,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.0-libc6-i386.mak 2001/01/31 04:58:50 1.1
+++ linux-2.0-libc6-i386.mak 2001/02/01 21:45:04 1.2
@@ -45,7 +45,7 @@
INCLUDES = \
-I/usr/X11R6/include \
-I/usr/X11R6/include \
- -I/home/jack/download/rmasdk_6_0/include \
+ -I/home/jack/src/rmasdk_6_0/include \
-I.. \
-I./pub
1.2 +1 -1 vorbis-plugins/realplayer/render/make/linux-2.0-libc6-i386.mak
Index: linux-2.0-libc6-i386.mak
===================================================================
RCS file: /usr/local/cvsroot/vorbis-plugins/realplayer/render/make/linux-2.0-libc6-i386.mak,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.0-libc6-i386.mak 2001/01/31 04:58:51 1.1
+++ linux-2.0-libc6-i386.mak 2001/02/01 21:45:04 1.2
@@ -47,7 +47,7 @@
INCLUDES = \
-I/usr/X11R6/include \
-I/usr/X11R6/include \
- -I/home/jack/download/rmasdk_6_0/include \
+ -I/home/jack/src/rmasdk_6_0/include \
-I.. \
-I./pub
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list