void cDvbDevice::SetAudioTrackDevice(eTrackType Type) { const tTrackId *TrackId = GetTrack(Type); if (TrackId && TrackId->id) { SetAudioBypass(false); if (IS_AUDIO_TRACK(Type) || (IS_DOLBY_TRACK(Type) && SetAudioBypass(true))) { if (pidHandles[ptAudio].pid && pidHandles[ptAudio].pid != TrackId->id) { DetachAll(pidHandles[ptAudio].pid); if (ciHandler) ciHandler->SetPid(pidHandles[ptAudio].pid, false); pidHandles[ptAudio].pid = TrackId->id; SetPid(&pidHandles[ptAudio], ptAudio, true); if (ciHandler) { ciHandler->SetPid(pidHandles[ptAudio].pid, true); ciHandler->StartDecrypting(); } } } else if (IS_DOLBY_TRACK(Type)) { if (setTransferModeForDolbyDigital == 0) return; // Currently this works only in Transfer Mode ForceTransferMode(); } } }
void cDvbHdFfDevice::SetAudioTrackDevice(eTrackType Type) { //printf("SetAudioTrackDevice %d\n", Type); const tTrackId *TrackId = GetTrack(Type); if (TrackId && TrackId->id) { int streamType = 0; cChannel * channel = Channels.GetByNumber(CurrentChannel()); if (channel) { if (IS_AUDIO_TRACK(Type)) streamType = channel->Atype(Type - ttAudioFirst); else if (IS_DOLBY_TRACK(Type)) streamType = channel->Dtype(Type - ttDolbyFirst); } //printf("SetAudioTrackDevice new %d %d, current %d\n", TrackId->id, streamType, pidHandles[ptAudio].pid); if (pidHandles[ptAudio].pid && pidHandles[ptAudio].pid != TrackId->id) { DetachAll(pidHandles[ptAudio].pid); if (CamSlot()) CamSlot()->SetPid(pidHandles[ptAudio].pid, false); pidHandles[ptAudio].pid = TrackId->id; pidHandles[ptAudio].streamType = streamType; SetPid(&pidHandles[ptAudio], ptAudio, true); if (CamSlot()) { CamSlot()->SetPid(pidHandles[ptAudio].pid, true); CamSlot()->StartDecrypting(); } } } }