printf("debug: edburns: ns4xPluginStreamListener::OnStartBinding() done switch\n");  return NS_OK;
NS_TRY_SAFE_CALL_RETURN(error, CallNPP_NewStreamProc(callbacks->newstream, npp, (char *)contentType, &mNPStream, seekable, &streamType), mInst->fLibrary);  NPP_PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("NPP NewStream called: this=%p, npp=%p, mime=%s, seek=%d, type=%d, return=%d, url=%s\n", this, npp, (char *)contentType, seekable, streamType, error, mNPStream.url));  if(error != NPERR_NO_ERROR) return NS_ERROR_FAILURE;   switch(streamType) { case NP_NORMAL: mStreamType = nsPluginStreamType_Normal; break; case NP_ASFILEONLY: mStreamType = nsPluginStreamType_AsFileOnly; break; case NP_ASFILE: mStreamType = nsPluginStreamType_AsFile; break; case NP_SEEK: mStreamType = nsPluginStreamType_Seek; break; default: return NS_ERROR_FAILURE; }   mStreamBuffer = (char*) PR_Malloc((PRUint32)MAX_PLUGIN_NECKO_BUFFER); if (!mStreamBuffer) { NS_ASSERTION(PR_FALSE,"failed to create 4.x plugin stream buffer or size MAX_PLUGIN_NECKO_BUFFER"); return NS_ERROR_OUT_OF_MEMORY; }  mStreamStarted = PR_TRUE; return NS_OK;
ns4xPluginStreamListener::OnStartBinding(nsIPluginStreamInfo* pluginInfo){    printf("debug: edburns: ns4xPluginStreamListener::OnStartBinding()\n");	NPP npp;	const NPPluginFuncs *callbacks;	PRBool seekable;	nsMIMEType contentType;	PRUint16 streamType = NP_NORMAL;	NPError error;    mNPStream.ndata        = (void*) this;    pluginInfo->GetURL(&mNPStream.url);	mNPStream.notifyData   = mNotifyData; 	pluginInfo->GetLength((PRUint32*)&(mNPStream.end));    pluginInfo->GetLastModified((PRUint32*)&(mNPStream.lastmodified));	pluginInfo->IsSeekable(&seekable);	pluginInfo->GetContentType(&contentType);    mInst->GetCallbacks(&callbacks);    mInst->GetNPP(&npp);    printf("debug: edburns: ns4xPluginStreamListener::OnStartBinding() done GetNPP()\n");#if !TARGET_CARBON    printf("debug: edburns: ns4xPluginStreamListener::OnStartBinding() about to call CallNPP_NewStreamProc: callbacks->newstream: %p\n", callbacks->newstream);// pinkerton// relies on routine descriptors, not present in carbon. We need to fix this.    error = CallNPP_NewStreamProc(callbacks->newstream,                                          npp,                                          (char *)contentType,                                          &mNPStream,                                          seekable,                                          &streamType);	if(error != NPERR_NO_ERROR)		return NS_ERROR_FAILURE;#endif	// translate the old 4x style stream type to the new one	switch(streamType)	{		case NP_NORMAL : mStreamType = nsPluginStreamType_Normal; break;		case NP_ASFILEONLY : mStreamType = nsPluginStreamType_AsFileOnly; break;		case NP_ASFILE : mStreamType = nsPluginStreamType_AsFile; break;		case NP_SEEK : mStreamType = nsPluginStreamType_Seek; break;		default: return NS_ERROR_FAILURE;	}    printf("debug: edburns: ns4xPluginStreamListener::OnStartBinding() done switch\n");	    return NS_OK;}