MediaClient: Some more consistency in args order

This commit is contained in:
Dario Casalinuovo
2017-04-28 02:13:51 +02:00
parent a2be272b55
commit a33c8f4c2a
2 changed files with 12 additions and 12 deletions
@@ -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.
@@ -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();
}