Changeset 20621


Ignore:
Timestamp:
03/23/13 02:20:32 (10 years ago)
Author:
nit
Message:

[titan] add audio delay

Location:
titan
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • titan/settings/titan-merge.cfg

    r20246 r20621  
    11debuglevel=10
     2audiodelaybitstream=/proc/stb/audio/audio_delay_bitstream
    23brightnessdev=/proc/stb/video/plane/psi_brightness
    34contrastdev=/proc/stb/video/plane/psi_contrast
  • titan/settings/titan.atemio510.cfg

    r20365 r20621  
    11debuglevel=10
     2audiodelaybitstream=/proc/stb/audio/audio_delay_bitstream
    23sataswitchdev=/proc/sata/sata_switch
    34brightnessdev=/proc/stb/video/plane/psi_brightness
  • titan/settings/titan.atemio7600.cfg

    r20365 r20621  
    11debuglevel=10
     2audiodelaybitstream=/proc/stb/audio/audio_delay_bitstream
    23sataswitchdev=/proc/sata/sata_switch
    34brightnessdev=/proc/stb/video/plane/psi_brightness
  • titan/settings/titan.atevio700.cfg

    r20365 r20621  
    11debuglevel=10
     2audiodelaybitstream=/proc/stb/audio/audio_delay_bitstream
    23sataswitchdev=/proc/sata/sata_switch
    34brightnessdev=/proc/stb/video/plane/psi_brightness
  • titan/settings/titan.atevio7000.cfg

    r20365 r20621  
    11debuglevel=10
     2audiodelaybitstream=/proc/stb/audio/audio_delay_bitstream
    23sataswitchdev=/proc/sata/sata_switch
    34brightnessdev=/proc/stb/video/plane/psi_brightness
  • titan/settings/titan.cfg

    r20365 r20621  
    11debuglevel=10
     2audiodelaybitstream=/proc/stb/audio/audio_delay_bitstream
    23sataswitchdev=/proc/sata/sata_switch
    34brightnessdev=/proc/stb/video/plane/psi_brightness
  • titan/titan/avsettings.h

    r20280 r20621  
    2626        struct skin* mode3d = getscreennode(avsettings, "mode3d");
    2727        struct skin* autosubtitle = getscreennode(avsettings, "autosubtitle");
     28        struct skin* audiodelaybitstream = getscreennode(avsettings, "audiodelaybitstream");
    2829        struct skin* tmp = NULL;
    2930
     
    142143        addchoicebox(autosubtitle, "1", _("yes"));
    143144        setchoiceboxselection(autosubtitle, getconfig("autosubtitle", NULL));
     145
     146        addchoicebox(audiodelaybitstream, "0", _("no"));
     147        addchoicebox(audiodelaybitstream, "350", "10ms");
     148        addchoicebox(audiodelaybitstream, "700", "20ms");
     149        addchoicebox(audiodelaybitstream, "1050", "30ms");
     150        addchoicebox(audiodelaybitstream, "1400", "40ms");
     151        addchoicebox(audiodelaybitstream, "1750", "50ms");
     152        addchoicebox(audiodelaybitstream, "2100", "60ms");
     153        addchoicebox(audiodelaybitstream, "2450", "70ms");
     154        addchoicebox(audiodelaybitstream, "2800", "80ms");
     155        addchoicebox(audiodelaybitstream, "3150", "90ms");
     156        addchoicebox(audiodelaybitstream, "3500", "100ms");
     157        setchoiceboxselection(audiodelaybitstream, getconfig("audiodelaybitstream", NULL));
    144158
    145159        drawscreen(avsettings, 0, 0);
     
    281295                                free(ret); ret = NULL;
    282296                        }
     297                        if(audiodelaybitstream->ret != NULL)
     298                        {
     299                                ret = getaudiodelaybitstream();
     300                                if(ostrcmp(ret, audiodelaybitstream->ret) != 0)
     301                                        setaudiodelaybitstream(audiodelaybitstream->ret);
     302                                free(ret); ret = NULL;
     303                        }
     304
    283305                        addconfigscreencheck("volautochangevalue", volautochangevalue, 0);
    284306                        status.volautochangevalue = getconfigint("volautochangevalue", NULL);
  • titan/titan/global.h

    r20612 r20621  
    42944294}
    42954295
     4296int setaudiodelaybitstream(char* value)
     4297{
     4298        debug(1000, "in");
     4299        char* audiodelaybitstreamdev = NULL;
     4300        int ret = 0;
     4301
     4302        audiodelaybitstreamdev = getconfig("audiodelaybitstreamdev", NULL);
     4303
     4304        if(audiodelaybitstreamdev != NULL && value != NULL)
     4305        {
     4306                debug(100, "set %s to %s", audiodelaybitstreamdev, value);
     4307                ret = writesys(audiodelaybitstreamdev, value, 0);
     4308                if(ret == 0) addconfig("audiodelaybitstream", value);
     4309                return ret;
     4310        }
     4311
     4312        debug(1000, "out");
     4313        return 0;
     4314}
     4315
     4316char* getaudiodelaybitstream()
     4317{
     4318        debug(1000, "in");
     4319        char *audiodelaybitstreamdev = NULL;
     4320        char *value = NULL;
     4321
     4322        audiodelaybitstreamdev = getconfig("audiodelaybitstreamdev", NULL);
     4323
     4324        if(audiodelaybitstreamdev == NULL)
     4325        {
     4326                debug(1000, "out -> NULL detect");
     4327                return NULL;
     4328        }
     4329
     4330        value = readsys(audiodelaybitstreamdev, 1);
     4331        if(value == NULL)
     4332        {
     4333                debug(1000, "out -> NULL detect");
     4334                return NULL;
     4335        }
     4336
     4337        debug(1000, "out");
     4338        return value;
     4339}
     4340
    42964341char* getpolicychoices()
    42974342{
  • titan/titan/titan.c

    r20533 r20621  
    562562        ret = setmode3d(getconfig("av_mode3d", NULL));
    563563        ret = setvfdbrightness(getconfigint("vfdbrightness", NULL));
     564        ret = setaudiodelaybitstream(getconfigint("audiodelaybitstream", NULL));
    564565        ret = addinetworkall(NULL);
    565566       
Note: See TracChangeset for help on using the changeset viewer.