/** * Deletes an XML reader. * @param reader XML reader created with xml_RaederCreate(). */ void xml_ReaderDelete(xml_reader_t *reader) { if (reader->p_stream) module_stop(reader, reader->p_module); module_release(reader->p_module); vlc_object_release(reader); }
size_t module_pause(void) { DBG("pause requested\n"); if (cicero_speaking) { DBG("Pause not supported by cicero\n"); cicero_pause_requested = 1; module_stop(); return -1; } cicero_pause_requested = 0; return 0; }
int module_close(void) { DBG("cicero: close()\n"); if (cicero_speaking) { module_stop(); } if (module_terminate_thread(cicero_speaking_thread) != 0) return -1; sem_destroy(&cicero_semaphore ); return 0; }
/** * Resets an existing XML reader. * If you need to parse several XML files, this function is much faster than * xml_ReaderCreate() and xml_ReaderDelete() combined. * If the stream parameter is NULL, the XML reader will be stopped, but * not restarted until the next xml_ReaderReset() call with a non-NULL stream. * * @param reader XML reader to reinitialize * @param stream new stream to read XML data from (or NULL) * @return reader on success, * NULL on error (in that case, the reader is destroyed). */ xml_reader_t *xml_ReaderReset(xml_reader_t *reader, stream_t *stream) { if (reader->p_stream) module_stop(reader, reader->p_module); reader->p_stream = stream; if ((stream != NULL) && module_start(reader, reader->p_module)) { module_release(reader->p_module); vlc_object_release(reader); return NULL; } return reader; }
int module_stop_all (modhash_t *mh) { zlist_t *uuids; char *uuid; int rc = -1; if (!(uuids = zhash_keys (mh->zh_byuuid))) oom (); uuid = zlist_first (uuids); while (uuid) { module_t *p = zhash_lookup (mh->zh_byuuid, uuid); assert (p != NULL); if (module_stop (p, NULL) < 0) goto done; uuid = zlist_next (uuids); } rc = 0; done: zlist_destroy (&uuids); return rc; }
void do_stop(void) { module_stop(); return; }