multiple maps for different devices

Kurt
2012-03-25
2013-05-30
  • Kurt
    Kurt
    2012-03-25

    I seem to have conflicting 'mapping needs:"
    Wev sites I read say I must modify my config.xml with the following for my Samsung DLNA tv:
    <map from="avi" to="video/mpeg"/>
    To use my PS3 I need the following:
    <map from=“avi” to=“video/divx”/>
    Is it possible to have one mapping for one device, and another mapping for another device?
    Kurt

     
  • Henrik Holst
    Henrik Holst
    2012-03-31

    Unfortunately no

     
  • prioryjim
    prioryjim
    2012-10-16

    Is it possible to run two or more instances of mediatomb on different ports using different config.xml ?

    Also
    If it were possible to get some form of client ID it might be possible to pass this as a parameter into the transcode script, and thus decide in the script what transcoding is required. Don't know if this is possible.

    Thanks
    Jim

     
  • A. Francois
    A. Francois
    2012-12-28

    The patch uploaded here should help : https://sourceforge.net/tracker/?func=detail&aid=3598743&group_id=129766&atid=715782

    The patch maintains a list of detected devices and the mapping is adapted at each request from the device.
    For the moment, the "per device mapping" is hardcoded at buikd time in the file tombupnp/upnp/src/genlib/net/http/webserver.c  :

       //  change "x-matroska" by "x-mkv", for samsung devices only
       char *newtype;
       if((strcmp(finfo.content_type, "video/x-matroska")==0)) {
           if(ssdpdevice_servermatch(&GlobalSsdpDevices, info->foreign_ip_addr.s_addr, "samsung")) {
              // change is made in two steps : free the previous string, malloc a new one
              if((newtype= (char *) strdup("video/x-mkv"))) {
                  free(finfo.content_type);
                  finfo.content_type = newtype;
              }
           }
       }
    

    In your case, duplicate this block to change "video/mpeg" to "video/divx" for PS3 devices (I don't knowhow to determine a PS3 device but the SSDP NOTIFY should contain a specific substring)

     
  • prioryjim
    prioryjim
    2012-12-29

    Thanks I will look into this
    Jim

     

  • Anonymous
    2013-01-24

    would be serviio acting in this way ?