Exemplo n.º 1
0
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();
        }
     }
}
Exemplo n.º 2
0
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();
            }
        }
    }
}
Exemplo n.º 3
0
void cTransfer::SetAudioTrack(eTrackType Type, const tTrackId *TrackId)
{
  if (cPlayer::device && cReceiver::device) {
     cPlayer::device->StartLiveView(false,true);
     cReceiver::device->SetAudioTrackDevice(Type,TrackId);
     cPlayer::device->StartLiveView(true,true);
     if (IS_DOLBY_TRACK(Type)) {
        int diff; int stat;
        if (cReceiver::device->pidHandles[cDevice::ptPcr].handle >= 0) {
           stat = ioctl(cReceiver::device->pidHandles[cDevice::ptPcr].handle,DMX_GET_AUDIO_SYNC_DIFF,&diff);
           dsyslog("cTransfer DEBUG: AC3 Audio Snyc Diff ioctl-Status %d Difference %d", stat, diff);
           }
        }
     }
}