Explorar el Código

VLCMedia: Add isEqual

Mike JS. Choi hace 7 años
padre
commit
005bcd7086
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      Sources/VLCMedia.m

+ 6 - 0
Sources/VLCMedia.m

@@ -366,6 +366,12 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)
     return p_md == [media libVLCMediaDescriptor] ? NSOrderedSame : NSOrderedAscending;
 }
 
+- (BOOL)isEqual:(id)other
+{
+    return ([other isKindOfClass: [VLCMedia class]] &&
+            [other libVLCMediaDescriptor] == p_md);
+}
+
 - (VLCTime *)length
 {
     if (!_length) {