Explorar el Código

VLCMedia: Add parseStop method

Soomin Lee hace 5 años
padre
commit
1ec6bf544c
Se han modificado 2 ficheros con 15 adiciones y 0 borrados
  1. 8 0
      Headers/Public/VLCMedia.h
  2. 7 0
      Sources/VLCMedia.m

+ 8 - 0
Headers/Public/VLCMedia.h

@@ -549,6 +549,14 @@ typedef int VLCMediaParsingOptions;
 - (int)parseWithOptions:(VLCMediaParsingOptions)options timeout:(int)timeoutValue;
 
 /**
+ * Stop the parsing of the media
+ *
+ * When the media parsing is stopped, the mediaDidFinishParsing will
+ * be sent with the VLCMediaParsedStatusTimeout status.
+*/
+- (void)parseStop;
+
+/**
  * Add options to the media, that will be used to determine how
  * VLCMediaPlayer will read the media. This allow to use VLC advanced
  * reading/streaming options in a per-media basis

+ 7 - 0
Sources/VLCMedia.m

@@ -454,6 +454,13 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)
                                            -1);
 }
 
+- (void)parseStop
+{
+    if (p_md) {
+        libvlc_media_parse_stop(p_md);
+    }
+}
+
 - (void)addOption:(NSString *)option
 {
     if (p_md) {