[mythtv] Beginner's code question

Jelle De Loecker skerit at kipdola.com
Wed Jan 28 21:46:19 UTC 2009


Hi everyone,

I'm trying to get LiveTV to work for people with Multirec (like me) but
I'm quite lost in the sourcecode (and there aren't that many comments,
really)

Below is an excerpt from the TvRec::StartRecording function, I'm curious
about a few things:

* If the other recorder is busy, but the input is not in a shared input
group, why do we label it as "not busy"? What if someone else is
watching it? (I wonder what we do with this list afterwards)

* Is StartRecording called every time you change the channel?

* Where do we "push_[it]_back" to?

BEGIN CODE:

// Stop remote recordings if needed
for (uint i = 0; i < cardids.size(); i++)
{
	TunedInputInfo busy_input;
	bool is_busy = RemoteIsBusy(cardids[i], busy_input);

	// if the other recorder is busy, but the input is
	// not in a shared input group, then as far as we're
	// concerned here it isn't busy.
	if (is_busy)
	{
	is_busy = (bool) igrp.GetSharedInputGroup(
		busy_input.inputid, rcinfo->inputid);
	}

	if (is_busy && !sourceid)
	{
	mplexid  = (*it).info->GetMplexID();
	sourceid = (*it).info->sourceid;
	}

	if (is_busy &&
	((sourceid != busy_input.sourceid) ||
		(mplexid  != busy_input.mplexid)))
	{
	states.push_back((TVState) RemoteGetState(cardids[i]));
	cardids2.push_back(cardids[i]);
	}
}



More information about the mythtv-dev mailing list