[flvmeta] 6 new revisions pushed by marc.noi...@gmail.com on 2012-04-22 12:02 GMT

1 view
Skip to first unread message

flv...@googlecode.com

unread,
Apr 22, 2012, 8:02:57 AM4/22/12
to flvme...@googlegroups.com
6 new revisions:

Revision: 803aad0d4fbd
Author: Marc Noirot <marc....@gmail.com>
Date: Thu Apr 19 02:07:39 2012
Log: Added a .gitignore file.
http://code.google.com/p/flvmeta/source/detail?r=803aad0d4fbd

Revision: 4ee216a6f1e9
Author: Marc Noirot <marc....@gmail.com>
Date: Thu Apr 19 07:26:05 2012
Log: Moved man page creation tool from ronn to pandoc....
http://code.google.com/p/flvmeta/source/detail?r=4ee216a6f1e9

Revision: 8f6576cf95d3
Author: Marc Noirot <marc....@gmail.com>
Date: Fri Apr 20 06:18:25 2012
Log: Added argument to the --event option usage string.
http://code.google.com/p/flvmeta/source/detail?r=8f6576cf95d3

Revision: 6fb9713d0345
Author: Marc Noirot <marc....@gmail.com>
Date: Fri Apr 20 06:19:52 2012
Log: Added ignore of build directories.
http://code.google.com/p/flvmeta/source/detail?r=6fb9713d0345

Revision: 71abfe859288
Author: Marc Noirot <marc....@gmail.com>
Date: Fri Apr 20 06:21:34 2012
Log: Updated man page.
http://code.google.com/p/flvmeta/source/detail?r=71abfe859288

Revision: 7c935d3c082b
Author: Marc Noirot <marc....@gmail.com>
Date: Sun Apr 22 02:58:28 2012
Log: Fixed warnings related to 64-bit type castings.
http://code.google.com/p/flvmeta/source/detail?r=7c935d3c082b

==============================================================================
Revision: 803aad0d4fbd
Author: Marc Noirot <marc....@gmail.com>
Date: Thu Apr 19 02:07:39 2012
Log: Added a .gitignore file.

http://code.google.com/p/flvmeta/source/detail?r=803aad0d4fbd

Added:
/.gitignore

=======================================
--- /dev/null
+++ /.gitignore Thu Apr 19 02:07:39 2012
@@ -0,0 +1,36 @@
+# http://www.gnu.org/software/automake
+
+Makefile.in
+
+# http://www.gnu.org/software/autoconf
+
+/autom4te.cache
+/aclocal.m4
+/compile
+/configure
+/depcomp
+/install-sh
+/missing
+
+# Object files
+*.o
+*.obj
+
+# Libraries
+*.lib
+*.a
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+
+# Executables
+*.exe
+*.out
+
+# CMake
+CMakeCache.txt
+CMakeFiles
+Makefile
+cmake_install.cmake
+install_manifest.txt

==============================================================================
Revision: 4ee216a6f1e9
Author: Marc Noirot <marc....@gmail.com>
Date: Thu Apr 19 07:26:05 2012
Log: Moved man page creation tool from ronn to pandoc.
Refactored and updated man page.

http://code.google.com/p/flvmeta/source/detail?r=4ee216a6f1e9

Added:
/man/1/flvmeta.1.md
Deleted:
/man/1/flvmeta.1.ronn
Modified:
/man/1/flvmeta.1

=======================================
--- /dev/null
+++ /man/1/flvmeta.1.md Thu Apr 19 07:26:05 2012
@@ -0,0 +1,200 @@
+% flvmeta(1) flvmeta user manual
+%
+% April 2012
+
+# NAME
+
+flvmeta - manipulate or extract metadata in Adobe Flash Video files
+
+# SYNOPSIS
+
+**flvmeta** *INPUT_FILE*
+**flvmeta** *INPUT_FILE* *OUTPUT_FILE*
+**flvmeta** `-D`|`--dump` [*options*] *INPUT_FILE*
+**flvmeta** `-F`|`--full-dump` [*options*] *INPUT_FILE*
+**flvmeta** `-C`|`--check` [*options*] *INPUT_FILE*
+**flvmeta** `-U`|`--update` [*options*] *INPUT_FILE* [*OUTPUT_FILE*]
+
+# DESCRIPTION
+
+**flvmeta** is a command-line utility aimed at manipulating Adobe(tm)
Flash Video
+files (FLV), through several commands, only one of which can be used for
each
+invocation of the program.
+
+It possesses the ability to compute and inject a variety of values in the
+_onMetaData_ event tag, including keyframe indices used by most video
players to
+allow random-access seeking, notably for HTTP pseudo-streamed files via a
+server-side module, by having the client send the file offset looked up
for the
+nearest desired keyframe.
+Tools such as **flvmeta** must be used in the case the initial encoding
process is
+unable to inject those metadata.
+
+It can also optionnally inject the _onLastSecond_ event, used to signal
the end
+of playback, for example to revert the player software to a 'stopped'
state.
+
+**flvmeta** also has the ability to dump metadata and full file
information to
+standard output, in a variety of textual output formats, including XML,
YAML,
+and JSON.
+
+Finally, the program can analyze FLV files to detect potential problems and
+errors, and generate a textual report in a raw format, or in XML.
+It has the ability to detect more than a hundred problems, going from
harmless
+to potentially unplayable, using a few real world encountered issues.
+This analysis can also determine and display the minimal Flash Player
version
+which can be used to correctly play a given file, as well as codec
information.
+
+**flvmeta** can operate on arbitrarily large files, and can handle FLV
files using
+extended (32-bit) timestamps.
+It can guess video frame dimensions for all known video codecs supported
by the
+official FLV specification.
+
+Its memory usage remains minimal, as it uses a two-pass reading algorithm
which
+permits the computation of all necessary tags without loading anything
more than
+the file's tags headers in memory.
+Only the dumping of JSON data can consume more memory, since the bundled
`mjson`
+library constructs a data tree in memory before outputting the formatted
data.
+
+# COMMANDS
+
+Only one command can be specified for an invocation of **flvmeta**. The
chosen
+command determines the mode of execution of the program.
+
+By default, if no command is specified, **flvmeta** will implicitely
choose the
+command to use according to the presence of *INPUT_FILE* and *OUTPUT_FILE*.
+
+If only *INPUT_FILE* is present, the `--dump` command will be executed.
+
+If both *INPUT_FILE* and *OUTPUT_FILE* are present, the `--update` command
+will be executed.
+
+Here is a list of the supported commands:
+
+## -D, \--dump
+
+Dump a textual representation of the first _onMetaData_ tag found in
+*INPUT_FILE* to standard output. The default format is XML, unless
+specified otherwise.
+It is also possible to specify another event via the `--event` option,
+such as _onLastSecond_.
+
+## -F, \--full-dump
+
+Dump a textual representation of the whole contents of *INPUT_FILE* to
+standard output. The default format is XML, unless specified otherwise.
+
+## -C, \--check
+
+Print a report to standard output listing warnings and errors detected in
+*INPUT_FILE*, as well as potential incompatibilities, and informations
about
+the codecs used in the file. The exit code will be set to a non-zero value
+if there is at least one error in the file.
+
+The output format can either be plain text or XML using the `--xml` option.
+It can also be disabled altogether using the `--quiet` option if you are
+only interested in the exit status.
+
+Messages are divided into four specific levels of increasing importance:
+
+* **info**: informational messages that do not pertain to the file validity
+* **warning**: messages that inform of oddities to the flv format but that
+ might not hamper file reading or playability, this is the default level
+* **error**: messages that inform of errors that might render the file
+ impossible to play or stream correctly
+* **fatal**: messages that inform of errors that make further file reading
+ impossible therefore ending parsing completely
+
+The `--level` option allows to limit the display of messages to a minimum
+level among those, for example if the user is only interested in error
+messages and above.
+
+Each message or message template presented to the user is identified by a
+specific code of the following format:
+
+`[level][topic][id]`
+
+* **level** is an upper-case letter that can be either I, W, E, F
according to
+ the aforementioned message levels
+* **topic** is a two-digit integer representing the general topic of the
+ message
+* **id** is a unique three-digit identifier for the message, or message
+ template if parameterized
+
+Messages can be related to the following topics :
+
+* **10** general flv file format
+* **11** file header
+* **12** previous tag size
+* **20** tag format
+* **30** tag types
+* **40** timestamps
+* **50** audio data
+* **51** audio codecs
+* **60** video data
+* **61** video codecs
+* **70** metadata
+* **80** AMF data
+* **81** keyframes
+* **82** cue points
+
+For example, <W51050> represents a Warning in topic 51 with the id 050,
+which represents a warning message related to audio codecs, in that case to
+signal that an audio tag has an unknown codec.
+
+## -U, \--update
+
+Update the given input file by inserting a computed _onMetaData_ tag. If
+*OUTPUT_FILE* is specified, it will be created or overwritten instead and
+the input file will not be modified. If the original file is to be updated,
+a temporary file will be created in the default temp directory of the
+platform, and it will be copied over the original file at the end of
+the operation. This is due to the fact that the output file is written
+while the original file is being read due to the two-pass method.
+
+The computed metadata contains among other data full keyframe informations,
+in order to allow HTTP pseudo-streaming and random-access seeking in the
+file.
+
+By default, an _onLastSecond_ tag will be inserted, unless the
+`--no-last-second` option is specified.
+
+Normally overwritten by the update process, the existing metadata found in
+the input file can be preserved by the `--preserve` option.
+
+It is also possible to insert custom string values with the `--add` option,
+which can be specified multiple times.
+
+By default, the update operation is performed without output, unless the
+`--verbose` option is specified, or the `--print-metadata` is used to
+print the newly written metadata to the standard output.
+
+# OPTIONS
+
+## DUMP
+
+-d *FORMAT*, \--dump-format=*FORMAT*
+: specify dump format where *FORMAT* is 'xml' (default), 'json', 'raw',
or
+ 'yaml'
+
+## FULL DUMP
+
+## CHECK
+
+## UPDATE
+
+## GENERAL
+
+# FORMATS
+
+# EXAMPLES
+
+# EXIT STATUS
+
+# BUGS
+
+**flvmeta** does not support encrypted FLV files yet.
+
+# AUTHOR
+
+# COPYRIGHT
+
+# CONTACT
=======================================
--- /man/1/flvmeta.1.ronn Wed Apr 11 09:40:02 2012
+++ /dev/null
@@ -1,185 +0,0 @@
-flvmeta(1) -- manipulate or extract metadata in Adobe Flash Video Files
-=======================================================================
-
-## SYNOPSIS
-
-`flvmeta` <INPUT_FILE>
-`flvmeta` <INPUT_FILE> <OUTPUT_FILE>
-`flvmeta` `-D`|`--dump` [<options>] <INPUT_FILE>
-`flvmeta` `-F`|`--full-dump` [<options>] <INPUT_FILE>
-`flvmeta` `-C`|`--check` [<options>] <INPUT_FILE>
-`flvmeta` `-U`|`--update` [<options>] <INPUT_FILE> [<OUTPUT_FILE>]
-
-## DESCRIPTION
-
-`flvmeta` is a command-line utility aimed at manipulating Adobe(tm) Flash
Video
-Files (FLV), through several commands, only one of which can be used for
each
-invocation of the program.
-
-It possesses the ability to compute and inject a variety of values in the
-_onMetaData_ event tag, including keyframe indices used by most video
players to
-allow random-access seeking, notably for HTTP pseudo-streamed files via a
-server-side module, by having the client send the file offset looked up
for the
-nearest desired keyframe.
-Tools such as `flvmeta` must be used in the case the initial encoding
process is
-unable to inject those metadata.
-
-It can also optionnally inject the _onLastSecond_ event, used to signal
the end
-of playback, for example to revert the player software to a 'stopped'
state.
-
-`flvmeta` also has the ability to dump metadata and full file information
to
-standard output, in a variety of textual output formats, including XML,
YAML,
-and JSON.
-
-Finally, the program can analyze FLV files to detect potential problems and
-errors, and generate a textual report in a raw format, or in XML.
-It has the ability to detect more than a hundred problems, going from
harmless
-to potentially unplayable, using a few real world encountered issues.
-This analysis can also determine and display the minimal Flash Player
version
-which can be used to correctly play a given file, as well as codec
information.
-
-`flvmeta` can operate on arbitrarily large files, and can handle FLV files
using
-extended (32-bit) timestamps.
-It can guess video frame dimensions for all known video codecs supported
by the
-official FLV specification.
-
-Its memory usage remains minimal, as it uses a two-pass reading algorithm
which
-permits the computation of all necessary tags without loading anything
more than
-the file's tags headers in memory.
-Only the dumping of JSON data can consume more memory, since the bundled
`mjson`
-library constructs a data tree in memory before outputting the formatted
data.
-
-## COMMANDS
-
-Only one command can be specified for an invocation of `flvmeta`. The
chosen
-command determines the mode of execution of the program.
-
-By default, if no command is specified, `flvmeta` will implicitely choose
the
-command to use according to the presence of <INPUT_FILE> and <OUTPUT_FILE>.
-
-If only <INPUT_FILE> is present, the `--dump` command will be executed.
-
-If both <INPUT_FILE> and <OUTPUT_FILE> are present, the `--update` command
-will be executed.
-
- * `-D`, `--dump`:
- Dump a textual representation of the first _onMetaData_ tag found in
- <INPUT_FILE> to standard output. The default format is XML, unless
specified
- otherwise.
-
- It is also possible to specify another event via the `--event` option,
such
- as _onLastSecond_.
-
- * `-F`, `--full-dump`:
- Dump a textual representation of the whole contents of <INPUT_FILE> to
- standard output. The default format is XML, unless specified otherwise.
-
- * `-C`, `--check`:
- Print a report to standard output listing warnings and errors detected
in
- <INPUT_FILE>, as well as potential incompatibilities, and informations
about
- the codecs used in the file. The exit code will be set to a non-zero
value
- if there is at least one error in the file.
-
- The output format can either be plain text or XML using the `--xml`
option.
- It can also be disabled altogether using the `--quiet` option if you
are
- only interested in the exit status.
-
- Messages are divided into four specific levels of increasing
importance:
-
- * *info*: informational messages that do not pertain to the file
validity
- * *warning*: messages that inform of oddities to the flv format but
that
- might not hamper file reading or playability, this is the default
level
- * *error*: messages that inform of errors that might render the file
- impossible to play or stream correctly
- * *fatal*: messages that inform of errors that make further file
reading
- impossible therefore ending parsing completely
-
- The `--level` option allows to limit the display of messages to a
minimum
- level among those, for example if the user is only interested in error
- messages and above.
-
- Each message or message template presented to the user is identified
by a
- specific code of the following format:
-
- `[level][topic][id]`
-
- * *level* is an upper-case letter that can be either I, W, E, F
according to
- the aforementioned message levels
- * *topic* is a two-digit integer representing the general topic of the
- message
- * *id* is a unique three-digit identifier for the message, or message
- template if parameterized
-
- Messages can be related to the following topics :
-
- * *10* general flv file format
- * *11* file header
- * *12* previous tag size
- * *20* tag format
- * *30* tag types
- * *40* timestamps
- * *50* audio data
- * *51* audio codecs
- * *60* video data
- * *61* video codecs
- * *70* metadata
- * *80* AMF data
- * *81* keyframes
- * *82* cue points
-
- For example, <W51050> represents a Warning in topic 51 with the id 050,
- which represents a warning message related to audio codecs, in that
case to
- signal that an audio tag has an unknown codec.
-
- * `-U`, `--update`:
- Update the given input file by inserting a computed _onMetaData_ tag.
If an
- output file is specified, it will be created or overwritten instead and
- the input file will not be modified. If the original file is to be
updated,
- a temporary file will be created in the default temp directory of the
- platform, and it will be copied over the original file at the end of
- the operation. This is due to the fact that the output file is written
- while the original file is being read due to the two-pass method.
-
- The computed metadata contains among other data full keyframe
informations,
- in order to allow HTTP pseudo-streaming and random-access seeking in
the
- file.
-
- By default, an _onLastSecond_ tag will be inserted, unless the
- `--no-last-second` option is specified.
-
- Normally overwritten by the update process, the existing metadata
found in
- the input file can be preserved by the `--preserve` option.
-
- It is also possible to insert custom string values with the `--add`
option,
- which can be specified multiple times.
-
- By default, the update operation is performed without output, unless
the
- `--verbose` option is specified, or the `--print-metadata` is used to
- print the newly written metadata to the standard output.
-
-
-## OPTIONS
-
-### DUMP
-
-### FULL DUMP
-
-### CHECK
-
-### UPDATE
-
-## FORMATS
-
-## EXAMPLES
-
-## EXIT STATUS
-
-## BUGS
-
-`flvmeta` does not support encrypted FLV files yet.
-
-## AUTHOR
-
-## COPYRIGHT
-
-## CONTACT
=======================================
--- /man/1/flvmeta.1 Wed Apr 11 09:40:02 2012
+++ /man/1/flvmeta.1 Thu Apr 19 07:26:05 2012
@@ -1,206 +1,289 @@
-.\" generated with Ronn/v0.7.3
-.\" http://github.com/rtomayko/ronn/tree/0.7.3
-.
-.TH "FLVMETA" "1" "April 2012" "" ""
-.
-.SH "NAME"
-\fBflvmeta\fR \- manipulate or extract metadata in Adobe Flash Video Files
-.
-.SH "SYNOPSIS"
-\fBflvmeta\fR \fIINPUT_FILE\fR
-.
-.br
-\fBflvmeta\fR \fIINPUT_FILE\fR \fIOUTPUT_FILE\fR
-.
-.br
-\fBflvmeta\fR \fB\-D\fR|\fB\-\-dump\fR [\fIoptions\fR] \fIINPUT_FILE\fR
-.
-.br
-\fBflvmeta\fR \fB\-F\fR|\fB\-\-full\-dump\fR [\fIoptions\fR]
\fIINPUT_FILE\fR
-.
-.br
-\fBflvmeta\fR \fB\-C\fR|\fB\-\-check\fR [\fIoptions\fR] \fIINPUT_FILE\fR
-.
-.br
-\fBflvmeta\fR \fB\-U\fR|\fB\-\-update\fR [\fIoptions\fR] \fIINPUT_FILE\fR
[\fIOUTPUT_FILE\fR]
-.
-.SH "DESCRIPTION"
-\fBflvmeta\fR is a command\-line utility aimed at manipulating Adobe(tm)
Flash Video Files (FLV), through several commands, only one of which can be
used for each invocation of the program\.
-.
+.TH flvmeta 1 "April 2012" "flvmeta user manual"
+.SH NAME
+.PP
+flvmeta - manipulate or extract metadata in Adobe Flash Video files
+.SH SYNOPSIS
+.PP
+\f[B]flvmeta\f[] \f[I]INPUT_FILE\f[]
+.PD 0
.P
-It possesses the ability to compute and inject a variety of values in the
\fIonMetaData\fR event tag, including keyframe indices used by most video
players to allow random\-access seeking, notably for HTTP pseudo\-streamed
files via a server\-side module, by having the client send the file offset
looked up for the nearest desired keyframe\. Tools such as \fBflvmeta\fR
must be used in the case the initial encoding process is unable to inject
those metadata\.
-.
+.PD
+\f[B]flvmeta\f[] \f[I]INPUT_FILE\f[] \f[I]OUTPUT_FILE\f[]
+.PD 0
.P
-It can also optionnally inject the \fIonLastSecond\fR event, used to
signal the end of playback, for example to revert the player software to a
\'stopped\' state\.
-.
+.PD
+\f[B]flvmeta\f[] \f[C]-D\f[]|\f[C]--dump\f[] [\f[I]options\f[]]
+\f[I]INPUT_FILE\f[]
+.PD 0
.P
-\fBflvmeta\fR also has the ability to dump metadata and full file
information to standard output, in a variety of textual output formats,
including XML, YAML, and JSON\.
-.
+.PD
+\f[B]flvmeta\f[] \f[C]-F\f[]|\f[C]--full-dump\f[] [\f[I]options\f[]]
+\f[I]INPUT_FILE\f[]
+.PD 0
.P
-Finally, the program can analyze FLV files to detect potential problems
and errors, and generate a textual report in a raw format, or in XML\. It
has the ability to detect more than a hundred problems, going from harmless
to potentially unplayable, using a few real world encountered issues\. This
analysis can also determine and display the minimal Flash Player version
which can be used to correctly play a given file, as well as codec
information\.
-.
+.PD
+\f[B]flvmeta\f[] \f[C]-C\f[]|\f[C]--check\f[] [\f[I]options\f[]]
+\f[I]INPUT_FILE\f[]
+.PD 0
.P
-\fBflvmeta\fR can operate on arbitrarily large files, and can handle FLV
files using extended (32\-bit) timestamps\. It can guess video frame
dimensions for all known video codecs supported by the official FLV
specification\.
-.
+.PD
+\f[B]flvmeta\f[] \f[C]-U\f[]|\f[C]--update\f[] [\f[I]options\f[]]
+\f[I]INPUT_FILE\f[] [\f[I]OUTPUT_FILE\f[]]
+.SH DESCRIPTION
+.PP
+\f[B]flvmeta\f[] is a command-line utility aimed at manipulating
+Adobe(tm) Flash Video files (FLV), through several commands, only one of
+which can be used for each invocation of the program.
+.PP
+It possesses the ability to compute and inject a variety of values in
+the \f[I]onMetaData\f[] event tag, including keyframe indices used by
+most video players to allow random-access seeking, notably for HTTP
+pseudo-streamed files via a server-side module, by having the client
+send the file offset looked up for the nearest desired keyframe.
+.PD 0
.P
-Its memory usage remains minimal, as it uses a two\-pass reading algorithm
which permits the computation of all necessary tags without loading
anything more than the file\'s tags headers in memory\. Only the dumping of
JSON data can consume more memory, since the bundled \fBmjson\fR library
constructs a data tree in memory before outputting the formatted data\.
-.
-.SH "COMMANDS"
-Only one command can be specified for an invocation of \fBflvmeta\fR\. The
chosen command determines the mode of execution of the program\.
-.
+.PD
+Tools such as \f[B]flvmeta\f[] must be used in the case the initial
+encoding process is unable to inject those metadata.
+.PP
+It can also optionnally inject the \f[I]onLastSecond\f[] event, used to
+signal the end of playback, for example to revert the player software to
+a `stopped' state.
+.PP
+\f[B]flvmeta\f[] also has the ability to dump metadata and full file
+information to standard output, in a variety of textual output formats,
+including XML, YAML, and JSON.
+.PP
+Finally, the program can analyze FLV files to detect potential problems
+and errors, and generate a textual report in a raw format, or in XML.
+It has the ability to detect more than a hundred problems, going from
+harmless to potentially unplayable, using a few real world encountered
+issues.
+This analysis can also determine and display the minimal Flash Player
+version which can be used to correctly play a given file, as well as
+codec information.
+.PP
+\f[B]flvmeta\f[] can operate on arbitrarily large files, and can handle
+FLV files using extended (32-bit) timestamps.
+It can guess video frame dimensions for all known video codecs supported
+by the official FLV specification.
+.PP
+Its memory usage remains minimal, as it uses a two-pass reading
+algorithm which permits the computation of all necessary tags without
+loading anything more than the file's tags headers in memory.
+Only the dumping of JSON data can consume more memory, since the bundled
+\f[C]mjson\f[] library constructs a data tree in memory before
+outputting the formatted data.
+.SH COMMANDS
+.PP
+Only one command can be specified for an invocation of \f[B]flvmeta\f[].
+The chosen command determines the mode of execution of the program.
+.PP
+By default, if no command is specified, \f[B]flvmeta\f[] will
+implicitely choose the command to use according to the presence of
+\f[I]INPUT_FILE\f[] and \f[I]OUTPUT_FILE\f[].
+.PP
+If only \f[I]INPUT_FILE\f[] is present, the \f[C]--dump\f[] command will
+be executed.
+.PP
+If both \f[I]INPUT_FILE\f[] and \f[I]OUTPUT_FILE\f[] are present, the
+\f[C]--update\f[] command will be executed.
+.PP
+Here is a list of the supported commands:
+.SS -D, --dump
+.PP
+Dump a textual representation of the first \f[I]onMetaData\f[] tag found
+in \f[I]INPUT_FILE\f[] to standard output.
+The default format is XML, unless specified otherwise.
+.PD 0
.P
-By default, if no command is specified, \fBflvmeta\fR will implicitely
choose the command to use according to the presence of \fIINPUT_FILE\fR and
\fIOUTPUT_FILE\fR\.
-.
+.PD
+It is also possible to specify another event via the \f[C]--event\f[]
+option, such as \f[I]onLastSecond\f[].
+.SS -F, --full-dump
+.PP
+Dump a textual representation of the whole contents of
+\f[I]INPUT_FILE\f[] to standard output.
+The default format is XML, unless specified otherwise.
+.SS -C, --check
+.PP
+Print a report to standard output listing warnings and errors detected
+in \f[I]INPUT_FILE\f[], as well as potential incompatibilities, and
+informations about the codecs used in the file.
+The exit code will be set to a non-zero value if there is at least one
+error in the file.
+.PP
+The output format can either be plain text or XML using the
+\f[C]--xml\f[] option.
+It can also be disabled altogether using the \f[C]--quiet\f[] option if
+you are only interested in the exit status.
+.PP
+Messages are divided into four specific levels of increasing importance:
+.IP \[bu] 2
+\f[B]info\f[]: informational messages that do not pertain to the file
+validity
+.PD 0
.P
-If only \fIINPUT_FILE\fR is present, the \fB\-\-dump\fR command will be
executed\.
-.
+.PD
+.IP \[bu] 2
+\f[B]warning\f[]: messages that inform of oddities to the flv format but
+that might not hamper file reading or playability, this is the default
+level
+.PD 0
.P
-If both \fIINPUT_FILE\fR and \fIOUTPUT_FILE\fR are present, the
\fB\-\-update\fR command will be executed\.
-.
-.IP "\(bu" 4
-\fB\-D\fR, \fB\-\-dump\fR: Dump a textual representation of the first
\fIonMetaData\fR tag found in \fIINPUT_FILE\fR to standard output\. The
default format is XML, unless specified otherwise\.
-.
-.IP
-It is also possible to specify another event via the \fB\-\-event\fR
option, such as \fIonLastSecond\fR\.
-.
-.IP "\(bu" 4
-\fB\-F\fR, \fB\-\-full\-dump\fR: Dump a textual representation of the
whole contents of \fIINPUT_FILE\fR to standard output\. The default format
is XML, unless specified otherwise\.
-.
-.IP "\(bu" 4
-\fB\-C\fR, \fB\-\-check\fR: Print a report to standard output listing
warnings and errors detected in \fIINPUT_FILE\fR, as well as potential
incompatibilities, and informations about the codecs used in the file\. The
exit code will be set to a non\-zero value if there is at least one error
in the file\.
-.
-.IP
-The output format can either be plain text or XML using the \fB\-\-xml\fR
option\. It can also be disabled altogether using the \fB\-\-quiet\fR
option if you are only interested in the exit status\.
-.
-.IP
-Messages are divided into four specific levels of increasing importance:
-.
-.IP "\(bu" 4
-\fIinfo\fR: informational messages that do not pertain to the file validity
-.
-.IP "\(bu" 4
-\fIwarning\fR: messages that inform of oddities to the flv format but that
might not hamper file reading or playability, this is the default level
-.
-.IP "\(bu" 4
-\fIerror\fR: messages that inform of errors that might render the file
impossible to play or stream correctly
-.
-.IP "\(bu" 4
-\fIfatal\fR: messages that inform of errors that make further file reading
impossible therefore ending parsing completely
-.
-.IP "" 0
-.
-.IP
-The \fB\-\-level\fR option allows to limit the display of messages to a
minimum level among those, for example if the user is only interested in
error messages and above\.
-.
-.IP
-Each message or message template presented to the user is identified by a
specific code of the following format:
-.
-.IP
-\fB[level][topic][id]\fR
-.
-.IP "\(bu" 4
-\fIlevel\fR is an upper\-case letter that can be either I, W, E, F
according to the aforementioned message levels
-.
-.IP "\(bu" 4
-\fItopic\fR is a two\-digit integer representing the general topic of the
message
-.
-.IP "\(bu" 4
-\fIid\fR is a unique three\-digit identifier for the message, or message
template if parameterized
-.
-.IP "" 0
-.
-.IP
+.PD
+.IP \[bu] 2
+\f[B]error\f[]: messages that inform of errors that might render the
+file impossible to play or stream correctly
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]fatal\f[]: messages that inform of errors that make further file
+reading impossible therefore ending parsing completely
+.PP
+The \f[C]--level\f[] option allows to limit the display of messages to a
+minimum level among those, for example if the user is only interested in
+error messages and above.
+.PP
+Each message or message template presented to the user is identified by
+a specific code of the following format:
+.PP
+\f[C][level][topic][id]\f[]
+.IP \[bu] 2
+\f[B]level\f[] is an upper-case letter that can be either I, W, E, F
+according to the aforementioned message levels
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]topic\f[] is a two-digit integer representing the general topic of
+the message
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]id\f[] is a unique three-digit identifier for the message, or
+message template if parameterized
+.PP
Messages can be related to the following topics :
-.
-.IP "\(bu" 4
-\fI10\fR general flv file format
-.
-.IP "\(bu" 4
-\fI11\fR file header
-.
-.IP "\(bu" 4
-\fI12\fR previous tag size
-.
-.IP "\(bu" 4
-\fI20\fR tag format
-.
-.IP "\(bu" 4
-\fI30\fR tag types
-.
-.IP "\(bu" 4
-\fI40\fR timestamps
-.
-.IP "\(bu" 4
-\fI50\fR audio data
-.
-.IP "\(bu" 4
-\fI51\fR audio codecs
-.
-.IP "\(bu" 4
-\fI60\fR video data
-.
-.IP "\(bu" 4
-\fI61\fR video codecs
-.
-.IP "\(bu" 4
-\fI70\fR metadata
-.
-.IP "\(bu" 4
-\fI80\fR AMF data
-.
-.IP "\(bu" 4
-\fI81\fR keyframes
-.
-.IP "\(bu" 4
-\fI82\fR cue points
-.
-.IP "" 0
-.
-.IP
-For example, \fIW51050\fR represents a Warning in topic 51 with the id
050, which represents a warning message related to audio codecs, in that
case to signal that an audio tag has an unknown codec\.
-.
-.IP "\(bu" 4
-\fB\-U\fR, \fB\-\-update\fR: Update the given input file by inserting a
computed \fIonMetaData\fR tag\. If an output file is specified, it will be
created or overwritten instead and the input file will not be modified\. If
the original file is to be updated, a temporary file will be created in the
default temp directory of the platform, and it will be copied over the
original file at the end of the operation\. This is due to the fact that
the output file is written while the original file is being read due to the
two\-pass method\.
-.
-.IP
-The computed metadata contains among other data full keyframe
informations, in order to allow HTTP pseudo\-streaming and random\-access
seeking in the file\.
-.
-.IP
-By default, an \fIonLastSecond\fR tag will be inserted, unless the
\fB\-\-no\-last\-second\fR option is specified\.
-.
-.IP
-Normally overwritten by the update process, the existing metadata found in
the input file can be preserved by the \fB\-\-preserve\fR option\.
-.
-.IP
-It is also possible to insert custom string values with the \fB\-\-add\fR
option, which can be specified multiple times\.
-.
-.IP
-By default, the update operation is performed without output, unless the
\fB\-\-verbose\fR option is specified, or the \fB\-\-print\-metadata\fR is
used to print the newly written metadata to the standard output\.
-.
-.IP "" 0
-.
-.SH "OPTIONS"
-.
-.SS "DUMP"
-.
-.SS "FULL DUMP"
-.
-.SS "CHECK"
-.
-.SS "UPDATE"
-.
-.SH "FORMATS"
-.
-.SH "EXAMPLES"
-.
-.SH "EXIT STATUS"
-.
-.SH "BUGS"
-\fBflvmeta\fR does not support encrypted FLV files yet\.
-.
-.SH "AUTHOR"
-.
-.SH "COPYRIGHT"
-.
-.SH "CONTACT"
-
+.IP \[bu] 2
+\f[B]10\f[] general flv file format
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]11\f[] file header
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]12\f[] previous tag size
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]20\f[] tag format
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]30\f[] tag types
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]40\f[] timestamps
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]50\f[] audio data
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]51\f[] audio codecs
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]60\f[] video data
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]61\f[] video codecs
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]70\f[] metadata
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]80\f[] AMF data
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]81\f[] keyframes
+.PD 0
+.P
+.PD
+.IP \[bu] 2
+\f[B]82\f[] cue points
+.PP
+For example, represents a Warning in topic 51 with the id 050, which
+represents a warning message related to audio codecs, in that case to
+signal that an audio tag has an unknown codec.
+.SS -U, --update
+.PP
+Update the given input file by inserting a computed \f[I]onMetaData\f[]
+tag.
+If \f[I]OUTPUT_FILE\f[] is specified, it will be created or overwritten
+instead and the input file will not be modified.
+If the original file is to be updated, a temporary file will be created
+in the default temp directory of the platform, and it will be copied
+over the original file at the end of the operation.
+This is due to the fact that the output file is written while the
+original file is being read due to the two-pass method.
+.PP
+The computed metadata contains among other data full keyframe
+informations, in order to allow HTTP pseudo-streaming and random-access
+seeking in the file.
+.PP
+By default, an \f[I]onLastSecond\f[] tag will be inserted, unless the
+\f[C]--no-last-second\f[] option is specified.
+.PP
+Normally overwritten by the update process, the existing metadata found
+in the input file can be preserved by the \f[C]--preserve\f[] option.
+.PP
+It is also possible to insert custom string values with the
+\f[C]--add\f[] option, which can be specified multiple times.
+.PP
+By default, the update operation is performed without output, unless the
+\f[C]--verbose\f[] option is specified, or the \f[C]--print-metadata\f[]
+is used to print the newly written metadata to the standard output.
+.SH OPTIONS
+.SS DUMP
+.TP
+.B -d \f[I]FORMAT\f[], --dump-format=\f[I]FORMAT\f[]
+specify dump format where \f[I]FORMAT\f[] is `xml' (default), `json',
+`raw', or `yaml'
+.RS
+.RE
+.SS FULL DUMP
+.SS CHECK
+.SS UPDATE
+.SS GENERAL
+.SH FORMATS
+.SH EXAMPLES
+.SH EXIT STATUS
+.SH BUGS
+.PP
+\f[B]flvmeta\f[] does not support encrypted FLV files yet.
+.SH AUTHOR
+.SH COPYRIGHT
+.SH CONTACT

==============================================================================
Revision: 8f6576cf95d3
Author: Marc Noirot <marc....@gmail.com>
Date: Fri Apr 20 06:18:25 2012
Log: Added argument to the --event option usage string.

http://code.google.com/p/flvmeta/source/detail?r=8f6576cf95d3

Modified:
/src/flvmeta.c

=======================================
--- /src/flvmeta.c Tue Apr 3 02:23:47 2012
+++ /src/flvmeta.c Fri Apr 20 06:18:25 2012
@@ -117,7 +117,7 @@
" -r, --raw equivalent to --dump-format=raw\n"
" -x, --xml equivalent to --dump-format=xml\n"
" -y, --yaml equivalent to --dump-format=yaml\n"
- " -e, --event specify the event to be dumped
instead of 'onMetadata'\n"
+ " -e, --event=EVENT specify the event to be dumped
instead of 'onMetadata'\n"
"\nCheck options:\n"
" -l, --level=LEVEL print only messages where level is
at least LEVEL\n"
" LEVEL is 'info', 'warning'
(default), 'error', or 'fatal'\n"

==============================================================================
Revision: 6fb9713d0345
Author: Marc Noirot <marc....@gmail.com>
Date: Fri Apr 20 06:19:52 2012
Log: Added ignore of build directories.

http://code.google.com/p/flvmeta/source/detail?r=6fb9713d0345

Modified:
/.gitignore

=======================================
--- /.gitignore Thu Apr 19 02:07:39 2012
+++ /.gitignore Fri Apr 20 06:19:52 2012
@@ -34,3 +34,4 @@
Makefile
cmake_install.cmake
install_manifest.txt
+/*build*

==============================================================================
Revision: 71abfe859288
Author: Marc Noirot <marc....@gmail.com>
Date: Fri Apr 20 06:21:34 2012
Log: Updated man page.

http://code.google.com/p/flvmeta/source/detail?r=71abfe859288

Modified:
/man/1/flvmeta.1
/man/1/flvmeta.1.md

=======================================
--- /man/1/flvmeta.1 Thu Apr 19 07:26:05 2012
+++ /man/1/flvmeta.1 Fri Apr 20 06:21:34 2012
@@ -271,13 +271,116 @@
.TP
.B -d \f[I]FORMAT\f[], --dump-format=\f[I]FORMAT\f[]
specify dump format where \f[I]FORMAT\f[] is `xml' (default), `json',
-`raw', or `yaml'
+`raw', or `yaml'.
+Also applicable for the \f[B]--full-dump\f[] command.
.RS
.RE
-.SS FULL DUMP
+.TP
+.B -j, --json
+equivalent to \f[B]--dump-format=json\f[]
+.RS
+.RE
+.TP
+.B -r, --raw
+equivalent to \f[B]--dump-format=raw\f[]
+.RS
+.RE
+.TP
+.B -x, --xml
+equivalent to \f[B]--dump-format=xml\f[]
+.RS
+.RE
+.TP
+.B -y, --yaml
+equivalent to \f[B]--dump-format=yaml\f[]
+.RS
+.RE
+.TP
+.B -e \f[I]EVENT\f[], --event=\f[I]EVENT\f[]
+specify the event to dump instead of \f[I]onMetaData\f[], for example
+\f[I]onLastSecond\f[].
+.RS
+.RE
.SS CHECK
+.TP
+.B -l \f[I]LEVEL\f[], --level=\f[I]LEVEL\f[]
+print only messages where level is at least \f[I]LEVEL\f[].
+The levels are, by ascending importance, `info', `warning' (default),
+`error', or `fatal'.
+.RS
+.RE
+.TP
+.B -q, --quiet
+do not print messages, only return the status code
+.RS
+.RE
+.TP
+.B -x, --xml
+generate an XML report instead of the default `compiler-friendly' text
+.RS
+.RE
.SS UPDATE
+.TP
+.B -m, --print-metadata
+print metadata to stdout after update using the format specified by the
+\f[B]--format\f[] option
+.RS
+.RE
+.TP
+.B -a \f[I]NAME=VALUE\f[], --add=\f[I]NAME=VALUE\f[]
+add a metadata string value to the output file
+.RS
+.RE
+.TP
+.B -s, --no-lastsecond
+do not create the \f[I]onLastSecond\f[] tag
+.RS
+.RE
+.TP
+.B -p, --preserve
+preserve input file existing \f[I]onMetadata\f[] tags
+.RS
+.RE
+.TP
+.B -f, --fix
+fix invalid tags from the input file
+.RS
+.RE
+.TP
+.B -i, --ignore
+ignore invalid tags from the input file (the default behaviour is to
+stop the update process with an error)
+.RS
+.RE
+.TP
+.B -t, --reset-timestamps
+reset timestamps so \f[I]OUTPUT_FILE\f[] starts at zero.
+This has been added because some FLV files are produced by cutting
+bigger files, and the software doing the cutting does not resets the
+timestamps as required by the standard, which can cause playback issues.
+.RS
+.RE
+.TP
+.B -k, \[em]all-keyframes
+index all keyframe tags, including duplicate timestamps
+.RS
+.RE
.SS GENERAL
+.TP
+.B -v, --verbose
+display informative messages
+.RS
+.RE
+.TP
+.B -V, --version
+print version information and exit
+.RS
+.RE
+.TP
+.B -h, --help
+display help on the program usage and exit
+.RS
+.RE
.SH FORMATS
.SH EXAMPLES
.SH EXIT STATUS
=======================================
--- /man/1/flvmeta.1.md Thu Apr 19 07:26:05 2012
+++ /man/1/flvmeta.1.md Fri Apr 20 06:21:34 2012
@@ -17,17 +17,17 @@

# DESCRIPTION

-**flvmeta** is a command-line utility aimed at manipulating Adobe(tm)
Flash Video
-files (FLV), through several commands, only one of which can be used for
each
-invocation of the program.
+**flvmeta** is a command-line utility aimed at manipulating Adobe(tm) Flash
+Video files (FLV), through several commands, only one of which can be used
for
+each invocation of the program.

It possesses the ability to compute and inject a variety of values in the
_onMetaData_ event tag, including keyframe indices used by most video
players to
allow random-access seeking, notably for HTTP pseudo-streamed files via a
server-side module, by having the client send the file offset looked up
for the
nearest desired keyframe.
-Tools such as **flvmeta** must be used in the case the initial encoding
process is
-unable to inject those metadata.
+Tools such as **flvmeta** must be used in the case the initial encoding
process
+is unable to inject those metadata.

It can also optionnally inject the _onLastSecond_ event, used to signal
the end
of playback, for example to revert the player software to a 'stopped'
state.
@@ -43,8 +43,8 @@
This analysis can also determine and display the minimal Flash Player
version
which can be used to correctly play a given file, as well as codec
information.

-**flvmeta** can operate on arbitrarily large files, and can handle FLV
files using
-extended (32-bit) timestamps.
+**flvmeta** can operate on arbitrarily large files, and can handle FLV
files
+using extended (32-bit) timestamps.
It can guess video frame dimensions for all known video codecs supported
by the
official FLV specification.

@@ -173,16 +173,78 @@

-d *FORMAT*, \--dump-format=*FORMAT*
: specify dump format where *FORMAT* is 'xml' (default), 'json', 'raw',
or
- 'yaml'
-
-## FULL DUMP
+ 'yaml'. Also applicable for the **\--full-dump** command.
+
+-j, \--json
+: equivalent to **\--dump-format=json**
+
+-r, \--raw
+: equivalent to **\--dump-format=raw**
+
+-x, \--xml
+: equivalent to **\--dump-format=xml**
+
+-y, \--yaml
+: equivalent to **\--dump-format=yaml**
+
+-e *EVENT*, \--event=*EVENT*
+: specify the event to dump instead of _onMetaData_, for example
+ _onLastSecond_.

## CHECK

+-l *LEVEL*, \--level=*LEVEL*
+: print only messages where level is at least *LEVEL*. The levels are, by
+ ascending importance, 'info', 'warning' (default), 'error', or 'fatal'.
+
+-q, \--quiet
+: do not print messages, only return the status code
+
+-x, \--xml
+: generate an XML report instead of the default 'compiler-friendly' text
+
## UPDATE

+-m, \--print-metadata
+: print metadata to stdout after update using the format specified by
+ the **\--format** option
+
+-a *NAME=VALUE*, \--add=*NAME=VALUE*
+: add a metadata string value to the output file
+
+-s, \--no-lastsecond
+: do not create the *onLastSecond* tag
+
+-p, \--preserve
+: preserve input file existing *onMetadata* tags
+
+-f, \--fix
+: fix invalid tags from the input file
+
+-i, \--ignore
+: ignore invalid tags from the input file (the default behaviour is to
stop
+ the update process with an error)
+
+-t, \--reset-timestamps
+: reset timestamps so *OUTPUT_FILE* starts at zero. This has been added
+ because some FLV files are produced by cutting bigger files, and the
+ software doing the cutting does not resets the timestamps as required
+ by the standard, which can cause playback issues.
+
+-k, --all-keyframes
+: index all keyframe tags, including duplicate timestamps
+
## GENERAL

+-v, \--verbose
+: display informative messages
+
+-V, \--version
+: print version information and exit
+
+-h, \--help
+: display help on the program usage and exit
+
# FORMATS

# EXAMPLES

==============================================================================
Revision: 7c935d3c082b
Author: Marc Noirot <marc....@gmail.com>
Date: Sun Apr 22 02:58:28 2012
Log: Fixed warnings related to 64-bit type castings.

http://code.google.com/p/flvmeta/source/detail?r=7c935d3c082b

Modified:
/src/dump_yaml.c
/src/flv.c

=======================================
--- /src/dump_yaml.c Tue Apr 3 02:23:47 2012
+++ /src/dump_yaml.c Sun Apr 22 02:58:28 2012
@@ -40,16 +40,16 @@
switch (data->type) {
case AMF_TYPE_NUMBER:
sprintf(str, "%.12g", data->number_data);
- yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)str, strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)str, (int)strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);
break;
case AMF_TYPE_BOOLEAN:
sprintf(str, (data->boolean_data) ? "true" : "false");
- yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)str, strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)str, (int)strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);
break;
case AMF_TYPE_STRING:
- yaml_scalar_event_initialize(&event, NULL, NULL,
amf_string_get_bytes(data), amf_string_get_size(data), 1, 1,
YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL,
amf_string_get_bytes(data), (int)amf_string_get_size(data), 1, 1,
YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);
break;
case AMF_TYPE_OBJECT:
@@ -107,7 +107,7 @@
tzset();
t = localtime(&time);
strftime(str, sizeof(str), "%Y-%m-%dT%H:%M:%S", t);
- yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)str, strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)str, (int)strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);
break;
case AMF_TYPE_XML: break;
@@ -143,7 +143,7 @@
yaml_emitter_emit(emitter, &event);

sprintf(buffer, "%.3s", header->signature);
- yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)buffer, strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)buffer, (int)strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

/* hasVideo */
@@ -151,7 +151,7 @@
yaml_emitter_emit(emitter, &event);

sprintf(buffer, "%s",
flv_header_has_video(*header) ? "true" : "false");
- yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)buffer, strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)buffer, (int)strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

/* hasAudio */
@@ -159,7 +159,7 @@
yaml_emitter_emit(emitter, &event);

sprintf(buffer, "%s",
flv_header_has_audio(*header) ? "true" : "false");
- yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)buffer, strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)buffer, (int)strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

/* version */
@@ -167,7 +167,7 @@
yaml_emitter_emit(emitter, &event);

sprintf(buffer, "%i", header->version);
- yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)buffer, strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)buffer, (int)strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

/* start of tags array */
@@ -201,7 +201,7 @@
yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)"type",
4, 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

- yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
(int)strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

/* timestamp */
@@ -209,7 +209,7 @@
yaml_emitter_emit(emitter, &event);

sprintf(buffer, "%i", flv_tag_get_timestamp(*tag));
- yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)buffer,
strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)buffer,
(int)strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

/* data size */
@@ -217,7 +217,7 @@
yaml_emitter_emit(emitter, &event);

sprintf(buffer, "%i", flv_tag_get_body_length(*tag));
- yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)buffer,
strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)buffer,
(int)strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

/* offset */
@@ -225,7 +225,7 @@
yaml_emitter_emit(emitter, &event);

sprintf(buffer, "%" FILE_OFFSET_PRINTF_FORMAT "i",
parser->stream->current_tag_offset);
- yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)buffer,
strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)buffer,
(int)strlen(buffer), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

return OK;
@@ -249,7 +249,7 @@
yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)"codecID", 7, 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

- yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
(int)strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

str = dump_string_get_video_frame_type(vt);
@@ -257,7 +257,7 @@
yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)"frameType", 9, 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

- yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
(int)strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

yaml_mapping_end_event_initialize(&event);
@@ -284,7 +284,7 @@
yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)"type",
4, 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

- yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
(int)strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

str = dump_string_get_sound_size(at);
@@ -292,7 +292,7 @@
yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)"size",
4, 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

- yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
(int)strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

str = dump_string_get_sound_rate(at);
@@ -300,7 +300,7 @@
yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)"rate",
4, 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

- yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
(int)strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

str = dump_string_get_sound_format(at);
@@ -308,7 +308,7 @@
yaml_scalar_event_initialize(&event, NULL, NULL,
(yaml_char_t*)"format", 6, 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

- yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
+ yaml_scalar_event_initialize(&event, NULL, NULL, (yaml_char_t*)str,
(int)strlen(str), 1, 1, YAML_ANY_SCALAR_STYLE);
yaml_emitter_emit(emitter, &event);

yaml_mapping_end_event_initialize(&event);
=======================================
--- /src/flv.c Thu Apr 5 09:32:57 2012
+++ /src/flv.c Sun Apr 22 02:58:28 2012
@@ -248,11 +248,11 @@
/* if only name can be read, metadata are invalid */
data_size = amf_data_size(d);
if (stream->current_tag_body_length > data_size) {
- stream->current_tag_body_length -= data_size;
+ stream->current_tag_body_length -= (uint32)data_size;
}
else {
stream->current_tag_body_length = 0;
- stream->current_tag_body_overflow = data_size -
stream->current_tag_body_length;
+ stream->current_tag_body_overflow = (uint32)data_size -
stream->current_tag_body_length;

stream->state = FLV_STREAM_STATE_PREV_TAG_SIZE;
if (stream->current_tag_body_overflow > 0) {
@@ -275,10 +275,10 @@

data_size = amf_data_size(d);
if (stream->current_tag_body_length >= data_size) {
- stream->current_tag_body_length -= data_size;
+ stream->current_tag_body_length -= (uint32)data_size;
}
else {
- stream->current_tag_body_overflow = data_size -
stream->current_tag_body_length;
+ stream->current_tag_body_overflow = (uint32)data_size -
stream->current_tag_body_length;
stream->current_tag_body_length = 0;
}

@@ -305,7 +305,7 @@
bytes_number = (buffer_size > stream->current_tag_body_length) ?
stream->current_tag_body_length : buffer_size;
bytes_number = fread(buffer, sizeof(byte), bytes_number,
stream->flvin);

- stream->current_tag_body_length -= bytes_number;
+ stream->current_tag_body_length -= (uint32)bytes_number;

if (stream->current_tag_body_length == 0) {
stream->state = FLV_STREAM_STATE_PREV_TAG_SIZE;

Reply all
Reply to author
Forward
0 new messages