diff options
author | David Schleef <david.schleef@rd.io> | 2013-08-21 14:14:43 -0700 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2013-10-05 22:33:02 -0700 |
commit | acbc4eab76d5330250dfeff64e04f015bc61ddef (patch) | |
tree | 7b40c600be3eac75ec332bbc0e6320ed0ae9f9a9 /tools | |
parent | c8743e8048511090bbce2bbbab8cacb22f038ad4 (diff) |
isom-tool: add --dump
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gss-isom-tool.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/tools/gss-isom-tool.c b/tools/gss-isom-tool.c index 3978640..e110994 100644 --- a/tools/gss-isom-tool.c +++ b/tools/gss-isom-tool.c @@ -1,18 +1,18 @@ #include <gst-streaming-server/gss-isom.h> -#include <gst-streaming-server/gss-isom.h> #include <stdio.h> -#include <openssl/aes.h> - #define GETTEXT_PACKAGE NULL -gboolean verbose; +gboolean verbose = FALSE; +gboolean dump = FALSE; static GOptionEntry entries[] = { {"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL}, + {"dump", 'd', 0, G_OPTION_ARG_NONE, &dump, "Dump file to readable output", + NULL}, {NULL} }; @@ -23,7 +23,7 @@ main (int argc, char *argv[]) GOptionContext *context; int i; - context = g_option_context_new ("- ISOM parsing test"); + context = g_option_context_new ("- ISOM manipulation tool"); g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); g_option_context_add_group (context, gst_init_get_option_group ()); if (!g_option_context_parse (context, &argc, &argv, &error)) { @@ -51,10 +51,15 @@ main (int argc, char *argv[]) continue; } - gss_isom_movie_serialize_track (file->movie, - file->movie->tracks[1]->tkhd.track_id, &data, &size); + if (dump) { + gss_isom_file_dump (file); + } + if (0) { + gss_isom_movie_serialize_track (file->movie, + file->movie->tracks[1]->tkhd.track_id, &data, &size); - g_file_set_contents ("out.mov", (gchar *) data, size, NULL); + g_file_set_contents ("out.mov", (gchar *) data, size, NULL); + } gss_isom_file_free (file); } |