public static int CompareVideoStreams(
TSVideoStream x,
TSVideoStream y)
{
if (x == null && y == null)
{
return 0;
}
else if (x == null && y != null)
{
return 1;
}
else if (x != null && y == null)
{
return -1;
}
else
{
if (x.Height > y.Height)
{
return -1;
}
else if (y.Height > x.Height)
{
return 1;
}
else if (x.PID > y.PID)
{
return 1;
}
else if (y.PID > x.PID)
{
return -1;
}
else
{
return 0;
}
}
}