]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/omapdrmtest.git/commitdiff
videnc2: Adding encoding completion msgs
authorPradeep Venkatasubbarao <pradeepv@ti.com>
Mon, 1 Sep 2014 04:03:10 +0000 (09:33 +0530)
committerPradeep Venkatasubbarao <pradeepv@ti.com>
Mon, 1 Sep 2014 04:03:38 +0000 (09:33 +0530)
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
videnc2test.c

index 014b5113b1b69f0982603067b490866b0aa0b8b7..5fcb2936010e5ffe2e6e4b24bfe9685e87e1562f 100644 (file)
@@ -1131,6 +1131,7 @@ int main(int argc, char * *argv)
             in_cnt++;
 
             MSG("n == -1 - go to shutdown");
+                       printf("Encoding completed successfully\n");
 
             goto shutdown;
         } else {
@@ -1138,6 +1139,7 @@ int main(int argc, char * *argv)
             encObj.inBufs->numPlanes = 0;
             eof = 1;
             MSG("n == 0 - go to shutdown");
+                       printf("Encoding completed successfully\n");
 
             goto shutdown;
 
@@ -1171,6 +1173,7 @@ int main(int argc, char * *argv)
                     if( XDM_ISFATALERROR(h264enc_outArgs->videnc2OutArgs.extendedError) ) {
                         ERROR("process returned error: %d\n", err);
                         ERROR("extendedError: %08x", h264enc_outArgs->videnc2OutArgs.extendedError);
+                                               printf("Encoding Error\n");
                         goto shutdown;
                     } else if( eof ) {
                         ERROR("Codec_process returned err=%d, extendedError=%08x", err, h264enc_outArgs->videnc2OutArgs.extendedError);
@@ -1197,6 +1200,7 @@ int main(int argc, char * *argv)
                 if( err < 0 ) {
                     //TODO error handling on MPEG4/H.263
                     ERROR("Codec_process returned err=%d, extendedError=%08x", err, mpeg4enc_outArgs->videnc2OutArgs.extendedError);
+                                       printf("Encoding Error\n");
                     goto shutdown;
                 }
                 MSG("\n bytesGenerated %d", mpeg4enc_outArgs->videnc2OutArgs.bytesGenerated);
@@ -1211,7 +1215,10 @@ int main(int argc, char * *argv)
             /* get the output buffer and write it to file */
             if( bytesGenerated ) {
                 // write the frames to output file based on the value of frames_to_write on how many frames to write.
-                if( out_cnt > encObj.nframes ) goto shutdown;
+                if( out_cnt > encObj.nframes ){
+                                       printf("Encoding completed successfully\n");
+                                       goto shutdown;
+                               }
                 INFO("Dumping frame %d", out_cnt);
                                write_output(&encObj, bytesGenerated);
             }
@@ -1221,6 +1228,5 @@ int main(int argc, char * *argv)
     }
 shutdown:
        encoder_deinit(&encObj);
-       INFO("Encoding complete...\n");
     return 0;
 }