OSDN Git Service

fix 0 byte bug.
[rec10/rec10-git.git] / jTsSplitter / trunk / src / jtssplitter / Main.java
1 /*
2  * jTsSplitter - java based mpeg2ts splitter.
3  * Copyright (C) 2009-2010 Yukikaze
4  */
5 package jtssplitter;
6
7 import java.io.File;
8
9
10 /**
11  *
12  * @author Administrator
13  */
14 public class Main {
15
16     /**
17      * @param args the command line arguments
18      *
19      */
20     public static void main(String[] args) {
21         // TODO code application logic here
22         String inf;
23         String outf;
24         int ch = 0;
25         inf = "";
26         outf = "";
27         for (int i = 0; i < args.length; i++) {
28             System.out.println(args[i]);
29         }
30         if (args.length > 1) {
31             inf = args[0];
32             outf = args[1];
33             if (args.length > 2) {
34                 ch = Integer.parseInt(args[2].trim(), 10);
35             }
36         }
37         Tsfile t1 = new Tsfile();
38         File f=new File(inf);
39         if (f.length()>1000*1000){
40             t1.splitTS_byte(inf, outf, ch);
41         }
42     }
43 }