MediaConnection: Remove format change protocol
This commit is contained in:
parent
7de0fd45cd
commit
182ec76b44
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user