[mythtv] [mythtv-commits] mythtv commit: r14781- intrunk/mythtv by nigel

David mythtv at theblains.net
Thu Nov 1 16:42:41 UTC 2007


> So what happens if I have three mythfrontend and two mythtv apps
> running
> on one machine? Auto-discovery only works for the first mythfrontend to
> start and not for the mythtv instances? Or do the second and third
> mythfrontends get into some undefined state?
> 
> I know the second and third mythfrontends still appear to work when
> using two different mysql.txt files, but is there something preventing
> this from working when using autodiscovery?
> 
> BTW I've noticed two other problems with the mythfrontend
> autodiscovery,
> it doesn't appear to be able to discover a mythbackend on the localhost
> so when I forget to use the "-d" switch it invariably connects to the
> wrong backend. And it doesn't check the myth protocol version before
> listing a backend or connecting to it, so when I'm developing it won't
> see the local backend and it will connect to the production backend
> which is incompatible with it. (I always run with "-d" to avoid these
> problems...)
> 
> -- Daniel
> 

Daniel,

This hasn't been tested but it should work in theory.

Each user would need to have a customized "~/.mythtv/config.xml" file.  In
particular, you would need to make sure the following settings are unique
for each user:

<Configuration>
	<UPnP>
		<SSDP>
			<Port>1900</Port>				<!--
May need to change... not sure -->
			<SearchPort>6546</SearchPort>		<!-- needs
to be unique per instance -->
		</SSDP>
		<MythFrontend>
			<ServicePort>6547</ServicePort>	<!-- needs to be
unique per instance -->
		</MythFrontend>
	</UPnP>
</Configuration>

Also, if you are having trouble locating the backend because it's on the
same machine, don't let any of the frontends use the SSDP settings above
since they are used by default in the backend.  (The backend settings are
the same as above, but are stored in the mythconverg database with key names
like: "UPnP/SSDP/Port" )

Ideally, the SSDP cache & search functions used by autodiscovery would be
shared by all processes.  I'll have to look into it for a future enhancement
(not sure yet how to do it in linux... in windows I would make it a windows
service and use ipc to communicate with it).  Actually, the best place for
the entire upnp stack is part of the kernel so all applications could use it
without port conflicts, but that's another story.

Let me know if you have any questions,

David B.







More information about the mythtv-dev mailing list