package fmp4Tomp4
-import (
- "context"
- "testing"
-)
-
-func Test_conver(t *testing.T) {
- path := "/codefile/testdata/"
- if e := conver(context.Background(), &path); e != nil {
- t.Fatal(e)
- }
-}
+// func Test_conver(t *testing.T) {
+// path := "/codefile/testdata/"
+// if e := conver(context.Background(), &path); e != nil {
+// t.Fatal(e)
+// }
+// }
package fmp4Tomp4
-import (
- "errors"
- "io"
- "testing"
+// func Test_parse(t *testing.T) {
+// var read = reader{
+// f: file.New("/codefile/testdata/0.mp4", 0, false),
+// }
+// if e := read.Parse(); e != nil && !errors.Is(e, io.EOF) {
+// t.Fatal(e)
+// }
+// t.Log(len(read.Boxs))
- file "github.com/qydysky/part/file"
-)
-
-func Test_parse(t *testing.T) {
- var read = reader{
- f: file.New("/codefile/testdata/0.mp4", 0, false),
- }
- if e := read.Parse(); e != nil && !errors.Is(e, io.EOF) {
- t.Fatal(e)
- }
- t.Log(len(read.Boxs))
-
- m, e := read.ParseTrun()
- t.Log(m)
- t.Log(e)
- // for i := 0; i < len(read.boxs); i++ {
- // t.Log(read.boxs[i].name)
- // }
-}
+// m, e := read.ParseTrun()
+// t.Log(m)
+// t.Log(e)
+// // for i := 0; i < len(read.boxs); i++ {
+// // t.Log(read.boxs[i].name)
+// // }
+// }
package fmp4Tomp4
-import (
- "testing"
+// func Test_w(t *testing.T) {
+// tf := file.New("1.mp4", 0, false)
+// if tf.IsExist() {
+// _ = tf.Delete()
+// }
+// defer tf.Close()
- file "github.com/qydysky/part/file"
-)
+// w, e := NewBoxWriter(tf)
+// if e != nil {
+// t.Fatal(e)
+// }
-func Test_w(t *testing.T) {
- tf := file.New("1.mp4", 0, false)
- if tf.IsExist() {
- _ = tf.Delete()
- }
- defer tf.Close()
-
- w, e := NewBoxWriter(tf)
- if e != nil {
- t.Fatal(e)
- }
-
- // ftyp
- {
- ftyp := w.Box("ftyp")
- ftyp.Write([]byte("isom"))
- ftyp.Write(itob32(512))
- ftyp.Write([]byte("isom"))
- ftyp.Write([]byte("iso2"))
- ftyp.Write([]byte("avc1"))
- ftyp.Write([]byte("mp41"))
- if e := ftyp.Close(); e != nil {
- t.Fatal(e)
- }
- }
-}
+// // ftyp
+// {
+// ftyp := w.Box("ftyp")
+// ftyp.Write([]byte("isom"))
+// ftyp.Write(itob32(512))
+// ftyp.Write([]byte("isom"))
+// ftyp.Write([]byte("iso2"))
+// ftyp.Write([]byte("avc1"))
+// ftyp.Write([]byte("mp41"))
+// if e := ftyp.Close(); e != nil {
+// t.Fatal(e)
+// }
+// }
+// }