From a33c8f4c2a7e6758751d402c382fae1cb9be7079 Mon Sep 17 00:00:00 2001 From: Dario Casalinuovo Date: Fri, 28 Apr 2017 01:59:25 +0200 Subject: [PATCH] MediaClient: Some more consistency in args order --- .../media/experimental/SimpleMediaClient.h | 6 +++--- .../media/experimental/SimpleMediaClient.cpp | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/headers/private/media/experimental/SimpleMediaClient.h b/headers/private/media/experimental/SimpleMediaClient.h index 27d9818063..cd4a539b8e 100755 --- a/headers/private/media/experimental/SimpleMediaClient.h +++ b/headers/private/media/experimental/SimpleMediaClient.h @@ -48,7 +48,7 @@ public: virtual BSimpleMediaInput* BeginInput(); virtual BSimpleMediaOutput* BeginOutput(); - void SetNotificationHook(notify_hook notifyHook = NULL, + void SetHook(notify_hook notifyHook = NULL, void* cookie = NULL); protected: @@ -58,7 +58,7 @@ protected: virtual void HandleSeek(bigtime_t mediaTime, bigtime_t performanceTime); - virtual status_t HandleFormatSuggestion(media_type type, + virtual status_t FormatSuggestion(media_type type, int32 quality, media_format* format); private: @@ -103,8 +103,8 @@ public: // Used to notify or inquire the client about what to do when certain // events happen. typedef status_t (*notify_hook)( - notification what, BMediaConnection* connection, + notification what, ...); // Use this to set your callbacks. diff --git a/src/kits/media/experimental/SimpleMediaClient.cpp b/src/kits/media/experimental/SimpleMediaClient.cpp index e3501b0f8c..0bc1d7640f 100644 --- a/src/kits/media/experimental/SimpleMediaClient.cpp +++ b/src/kits/media/experimental/SimpleMediaClient.cpp @@ -48,7 +48,7 @@ BSimpleMediaClient::BeginOutput() void -BSimpleMediaClient::SetNotificationHook(notify_hook notifyHook, void* cookie) +BSimpleMediaClient::SetHook(notify_hook notifyHook, void* cookie) { CALLED(); @@ -91,7 +91,7 @@ BSimpleMediaClient::HandleSeek(bigtime_t mediaTime, bigtime_t performanceTime) status_t -BSimpleMediaClient::HandleFormatSuggestion(media_type type, int32 quality, +BSimpleMediaClient::FormatSuggestion(media_type type, int32 quality, media_format* format) { if (fNotifyHook != NULL) { @@ -169,7 +169,7 @@ void BSimpleMediaInput::Connected(const media_format& format) { if (fNotifyHook != NULL) - (*fNotifyHook)(BSimpleMediaConnection::B_INPUT_CONNECTED, this); + (*fNotifyHook)(this, BSimpleMediaConnection::B_INPUT_CONNECTED); BMediaInput::Connected(format); } @@ -179,7 +179,7 @@ void BSimpleMediaInput::Disconnected() { if (fNotifyHook != NULL) - (*fNotifyHook)(BSimpleMediaConnection::B_INPUT_DISCONNECTED, this); + (*fNotifyHook)(this, BSimpleMediaConnection::B_INPUT_DISCONNECTED); BMediaConnection::Disconnected(); } @@ -191,7 +191,7 @@ BSimpleMediaInput::HandleBuffer(BBuffer* buffer) CALLED(); if (fProcessHook != NULL) - (*fProcessHook)((BMediaConnection*)this, buffer); + (*fProcessHook)(this, buffer); } @@ -214,8 +214,8 @@ status_t BSimpleMediaOutput::FormatProposal(media_format* format) { if (fNotifyHook != NULL) { - return (*fNotifyHook)(BSimpleMediaConnection::B_FORMAT_PROPOSAL, - this, format); + return (*fNotifyHook)(this, + BSimpleMediaConnection::B_FORMAT_PROPOSAL, format); } return BMediaOutput::FormatProposal(format); @@ -226,7 +226,7 @@ void BSimpleMediaOutput::Connected(const media_format& format) { if (fNotifyHook != NULL) - (*fNotifyHook)(BSimpleMediaConnection::B_OUTPUT_CONNECTED, this); + (*fNotifyHook)(this, BSimpleMediaConnection::B_OUTPUT_CONNECTED); BSimpleMediaConnection::Connected(format); } @@ -236,7 +236,7 @@ void BSimpleMediaOutput::Disconnected() { if (fNotifyHook != NULL) - (*fNotifyHook)(BSimpleMediaConnection::B_OUTPUT_DISCONNECTED, this); + (*fNotifyHook)(this, BSimpleMediaConnection::B_OUTPUT_DISCONNECTED); BSimpleMediaConnection::Disconnected(); }