void XMH323Connection::OnDecodingVideoFailed(OpalMediaFormat & mediaFormat, INT ignore) { excludedFormats += mediaFormat; // Request a mode change, use the existing audio / H.224 channels and all available video formats PString modePrefix = ""; OpalMediaStreamPtr audioStream = GetMediaStream(OpalMediaType::Audio(), true); OpalMediaStreamPtr h224Stream = GetMediaStream(OpalH224MediaType::MediaType(), true); if (audioStream != NULL) { modePrefix += audioStream->GetMediaFormat().GetName() + "\t"; } if (h224Stream != NULL) { modePrefix += h224Stream->GetMediaFormat().GetName() + "\t"; } PString modes = ""; OpalMediaFormatList mediaFormats = GetMediaFormats(); mediaFormats -= excludedFormats; for (PINDEX i = 0; i < mediaFormats.GetSize(); i++) { const OpalMediaFormat & mediaFormat = mediaFormats[i]; if (mediaFormat.GetMediaType() == OpalMediaType::Video()) { modes += modePrefix + mediaFormat.GetName() + "\n"; } } PTRACE(1, "XMH323Con\tRequest mode change since can't decode incoming video stream"); RequestModeChange(modes); }
void RemoteSourceStreamInfo::StartReceiving() { if (mReceiving || mPipelines.empty()) { return; } mReceiving = true; SourceMediaStream* source = GetMediaStream()->GetInputStream()->AsSourceStream(); source->SetPullEnabled(true); // AdvanceKnownTracksTicksTime(HEAT_DEATH_OF_UNIVERSE) means that in // theory per the API, we can't add more tracks before that // time. However, the impl actually allows it, and it avoids a whole // bunch of locking that would be required (and potential blocking) // if we used smaller values and updated them on each NotifyPull. source->AdvanceKnownTracksTime(STREAM_TIME_MAX); CSFLogDebug(logTag, "Finished adding tracks to MediaStream %p", source); }