filevpedisplay: added usage details
authoralaganraj <alaganraj.s@ti.com>
Fri, 4 Apr 2014 08:55:52 +0000 (14:25 +0530)
committeralaganraj <alaganraj.s@ti.com>
Wed, 9 Apr 2014 14:23:37 +0000 (19:53 +0530)
added command line arguments usage details

Signed-off-by: alaganraj <alaganraj.s@ti.com>
filevpedisplay.c

index 06c5be8e28c7d80cdaaa4e5bf7d53f0224e241f5..a38a2dfbc00e1f795ed3360b40876a7bc2a488a0 100644 (file)
@@ -179,6 +179,18 @@ int main (int argc, char *argv[])
 
        struct  vpe *vpe;
 
+       if (argc != 16) {
+               printf (
+               "USAGE : <SRCfilename> <SRCWidth> <SRCHeight> <SRCFormat> "
+                       "<DSTWidth> <DSTHeight> <DSTformat> "
+                       "<CropTop> <CropLeft> <CropWidth> <CropHeight> "
+                       "<interlace> <translen> -s <connector_id>:<mode>\n"
+                       "Note:\n<interlace>\n1 - Deinterlace Alternate frame type\n"
+                       "2 - Deinterlace Sequence TB frame type\n");
+
+               return 1;
+       }
+
        /** Open the device */
        vpe = vpe_open();
 
@@ -207,7 +219,9 @@ int main (int argc, char *argv[])
 
        if (fin  < 0 || vpe->src.height < 0 || vpe->src.width < 0 || \
            vpe->src.fourcc < 0 || vpe->dst.height < 0 || \
-           vpe->dst.width < 0 || vpe->dst.fourcc < 0) {
+           vpe->dst.width < 0 || vpe->dst.fourcc < 0 || \
+           vpe->crop.c.top < 0 || vpe->crop.c.left < 0 || \
+           vpe->crop.c.width < 0 || vpe->crop.c.height < 0) {
            pexit("Invalid parameters\n");
        }