bool MediaPluginGStreamer010::unload () { if (!mDoneInit) return false; // error DEBUGMSG("unloading media..."); // stop getting callbacks for this bus g_source_remove(mBusWatchID); mBusWatchID = 0; if (mPlaybin) { llgst_element_set_state (mPlaybin, GST_STATE_NULL); llgst_object_unref (GST_OBJECT (mPlaybin)); mPlaybin = NULL; } if (mPump) { g_main_loop_quit(mPump); mPump = NULL; } mVideoSink = NULL; setStatus(STATUS_NONE); return true; }
BOOL LLMediaImplGStreamer:: unload () { if (mPlaybin) { llgst_element_set_state (mPlaybin, GST_STATE_NULL); llgst_object_unref (GST_OBJECT (mPlaybin)); mPlaybin = NULL; } if (mPump) { g_main_loop_quit(mPump); mPump = NULL; } if (mediaData) { if (ownBuffer) { delete [] mediaData; mediaData = NULL; } } mVideoSink = NULL; return TRUE; }
bool LLMediaImplGStreamer:: unload () { DEBUGMSG("unloading media..."); if (mPlaybin) { llgst_element_set_state (mPlaybin, GST_STATE_NULL); llgst_object_unref (GST_OBJECT (mPlaybin)); mPlaybin = NULL; } if (mPump) { g_main_loop_quit(mPump); mPump = NULL; } if (mediaData) { delete mediaData; mediaData = NULL; } mVideoSink = NULL; return true; }
bool MediaPluginGStreamer010::stop() { DEBUGMSG("stopping media..."); // todo: error-check this? llgst_element_set_state(mPlaybin, GST_STATE_READY); return true; }
bool MediaPluginGStreamer010::pause() { DEBUGMSG("pausing media..."); // todo: error-check this? llgst_element_set_state(mPlaybin, GST_STATE_PAUSED); return true; }
bool LLMediaImplGStreamer:: play () { DEBUGMSG("playing media..."); // todo: error-check this? llgst_element_set_state(mPlaybin, GST_STATE_PLAYING); return true; }
BOOL LLMediaImplGStreamer:: pause () { llinfos << "pausing media..." << llendl; // todo: error-check this? llgst_element_set_state(mPlaybin, GST_STATE_PAUSED); return LLMediaMovieBase::pause(); };
bool MediaPluginGStreamer010::play(double rate) { // NOTE: we don't actually support non-natural rate. DEBUGMSG("playing media... rate=%f", rate); // todo: error-check this? llgst_element_set_state(mPlaybin, GST_STATE_PLAYING); return true; }
BOOL LLMediaImplGStreamer:: stop () { llinfos << "stopping media..." << llendl; // todo: error-check this? llgst_element_set_state(mPlaybin, GST_STATE_READY); BOOL rtn = LLMediaMovieBase::stop(); setCurrentMode(LLMediaImplGStreamer::ModeStopped);//? return rtn; }