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:
Dario Casalinuovo
2016-02-09 20:15:05 +01:00
parent cc0d365ef7
commit d23913f2d9
2 changed files with 3 additions and 4 deletions
+1 -3
View File
@@ -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);
} }
+2 -1
View File
@@ -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;
} }