ソースを参照

VLCMedia: Add isEqual

Mike JS. Choi 7 年 前
コミット
005bcd7086
1 ファイル変更6 行追加0 行削除
  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) {