MediaClient: Some more consistency in args order
This commit is contained in:
@@ -48,7 +48,7 @@ public:
|
|||||||
virtual BSimpleMediaInput* BeginInput();
|
virtual BSimpleMediaInput* BeginInput();
|
||||||
virtual BSimpleMediaOutput* BeginOutput();
|
virtual BSimpleMediaOutput* BeginOutput();
|
||||||
|
|
||||||
void SetNotificationHook(notify_hook notifyHook = NULL,
|
void SetHook(notify_hook notifyHook = NULL,
|
||||||
void* cookie = NULL);
|
void* cookie = NULL);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -58,7 +58,7 @@ protected:
|
|||||||
virtual void HandleSeek(bigtime_t mediaTime,
|
virtual void HandleSeek(bigtime_t mediaTime,
|
||||||
bigtime_t performanceTime);
|
bigtime_t performanceTime);
|
||||||
|
|
||||||
virtual status_t HandleFormatSuggestion(media_type type,
|
virtual status_t FormatSuggestion(media_type type,
|
||||||
int32 quality, media_format* format);
|
int32 quality, media_format* format);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -103,8 +103,8 @@ public:
|
|||||||
// Used to notify or inquire the client about what to do when certain
|
// Used to notify or inquire the client about what to do when certain
|
||||||
// events happen.
|
// events happen.
|
||||||
typedef status_t (*notify_hook)(
|
typedef status_t (*notify_hook)(
|
||||||
notification what,
|
|
||||||
BMediaConnection* connection,
|
BMediaConnection* connection,
|
||||||
|
notification what,
|
||||||
...);
|
...);
|
||||||
|
|
||||||
// Use this to set your callbacks.
|
// Use this to set your callbacks.
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ BSimpleMediaClient::BeginOutput()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BSimpleMediaClient::SetNotificationHook(notify_hook notifyHook, void* cookie)
|
BSimpleMediaClient::SetHook(notify_hook notifyHook, void* cookie)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ BSimpleMediaClient::HandleSeek(bigtime_t mediaTime, bigtime_t performanceTime)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BSimpleMediaClient::HandleFormatSuggestion(media_type type, int32 quality,
|
BSimpleMediaClient::FormatSuggestion(media_type type, int32 quality,
|
||||||
media_format* format)
|
media_format* format)
|
||||||
{
|
{
|
||||||
if (fNotifyHook != NULL) {
|
if (fNotifyHook != NULL) {
|
||||||
@@ -169,7 +169,7 @@ void
|
|||||||
BSimpleMediaInput::Connected(const media_format& format)
|
BSimpleMediaInput::Connected(const media_format& format)
|
||||||
{
|
{
|
||||||
if (fNotifyHook != NULL)
|
if (fNotifyHook != NULL)
|
||||||
(*fNotifyHook)(BSimpleMediaConnection::B_INPUT_CONNECTED, this);
|
(*fNotifyHook)(this, BSimpleMediaConnection::B_INPUT_CONNECTED);
|
||||||
|
|
||||||
BMediaInput::Connected(format);
|
BMediaInput::Connected(format);
|
||||||
}
|
}
|
||||||
@@ -179,7 +179,7 @@ void
|
|||||||
BSimpleMediaInput::Disconnected()
|
BSimpleMediaInput::Disconnected()
|
||||||
{
|
{
|
||||||
if (fNotifyHook != NULL)
|
if (fNotifyHook != NULL)
|
||||||
(*fNotifyHook)(BSimpleMediaConnection::B_INPUT_DISCONNECTED, this);
|
(*fNotifyHook)(this, BSimpleMediaConnection::B_INPUT_DISCONNECTED);
|
||||||
|
|
||||||
BMediaConnection::Disconnected();
|
BMediaConnection::Disconnected();
|
||||||
}
|
}
|
||||||
@@ -191,7 +191,7 @@ BSimpleMediaInput::HandleBuffer(BBuffer* buffer)
|
|||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
if (fProcessHook != NULL)
|
if (fProcessHook != NULL)
|
||||||
(*fProcessHook)((BMediaConnection*)this, buffer);
|
(*fProcessHook)(this, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -214,8 +214,8 @@ status_t
|
|||||||
BSimpleMediaOutput::FormatProposal(media_format* format)
|
BSimpleMediaOutput::FormatProposal(media_format* format)
|
||||||
{
|
{
|
||||||
if (fNotifyHook != NULL) {
|
if (fNotifyHook != NULL) {
|
||||||
return (*fNotifyHook)(BSimpleMediaConnection::B_FORMAT_PROPOSAL,
|
return (*fNotifyHook)(this,
|
||||||
this, format);
|
BSimpleMediaConnection::B_FORMAT_PROPOSAL, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
return BMediaOutput::FormatProposal(format);
|
return BMediaOutput::FormatProposal(format);
|
||||||
@@ -226,7 +226,7 @@ void
|
|||||||
BSimpleMediaOutput::Connected(const media_format& format)
|
BSimpleMediaOutput::Connected(const media_format& format)
|
||||||
{
|
{
|
||||||
if (fNotifyHook != NULL)
|
if (fNotifyHook != NULL)
|
||||||
(*fNotifyHook)(BSimpleMediaConnection::B_OUTPUT_CONNECTED, this);
|
(*fNotifyHook)(this, BSimpleMediaConnection::B_OUTPUT_CONNECTED);
|
||||||
|
|
||||||
BSimpleMediaConnection::Connected(format);
|
BSimpleMediaConnection::Connected(format);
|
||||||
}
|
}
|
||||||
@@ -236,7 +236,7 @@ void
|
|||||||
BSimpleMediaOutput::Disconnected()
|
BSimpleMediaOutput::Disconnected()
|
||||||
{
|
{
|
||||||
if (fNotifyHook != NULL)
|
if (fNotifyHook != NULL)
|
||||||
(*fNotifyHook)(BSimpleMediaConnection::B_OUTPUT_DISCONNECTED, this);
|
(*fNotifyHook)(this, BSimpleMediaConnection::B_OUTPUT_DISCONNECTED);
|
||||||
|
|
||||||
BSimpleMediaConnection::Disconnected();
|
BSimpleMediaConnection::Disconnected();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user