BMediaRecorder: Return the actual accepted format
* Allow SoundRecorder to record without the need of a system mixer in front, for the nodes I can test. * Solve other format related problems.
This commit is contained in:
@@ -413,13 +413,11 @@ BMediaRecorder::_Connect(const media_node& node,
|
||||
if (ourOutput.source == media_source::null)
|
||||
return B_MEDIA_BAD_SOURCE;
|
||||
|
||||
fOutputSource = ourOutput.source;
|
||||
|
||||
// find our Node's free input
|
||||
media_input ourInput;
|
||||
fNode->GetInput(&ourInput);
|
||||
|
||||
return BMediaRoster::CurrentRoster()->Connect(fOutputSource,
|
||||
return BMediaRoster::CurrentRoster()->Connect(ourOutput.source,
|
||||
ourInput.destination, &ourFormat, &ourOutput, &ourInput,
|
||||
BMediaRoster::B_CONNECT_MUTED);
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ BMediaRecorderNode::SetAcceptedFormat(const media_format& format)
|
||||
{
|
||||
CALLED();
|
||||
|
||||
fInput.format = format;
|
||||
fOKFormat = format;
|
||||
}
|
||||
|
||||
@@ -113,7 +114,7 @@ BMediaRecorderNode::AcceptedFormat() const
|
||||
{
|
||||
CALLED();
|
||||
|
||||
return fOKFormat;
|
||||
return fInput.format;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user