nsIPluginInstance* pluginInstance = (nsIPluginInstance*) instance->pdata;
CPluginInstancePeer* peer = (CPluginInstancePeer*) instance->pdata; nsIPluginInstance* pluginInstance = peer->GetInstance();
NPP_NewStream(NPP instance,	      NPMIMEType type,	      NPStream *stream, 	      NPBool seekable,	      PRUint16 *stype){    // XXX - How do you set the fields of the peer stream and stream?    // XXX - Looks like these field will have to be created since    // XXX - We are not using np_stream.   //    TRACE("NPP_NewStream\n");    if (instance == NULL)        return NPERR_INVALID_INSTANCE_ERROR;				    // Create a new plugin stream peer and plugin stream.    CPluginStreamPeer* speer = new CPluginStreamPeer((nsMIMEType)type, stream,                                                     (PRBool)seekable, stype);     if (speer == NULL) return NPERR_OUT_OF_MEMORY_ERROR;    speer->AddRef();    nsIPluginStream* pluginStream = NULL;     nsIPluginInstance* pluginInstance = (nsIPluginInstance*) instance->pdata;    nsresult err = pluginInstance->NewStream(speer, &pluginStream);    if (err) return NPERR_OUT_OF_MEMORY_ERROR;    speer->Release();        if (pluginStream == NULL)        return NPERR_OUT_OF_MEMORY_ERROR;		    stream->pdata = (void*) pluginStream;    err = pluginStream->GetStreamType((nsPluginStreamType*)stype);    assert(err == NS_OK);	    return NPERR_NO_ERROR;}