Hi 5412; basically declaring martial law is a total 'Last resort' situation which would only happen after true chaos had already broken out, mainly because until it does, the military component of it has huge issues with using force on anyone as you surmised. And, essentially, the Posse Comitatus Act only permits the restoration of order, not pre-emptive use of military force to supplant civil authority.
What would actually happen if there were total chaos in the streets depends on a lot of variables that are scenario-dependent, such as whether Guard or Regulars would be used (The Army Reserve has been completely gutted over the last 20 years and isn't much of a factor as a force provider, it paid the political bills to preserve large Guard organizations and so lost all its large combat arms formations and is now mostly combat service support units, plus some combat support ones). Another big factor is just exactly what would be the underlying cause of the chaos in the first place.
However, outside certain already-disarmed metropolitan areas, the natural security-biased impulse of the police and military officers to disarm everyone in the affected area is going to be extremely poorly received, and a lot of the enlisted troops who would be charged with the job have grave reservations about the wisdom or legality of it, and the results would be extremely unpredictable.
My sense of it is that military people below flag rank have a pretty clear idea just how badly that unpredictability could turn out, but political leaders and people whose jobs are tied to them (Including many generals and most police leadership) are perfectly willing to suspend their common sense, Constitutional obligations, and generally any ties to reality when it comes down to following an idiotic order. There is an excellent chance that trying to enforce such an order would wreck the military organization on which the duty fell, with large-scale desertions, order refusals, or even defections.
True martial law has never been imposed in the modern US on any scale, the closest we have come is the large race riots of the late 60s era, but even then offenders were still taken to civilian lock-ups and their cases handled by civilian courts, not by military tribunals. The legal rangefan of what can be done has only narrowed since then, due to both GWOT issues over the Gitmo tribunals and events like NOLA. Trying to declare martial law on any wide scale now would be an absolutely desperate act that no sane President would try, and while Obama may by a starry-eyed Prog numbskull with less understanding of economics and military affairs than your average 14th-Century village idiot, he isn't actually insane.