Moved the space checking code at proper place.
fixed the coding syntax warnings
Fix for following scenario
1. If recording location is set in mmc card and during audio/video recording if user remove the mmc card, then muse-server used to crash.
2. while recording if device space is over then internally mm-camcorder start dropping the frame, but if in background data copy is in progress
using MTP, then there is chance that there is no space to write the file header also. as it may be occupied by the data copy.
so before doing the commit, check the minimum space availability in destination storage type.
[Version] 0.10.132
[Profile] Common
[Issue Type] Bug fix
[Dependency module] N/A
Change-Id: I9ebecd03ff8bb5c7b6782a1d807717090fcd4b6c
Signed-off-by: yogesh manav <yogesh.m@samsung.com>