From: Michael Zucchi Date: Sun, 12 May 2019 09:54:53 +0000 (+0930) Subject: javadoc fixes. X-Git-Url: https://code.zedzone.au/cvs?a=commitdiff_plain;h=989012e78cb93ce954eb52a2690cd9c035d85ab3;p=jjmpeg javadoc fixes. --- diff --git a/Makefile b/Makefile index a6c4976..cbaada0 100644 --- a/Makefile +++ b/Makefile @@ -17,3 +17,12 @@ notzed.jjmpeg.fx_JDEPMOD=notzed.jjmpeg notzed.jjmpeg.demo_JDEPMOD=notzed.jjmpeg notzed.jjmpeg.awt notzed.jjmpeg.fx include java.make + +javadoc: + javadoc -d bin/doc/jjmpeg \ + --module-source-path "src/*/classes:bin/gen/*/classes:../nativez/src/*/classes" \ + --module-path $(JAVAFX_HOME)/lib:../nativez/bin/notzed.nativez \ + $(patsubst %,--module %,$(java_MODULES) notzed.nativez) \ + -stylesheetfile doc.css \ + -header '$(dist_NAME) v$(dist_VERSION) Code ZedZone' \ + -footer "Copyright (C) 2019 Michael Zucchi" diff --git a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVOptions.java b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVOptions.java index ed4e4e5..c62dd25 100644 --- a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVOptions.java +++ b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVOptions.java @@ -81,14 +81,18 @@ public abstract class AVOptions extends AVObject implements AVOptionsBits { public native AVDictionary getDictionary(String name, int flags); /** - * Call set_options_string(this, serialised, "=", ",") + * Set serialised options. + *

+ * Calls set_options_string(this, serialised, "=", ",") * * @param serialised */ public native void setOptions(String serialised); /** - * Call opt_serialise(this, opt_flags, ser_flags, &result, '=', ',') + * Get serialised options. + *

+ * Calls opt_serialise(this, opt_flags, ser_flags, &result, '=', ',') * * @param opt_flags * @param ser_flags diff --git a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVPixelReader.java b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVPixelReader.java index 8966122..f7578da 100644 --- a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVPixelReader.java +++ b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVPixelReader.java @@ -25,7 +25,7 @@ import java.nio.Buffer; *

* This interface allows one to retrieve pixels by bands to a specific format. * - * @see AVFrame:getPixelReader + * @see AVFrame#getPixelReader */ public interface AVPixelReader { diff --git a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVSampleReader.java b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVSampleReader.java index 4ab774a..c83dd95 100644 --- a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVSampleReader.java +++ b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/AVSampleReader.java @@ -40,12 +40,12 @@ public interface AVSampleReader { /** * Retrieve converted samples. *

+ * TODO: pass in lengh and keep calling until drained. problem is how to track the state internally. * * @param buffer output buffer * @param offset output buffer offset * @param length maximum amount to read, this must currently be at least {@link getNumSamples} * sample data size * channels. * @return The number of valid samples converted. - * @todo pass in lengh and keep calling until drained. problem is how to track the state internally. */ public int getSamples(byte[] buffer, int offset, int length); diff --git a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/SwsContext.java b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/SwsContext.java index c293c46..4487e8e 100644 --- a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/SwsContext.java +++ b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/SwsContext.java @@ -25,7 +25,7 @@ import java.nio.ByteBuffer; *

* See also AVFrame.getPixelReader() for a higher level implementation. *

- * @deprecated Not fully implemented Use {@link AVFrame:getPixelReader} + * @deprecated Not fully implemented Use {@link AVFrame#getPixelReader} */ @Deprecated public class SwsContext extends AVObject { diff --git a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/io/JJMediaReader.java b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/io/JJMediaReader.java index 16aa7c5..b2678bc 100644 --- a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/io/JJMediaReader.java +++ b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/io/JJMediaReader.java @@ -213,7 +213,7 @@ public class JJMediaReader implements AutoCloseable { /** * Attempt to seek to the nearest millisecond. *

- * The next frame will have pts (in milliseconds) >= stamp. + * The next frame will have pts (in milliseconds) ≥ stamp. * * @param stamp * @throws AVIOException @@ -235,9 +235,9 @@ public class JJMediaReader implements AutoCloseable { } /** - * Seek in stream units + * Seek in stream units. *

- * The next frame will have pts >= stamp + * The next frame will have pts ≥ stamp * * @param stamp * @throws AVIOException diff --git a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/io/JJMediaWriter.java b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/io/JJMediaWriter.java index aff403c..4b7ba98 100644 --- a/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/io/JJMediaWriter.java +++ b/src/notzed.jjmpeg/classes/au/notzed/jjmpeg/io/JJMediaWriter.java @@ -356,8 +356,8 @@ public class JJMediaWriter implements AutoCloseable { * Write unencoded frame. *

* The frame is passed through the - * {@link AVCodecContext#sendFrame(au.notzed.jjmpeg.AVFrame) / - * {@link AVCodecContext#receivePacket(au.notzed.jjmpeg.AVPacket) + * {@link AVCodecContext#sendFrame(au.notzed.jjmpeg.AVFrame)} / + * {@link AVCodecContext#receivePacket(au.notzed.jjmpeg.AVPacket)} * sequence and then written to the output. * * @param frame diff --git a/src/notzed.jjmpeg/gen/extract-defines.pl b/src/notzed.jjmpeg/gen/extract-defines.pl index cddf729..b4be487 100644 --- a/src/notzed.jjmpeg/gen/extract-defines.pl +++ b/src/notzed.jjmpeg/gen/extract-defines.pl @@ -25,11 +25,12 @@ $inc = ""; $start = ""; $stop = ""; # keep all comments -$keepc = 1; +$keepc = 0; $shift = ""; $interface = ""; $class = ""; $type = "int"; +$nomulti = 0; @defines = (); %process = (); @@ -149,6 +150,26 @@ sub scanCopyright { print C "printf(\"\\t */\\n\\n\");\n"; } +sub tohtml { + my $t = $_[0]; + + $t =~ s@\"@\\\"@g; + $t =~ s@&@\&@g; + $t =~ s@<=@\≤@g; + $t =~ s@>=@\ⅇ@g; + $t =~ s@<@\<@g; + $t =~ s@>@\>@g; + + # strip some doxygen? crap + $t =~ s:\@\{::g; + $t =~ s:\@\}::g; + $t =~ s:\@defgroup::g; + $t =~ s:\@see :see :g; + $t =~ s:\@ingroup :ingroup :g; + + return $t; +} + sub scan { my %o = %{$_[0]}; my $d = $o{define}; @@ -175,11 +196,10 @@ sub scan { my $def = $1; #print $1."\n"; if ($lastc ne "") { - $lastc =~ s@\"@\\\"@g; + $lastc = tohtml($lastc); print C "\tprintf(\"%s\", \"$lastc\");\n"; } elsif (m@///< (.*)@ || m@/\*\|<(.*)\*@) { - my $com = $1; - $com =~ s@\"@\\\"@g; + my $com = tohtml($1); # handle single-line comments, perhaps these should override print C "\tprintf(\"\\t/**\\n\\t * $com\\n\\t */\\n\");\n"; } diff --git a/src/notzed.jjmpeg/gen/extract-enum.pl b/src/notzed.jjmpeg/gen/extract-enum.pl index 32c1c15..37eff67 100644 --- a/src/notzed.jjmpeg/gen/extract-enum.pl +++ b/src/notzed.jjmpeg/gen/extract-enum.pl @@ -60,9 +60,10 @@ while () { last if m/^\};/; if (m@///< (.*)@) { - s@\*/@@g; - s@/\*@@g; - print C "\tprintf(\"\\t/**\\n\\t * $1\\n\\t */\\n\");\n"; + my $t = tohtml($1); + $t =~ s@\*/@@g; + $t =~ s@/\*@@g; + print C "\tprintf(\"\\t/**\\n\\t * $t\\n\\t */\\n\");\n"; } if (m/($d\w*) = (0x[0-9x]+)/) { @@ -95,6 +96,26 @@ close IN; exit 0; +sub tohtml { + my $t = $_[0]; + + $t =~ s@\"@\\\"@g; + $t =~ s@&@\&@g; + $t =~ s@<=@\≤@g; + $t =~ s@>=@\ⅇ@g; + $t =~ s@<@\<@g; + $t =~ s@>@\>@g; + + # strip some doxygen? crap + $t =~ s:\@\{::g; + $t =~ s:\@\}::g; + $t =~ s:\@defgroup::g; + $t =~ s:\@see :see :g; + $t =~ s:\@ingroup.*::g; + + return $t; +} + sub scanCopyright { my $h = $_[0]; my $copyright = ""; diff --git a/src/notzed.jjmpeg/gen/gen.make b/src/notzed.jjmpeg/gen/gen.make index 6281db8..76b758b 100644 --- a/src/notzed.jjmpeg/gen/gen.make +++ b/src/notzed.jjmpeg/gen/gen.make @@ -94,4 +94,4 @@ $(tmp)/AVIOContextBits-gen.c: $(extract_defines) $(dep) $(tmp)/AVOptionsBits-gen.c: $(extract_defines) $(dep) @install -d $(@D) - perl $(extract_defines) -c -interface AVOptionsBits -f $(FFMPEG_HOME) -header libavutil/opt.h -d AV_OPT_ $@ + perl $(extract_defines) -interface AVOptionsBits -f $(FFMPEG_HOME) -header libavutil/opt.h -d AV_OPT_ $@