Prechádzať zdrojové kódy

VLCMedia: Add isEqual

Mike JS. Choi 7 rokov pred
rodič
commit
005bcd7086
1 zmenil súbory, kde vykonal 6 pridanie a 0 odobranie
  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) {