소스 검색

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) {