Make a separate MediaPlayer2Base::NotifyCallback

This avoids the collision with notify_callback_f.

Also, this CL should fix the potential use-after-free in notify().

Test: Builds properly
Bug: 70546581
Change-Id: Ia4919522d00c94591d6f14a27cb6465a8c4efaeb
diff --git a/media/libmedia/MediaPlayer2Factory.h b/media/libmedia/MediaPlayer2Factory.h
index 5813b2e..799b5f3 100644
--- a/media/libmedia/MediaPlayer2Factory.h
+++ b/media/libmedia/MediaPlayer2Factory.h
@@ -65,8 +65,8 @@
                                       const sp<DataSource> &source);
 
     static sp<MediaPlayer2Base> createPlayer(player2_type playerType,
-                                             void* cookie,
-                                             notify_callback_f notifyFunc,
+                                             const wp<MediaPlayer2Engine> &client,
+                                             MediaPlayer2Base::NotifyCallback notifyFunc,
                                              pid_t pid);
 
     static void registerBuiltinFactories();