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)
|
if (ourOutput.source == media_source::null)
|
||||||
return B_MEDIA_BAD_SOURCE;
|
return B_MEDIA_BAD_SOURCE;
|
||||||
|
|
||||||
fOutputSource = ourOutput.source;
|
|
||||||
|
|
||||||
// find our Node's free input
|
// find our Node's free input
|
||||||
media_input ourInput;
|
media_input ourInput;
|
||||||
fNode->GetInput(&ourInput);
|
fNode->GetInput(&ourInput);
|
||||||
|
|
||||||
return BMediaRoster::CurrentRoster()->Connect(fOutputSource,
|
return BMediaRoster::CurrentRoster()->Connect(ourOutput.source,
|
||||||
ourInput.destination, &ourFormat, &ourOutput, &ourInput,
|
ourInput.destination, &ourFormat, &ourOutput, &ourInput,
|
||||||
BMediaRoster::B_CONNECT_MUTED);
|
BMediaRoster::B_CONNECT_MUTED);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ BMediaRecorderNode::SetAcceptedFormat(const media_format& format)
|
|||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
|
fInput.format = format;
|
||||||
fOKFormat = format;
|
fOKFormat = format;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,7 +114,7 @@ BMediaRecorderNode::AcceptedFormat() const
|
|||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
return fOKFormat;
|
return fInput.format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user