Since the Pipeline Extensibility is not restricted to any content source you do not have a proper API for this scenario, but you can try achieving it in a not elegant and dirty way.
On every input item you can get the item's URL from the XML and compere the start address to the content source start address and if they match you can process the item else move on to the next input item.
For example:
Get the item Url:
XDocument inputDoc = XDocument.Load(args[0]);
// retrieve the url input property value
string url = (from cp in inputDoc.Descendants("CrawledProperty")
where new Guid(cp.Attribute("propertySet").Value).Equals(PROPERTYSET_SPECIAL) &&
cp.Attribute("propertyName").Value == "url" &&
cp.Attribute("varType").Value == "31"
select cp.Value).First();
Check if content source contains item url:
public bool CheckSourceAdress(string contentSource,string itemUrl)
{
string siteURL = SPContext.Current.Site.Url;
string contentSSA = HttpUtility.UrlDecode(HttpContext.Current.Request["ConName"]);
using (SPSite site = new SPSite(siteURL))
{
// Gets the service context for a selected site
SPServiceContext serviceContext = SPServiceContext.GetContext(site);
// Access the service proxy instance of search application proxy.
SearchServiceApplicationProxy searchApplicationProxy = serviceContext.GetDefaultProxy(typeof(SearchServiceApplicationProxy)) as SearchServiceApplicationProxy;
SearchServiceApplication searchApplication = Microsoft.Office.Server.Search.Administration.SearchService.Service.SearchApplications.GetValue<SearchServiceApplication>(contentSSA);
if (searchApplication != null)
{
Microsoft.Office.Server.Search.Administration.Content sspContent = new Microsoft.Office.Server.Search.Administration.Content(searchApplication);
ContentSourceCollection sspContentSources = sspContent.ContentSources;
foreach (ContentSource cs in sspContentSources)
{
if (cs.Name == contentSource)
{
foreach (Uri url in cs.StartAddresses)
{
if(itemUrl.Contains(url))
return True;
}
break;
}
else
return False;
}
}
}
return sources;
}