Update of /cvsroot/mplayerplug-in/mplayerplug-in/Source
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27383/Source
Modified Files:
plugin-list.cpp plugin-support.cpp
Log Message:
Add support for realmedia pnm:// streaming media
Index: plugin-list.cpp
===================================================================
RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-list.cpp,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** plugin-list.cpp 15 Feb 2007 13:53:00 -0000 1.75
--- plugin-list.cpp 20 Aug 2007 13:51:08 -0000 1.76
***************
*** 866,869 ****
--- 866,903 ----
}
}
+ // simple playlist usually realmedia file
+ if (strncasecmp(buffer, "pnm", 3) == 0 && found == 0) {
+ if (DEBUG) {
+ printf("Search for PNM url File\n");
+ }
+ p = buffer_lower;
+ while (p != NULL) {
+ i = size - ((long) p - (long) buffer_lower);
+ p = (char *) memmem(p, i, "pnm://", 6);
+ if (p == NULL) {
+ break;
+ } else {
+ i = (long) p - (long) buffer_lower;
+ snprintf(url, 1024, "pnm://%s", buffer + i + 6);
+ sub = strchr(url, 0xd); // terminate on CR
+ if (sub != NULL)
+ sub[0] = '\0';
+ sub = strchr(url, 0xa); // terminate on line feed
+ if (sub != NULL)
+ sub[0] = '\0';
+ //sub = strchr(url, 0x20); // terminate on space
+ sub = strchr(url, EOF); // terminate on EOF
+ if (sub != NULL)
+ sub[0] = '\0';
+ if (DEBUG)
+ printf("URL: %s\n", url);
+ parent->playlist = 1;
+ addToList(instance, url, parent, -1, 0, -1,0);
+ p = p + strlen(url) + 1;
+ found = 1;
+ }
+ }
+ }
+
// simple playlist, usually old windows media
if ((strncasecmp(buffer, "http://", 7) == 0
Index: plugin-support.cpp
===================================================================
RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-support.cpp,v
retrieving revision 1.103
retrieving revision 1.104
diff -C2 -d -r1.103 -r1.104
*** plugin-support.cpp 4 Jan 2007 13:45:55 -0000 1.103
--- plugin-support.cpp 20 Aug 2007 13:51:09 -0000 1.104
***************
*** 181,184 ****
--- 181,185 ----
|| (strncasecmp(url, "smb://", 6) == 0)
|| (strncasecmp(url, "tv://", 5) == 0)
+ || (strncasecmp(url, "pnm://", 6) == 0)
|| (strncasecmp(url, "rtsp://", 7) == 0)) {
if (DEBUG > 1)
|