MediaConnection: Remove format change protocol

This commit is contained in:
Barrett17 2018-03-01 01:39:55 +01:00
parent 7de0fd45cd
commit 182ec76b44
3 changed files with 2 additions and 36 deletions

View File

@ -125,8 +125,6 @@ protected:
virtual ~BMediaInput();
// Callbacks
virtual status_t FormatChanged(const media_format& format);
virtual void HandleBuffer(BBuffer* buffer);
virtual void Connected(const media_format& format);
@ -159,12 +157,8 @@ protected:
// Callbacks
virtual status_t PrepareToConnect(media_format* format);
virtual status_t FormatProposal(media_format* format);
// TODO: Do we really want this?
virtual status_t FormatChangeRequested(media_format* format);
// When a connection is not binded with another, and you really don't want
// to use BMediaGraph it's your job to send the buffer to the connection
// you want. You might want to ovverride it so that you can track something,

View File

@ -260,12 +260,7 @@ BMediaClientNode::FormatChanged(const media_source& source,
int32 tag, const media_format& format)
{
CALLED();
BMediaInput* conn = fOwner->_FindInput(dest);
if (conn == NULL)
return B_MEDIA_BAD_DESTINATION;
return conn->FormatChanged(format);
return B_ERROR;
}
@ -314,11 +309,7 @@ BMediaClientNode::FormatChangeRequested(const media_source& source,
{
CALLED();
BMediaOutput* conn = fOwner->_FindOutput(source);
if (conn == NULL)
return B_MEDIA_BAD_DESTINATION;
return conn->FormatChangeRequested(format);
return B_ERROR;
}

View File

@ -188,18 +188,6 @@ BMediaInput::~BMediaInput()
}
status_t
BMediaInput::FormatChanged(const media_format& format)
{
if (!format_is_compatible(format, AcceptedFormat()))
return B_MEDIA_BAD_FORMAT;
SetAcceptedFormat(format);
return B_OK;
}
void
BMediaInput::HandleBuffer(BBuffer* buffer)
{
@ -291,13 +279,6 @@ BMediaOutput::FormatProposal(media_format* format)
}
status_t
BMediaOutput::FormatChangeRequested(media_format* format)
{
return B_ERROR;
}
status_t
BMediaOutput::SendBuffer(BBuffer* buffer)
{