changeset 10798:c365d3fe603b

Merge
author kcr
date Mon, 06 Nov 2017 15:40:16 -0800
parents 1dc2d38bc276 beafd0f2d662
children abae99b73529
files README-java-options apps/samples/Ensemble8/src/samples/java/ensemble/samples/media/alphamediaplayer/AlphaMediaPlayerApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/media/alphamediaplayer/PlanetaryPlayerPane.java build.gradle modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/platform/java/FLVMetadataParser.java modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvdemux.c modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvdemux.h modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvmetadata.c modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvmetadata.h modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvparser.c modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvparser.h modules/javafx.media/src/main/native/gstreamer/plugins/vp6/fxmplugin.c modules/javafx.media/src/main/native/gstreamer/plugins/vp6/fxmplugin.h modules/javafx.media/src/main/native/gstreamer/plugins/vp6/vp6decoder.c modules/javafx.media/src/main/native/gstreamer/plugins/vp6/vp6decoder.h
diffstat 49 files changed, 194 insertions(+), 5101 deletions(-) [+]
line wrap: on
line diff
--- a/README-java-options	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-The following environment variable must be set in order to run gradle 3.1 with the latest JDK 9 build:
-
-export _JAVA_OPTIONS="-Dsun.reflect.debugModuleAccessChecks=true --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED"
--- a/apps/samples/Ensemble8/src/generated/java/ensemble/generated/Samples.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/apps/samples/Ensemble8/src/generated/java/ensemble/generated/Samples.java	Mon Nov 06 15:40:16 2017 -0800
@@ -127,7 +127,6 @@
     private static final SampleInfo SAMPLE_120 = new SampleInfo("TilePane","An example of a TilePane layout. ","/Layout/TilePane","/ensemble/samples/layout/tilepane","ensemble.samples.layout.tilepane.TilePaneApp","/ensemble/samples/layout/tilepane/preview.png",new String[]{"/ensemble/samples/shared-resources/icon-48x48.png","/ensemble/samples/layout/tilepane/TilePaneApp.java",},new String[]{"javafx.scene.control.Button","javafx.scene.image.ImageView","javafx.scene.layout.TilePane",},new String[]{"http://docs.oracle.com/javase/8/javafx/layout-tutorial/index.html","JavaFX Layouts",},new String[]{"/Layout/AnchorPane","/Layout/BorderPane","/Layout/FlowPane","/Layout/GridPane","/Layout/HBox","/Graphics 2d/Images/Image Creation","/Layout/StackPane","/Layout/VBox",},"/ensemble/samples/layout/tilepane/TilePaneApp.java",new PlaygroundProperty[]{},new ConditionalFeature[]{},true);
     private static final SampleInfo SAMPLE_121 = new SampleInfo("VBox","A simple example of a VBox layout. ","/Layout/VBox","/ensemble/samples/layout/vbox","ensemble.samples.layout.vbox.VBoxApp","/ensemble/samples/layout/vbox/preview.png",new String[]{"/ensemble/samples/layout/vbox/VBoxApp.java",},new String[]{"javafx.scene.control.CheckBox","javafx.scene.control.Label","javafx.scene.layout.VBox",},new String[]{"http://docs.oracle.com/javase/8/javafx/layout-tutorial/index.html","JavaFX Layouts",},new String[]{"/Layout/AnchorPane","/Layout/BorderPane","/Layout/FlowPane","/Layout/GridPane","/Layout/HBox","/Layout/StackPane","/Layout/TilePane",},"/ensemble/samples/layout/vbox/VBoxApp.java",new PlaygroundProperty[]{},new ConditionalFeature[]{},true);
     private static final SampleInfo SAMPLE_122 = new SampleInfo("Advanced Media","An advanced media player with controls for play/pause, seek, and volume. ","/Media/Advanced Media","/ensemble/samples/media/advancedmedia","ensemble.samples.media.advancedmedia.AdvancedMediaApp","/ensemble/samples/media/advancedmedia/preview.png",new String[]{"/ensemble/samples/media/advancedmedia/AdvancedMediaApp.java","/ensemble/samples/shared-resources/playbutton.png","/ensemble/samples/shared-resources/pausebutton.png","/ensemble/samples/media/advancedmedia/MediaControl.java",},new String[]{"javafx.scene.media.Media","javafx.scene.media.MediaPlayer",},new String[]{"http://docs.oracle.com/javase/8/javafx/media-tutorial/overview.htm#JFXMD101","Using JavaFX Media",},new String[]{"/Media/Alpha Media Player","/Media/Overlay Media Player","/Media/Streaming Media Player",},"/ensemble/samples/media/advancedmedia/AdvancedMediaApp.java",new PlaygroundProperty[]{},new ConditionalFeature[]{ConditionalFeature.WEB,ConditionalFeature.MEDIA,},false);
-    private static final SampleInfo SAMPLE_123 = new SampleInfo("Alpha Media Player","An alpha media player with 2 different media views and alpha channels. ","/Media/Alpha Media Player","/ensemble/samples/media/alphamediaplayer","ensemble.samples.media.alphamediaplayer.AlphaMediaPlayerApp","/ensemble/samples/media/alphamediaplayer/preview.png",new String[]{"/ensemble/samples/media/alphamediaplayer/AlphaMediaPlayerApp.java","/ensemble/samples/media/alphamediaplayer/PlanetaryPlayerPane.java","/ensemble/samples/media/alphamediaplayer/AlphaMediaPlayer.css",},new String[]{"javafx.scene.media.MediaPlayer","javafx.scene.media.Media",},new String[]{"http://docs.oracle.com/javase/8/javafx/media-tutorial/overview.htm#JFXMD101","Using JavaFX Media",},new String[]{"/Media/Advanced Media","/Media/Overlay Media Player","/Media/Streaming Media Player",},"/ensemble/samples/media/alphamediaplayer/AlphaMediaPlayerApp.java",new PlaygroundProperty[]{new PlaygroundProperty(null,"arthPos","min","-100","max","100","name","Arth Position"),new PlaygroundProperty(null,"fierPos","min","-100","max","100","name","Fier Position"),new PlaygroundProperty(null,"arthRate","min","0.1","max","1","name","Arth Rate"),new PlaygroundProperty(null,"fierRate","min","0.1","max","1","name","Fier Rate"),},new ConditionalFeature[]{ConditionalFeature.WEB,ConditionalFeature.MEDIA,},false);
     private static final SampleInfo SAMPLE_124 = new SampleInfo("Audio Clip","A sample that demonstrates the basics of AudioClips. ","/Media/Audio Clip","/ensemble/samples/media/audioclip","ensemble.samples.media.audioclip.AudioClipApp","/ensemble/samples/media/audioclip/preview.png",new String[]{"/ensemble/samples/shared-resources/Note1.wav","/ensemble/samples/shared-resources/Note2.wav","/ensemble/samples/shared-resources/Note3.wav","/ensemble/samples/shared-resources/Note4.wav","/ensemble/samples/shared-resources/Note5.wav","/ensemble/samples/shared-resources/Note6.wav","/ensemble/samples/shared-resources/Note7.wav","/ensemble/samples/shared-resources/Note8.wav","/ensemble/samples/media/audioclip/AudioClipApp.java",},new String[]{"javafx.scene.layout.StackPane","javafx.scene.media.AudioClip",},new String[]{"http://docs.oracle.com/javase/8/javafx/media-tutorial/overview.htm#JFXMD101","Using JavaFX Media",},new String[]{"/Media/Alpha Media Player","/Media/Overlay Media Player","/Media/Streaming Media Player","/Graphics 3d/Xylophone",},"/ensemble/samples/media/audioclip/AudioClipApp.java",new PlaygroundProperty[]{},new ConditionalFeature[]{ConditionalFeature.WEB,ConditionalFeature.MEDIA,},false);
     private static final SampleInfo SAMPLE_125 = new SampleInfo("Overlay Media Player","A media player with controls for play, pause, stop, seek, and volume. This media player also demonstrates overlaying the player controls on top of the media. ","/Media/Overlay Media Player","/ensemble/samples/media/overlaymediaplayer","ensemble.samples.media.overlaymediaplayer.OverlayMediaPlayerApp","/ensemble/samples/media/overlaymediaplayer/preview.png",new String[]{"/ensemble/samples/media/overlaymediaplayer/OverlayMediaPlayerApp.java","/ensemble/samples/media/overlaymediaplayer/PlayerPane.java","/ensemble/samples/media/overlaymediaplayer/OverlayMediaPlayer.css",},new String[]{"javafx.scene.media.MediaPlayer","javafx.scene.media.Media",},new String[]{"http://docs.oracle.com/javase/8/javafx/media-tutorial/overview.htm#JFXMD101","Using JavaFX Media",},new String[]{"/Media/Alpha Media Player","/Media/Overlay Media Player","/Media/Streaming Media Player",},"/ensemble/samples/media/overlaymediaplayer/OverlayMediaPlayerApp.java",new PlaygroundProperty[]{},new ConditionalFeature[]{ConditionalFeature.WEB,ConditionalFeature.MEDIA,},false);
     private static final SampleInfo SAMPLE_126 = new SampleInfo("Streaming Media Player","A media player with controls for play, pause, stop, seek, and volume. This media player is playing media via HTTP Live Streaming, also known as HLS. ","/Media/Streaming Media Player","/ensemble/samples/media/streamingmediaplayer","ensemble.samples.media.streamingmediaplayer.StreamingMediaPlayerApp","/ensemble/samples/media/streamingmediaplayer/preview.png",new String[]{"/ensemble/samples/media/streamingmediaplayer/PlayerPane.java","/ensemble/samples/media/streamingmediaplayer/StreamingMediaPlayerApp.java","/ensemble/samples/media/streamingmediaplayer/StreamingMediaPlayer.css",},new String[]{"javafx.scene.media.MediaPlayer","javafx.scene.media.Media",},new String[]{"http://docs.oracle.com/javase/8/javafx/media-tutorial/overview.htm#JFXMD101","Using JavaFX Media",},new String[]{"/Media/Advanced Media","/Media/Alpha Media Player","/Media/Overlay Media Player",},"/ensemble/samples/media/streamingmediaplayer/StreamingMediaPlayerApp.java",new PlaygroundProperty[]{},new ConditionalFeature[]{ConditionalFeature.WEB,ConditionalFeature.MEDIA,},false);
@@ -141,7 +140,7 @@
     private static final SampleInfo SAMPLE_134 = new SampleInfo("Key Stroke Motion","An example of animation generated from key events. Click the grey area to give it focus and try typing letters. ","/Scenegraph/Events/Key Stroke Motion","/ensemble/samples/scenegraph/events/keystrokemotion","ensemble.samples.scenegraph.events.keystrokemotion.KeyStrokeMotionApp","/ensemble/samples/scenegraph/events/keystrokemotion/preview.png",new String[]{"/ensemble/samples/scenegraph/events/keystrokemotion/KeyStrokeMotionApp.java","/ensemble/samples/scenegraph/events/keystrokemotion/LettersPane.java",},new String[]{"javafx.animation.Interpolator","javafx.scene.input.KeyEvent","javafx.scene.input.MouseEvent","javafx.scene.layout.Region",},new String[]{"http://docs.oracle.com/javase/8/javafx/events-tutorial/events.htm#JFXED117","JavaFX Events",},new String[]{"/Graphics 2d/Effects/Drop Shadow","/Animation/Interpolator","/Scenegraph/Events/KeyEvent","/Scenegraph/Events/MouseEvent",},"/ensemble/samples/scenegraph/events/keystrokemotion/KeyStrokeMotionApp.java",new PlaygroundProperty[]{},new ConditionalFeature[]{},false);
     private static final SampleInfo SAMPLE_135 = new SampleInfo("MouseEvent","A sample that demonstrates various mouse and scroll events and their usage. Click the circles and drag them across the screen. Scroll the whole screen. All events are logged to the console. ","/Scenegraph/Events/MouseEvent","/ensemble/samples/scenegraph/events/mouseevent","ensemble.samples.scenegraph.events.mouseevent.MouseEventApp","/ensemble/samples/scenegraph/events/mouseevent/preview.png",new String[]{"/ensemble/samples/scenegraph/events/mouseevent/MouseEventApp.java",},new String[]{"javafx.scene.Cursor","javafx.scene.input.MouseEvent","javafx.scene.input.ScrollEvent","javafx.scene.paint.LinearGradient","javafx.scene.paint.RadialGradient","javafx.scene.shape.Circle",},new String[]{"http://docs.oracle.com/javase/8/javafx/events-tutorial/events.htm#JFXED117","JavaFX Events",},new String[]{"/Scenegraph/Events/Cursor","/Scenegraph/Events/Gesture Event","/Scenegraph/Events/KeyEvent","/Scenegraph/Events/Key Stroke Motion","/Scenegraph/Events/Multi-Touch",},"/ensemble/samples/scenegraph/events/mouseevent/MouseEventApp.java",new PlaygroundProperty[]{},new ConditionalFeature[]{},false);
     private static final SampleInfo SAMPLE_136 = new SampleInfo("Multi-Touch","A sample that demonstrates multi-touch support. You can zoom in and out of the images and also rotate the images with multi-touch. ","/Scenegraph/Events/Multi-Touch","/ensemble/samples/scenegraph/events/multitouch","ensemble.samples.scenegraph.events.multitouch.MultiTouchApp","/ensemble/samples/scenegraph/events/multitouch/preview.png",new String[]{"/ensemble/samples/scenegraph/events/multitouch/MultiTouchApp.java","/ensemble/samples/scenegraph/events/multitouch/MultiTouchImageView.java","/ensemble/samples/shared-resources/warning.png","/ensemble/samples/shared-resources/Animal1.jpg","/ensemble/samples/shared-resources/Animal2.jpg","/ensemble/samples/shared-resources/Animal3.jpg","/ensemble/samples/scenegraph/events/multitouch/MultiTouchPane.java",},new String[]{"javafx.scene.effect.BlurType","javafx.scene.effect.DropShadow","javafx.scene.image.ImageView","javafx.scene.input.MouseEvent","javafx.scene.input.RotateEvent","javafx.scene.input.ZoomEvent","javafx.scene.layout.StackPane","javafx.scene.paint.Color","javafx.scene.shape.Rectangle",},new String[]{"http://docs.oracle.com/javase/8/javafx/events-tutorial/events.htm#JFXED117","JavaFX Events",},new String[]{"/Scenegraph/Events/Cursor","/Scenegraph/Events/Gesture Event","/Scenegraph/Events/KeyEvent","/Scenegraph/Events/Key Stroke Motion",},"/ensemble/samples/scenegraph/events/multitouch/MultiTouchApp.java",new PlaygroundProperty[]{},new ConditionalFeature[]{},true);
-    public static final SampleCategory ROOT = new SampleCategory("ROOT",null,null,new SampleCategory[]{new SampleCategory("Animation",new SampleInfo[]{SAMPLE_0,SAMPLE_1,SAMPLE_2,},new SampleInfo[]{SAMPLE_0,SAMPLE_1,SAMPLE_2,SAMPLE_3,SAMPLE_4,SAMPLE_5,SAMPLE_6,SAMPLE_7,SAMPLE_8,SAMPLE_9,SAMPLE_10,SAMPLE_11,SAMPLE_12,},new SampleCategory[]{new SampleCategory("Transitions",new SampleInfo[]{SAMPLE_3,SAMPLE_4,SAMPLE_5,SAMPLE_6,SAMPLE_7,SAMPLE_8,SAMPLE_9,SAMPLE_10,SAMPLE_11,SAMPLE_12,},null,null),}),new SampleCategory("Charts",new SampleInfo[]{SAMPLE_13,SAMPLE_14,},new SampleInfo[]{SAMPLE_15,SAMPLE_16,SAMPLE_17,SAMPLE_18,SAMPLE_19,SAMPLE_20,SAMPLE_21,SAMPLE_22,SAMPLE_23,SAMPLE_13,SAMPLE_14,SAMPLE_24,SAMPLE_25,SAMPLE_26,SAMPLE_27,SAMPLE_28,SAMPLE_29,SAMPLE_30,},new SampleCategory[]{new SampleCategory("Area",new SampleInfo[]{SAMPLE_15,SAMPLE_16,SAMPLE_17,SAMPLE_18,},null,null),new SampleCategory("Bar",new SampleInfo[]{SAMPLE_19,SAMPLE_20,SAMPLE_21,SAMPLE_22,SAMPLE_23,},null,null),new SampleCategory("Line",new SampleInfo[]{SAMPLE_24,SAMPLE_25,SAMPLE_26,},null,null),new SampleCategory("Pie",new SampleInfo[]{SAMPLE_27,SAMPLE_28,},null,null),new SampleCategory("Scatter",new SampleInfo[]{SAMPLE_29,SAMPLE_30,},null,null),}),new SampleCategory("Controls",new SampleInfo[]{SAMPLE_31,SAMPLE_32,SAMPLE_33,SAMPLE_34,SAMPLE_35,SAMPLE_36,SAMPLE_37,SAMPLE_38,SAMPLE_39,SAMPLE_40,SAMPLE_41,SAMPLE_42,SAMPLE_43,SAMPLE_44,SAMPLE_45,SAMPLE_46,SAMPLE_47,SAMPLE_48,SAMPLE_49,SAMPLE_50,SAMPLE_51,SAMPLE_52,SAMPLE_53,},new SampleInfo[]{SAMPLE_31,SAMPLE_54,SAMPLE_55,SAMPLE_56,SAMPLE_32,SAMPLE_33,SAMPLE_34,SAMPLE_35,SAMPLE_36,SAMPLE_37,SAMPLE_38,SAMPLE_57,SAMPLE_58,SAMPLE_59,SAMPLE_39,SAMPLE_40,SAMPLE_41,SAMPLE_42,SAMPLE_43,SAMPLE_44,SAMPLE_45,SAMPLE_46,SAMPLE_47,SAMPLE_48,SAMPLE_49,SAMPLE_60,SAMPLE_61,SAMPLE_62,SAMPLE_63,SAMPLE_64,SAMPLE_65,SAMPLE_66,SAMPLE_67,SAMPLE_68,SAMPLE_50,SAMPLE_69,SAMPLE_70,SAMPLE_51,SAMPLE_52,SAMPLE_53,},new SampleCategory[]{new SampleCategory("Button",new SampleInfo[]{SAMPLE_54,SAMPLE_55,SAMPLE_56,},null,null),new SampleCategory("Listview",new SampleInfo[]{SAMPLE_57,SAMPLE_58,SAMPLE_59,},null,null),new SampleCategory("Text",new SampleInfo[]{SAMPLE_60,SAMPLE_61,SAMPLE_62,SAMPLE_63,SAMPLE_64,SAMPLE_65,SAMPLE_66,SAMPLE_67,SAMPLE_68,},null,null),new SampleCategory("Toolbar",new SampleInfo[]{SAMPLE_69,SAMPLE_70,},null,null),}),new SampleCategory("Graphics 2d",new SampleInfo[]{SAMPLE_71,SAMPLE_72,SAMPLE_73,SAMPLE_74,SAMPLE_75,SAMPLE_76,SAMPLE_77,SAMPLE_78,SAMPLE_79,SAMPLE_80,},new SampleInfo[]{SAMPLE_71,SAMPLE_72,SAMPLE_73,SAMPLE_74,SAMPLE_75,SAMPLE_76,SAMPLE_77,SAMPLE_81,SAMPLE_82,SAMPLE_83,SAMPLE_84,SAMPLE_85,SAMPLE_78,SAMPLE_86,SAMPLE_87,SAMPLE_88,SAMPLE_89,SAMPLE_90,SAMPLE_91,SAMPLE_79,SAMPLE_92,SAMPLE_93,SAMPLE_94,SAMPLE_95,SAMPLE_96,SAMPLE_97,SAMPLE_98,SAMPLE_99,SAMPLE_100,SAMPLE_101,SAMPLE_80,},new SampleCategory[]{new SampleCategory("Effects",new SampleInfo[]{SAMPLE_81,SAMPLE_82,SAMPLE_83,SAMPLE_84,SAMPLE_85,},null,null),new SampleCategory("Images",new SampleInfo[]{SAMPLE_86,SAMPLE_87,SAMPLE_88,},null,null),new SampleCategory("Paints",new SampleInfo[]{SAMPLE_89,SAMPLE_90,SAMPLE_91,},null,null),new SampleCategory("Shapes",new SampleInfo[]{SAMPLE_92,SAMPLE_93,SAMPLE_94,SAMPLE_95,SAMPLE_96,SAMPLE_97,SAMPLE_98,SAMPLE_99,SAMPLE_100,SAMPLE_101,},null,null),}),new SampleCategory("Graphics 3d",new SampleInfo[]{SAMPLE_102,SAMPLE_103,SAMPLE_104,SAMPLE_105,SAMPLE_106,},new SampleInfo[]{SAMPLE_102,SAMPLE_103,SAMPLE_104,SAMPLE_105,SAMPLE_106,},null),new SampleCategory("Language",new SampleInfo[]{SAMPLE_107,SAMPLE_108,SAMPLE_109,SAMPLE_110,SAMPLE_111,},new SampleInfo[]{SAMPLE_107,SAMPLE_112,SAMPLE_113,SAMPLE_108,SAMPLE_109,SAMPLE_110,SAMPLE_111,},new SampleCategory[]{new SampleCategory("Concurrency",new SampleInfo[]{SAMPLE_112,SAMPLE_113,},null,null),}),new SampleCategory("Layout",new SampleInfo[]{SAMPLE_114,SAMPLE_115,SAMPLE_116,SAMPLE_117,SAMPLE_118,SAMPLE_119,SAMPLE_120,SAMPLE_121,},new SampleInfo[]{SAMPLE_114,SAMPLE_115,SAMPLE_116,SAMPLE_117,SAMPLE_118,SAMPLE_119,SAMPLE_120,SAMPLE_121,},null),new SampleCategory("Media",new SampleInfo[]{SAMPLE_122,SAMPLE_123,SAMPLE_124,SAMPLE_125,SAMPLE_126,},new SampleInfo[]{SAMPLE_122,SAMPLE_123,SAMPLE_124,SAMPLE_125,SAMPLE_126,},null),new SampleCategory("Scenegraph",new SampleInfo[]{SAMPLE_127,SAMPLE_128,SAMPLE_129,SAMPLE_130,},new SampleInfo[]{SAMPLE_127,SAMPLE_128,SAMPLE_131,SAMPLE_132,SAMPLE_133,SAMPLE_134,SAMPLE_135,SAMPLE_136,SAMPLE_129,SAMPLE_130,},new SampleCategory[]{new SampleCategory("Events",new SampleInfo[]{SAMPLE_131,SAMPLE_132,SAMPLE_133,SAMPLE_134,SAMPLE_135,SAMPLE_136,},null,null),}),});
+    public static final SampleCategory ROOT = new SampleCategory("ROOT",null,null,new SampleCategory[]{new SampleCategory("Animation",new SampleInfo[]{SAMPLE_0,SAMPLE_1,SAMPLE_2,},new SampleInfo[]{SAMPLE_0,SAMPLE_1,SAMPLE_2,SAMPLE_3,SAMPLE_4,SAMPLE_5,SAMPLE_6,SAMPLE_7,SAMPLE_8,SAMPLE_9,SAMPLE_10,SAMPLE_11,SAMPLE_12,},new SampleCategory[]{new SampleCategory("Transitions",new SampleInfo[]{SAMPLE_3,SAMPLE_4,SAMPLE_5,SAMPLE_6,SAMPLE_7,SAMPLE_8,SAMPLE_9,SAMPLE_10,SAMPLE_11,SAMPLE_12,},null,null),}),new SampleCategory("Charts",new SampleInfo[]{SAMPLE_13,SAMPLE_14,},new SampleInfo[]{SAMPLE_15,SAMPLE_16,SAMPLE_17,SAMPLE_18,SAMPLE_19,SAMPLE_20,SAMPLE_21,SAMPLE_22,SAMPLE_23,SAMPLE_13,SAMPLE_14,SAMPLE_24,SAMPLE_25,SAMPLE_26,SAMPLE_27,SAMPLE_28,SAMPLE_29,SAMPLE_30,},new SampleCategory[]{new SampleCategory("Area",new SampleInfo[]{SAMPLE_15,SAMPLE_16,SAMPLE_17,SAMPLE_18,},null,null),new SampleCategory("Bar",new SampleInfo[]{SAMPLE_19,SAMPLE_20,SAMPLE_21,SAMPLE_22,SAMPLE_23,},null,null),new SampleCategory("Line",new SampleInfo[]{SAMPLE_24,SAMPLE_25,SAMPLE_26,},null,null),new SampleCategory("Pie",new SampleInfo[]{SAMPLE_27,SAMPLE_28,},null,null),new SampleCategory("Scatter",new SampleInfo[]{SAMPLE_29,SAMPLE_30,},null,null),}),new SampleCategory("Controls",new SampleInfo[]{SAMPLE_31,SAMPLE_32,SAMPLE_33,SAMPLE_34,SAMPLE_35,SAMPLE_36,SAMPLE_37,SAMPLE_38,SAMPLE_39,SAMPLE_40,SAMPLE_41,SAMPLE_42,SAMPLE_43,SAMPLE_44,SAMPLE_45,SAMPLE_46,SAMPLE_47,SAMPLE_48,SAMPLE_49,SAMPLE_50,SAMPLE_51,SAMPLE_52,SAMPLE_53,},new SampleInfo[]{SAMPLE_31,SAMPLE_54,SAMPLE_55,SAMPLE_56,SAMPLE_32,SAMPLE_33,SAMPLE_34,SAMPLE_35,SAMPLE_36,SAMPLE_37,SAMPLE_38,SAMPLE_57,SAMPLE_58,SAMPLE_59,SAMPLE_39,SAMPLE_40,SAMPLE_41,SAMPLE_42,SAMPLE_43,SAMPLE_44,SAMPLE_45,SAMPLE_46,SAMPLE_47,SAMPLE_48,SAMPLE_49,SAMPLE_60,SAMPLE_61,SAMPLE_62,SAMPLE_63,SAMPLE_64,SAMPLE_65,SAMPLE_66,SAMPLE_67,SAMPLE_68,SAMPLE_50,SAMPLE_69,SAMPLE_70,SAMPLE_51,SAMPLE_52,SAMPLE_53,},new SampleCategory[]{new SampleCategory("Button",new SampleInfo[]{SAMPLE_54,SAMPLE_55,SAMPLE_56,},null,null),new SampleCategory("Listview",new SampleInfo[]{SAMPLE_57,SAMPLE_58,SAMPLE_59,},null,null),new SampleCategory("Text",new SampleInfo[]{SAMPLE_60,SAMPLE_61,SAMPLE_62,SAMPLE_63,SAMPLE_64,SAMPLE_65,SAMPLE_66,SAMPLE_67,SAMPLE_68,},null,null),new SampleCategory("Toolbar",new SampleInfo[]{SAMPLE_69,SAMPLE_70,},null,null),}),new SampleCategory("Graphics 2d",new SampleInfo[]{SAMPLE_71,SAMPLE_72,SAMPLE_73,SAMPLE_74,SAMPLE_75,SAMPLE_76,SAMPLE_77,SAMPLE_78,SAMPLE_79,SAMPLE_80,},new SampleInfo[]{SAMPLE_71,SAMPLE_72,SAMPLE_73,SAMPLE_74,SAMPLE_75,SAMPLE_76,SAMPLE_77,SAMPLE_81,SAMPLE_82,SAMPLE_83,SAMPLE_84,SAMPLE_85,SAMPLE_78,SAMPLE_86,SAMPLE_87,SAMPLE_88,SAMPLE_89,SAMPLE_90,SAMPLE_91,SAMPLE_79,SAMPLE_92,SAMPLE_93,SAMPLE_94,SAMPLE_95,SAMPLE_96,SAMPLE_97,SAMPLE_98,SAMPLE_99,SAMPLE_100,SAMPLE_101,SAMPLE_80,},new SampleCategory[]{new SampleCategory("Effects",new SampleInfo[]{SAMPLE_81,SAMPLE_82,SAMPLE_83,SAMPLE_84,SAMPLE_85,},null,null),new SampleCategory("Images",new SampleInfo[]{SAMPLE_86,SAMPLE_87,SAMPLE_88,},null,null),new SampleCategory("Paints",new SampleInfo[]{SAMPLE_89,SAMPLE_90,SAMPLE_91,},null,null),new SampleCategory("Shapes",new SampleInfo[]{SAMPLE_92,SAMPLE_93,SAMPLE_94,SAMPLE_95,SAMPLE_96,SAMPLE_97,SAMPLE_98,SAMPLE_99,SAMPLE_100,SAMPLE_101,},null,null),}),new SampleCategory("Graphics 3d",new SampleInfo[]{SAMPLE_102,SAMPLE_103,SAMPLE_104,SAMPLE_105,SAMPLE_106,},new SampleInfo[]{SAMPLE_102,SAMPLE_103,SAMPLE_104,SAMPLE_105,SAMPLE_106,},null),new SampleCategory("Language",new SampleInfo[]{SAMPLE_107,SAMPLE_108,SAMPLE_109,SAMPLE_110,SAMPLE_111,},new SampleInfo[]{SAMPLE_107,SAMPLE_112,SAMPLE_113,SAMPLE_108,SAMPLE_109,SAMPLE_110,SAMPLE_111,},new SampleCategory[]{new SampleCategory("Concurrency",new SampleInfo[]{SAMPLE_112,SAMPLE_113,},null,null),}),new SampleCategory("Layout",new SampleInfo[]{SAMPLE_114,SAMPLE_115,SAMPLE_116,SAMPLE_117,SAMPLE_118,SAMPLE_119,SAMPLE_120,SAMPLE_121,},new SampleInfo[]{SAMPLE_114,SAMPLE_115,SAMPLE_116,SAMPLE_117,SAMPLE_118,SAMPLE_119,SAMPLE_120,SAMPLE_121,},null),new SampleCategory("Media",new SampleInfo[]{SAMPLE_122,SAMPLE_124,SAMPLE_125,SAMPLE_126,},new SampleInfo[]{SAMPLE_122,SAMPLE_124,SAMPLE_125,SAMPLE_126,},null),new SampleCategory("Scenegraph",new SampleInfo[]{SAMPLE_127,SAMPLE_128,SAMPLE_129,SAMPLE_130,},new SampleInfo[]{SAMPLE_127,SAMPLE_128,SAMPLE_131,SAMPLE_132,SAMPLE_133,SAMPLE_134,SAMPLE_135,SAMPLE_136,SAMPLE_129,SAMPLE_130,},new SampleCategory[]{new SampleCategory("Events",new SampleInfo[]{SAMPLE_131,SAMPLE_132,SAMPLE_133,SAMPLE_134,SAMPLE_135,SAMPLE_136,},null,null),}),});
     public static final SampleInfo[] HIGHLIGHTS = new SampleInfo[]{SAMPLE_18,SAMPLE_14,SAMPLE_66,SAMPLE_124,};
     private static final HashMap<String,SampleInfo[]> DOCS_URL_TO_SAMPLE = new HashMap<String,SampleInfo[]>(214);
     static {
@@ -227,7 +226,7 @@
         DOCS_URL_TO_SAMPLE.put("javafx.scene.input.SwipeEvent",new SampleInfo[]{SAMPLE_132,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.control.TableColumn",new SampleInfo[]{SAMPLE_49,SAMPLE_48,SAMPLE_112,SAMPLE_113,});
         DOCS_URL_TO_SAMPLE.put("javafx.animation.KeyValue",new SampleInfo[]{SAMPLE_1,SAMPLE_2,SAMPLE_0,SAMPLE_72,});
-        DOCS_URL_TO_SAMPLE.put("javafx.scene.media.MediaPlayer",new SampleInfo[]{SAMPLE_19,SAMPLE_126,SAMPLE_15,SAMPLE_123,SAMPLE_122,SAMPLE_125,});
+        DOCS_URL_TO_SAMPLE.put("javafx.scene.media.MediaPlayer",new SampleInfo[]{SAMPLE_19,SAMPLE_126,SAMPLE_15,SAMPLE_122,SAMPLE_125,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.control.ColorPicker",new SampleInfo[]{SAMPLE_34,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.control.ProgressIndicator",new SampleInfo[]{SAMPLE_112,SAMPLE_113,SAMPLE_42,SAMPLE_41,});
         DOCS_URL_TO_SAMPLE.put("http://docs.oracle.com/javase/8/javafx/visual-effects-tutorial/visual_effects.htm#JFXTE191",new SampleInfo[]{SAMPLE_82,SAMPLE_81,SAMPLE_85,SAMPLE_84,SAMPLE_83,});
@@ -268,7 +267,7 @@
         DOCS_URL_TO_SAMPLE.put("javafx.animation.Timeline",new SampleInfo[]{SAMPLE_71,SAMPLE_29,SAMPLE_1,SAMPLE_103,SAMPLE_2,SAMPLE_75,SAMPLE_0,SAMPLE_72,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.canvas.Canvas",new SampleInfo[]{SAMPLE_74,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.input.KeyEvent",new SampleInfo[]{SAMPLE_134,SAMPLE_133,SAMPLE_77,SAMPLE_73,});
-        DOCS_URL_TO_SAMPLE.put("http://docs.oracle.com/javase/8/javafx/media-tutorial/overview.htm#JFXMD101",new SampleInfo[]{SAMPLE_126,SAMPLE_123,SAMPLE_122,SAMPLE_125,SAMPLE_124,});
+        DOCS_URL_TO_SAMPLE.put("http://docs.oracle.com/javase/8/javafx/media-tutorial/overview.htm#JFXMD101",new SampleInfo[]{SAMPLE_126,SAMPLE_122,SAMPLE_125,SAMPLE_124,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.chart.PieChart",new SampleInfo[]{SAMPLE_28,SAMPLE_27,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.effect.Reflection",new SampleInfo[]{SAMPLE_71,SAMPLE_77,SAMPLE_74,SAMPLE_84,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.layout.Region",new SampleInfo[]{SAMPLE_46,SAMPLE_134,SAMPLE_100,});
@@ -330,7 +329,7 @@
         DOCS_URL_TO_SAMPLE.put("javafx.util.Duration",new SampleInfo[]{SAMPLE_1,SAMPLE_2,SAMPLE_0,SAMPLE_72,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.layout.AnchorPane",new SampleInfo[]{SAMPLE_114,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.chart.AreaChart",new SampleInfo[]{SAMPLE_17,SAMPLE_16,SAMPLE_15,});
-        DOCS_URL_TO_SAMPLE.put("javafx.scene.media.Media",new SampleInfo[]{SAMPLE_19,SAMPLE_126,SAMPLE_15,SAMPLE_123,SAMPLE_122,SAMPLE_125,});
+        DOCS_URL_TO_SAMPLE.put("javafx.scene.media.Media",new SampleInfo[]{SAMPLE_19,SAMPLE_126,SAMPLE_15,SAMPLE_122,SAMPLE_125,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.text.TextBoundsType",new SampleInfo[]{SAMPLE_80,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.control.Pagination",new SampleInfo[]{SAMPLE_40,});
         DOCS_URL_TO_SAMPLE.put("javafx.scene.control.RadioMenuItem",new SampleInfo[]{SAMPLE_35,});
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/media/alphamediaplayer/AlphaMediaPlayerApp.java	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package ensemble.samples.media.alphamediaplayer;
-
-import javafx.application.Application;
-import javafx.beans.Observable;
-import javafx.beans.property.DoubleProperty;
-import javafx.beans.property.SimpleDoubleProperty;
-import javafx.scene.Parent;
-import javafx.scene.media.Media;
-import javafx.scene.media.MediaPlayer;
-import javafx.scene.Scene;
-import javafx.stage.Stage;
-
-/**
- * An alpha media player with 2 different media views and alpha channels.
- *
- * @sampleName Alpha Media Player
- * @preview preview.png
- * @docUrl http://docs.oracle.com/javase/8/javafx/media-tutorial/overview.htm#JFXMD101 Using JavaFX Media
- * @see javafx.scene.media.MediaPlayer
- * @see javafx.scene.media.Media
- * @playground arthPos (name="Arth Position", min=-100, max=100)
- * @playground fierPos (name="Fier Position", min=-100, max=100)
- * @playground arthRate (name="Arth Rate", min=0.1, max=1)
- * @playground fierRate (name="Fier Rate", min=0.1, max=1)
- * @conditionalFeatures WEB, MEDIA
- *
- * @related /Media/Advanced Media
- * @related /Media/Overlay Media Player
- * @related /Media/Streaming Media Player
- */
-public class AlphaMediaPlayerApp extends Application {
-
-    PlanetaryPlayerPane planetaryPlayerPane;
-    private MediaPlayer arthPlayer;
-    private MediaPlayer fierPlayer;
-
-    private final DoubleProperty arthPos = new SimpleDoubleProperty(-90.0);
-    public final DoubleProperty arthPosProperty() {
-        return arthPos;
-    }
-
-    private final DoubleProperty fierPos = new SimpleDoubleProperty(50.0);
-    public final DoubleProperty fierPosProperty() {
-        return fierPos;
-    }
-
-    private final DoubleProperty arthRate = new SimpleDoubleProperty(1.0);
-    public final DoubleProperty arthRateProperty() {
-        return arthRate;
-    }
-
-    private final DoubleProperty fierRate = new SimpleDoubleProperty(1.0);
-    public final DoubleProperty fierRateProperty() {
-        return fierRate;
-    }
-
-    public Parent createContent() {
-        String ARTH_URL =
-            "http://download.oracle.com/otndocs/products/javafx/arth_512.flv";
-        String FIER_URL =
-            "http://download.oracle.com/otndocs/products/javafx/fier_512.flv";
-        arthPlayer = new MediaPlayer(new Media(ARTH_URL));
-        arthPlayer.setAutoPlay(true);
-        fierPlayer = new MediaPlayer(new Media(FIER_URL));
-        fierPlayer.setAutoPlay(true);
-
-        arthPos.addListener((Observable observable) -> {
-            planetaryPlayerPane.setTranslate1(arthPos.doubleValue());
-        });
-
-        fierPos.addListener((Observable observable) -> {
-            planetaryPlayerPane.setTranslate2(fierPos.doubleValue());
-        });
-
-        arthRate.addListener((Observable observable) -> {
-            arthPlayer.setRate(arthRate.doubleValue());
-        });
-
-        fierRate.addListener((Observable observable) -> {
-            fierPlayer.setRate(fierRate.doubleValue());
-        });
-
-        String alphaMediaPlayerCss =
-            getClass().getResource("AlphaMediaPlayer.css").toExternalForm();
-
-        planetaryPlayerPane = new PlanetaryPlayerPane(arthPlayer, fierPlayer);
-        planetaryPlayerPane.setMinSize(480, 320);
-        planetaryPlayerPane.setPrefSize(480, 320);
-        planetaryPlayerPane.setMaxSize(480, 320);
-        planetaryPlayerPane.getStylesheets().add(alphaMediaPlayerCss);
-        return planetaryPlayerPane;
-    }
-
-    public void play() {
-        MediaPlayer.Status status = fierPlayer.getStatus();
-        if (status == MediaPlayer.Status.UNKNOWN ||
-                status == MediaPlayer.Status.HALTED) {
-            return;
-        }
-        if (status == MediaPlayer.Status.PAUSED ||
-                status == MediaPlayer.Status.STOPPED ||
-                status == MediaPlayer.Status.READY) {
-            fierPlayer.play();
-            arthPlayer.play();
-        }
-    }
-
-    @Override
-    public void stop() {
-        fierPlayer.stop();
-        arthPlayer.stop();
-    }
-
-    @Override
-    public void start(Stage primaryStage) throws Exception {
-        primaryStage.setScene(new Scene(createContent()));
-        primaryStage.show();
-        play();
-    }
-
-    /**
-     * Java main for when running without JavaFX launcher
-     * @param args command line arguments
-     */
-    public static void main(String[] args) {
-        launch(args);
-    }
-}
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/media/alphamediaplayer/PlanetaryPlayerPane.java	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates.
- * All rights reserved. Use is subject to license terms.
- *
- * This file is available and licensed under the following license:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *  - Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  - Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the distribution.
- *  - Neither the name of Oracle Corporation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package ensemble.samples.media.alphamediaplayer;
-
-import javafx.animation.ParallelTransition;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
-import javafx.geometry.Pos;
-import javafx.scene.DepthTest;
-import javafx.scene.Group;
-import javafx.scene.control.Button;
-import javafx.scene.effect.BoxBlur;
-import javafx.scene.layout.BorderPane;
-import javafx.scene.layout.HBox;
-import javafx.scene.layout.Pane;
-import javafx.scene.media.MediaPlayer;
-import javafx.scene.media.MediaView;
-import javafx.util.Duration;
-
-public class PlanetaryPlayerPane extends BorderPane {
-
-    private MediaPlayer mp;
-    public Group mediaViewer1;
-    public Group mediaViewer2;
-    private Group mediaViewerGroup;
-    private final boolean repeat = true;
-    private boolean stopRequested = false;
-    private boolean atEndOfMedia = false;
-    private Duration duration;
-    private HBox mediaBottomBar;
-    private ParallelTransition transition = null;
-
-    public PlanetaryPlayerPane(final MediaPlayer mp1, final MediaPlayer mp2) {
-        this.mp = mp1;
-        setId("player-pane");
-
-        mediaViewer1 = createViewer(mp1, 0.4, false);
-        mediaViewer2 = createViewer(mp2, 0.55, false);
-
-        mediaViewerGroup = new Group();
-        mediaViewerGroup.getChildren().add(mediaViewer2);
-        mediaViewerGroup.getChildren().add(mediaViewer1);
-        mediaViewerGroup.setTranslateX(-17.0);
-        mediaViewerGroup.setTranslateY(-115.0);
-        setTranslate1(-90.0);
-        setTranslate2(50.0);
-
-        Pane mvPane = new Pane() {
-        };
-        mvPane.setId("media-pane");
-        mvPane.getChildren().add(mediaViewerGroup);
-        setCenter(mvPane);
-
-        mp1.setOnPlaying(() -> {
-            if (stopRequested) {
-                mp1.pause();
-                stopRequested = false;
-            }
-        });
-        mp1.setOnEndOfMedia(() -> {
-            if (!repeat) {
-                stopRequested = true;
-                atEndOfMedia = true;
-            }
-        });
-        mp1.setCycleCount(repeat ? MediaPlayer.INDEFINITE : 1);
-
-        mp2.setOnPlaying(() -> {
-            if (stopRequested) {
-                mp2.pause();
-                stopRequested = false;
-            }
-        });
-        mp2.setOnEndOfMedia(() -> {
-            if (!repeat) {
-                stopRequested = true;
-                atEndOfMedia = true;
-            }
-        });
-        mp2.setCycleCount(repeat ? MediaPlayer.INDEFINITE : 1);
-
-        final EventHandler<ActionEvent> backAction = (ActionEvent e) -> {
-            mp1.seek(Duration.ZERO);
-            mp2.seek(Duration.ZERO);
-        };
-        final EventHandler<ActionEvent> stopAction = (ActionEvent e) -> {
-            mp1.stop();
-            mp2.stop();
-        };
-        final EventHandler<ActionEvent> playAction = (ActionEvent e) -> {
-            mp1.play();
-            mp2.play();
-        };
-        final EventHandler<ActionEvent> pauseAction = (ActionEvent e) -> {
-            mp1.pause();
-            mp2.pause();
-        };
-        final EventHandler<ActionEvent> forwardAction = (ActionEvent e) -> {
-            Duration currentTime = mp1.getCurrentTime();
-            mp1.seek(Duration.seconds(currentTime.toSeconds() + 0.1));
-            mp2.seek(Duration.seconds(currentTime.toSeconds() + 0.1));
-        };
-
-        mediaBottomBar = new HBox();
-        mediaBottomBar.setId("bottom");
-        mediaBottomBar.setSpacing(0);
-        mediaBottomBar.setAlignment(Pos.CENTER);
-        BorderPane.setAlignment(mediaBottomBar, Pos.CENTER);
-
-        Button backButton = new Button("Back");
-        backButton.setId("back-button");
-        backButton.setOnAction(backAction);
-
-        Button stopButton = new Button("Stop");
-        stopButton.setId("stop-button");
-        stopButton.setOnAction(stopAction);
-
-        Button playButton = new Button("Play");
-        playButton.setId("play-button");
-        playButton.setOnAction(playAction);
-
-        Button pauseButton = new Button("Pause");
-        pauseButton.setId("pause-button");
-        pauseButton.setOnAction(pauseAction);
-
-        Button forwardButton = new Button("Forward");
-        forwardButton.setId("forward-button");
-        forwardButton.setOnAction(forwardAction);
-
-        mediaBottomBar.getChildren().addAll(backButton, stopButton, playButton,
-                                            pauseButton, forwardButton);
-        setBottom(mediaBottomBar);
-    }
-
-    public void setTranslate1(double tx) {
-        mediaViewer1.setTranslateX(tx);
-    }
-
-    public void setTranslate2(double tx) {
-        mediaViewer2.setTranslateX(tx);
-    }
-
-    private static Group createViewer(final MediaPlayer player,
-                                      final double scale, boolean blur) {
-        Group mediaGroup = new Group();
-
-        final MediaView mediaView = new MediaView(player);
-
-        if (blur) {
-            BoxBlur bb = new BoxBlur();
-            bb.setWidth(4);
-            bb.setHeight(4);
-            bb.setIterations(1);
-            mediaView.setEffect(bb);
-        }
-
-        double width = player.getMedia().getWidth();
-        double height = player.getMedia().getHeight();
-
-        mediaView.setFitWidth(width);
-        mediaView.setTranslateX(-width / 2.0);
-        mediaView.setScaleX(-scale);
-
-        mediaView.setFitHeight(height);
-        mediaView.setTranslateY(-height / 2.0);
-        mediaView.setScaleY(scale);
-
-        mediaView.setDepthTest(DepthTest.ENABLE);
-        mediaGroup.getChildren().add(mediaView);
-        return mediaGroup;
-    }
-}
--- a/apps/toys/Hello/src/main/java/hello/HelloHostServices.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/apps/toys/Hello/src/main/java/hello/HelloHostServices.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,6 @@
         final HostServices hs = getHostServices();
         final Label codeBaseText = new Label();
         final Label documentBaseText = new Label();
-        final Label webContextText = new Label();
         final Label showDocumentText = new Label();
 
         stage.setTitle("Hello HostServices");
@@ -67,24 +66,18 @@
         Button getDocumentBaseBtn = new Button("Get DocumentBase");
         getDocumentBaseBtn.setOnAction(event -> documentBaseText.setText(hs.getDocumentBase()));
 
-        // getWebContext() in HostServices has been deprecated and marked for removal
-        Button getWebContextBtn = new Button("Get WebContext");
-        getWebContextBtn.setOnAction(event -> webContextText.setText(
-                (hs.getWebContext() != null) ? hs.getWebContext().toString() : "NULL"));
-
         Button showDocmentBtn = new Button("Show Document");
         showDocmentBtn.setOnAction(event
                 -> showDocument(hs, showDocumentText, "http://www.oracle.com/java/"));
 
         VBox textBox = new VBox(15);
         textBox.setFillWidth(false);
-        textBox.getChildren().addAll(codeBaseText, documentBaseText, webContextText, showDocumentText);
+        textBox.getChildren().addAll(codeBaseText, documentBaseText, showDocumentText);
 
         VBox buttonBox = new VBox(5);
         buttonBox.getChildren().addAll(
                 getCodeBaseBtn,
                 getDocumentBaseBtn,
-                getWebContextBtn,
                 showDocmentBtn);
 
         HBox root = new HBox(7);
--- a/build.gradle	Thu Nov 02 15:33:43 2017 -0700
+++ b/build.gradle	Mon Nov 06 15:40:16 2017 -0800
@@ -1076,8 +1076,8 @@
     NUM_COMPILE_THREADS = 1
 }
 
-// Check for Gradle 3.1, error if < 3.0.
-if (gradle.gradleVersion != "3.1") {
+// Check for Gradle 4.3, error if < 3.0.
+if (gradle.gradleVersion != "4.3") {
     def ver = gradle.gradleVersion.split("[\\.]");
     def gradleMajor = Integer.parseInt(ver[0]);
     def gradleMinor = Integer.parseInt(ver[1].split("[^0-9]")[0]);
@@ -1092,7 +1092,7 @@
 
     logger.warn("*****************************************************************");
     logger.warn("Unsupported gradle version $gradle.gradleVersion in use.");
-    logger.warn("Only version 3.1 is supported. Use this version at your own risk");
+    logger.warn("Only version 4.3 is supported. Use this version at your own risk");
     if ( err != "") logger.warn(err);
     logger.warn("*****************************************************************");
 }
@@ -2957,19 +2957,10 @@
             def buildPlugins = task("build${t.capital}Plugins", dependsOn: buildGStreamer) {
                 enabled = IS_COMPILE_MEDIA
 
-                if (!project.ext.properties.containsKey("ON2_SRCDIR")) {
-                    project.ext.ON2_SRCDIR = "";
-                }
-
-                if (!project.ext.properties.containsKey("ON2_LIB")) {
-                    project.ext.ON2_LIB = "";
-                }
-
                 doLast {
                     exec {
                         commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/${projectDir}/fxplugins")
                         args("OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", "BASE_NAME=fxplugins",
-                             "ON2_SRCDIR=${project.ext.ON2_SRCDIR}", "ON2_LIB=${project.ext.ON2_LIB}",
                              IS_64 ? "ARCH=x64" : "ARCH=x32",
                              "CC=${mediaProperties.compiler}", "AR=${mediaProperties.ar}", "LINKER=${mediaProperties.linker}")
 
--- a/modules/javafx.controls/src/main/java/javafx/scene/control/RadioMenuItem.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.controls/src/main/java/javafx/scene/control/RadioMenuItem.java	Mon Nov 06 15:40:16 2017 -0800
@@ -194,7 +194,7 @@
                         if (get()) {
                             getToggleGroup().selectToggle(RadioMenuItem.this);
                         } else if (getToggleGroup().getSelectedToggle() == RadioMenuItem.this) {
-                            getToggleGroup().selectToggle(null);
+                            getToggleGroup().clearSelectedToggle();
                         }
                     }
 
--- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/RadioMenuItemTest.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/RadioMenuItemTest.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
 import javafx.scene.Node;
 import javafx.scene.control.RadioMenuItem;
 import javafx.scene.control.ToggleGroup;
@@ -280,5 +282,27 @@
         assertEquals(other.get(), rmi.isSelected());
     }
 
+    private boolean result8189677 = false;
+    @Test public void extraNullValueInSelectedProperty_JDK_8189677() {
+       RadioMenuItem b1 = new RadioMenuItem("ONE");
+       RadioMenuItem b2 = new RadioMenuItem("TWO");
+       ToggleGroup group = new ToggleGroup();
+       group.getToggles().addAll(b1, b2);
+       group.selectToggle(b1);
 
+       group.selectedToggleProperty().addListener(new ChangeListener() {
+            @Override public void changed(ObservableValue o, Object oldVal,
+                                          Object newVal) {
+                if (newVal == null || oldVal == null) {
+                    result8189677 = true;
+                }
+            }
+       });
+
+       group.selectToggle(b2);
+       group.selectToggle(b1);
+
+       assertTrue(b1.isSelected());
+       assertFalse(result8189677);
+    }
 }
--- a/modules/javafx.graphics/src/main/java/com/sun/javafx/application/HostServicesDelegate.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.graphics/src/main/java/com/sun/javafx/application/HostServicesDelegate.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,6 @@
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
 import javafx.application.Application;
-import netscape.javascript.JSObject;
-
 
 public abstract class HostServicesDelegate {
 
@@ -84,8 +82,6 @@
 
     public abstract void showDocument(String uri);
 
-    public abstract JSObject getWebContext();
-
     // StandaloneHostService implementation
     private static class StandaloneHostService extends HostServicesDelegate {
 
@@ -193,9 +189,5 @@
                 e.printStackTrace();
             }
         }
-
-        @Override public JSObject getWebContext() {
-            return null;
-        }
     }
 }
--- a/modules/javafx.graphics/src/main/java/javafx/application/HostServices.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.graphics/src/main/java/javafx/application/HostServices.java	Mon Nov 06 15:40:16 2017 -0800
@@ -27,16 +27,13 @@
 
 import java.net.URI;
 
-import netscape.javascript.JSObject;
-
 import com.sun.javafx.application.HostServicesDelegate;
 
 /**
  * This class provides HostServices for an Application. This includes
  * methods to get the code base and document base for an Application,
- * show a web page in a browser, and communicate with the enclosing web page
- * using JavaScript if the Application is running in
- * a browser.
+ * and to show a web page in a browser.
+ *
  * @since JavaFX 2.0
  */
 public final class HostServices {
@@ -125,34 +122,4 @@
         delegate.showDocument(uri);
     }
 
-    /**
-     * Returns the JavaScript handle of the enclosing DOM window of the web
-     * page containing this application.
-     * This handle is used to access the web page by calling from Java into
-     * JavaScript.
-     * If the application is not embedded into a web page, this method
-     * return null.
-     *
-     * <p>Example:</p>
-     * <pre>{@code
-     *     JSObject jsWin = getHostServices().getWebContext();
-     *     if (jsWin != null) {
-     *         jsWin.eval("var b = document.body;" +
-     *                    "var newdiv = document.createElement('div');" +
-     *                    "newdiv.innerHTML = '<br>Hello from JavaScript!';" +
-     *                    "b.appendChild(newdiv);");
-     *     }
-     * }</pre>
-     *
-     * @return handle of the enclosing DOM window of the web page containing
-     * this application
-     *
-     * @deprecated This method is deprecated as of JDK 9 because the
-     * {@link java.applet.Applet Applet} API is deprecated.
-     */
-    @Deprecated(since="9", forRemoval=true)
-    public final JSObject getWebContext() {
-        return delegate.getWebContext();
-    }
-
 }
--- a/modules/javafx.graphics/src/main/java/module-info.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.graphics/src/main/java/module-info.java	Mon Nov 06 15:40:16 2017 -0800
@@ -36,7 +36,6 @@
 module javafx.graphics {
     requires java.desktop;
     requires java.xml;
-    requires jdk.jsobject;
 
     requires transitive javafx.base;
 
--- a/modules/javafx.media/src/main/java/com/sun/media/jfxmedia/MetadataParser.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/java/com/sun/media/jfxmedia/MetadataParser.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,16 +29,8 @@
 import java.io.IOException;
 
 public interface MetadataParser {
-    // FLV and MP3
+    // MP3
     static final String DURATION_TAG_NAME = "duration";
-    // FLV
-    static final String CREATIONDATE_TAG_NAME = "creationdate";
-    static final String WIDTH_TAG_NAME = "width";
-    static final String HEIGHT_TAG_NAME = "height";
-    static final String FRAMERATE_TAG_NAME = "framerate";
-    static final String VIDEOCODEC_TAG_NAME = "video codec";
-    static final String AUDIOCODEC_TAG_NAME = "audio codec";
-    // MP3
     static final String IMAGE_TAG_NAME = "image";
     static final String ALBUMARTIST_TAG_NAME = "album artist";
     static final String ALBUM_TAG_NAME = "album";
@@ -55,7 +47,6 @@
     static final String TEXT_TAG_NAME = "text";
 
     static final String RAW_METADATA_TAG_NAME = "raw metadata";
-    static final String RAW_FLV_METADATA_NAME = "FLV";
     static final String RAW_ID3_METADATA_NAME = "ID3";
 
     void addListener(MetadataListener listener);
--- a/modules/javafx.media/src/main/java/com/sun/media/jfxmedia/locator/Locator.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/java/com/sun/media/jfxmedia/locator/Locator.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -473,9 +473,11 @@
 
             if (Logger.canLog(Logger.WARNING)) {
                 if (contentType.equals(MediaUtils.CONTENT_TYPE_FLV)) {
-                    Logger.logMsg(Logger.WARNING, "FLV container and VP6 video are deprecated.");
+                    Logger.logMsg(Logger.WARNING, "Support for FLV container and VP6 video is removed.");
+                    throw new MediaException("media type not supported (" + uri.toString() + ")");
                 } else if (contentType.equals(MediaUtils.CONTENT_TYPE_JFX)) {
-                    Logger.logMsg(Logger.WARNING, "FXM container and VP6 video are deprecated.");
+                    Logger.logMsg(Logger.WARNING, "Support for FXM container and VP6 video is removed.");
+                    throw new MediaException("media type not supported (" + uri.toString() + ")");
                 }
             }
 
--- a/modules/javafx.media/src/main/java/com/sun/media/jfxmedia/track/Track.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/java/com/sun/media/jfxmedia/track/Track.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,6 @@
         H264,               // H.264 ("ISO/IEC 14496-10" standard
                             // or "ITU-T Recommendation H.264")
                             // (aka MPEG-4 part 10 video, also known as AVC)
-        VP6,                // On2 VP6
 
         // custom encoding
         CUSTOM;
--- a/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/MediaUtils.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/MediaUtils.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,6 +50,9 @@
     /**
      * Format of an error which occurred in the native porting layer. A single
      * int argument representing a warning code is expected.
+     *
+     * Note: FLV related code in this file is needed so we can provide error
+     * message that FLV support is removed.
      */
     static final String NATIVE_MEDIA_WARNING_FORMAT = "Internal media warning: %d";
     public static final String CONTENT_TYPE_AIFF = "audio/x-aiff";
--- a/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/MetadataParserImpl.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/MetadataParserImpl.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,13 +42,6 @@
 import java.util.Collections;
 
 public abstract class MetadataParserImpl extends Thread implements com.sun.media.jfxmedia.MetadataParser {
-    private String[] FLV_VIDEO_CODEC_NAME = {
-        "Unsupported", "JPEG Video (Unsupported)", "Sorenson H.263 Video", "Flash Screen Video",
-        "On2 VP6 Video", "On2 VP6-Alpha Video", "Unsupported", "H.264 Video",
-        "Unsupported", "Unsupported", "Unsupported", "Unsupported",
-        "Unsupported", "Unsupported", "Unsupported", "Unsupported"
-    };
-
     private final List<WeakReference<MetadataListener>> listeners = new ArrayList<WeakReference<MetadataListener>>();
     private Map<String, Object> metadata = new HashMap<String, Object>();
     private Locator locator = null;
@@ -341,19 +334,6 @@
         } else if (tag.equals("duration") && value instanceof String) {
             String v = (String) value;
             return Long.valueOf(v.trim());
-        } else if (tag.equals("width") || tag.equals("height")) {
-            Double v = (Double) value;
-            return v.intValue();
-        } else if (tag.equals("framerate")) {
-            return value;
-        } else if (tag.equals("videocodecid")) {
-            // XXX: This conversion to String should be in the FLV parser itself.
-            int codecid = ((Double) value).intValue();
-            if (codecid < FLV_VIDEO_CODEC_NAME.length) {
-                return FLV_VIDEO_CODEC_NAME[codecid];
-            } else {
-                return null;
-            }
         } else if (tag.equals("audiocodecid")) {
             // XXX hard-coded
             return "MPEG 1 Audio";
--- a/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/platform/gstreamer/GSTPlatform.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/platform/gstreamer/GSTPlatform.java	Mon Nov 06 15:40:16 2017 -0800
@@ -48,9 +48,6 @@
         "audio/mp3",
         "audio/mpeg",
         "audio/x-wav",
-        "video/x-javafx",
-        "video/x-flv",
-        "video/x-fxm",
         "video/mp4",
         "audio/x-m4a",
         "video/x-m4v",
--- a/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/platform/java/FLVMetadataParser.java	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,311 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.media.jfxmediaimpl.platform.java;
-
-import com.sun.media.jfxmediaimpl.MetadataParserImpl;
-import java.io.IOException;
-import com.sun.media.jfxmedia.locator.Locator;
-import com.sun.media.jfxmedia.logging.Logger;
-import java.nio.charset.Charset;
-
-final class FLVMetadataParser extends MetadataParserImpl {
-    private int dataSize = 0;
-    private static final String CHARSET_UTF_8 = "UTF-8";
-
-    public FLVMetadataParser(Locator locator) {
-        super(locator);
-    }
-
-    protected void parse() {
-        try {
-            // Check for header (FLV)
-            if (getNextByte() == 0x46 && getNextByte() == 0x4C && getNextByte() == 0x56) {
-                skipBytes(2);
-                int dataOffset = getInteger();
-                skipBytes(dataOffset - 9); // Skip rest of header
-
-                int tagCount = 0; // process up to ten tags, then fail gracefully
-                for (tagCount = 0; tagCount < 10; tagCount++) {
-                    skipBytes(4); // previous tag size
-
-                    byte tagType = getNextByte();
-                    dataSize = getU24();
-                    skipBytes(7); // Skip rest of tag header
-
-                    if (tagType == 0x12) {
-                        int expectedEndPosition = getStreamPosition() + dataSize;
-                        // process SCRIPT_DATA tag
-                        if (parseDataTag()) {
-                            break;
-                        }
-
-                        // make sure we're aligned with the next tag (prev tag size)
-                        if (getStreamPosition() < expectedEndPosition) {
-                            skipBytes(expectedEndPosition - getStreamPosition());
-                        }
-                    } else {
-                        skipBytes(dataSize);
-                    }
-                }
-            }
-        } catch (IOException e) {
-        }
-    }
-
-    /* returns true if it parsed onMetaData */
-    private boolean parseDataTag() throws IOException {
-        if (dataSize < 14) {
-            return false; // not large enough for onMetaData
-        }
-
-        // read the tag header into memory
-        byte[] header = new byte[14];
-        for (int ii = 0; ii < 14; ii++) {
-            header[ii] = getNextByte();
-        }
-        // validate header
-        if (header[0] != 2) {
-            return false;
-        }
-
-        int nameSize = (header[1] & 0xff) << 8 | (header[2] & 0xff);
-        if (nameSize != 10) {
-            return false; // "onMetaData" name length
-        }
-        if (!Charset.isSupported(CHARSET_UTF_8)) {
-            return false;
-        }
-        String methodName = new String(header, 3, nameSize, Charset.forName(CHARSET_UTF_8));
-        if (!methodName.equals("onMetaData")) {
-            return false;
-        }
-
-        // check type, it must be ECMA_ARRAY
-        if (header[13] != FlvDataValue.ECMA_ARRAY) {
-            if (Logger.canLog(Logger.WARNING)) {
-                Logger.logMsg(Logger.WARNING, "FLV metadata must be in an ECMA array");
-            }
-            return false;
-        }
-
-        // Now buffer the entire metadata tag and process it from memory
-        // this will avoid buffer issues if the metadata is malformed or corrupt
-        startRawMetadata(dataSize);
-        if (null == rawMetaBlob) {
-            if (Logger.canLog(Logger.DEBUG)) {
-                Logger.logMsg(Logger.DEBUG, "Unable to allocate buffer for FLV metadata");
-            }
-            return false;
-        }
-
-        // load it up
-        stuffRawMetadata(header, 0, 14);
-        readRawMetadata(dataSize-14);
-
-        // now parse from rawMetaBlob
-        setParseRawMetadata(true);
-        skipBytes(14); // reposition to the ECMA array size field
-
-        // OMD is always an ECMA array, so just process it here
-        try {
-            FlvDataValue flvValue;
-            int arrayCount = getInteger(); // ECMA array element count
-            int parseCount = 0;
-            boolean done = false;
-            boolean warnMalformed = false;
-
-            do {
-                String attribute = getString(getShort(), Charset.forName(CHARSET_UTF_8));
-                flvValue = readDataValue(false);
-                parseCount++;
-                String tag = convertTag(attribute);
-                if (Logger.canLog(Logger.DEBUG) && !attribute.equals("")) {
-                    Logger.logMsg(Logger.DEBUG, parseCount+": \""+attribute+"\" -> "
-                            +(null == tag ? "(unsupported)" : ("\""+tag+"\"")));
-                }
-                if (tag != null) {
-                    Object value = convertValue(attribute, flvValue.obj);
-                    if (value != null) {
-                        addMetadataItem(tag, value);
-                    }
-                }
-
-                /* if the array contains an end of object marker, then it will be
-                 * included in the count
-                 * There are cases where the EOO marker is not present so we
-                 * must track the number of objects we parse and terminate properly.
-                 */
-
-                // we have to decide whether to end or not
-                if (parseCount >= arrayCount) {
-                    // there may be more data, in spite of what the count was
-                    if (getStreamPosition() < dataSize) {
-                        if (!warnMalformed && Logger.canLog(Logger.WARNING)) {
-                            Logger.logMsg(Logger.WARNING, "FLV Source has malformed metadata, invalid ECMA element count");
-                            warnMalformed = true;
-                        }
-                    } else {
-                        done = true;
-                    }
-                }
-            } while (!done);
-        } catch (Exception e) {
-            // fail gracefully, probably just hit the end of the buffer
-            if (Logger.canLog(Logger.WARNING)) {
-                Logger.logMsg(Logger.WARNING, "Exception while processing FLV metadata: "+e);
-            }
-        } finally {
-            if (null != rawMetaBlob) {
-                setParseRawMetadata(false);
-                addRawMetadata(RAW_FLV_METADATA_NAME);
-                disposeRawMetadata();
-            }
-            done();
-        }
-
-        return true;
-    }
-
-    private FlvDataValue readDataValue(boolean hasName) throws IOException {
-        FlvDataValue sdv = new FlvDataValue();
-
-        if (hasName) {
-            skipBytes(getShort()); // skip the property/element name
-        }
-
-        sdv.type = getNextByte();
-        switch (sdv.type) {
-            case FlvDataValue.NUMBER:
-                sdv.obj = getDouble();
-                break;
-            case FlvDataValue.BOOLEAN:
-                boolean b = (getNextByte() != 0);
-                sdv.obj = b;
-                break;
-            case FlvDataValue.STRING:
-                sdv.obj = getString(getShort(), Charset.forName(CHARSET_UTF_8));
-                break;
-            case FlvDataValue.OBJECT:
-                skipObject();
-                break;
-            case FlvDataValue.MOVIE_CLIP:
-                getString(getShort(), Charset.forName(CHARSET_UTF_8));
-                break;
-            case FlvDataValue.NULL:
-                break;
-            case FlvDataValue.UNDEFINED:
-                break;
-            case FlvDataValue.REFERENCE:
-                skipBytes(2);
-                break;
-            case FlvDataValue.ECMA_ARRAY:
-                skipArray();
-                break;
-            case FlvDataValue.END_OF_DATA:
-                sdv.scriptDataObjectEnd = true;
-                break;
-            case FlvDataValue.STRICT_ARRAY:
-                skipStrictArray();
-                break;
-            case FlvDataValue.DATE:
-                sdv.obj = getDouble();
-                skipBytes(2); // Skip LocalDateTimeOffset
-                break;
-            case FlvDataValue.LONG_STRING:
-                sdv.obj = getString(getInteger(), Charset.forName(CHARSET_UTF_8));
-                break;
-            default:
-                break;
-        }
-
-        return sdv;
-    }
-
-    private void skipObject() throws IOException {
-        // Objects define a list of serialized properties, just skip them
-        FlvDataValue value;
-        do {
-            value = readDataValue(true);
-        } while (!value.scriptDataObjectEnd);
-    }
-
-    private void skipArray() throws IOException {
-        // Some files have invalid ECMA arrays, they are not terminated with
-        // an EOO marker, so we have to track the number of objects we're parsing
-        int arrayCount = getInteger(); // ECMA array element count
-        for (int parseCount = 0; parseCount < arrayCount; parseCount++) {
-            readDataValue(true);
-            // don't even bother processing the EOO marker, since it will be counted, usually
-        }
-    }
-
-    private void skipStrictArray() throws IOException {
-        long arrayLen = getInteger();
-
-        for (int i = 0; i < arrayLen; i++) {
-            readDataValue(false);
-        }
-    }
-
-    private String convertTag(String tag) {
-        if (tag.equals("duration")) {
-            return MetadataParserImpl.DURATION_TAG_NAME;
-        } else if (tag.equals("width")) {
-            return MetadataParserImpl.WIDTH_TAG_NAME;
-        } else if (tag.equals("height")) {
-            return MetadataParserImpl.HEIGHT_TAG_NAME;
-        } else if (tag.equals("framerate")) {
-            return MetadataParserImpl.FRAMERATE_TAG_NAME;
-        } else if (tag.equals("videocodecid")) {
-            return MetadataParserImpl.VIDEOCODEC_TAG_NAME;
-        } else if (tag.equals("audiocodecid")) {
-            return MetadataParserImpl.AUDIOCODEC_TAG_NAME;
-        } else if (tag.equals("creationdate")) {
-            return MetadataParserImpl.CREATIONDATE_TAG_NAME;
-        }
-
-        return null;
-    }
-
-    private static class FlvDataValue {
-        static final byte NUMBER = 0;
-        static final byte BOOLEAN = 1;
-        static final byte STRING = 2;
-        static final byte OBJECT = 3;
-        static final byte MOVIE_CLIP = 4;
-        static final byte NULL = 5;
-        static final byte UNDEFINED = 6;
-        static final byte REFERENCE = 7;
-        static final byte ECMA_ARRAY = 8;
-        static final byte END_OF_DATA = 9; // Really only after null string
-        static final byte STRICT_ARRAY = 10;
-        static final byte DATE = 11;
-        static final byte LONG_STRING = 12;
-        boolean scriptDataObjectEnd = false;
-        Object obj;
-        byte type;
-    }
-}
--- a/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/platform/java/JavaPlatform.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/platform/java/JavaPlatform.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,9 +57,7 @@
     @Override
     public MetadataParser createMetadataParser(Locator source) {
         String contentType = source.getContentType();
-        if (contentType.equals(MediaUtils.CONTENT_TYPE_JFX) || contentType.equals(MediaUtils.CONTENT_TYPE_FLV)) {
-            return new FLVMetadataParser(source);
-        } else if (contentType.equals(MediaUtils.CONTENT_TYPE_MPA) ||
+        if (contentType.equals(MediaUtils.CONTENT_TYPE_MPA) ||
                 contentType.equals(MediaUtils.CONTENT_TYPE_MP3)) {
             return new ID3MetadataParser(source);
         }
--- a/modules/javafx.media/src/main/java/javafx/scene/media/package.html	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/java/javafx/scene/media/package.html	Mon Nov 06 15:40:16 2017 -0800
@@ -75,13 +75,8 @@
 <tr><th scope="row">PCM</th><td>Audio</td><td>Uncompressed, raw audio samples</td></tr>
 <tr><th scope="row">H.264/AVC</th><td>Video</td><td>H.264/MPEG-4 Part 10 / AVC (Advanced Video Coding)
 video compression</td></tr>
-<tr><th scope="row">VP6 (*)</th><td>Video</td><td>On2 VP6 video compression</td></tr>
 </table>
 
-<p>
-<br>(*) VP6 video encoding is deprecated since JDK 9.
-</p>
-
 <h4>Supported Container Types</h4>
 
 <p>
@@ -98,11 +93,9 @@
 <th scope="col">Audio Encoding</th><th scope="col">MIME Type</th><th scope="col">File Extension</th></tr>
 <tr><th scope="row">AIFF</th><td>Audio Interchange File Format</td><td>N/A</td>
     <td>PCM</td><td>audio/x-aiff</td><td>.aif, .aiff</td></tr>
-<tr><th scope="row">FXM, FLV (*)</th><td>FX Media, Flash Video</td><td>VP6</td>
-    <td>MP3</td><td>video/x-javafx, video/x-flv</td><td>.fxm, .flv</td></tr>
-<tr><th scope="row">HLS (**)</th><td>MP2T HTTP Live Streaming (audiovisual)</td><td>H.264/AVC</td>
+<tr><th scope="row">HLS (*)</th><td>MP2T HTTP Live Streaming (audiovisual)</td><td>H.264/AVC</td>
     <td>AAC</td><td>application/vnd.apple.mpegurl, audio/mpegurl</td><td>.m3u8</td></tr>
-<tr><th scope="row">HLS (**)</th><td>MP3 HTTP Live Streaming (audio-only)</td><td>N/A</td>
+<tr><th scope="row">HLS (*)</th><td>MP3 HTTP Live Streaming (audio-only)</td><td>N/A</td>
     <td>MP3</td><td>application/vnd.apple.mpegurl, audio/mpegurl</td><td>.m3u8</td></tr>
 <tr><th scope="row">MP3</th><td>MPEG-1, 2, 2.5 raw audio stream possibly with ID3 metadata v2.3 or v2.4</td>
     <td>N/A</td><td>MP3</td><td>audio/mpeg</td><td>.mp3</td></tr>
@@ -112,8 +105,7 @@
     <td>PCM</td><td>audio/x-wav</td><td>.wav</td></tr>
 </table>
 
-<br>(*) FXM and FLV containers are deprecated since JDK 9.
-<br>(**) HLS is a protocol rather than a container type but is included here to
+<br>(*) HLS is a protocol rather than a container type but is included here to
 aggregate similar attributes.
 
 <a id="SupportedProtocols"></a>
@@ -186,14 +178,7 @@
 <table border="1">
 <caption>"Metadata Keys and Tags Table</caption>
 <tr><th scope="col"> Container </th><th scope="col"> Tag (type String) </th><th scope="col"> Type </th><th scope="col"> Description </th></tr>
-<tr><td> FXM, FLV </td><th scope="row"> audio&nbsp;codec </th><td> java.lang.String </td><td>The encoder used for the audio track.</td></tr>
-<tr><td> FXM, FLV </td><th scope="row"> duration </th><td> javafx.util.Duration </td><td>The duration of the media.</td></tr>
-<tr><td> FXM, FLV </td><th scope="row"> video&nbsp;codec </th><td> java.lang.String </td><td>The encoder used for the video track.</td></tr>
-<tr><td> FXM, FLV </td><th scope="row"> width </th><td> java.lang.Integer </td><td>The width in pixels of the video track.</td></tr>
-<tr><td> FXM, FLV </td><th scope="row"> height </th><td> java.lang.Integer </td><td>The height in pixels of the video track.</td></tr>
-<tr><td> FXM, FLV </td><th scope="row"> framerate </th><td> java.lang.Double </td><td>The video frame rate in frames per second.</td></tr>
-<tr><td> FXM, FLV </td><th scope="row"> creationdate </th><td> java.lang.String </td><td>The date when the video was created.</td></tr>
-<tr><td> FXM, FLV, MP3 </td><th scope="row"> raw&nbsp;metadata </th><td> Map&lt;String,ByteBuffer&gt; </td><td>The raw metadata according to the appropriate media specification. The key "ID3" maps to MP3 ID3v2 metadata and "FLV" to the FLV onMetadata marker content.</td></tr>
+<tr><td> MP3 </td><th scope="row"> raw&nbsp;metadata </th><td> Map&lt;String,ByteBuffer&gt; </td><td>The raw metadata according to the appropriate media specification. The key "ID3" maps to MP3 ID3v2 metadata.</td></tr>
 <tr><td> MP3 </td><th scope="row"> album&nbsp;artist </th><td> java.lang.String </td><td>The artist for the overall album, possibly "Various Artists" for compilations.</td></tr>
 <tr><td> MP3 </td><th scope="row"> album </th><td> java.lang.String </td><td>The name of the album.</td></tr>
 <tr><td> MP3 </td><th scope="row"> artist </th><td> java.lang.String </td><td>The artist of the track.</td></tr>
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/fxplugins.c	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/gstreamer/plugins/fxplugins.c	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,11 +30,6 @@
 #include <progressbuffer.h>
 #include <hlsprogressbuffer.h>
 
-#ifdef ENABLE_ON2_DECODER
-#include <vp6decoder.h>
-#include <flvdemux.h>
-#endif
-
 #ifdef OSX
 #include <audioconverter.h>
 #include <avcdecoder.h>
@@ -49,11 +44,6 @@
     return java_source_plugin_init(plugin) &&
            hls_progress_buffer_plugin_init(plugin) &&
 
-#ifdef ENABLE_ON2_DECODER
-           gst_element_register (plugin, "vp6decoder", 250, TYPE_VP6_DECODER) &&
-           gst_element_register (plugin, "flvdemux", 70, TYPE_FLV_DEMUX) &&
-#endif
-
 #if defined(WIN32)
            dshowwrapper_init(plugin) &&
 #elif defined(OSX)
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvdemux.c	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1445 +0,0 @@
-/*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include <gst/gst.h>
-#include <string.h>
-
-#include "flvdemux.h"
-#include "flvparser.h"
-#include "flvmetadata.h"
-#include <fxplugins_common.h>
-
-GST_DEBUG_CATEGORY_EXTERN (fxm_plugin_debug);
-#define GST_CAT_DEFAULT fxm_plugin_debug
-
-/* the capabilities of the inputs and outputs.*/
-static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
-    GST_PAD_SINK,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("video/x-flv")
-    );
-
-static GstStaticPadTemplate audio_src_template =
-GST_STATIC_PAD_TEMPLATE ("audio",
-    GST_PAD_SRC,
-    GST_PAD_SOMETIMES,
-    GST_STATIC_CAPS_ANY);
-
-static GstStaticPadTemplate video_src_template =
-GST_STATIC_PAD_TEMPLATE ("video",
-    GST_PAD_SRC,
-    GST_PAD_SOMETIMES,
-    GST_STATIC_CAPS_ANY);
-
-/***********************************************************************************
- * Substitution for
- * G_DEFINE_TYPE (FlvDemux, flv_demux, GstElement, GST_TYPE_ELEMENT);
- ***********************************************************************************/
-#define flv_demux_parent_class parent_class
-static void flv_demux_init          (FlvDemux      *self);
-static void flv_demux_class_init    (FlvDemuxClass *klass);
-static gpointer flv_demux_parent_class = NULL;
-static void     flv_demux_class_intern_init (gpointer klass)
-{
-    flv_demux_parent_class = g_type_class_peek_parent (klass);
-    flv_demux_class_init ((FlvDemuxClass*) klass);
-}
-
-GType flv_demux_get_type (void)
-{
-    static volatile gsize gonce_data = 0;
-// INLINE - g_once_init_enter()
-    if (g_once_init_enter (&gonce_data))
-    {
-        GType _type;
-        _type = g_type_register_static_simple (GST_TYPE_ELEMENT,
-               g_intern_static_string ("FlvDemux"),
-               sizeof (FlvDemuxClass),
-               (GClassInitFunc) flv_demux_class_intern_init,
-               sizeof(FlvDemux),
-               (GInstanceInitFunc) flv_demux_init,
-               (GTypeFlags) 0);
-        g_once_init_leave (&gonce_data, (gsize) _type);
-    }
-    return (GType) gonce_data;
-}
-
-/***********************************************************************************
- * Init stuff
- ***********************************************************************************/
-static void flv_demux_dispose(GObject* object);
-
-static GstStateChangeReturn
-            flv_demux_change_state(GstElement * element, GstStateChange transition);
-
-static gboolean flv_demux_sink_event (GstPad * pad, GstObject *parent, GstEvent * event);
-static GstFlowReturn flv_demux_chain (GstPad * pad, GstObject *parent, GstBuffer * buf);
-static gboolean flv_demux_sink_activate (GstPad * sinkpad, GstObject *parent);
-static gboolean flv_demux_activatemode(GstPad *pad, GstObject *parent, GstPadMode mode, gboolean active);
-static gboolean flv_demux_sink_query (GstPad * pad, GstObject *parent, GstQuery * query);
-static void flv_demux_loop (GstPad * pad);
-
-static gboolean flv_demux_src_query (GstPad * pad, GstObject *parent, GstQuery * query);
-static gboolean flv_demux_src_event (GstPad * pad, GstObject *parent, GstEvent * event);
-
-/*!
- * \brief Creates time-position association of a keyframe in internal index.
- */
-static void
-flv_demux_index_add_entry(FlvDemux* filter,
-        GstClockTime index_time, guint64 index_pos);
-
-/*!
- * \brief Searches for last keyframe prior to specified time in internal index.
- */
-static gboolean
-flv_demux_index_lookup(FlvDemux* filter,
-        GstClockTime time, GstClockTime *index_time, guint64 *index_pos);
-
-/* Initialize the class */
-static void
-flv_demux_class_init (FlvDemuxClass * klass)
-{
-    //fprintf(stderr, "===flv_demux_class_init()\n");
-    GObjectClass *gobject_class;
-    GstElementClass *element_class;
-
-    gobject_class = G_OBJECT_CLASS (klass);
-    element_class = GST_ELEMENT_CLASS (klass);
-
-    gst_element_class_set_details_simple(element_class,
-            "FlvDemux",
-            "Coder/Demuxer",
-            "Split flv stream to video and audio streams",
-            "Oracle Corporation");
-
-    gst_element_class_add_pad_template (element_class,
-        gst_static_pad_template_get (&sink_template));
-    gst_element_class_add_pad_template (element_class,
-        gst_static_pad_template_get (&audio_src_template));
-    gst_element_class_add_pad_template (element_class,
-        gst_static_pad_template_get (&video_src_template));
-
-    gobject_class->dispose = GST_DEBUG_FUNCPTR (flv_demux_dispose);
-
-    element_class->change_state = GST_DEBUG_FUNCPTR(flv_demux_change_state);
-}
-
-/* initialize the new element
- * instantiate pads and add them to element
- * set pad calback functions
- * initialize instance structure
- */
-static void
-flv_demux_init (FlvDemux * filter)
-{
-    //fprintf(stderr, "===flv_demux_init()\n");
-
-    //Create sink
-    filter->sink_pad = gst_pad_new_from_static_template (&sink_template, "sink");
-    gst_pad_set_event_function (filter->sink_pad,
-            GST_DEBUG_FUNCPTR (flv_demux_sink_event));
-    gst_pad_set_chain_function (filter->sink_pad,
-            GST_DEBUG_FUNCPTR (flv_demux_chain));
-    gst_pad_set_activate_function (filter->sink_pad,
-            GST_DEBUG_FUNCPTR (flv_demux_sink_activate));
-    gst_pad_set_activatemode_function  (filter->sink_pad,
-        GST_DEBUG_FUNCPTR(flv_demux_activatemode));
-    gst_pad_set_query_function (filter->sink_pad,
-            GST_DEBUG_FUNCPTR (flv_demux_sink_query));
-    gst_element_add_pad (GST_ELEMENT (filter), filter->sink_pad);
-
-    //Create adapter
-    filter->adapter = gst_adapter_new();
-
-    //Init parser
-    flv_parser_init(&filter->parser);
-    filter->need_parser_flush = FALSE;
-
-    //Init indexing and seeking
-    filter->current_timestamp = GST_CLOCK_TIME_NONE;
-    filter->last_file_position = 0;
-
-    filter->keyframes = NULL; // allocated dynamically
-    filter->copied_metadata_keyframes = FALSE;
-    filter->is_flushing = FALSE;
-    filter->is_eos_received = FALSE;
-    gst_segment_init(&filter->segment, GST_FORMAT_TIME);
-
-    //Init metadata
-    filter->metadata = flv_metadata_new();
-    filter->queued_tags = NULL;
-
-    //Init Source pads
-    filter->audio_src_pad = NULL;
-    filter->video_src_pad = NULL;
-
-    //Init Audio
-    filter->sound_format = 0;
-    filter->audio_linked = FALSE;
-    filter->audio_offset = 0;
-    filter->audio_discont = TRUE;
-    filter->audio_prev_timestamp = GST_CLOCK_TIME_NONE;
-    filter->audio_frame_duration = GST_CLOCK_TIME_NONE;
-
-    //Init Video
-    filter->video_codec_id = 0;
-    filter->video_linked = FALSE;
-    filter->video_offset = 0;
-    filter->video_discont = TRUE;
-    filter->video_prev_timestamp = GST_CLOCK_TIME_NONE;
-    filter->video_frame_duration = GST_CLOCK_TIME_NONE;
-}
-
-static void
-flv_demux_dispose(GObject* object)
-{
-    FlvDemux* filter = FLV_DEMUX(object);
-
-    //Dispose adapter
-    if (filter->adapter) {
-        gst_adapter_clear(filter->adapter);
-        g_object_unref(filter->adapter);
-        filter->adapter = NULL;
-    }
-
-    //Dispose index
-    if (filter->keyframes) {
-        GList *keyframe = g_list_first(filter->keyframes);
-        while (keyframe)
-        {
-            FlvKeyframe *entry = (FlvKeyframe*)keyframe->data;
-            g_slice_free1(sizeof(FlvKeyframe), entry);
-            keyframe = g_list_next(keyframe);
-        }
-        g_list_free(filter->keyframes);
-        filter->keyframes = NULL;
-    }
-
-    flv_metadata_free(filter->metadata);
-
-    if (filter->queued_tags) {
-        gst_tag_list_free(filter->queued_tags);
-    }
-
-    G_OBJECT_CLASS(parent_class)->dispose(object);
-}
-
-static GstStateChangeReturn
-flv_demux_change_state (GstElement * element, GstStateChange transition)
-{
-    //fprintf(stderr, "===flv_demux_change_state(0x%02x)\n", transition);
-    FlvDemux *filter;
-    GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-
-    filter = FLV_DEMUX (element);
-
-    switch (transition) {
-        case GST_STATE_CHANGE_READY_TO_PAUSED:
-                        filter->last_file_position = 0;
-                        filter->current_timestamp = 0;
-                        filter->need_parser_flush = TRUE;
-            break;
-        default:
-            break;
-    }
-
-    ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-    if (ret == GST_STATE_CHANGE_FAILURE)
-        return ret;
-
-    return ret;
-}
-
-static gboolean
-flv_demux_push_src_event (FlvDemux * filter, GstEvent * event)
-{
-  gboolean ret = TRUE;
-
-  if (filter->audio_src_pad != NULL)
-// INLINE - gst_event_ref()
-    ret |= gst_pad_push_event (filter->audio_src_pad, gst_event_ref (event));
-
-  if (filter->video_src_pad != NULL)
-// INLINE - gst_event_ref()
-    ret |= gst_pad_push_event (filter->video_src_pad, gst_event_ref (event));
-
-// INLINE - gst_event_unref()
-  gst_event_unref (event);
-
-  return ret;
-}
-
-static gboolean
-flv_demux_sink_event (GstPad * pad, GstObject *parent, GstEvent * event)
-{
-    gboolean ret = TRUE;
-    FlvDemux *filter;
-
-    //fprintf(stderr, "===flv_demux_sink_event(%s)\n", GST_EVENT_TYPE_NAME(event));
-
-    filter = FLV_DEMUX (parent);
-    switch (GST_EVENT_TYPE (event)) {
-        case GST_EVENT_FLUSH_START:
-            //fprintf(stderr, "===flv_demux_sink_event(%s)\n", GST_EVENT_TYPE_NAME(event));
-            filter->is_flushing = TRUE;
-            gst_pad_event_default(filter->sink_pad, parent, event);
-            break;
-        case GST_EVENT_FLUSH_STOP:
-            //fprintf(stderr, "===flv_demux_sink_event(%s)\n", GST_EVENT_TYPE_NAME(event));
-            filter->is_flushing = FALSE;
-            filter->need_parser_flush = TRUE;
-            gst_pad_event_default(filter->sink_pad, parent, event);
-            break;
-        case GST_EVENT_EOS:
-            //fprintf(stderr, "Sending no-more-pads\n");
-            filter->is_eos_received = TRUE;
-            gst_element_no_more_pads(GST_ELEMENT(filter));
-            flv_demux_push_src_event (filter, event);
-            break;
-        case FX_EVENT_RANGE_READY: // This event appears only in pull mode during outrange seeking.
-            ret = gst_pad_start_task (pad, (GstTaskFunction) flv_demux_loop, pad, NULL);
-            // INLINE - gst_event_unref()
-            gst_event_unref(event);
-            break;
-        case GST_EVENT_SEGMENT:
-        {
-            GstSegment segment;
-
-            gst_event_copy_segment (event, &segment);
-
-            //Use segment if it has time format, mark that segment needed otherwise.
-            if (segment.format == GST_FORMAT_TIME) {
-                gst_segment_copy_into (&segment, &filter->segment);
-            }
-            filter->audio_discont = TRUE;
-            filter->video_discont = TRUE;
-
-            filter->is_eos_received = FALSE;
-
-            break;
-         }
-        default:
-            ret = flv_demux_push_src_event(filter, event);
-            break;
-    }
-    return ret;
-}
-
-static gboolean
-flv_demux_negotiate_audio_caps(FlvDemux* filter, guint sound_format,
-        guint sampling_rate, gboolean is_16bit, gboolean is_stereo)
-{
-    //fprintf(stderr, "===flv_demux_negotiate_audio_caps()\n");
-    gboolean result = FALSE;
-    GstCaps *caps = NULL;
-    gchar *codec_name = NULL;
-    guint rate = 0;
-    guint channels = 0;
-    GstEvent *caps_event = NULL;
-
-    if (FLVDEMUX_AUDIO_FORMAT_MP3 != sound_format)
-    {
-        caps = gst_caps_new_simple ("audio/unsupported", NULL, NULL);
-        codec_name = "Unsupported";
-    }
-    else
-    {
-        caps = gst_caps_new_simple ("audio/mpeg",
-            "mpegversion", G_TYPE_INT, 1,
-            "layer", G_TYPE_INT, 3,            // In FLV we support only MP3
-            "framed", G_TYPE_BOOLEAN, FALSE,
-            NULL);
-        codec_name = "MPEG 1 Audio";
-
-        if (sampling_rate == 0) {
-            rate = 5500;
-        } else if (sampling_rate == 1) {
-            rate = 11025;
-        } else if (sampling_rate == 2) {
-            rate = 22050;
-        } else if (sampling_rate == 3) {
-            rate = 44100;
-        }
-        channels = (is_stereo) ? 2 : 1;
-
-        gst_caps_set_simple (caps, "rate", G_TYPE_INT, rate, "channels", G_TYPE_INT, channels, NULL);
-    }
-
-    caps_event = gst_event_new_caps(caps);
-    if (caps_event)
-        result = gst_pad_push_event(filter->audio_src_pad, caps_event);
-    gst_caps_unref (caps);
-
-    if (result) {
-        filter->sound_format = sound_format;
-
-        if (filter->queued_tags == NULL)
-            filter->queued_tags = gst_tag_list_new_empty ();
-
-        gst_tag_list_add (filter->queued_tags, GST_TAG_MERGE_REPLACE,
-              GST_TAG_AUDIO_CODEC, codec_name, NULL);
-
-        /* Push tags only if we don't expect more tags */
-        if (!filter->has_video || filter->video_linked) {
-            GstEvent *event = gst_event_new_tag (filter->queued_tags);
-            gst_element_send_event(GST_ELEMENT(filter), event);
-            filter->queued_tags = NULL;
-        }
-    }
-
-    return result;
-}
-
-static GstFlowReturn
-flv_demux_parse_audio_tag(FlvDemux* filter, guchar* data, gsize size)
-{
-    FlvAudioTag audio_tag;
-    GstBuffer* out;
-    GstMapInfo info;
-    GstFlowReturn result = GST_FLOW_OK;
-    gint parse_result;
-    FlvParser* parser = &filter->parser;
-    GstClockTime prev_frame_duration;
-
-    parse_result = flv_parser_read_audio_tag(parser, data, size, &audio_tag);
-    if (parse_result != FLV_PARSER_OK) {
-        //fprintf(stderr, "flv_demux_chain() : Error parsing buffer : %d\n", parse_result);
-        return GST_FLOW_ERROR;
-    }
-
-    filter->has_audio = TRUE;
-
-    /* Create video pad if it's not initialized yet */
-    if (!filter->audio_src_pad) {
-        //fprintf(stderr, "Creating audio pad...\n");
-        filter->audio_src_pad =
-            gst_pad_new_from_template (gst_element_class_get_pad_template
-            (GST_ELEMENT_GET_CLASS (filter), "audio"), "audio");
-
-        gst_pad_set_query_function (filter->audio_src_pad,
-            GST_DEBUG_FUNCPTR (flv_demux_src_query));
-        gst_pad_set_event_function (filter->audio_src_pad,
-            GST_DEBUG_FUNCPTR (flv_demux_src_event));
-
-        /* Activate pad */
-        if (!gst_pad_set_active (filter->audio_src_pad, TRUE)) {
-            return GST_FLOW_ERROR;
-        }
-
-        /* Set caps for newly crated pad */
-        if (!flv_demux_negotiate_audio_caps(filter, audio_tag.sound_format,
-                audio_tag.sampling_rate, audio_tag.is_16bit, audio_tag.is_stereo)) {
-            gst_object_unref(filter->audio_src_pad);
-            filter->audio_src_pad = NULL;
-            //fprintf(stderr, "Error creating audio pad.\n");
-            return GST_FLOW_ERROR;
-        }
-
-        /* Fixate caps */
-        gst_pad_use_fixed_caps (filter->audio_src_pad);
-
-        /* We need to set caps before adding */
-        if (!gst_element_add_pad (GST_ELEMENT (filter), filter->audio_src_pad)) {
-            return GST_FLOW_ERROR;
-        }
-
-        /* Send no_more_pads only if we don't expect pads */
-        if (filter->video_src_pad || !filter->has_video) {
-            gst_element_no_more_pads(GST_ELEMENT(filter));
-        }
-    }
-
-    // If the audio encoding is unsupported return OK as we've parsed the tag anyway.
-    if(FLVDEMUX_AUDIO_FORMAT_MP3 != audio_tag.sound_format) {
-        if(GST_CLOCK_TIME_NONE == filter->audio_prev_timestamp) {
-            gst_element_message_full(GST_ELEMENT(filter), GST_MESSAGE_WARNING, GST_STREAM_ERROR_CODEC_NOT_FOUND, GST_STREAM_ERROR_DEMUX, g_strdup("No audio decoder for this encoding"), NULL, ("flvdemux.c"), ("flv_demux_parse_audio_tag"), 0);
-        }
-        filter->audio_prev_timestamp = filter->current_timestamp;
-        return GST_FLOW_OK;
-    }
-
-    /* Renegotiate caps if changed */
-    if (filter->sound_format != audio_tag.sound_format) {
-        flv_demux_negotiate_audio_caps(filter, audio_tag.sound_format,
-                audio_tag.sampling_rate, audio_tag.is_16bit, audio_tag.is_stereo);
-    }
-
-    /* Create buffer and push data */
-    out = gst_buffer_new_allocate(NULL, audio_tag.audio_packet_size, NULL);
-    if (out == NULL) {
-        return GST_FLOW_ERROR;
-    }
-
-    /* Calculate last frame length */
-    if (filter->audio_prev_timestamp != GST_CLOCK_TIME_NONE && !filter->audio_discont) {
-        prev_frame_duration = filter->current_timestamp - filter->audio_prev_timestamp;
-        if (filter->audio_frame_duration == GST_CLOCK_TIME_NONE
-                || filter->audio_frame_duration < prev_frame_duration) {
-            filter->audio_frame_duration = prev_frame_duration;
-        }
-    }
-    filter->audio_prev_timestamp = filter->current_timestamp;
-
-    /* Fill in buffer */
-    if (!gst_buffer_map(out, &info, GST_MAP_WRITE)) {
-        // INLINE - gst_buffer_unref()
-        gst_buffer_unref(out);
-        return GST_FLOW_ERROR;
-    }
-
-    memcpy(info.data, data + audio_tag.audio_packet_offset, audio_tag.audio_packet_size);
-
-    gst_buffer_unmap(out, &info);
-
-    GST_BUFFER_TIMESTAMP(out) = filter->current_timestamp;
-    GST_BUFFER_DURATION(out) = filter->audio_frame_duration;
-    GST_BUFFER_OFFSET(out) = filter->audio_offset++;
-    GST_BUFFER_OFFSET_END(out) = filter->audio_offset;
-
-    filter->segment.position = GST_BUFFER_TIMESTAMP (out);
-
-    /* Handle discontinuity */
-    if (filter->audio_discont) {
-        GstEvent *new_segment = NULL;
-        GstSegment segment;
-        GST_BUFFER_FLAG_SET(out, GST_BUFFER_FLAG_DISCONT);
-        gst_segment_copy_into(&filter->segment, &segment);
-        new_segment = gst_event_new_segment(&segment);
-        gst_pad_push_event (filter->audio_src_pad, new_segment);
-        filter->audio_discont = FALSE;
-    }
-
-    /* Add index association only if we don't have video */
-    if (!filter->has_video) {
-        flv_demux_index_add_entry(filter, filter->current_timestamp, filter->last_file_position);
-    }
-
-    /* Push data downstream */
-    result = gst_pad_push (filter->audio_src_pad, out);
-    if (result == GST_FLOW_OK) {
-        filter->audio_linked = TRUE;
-    } else if (result == GST_FLOW_NOT_LINKED) {
-        filter->audio_linked = FALSE;
-    }
-
-    return result;
-}
-
-static gchar* flv_video_mime_type[16] = {
-    "video/unsupported", "video/unsupported", "video/unsupported", "video/unsupported",
-    "video/x-vp6-flash", "video/x-vp6-alpha", "video/unsupported", "video/unsupported",
-    "video/unsupported", "video/unsupported", "video/unsupported", "video/unsupported",
-    "video/unsupported", "video/unsupported", "video/unsupported", "video/unsupported"
-};
-
-static gchar* flv_video_codec_name[16] = {
-    "Unsupported", "Unsupported", "Unsupported", "Unsupported",
-    "On2 VP6 Video", "On2 VP6-Alpha Video", "Unsupported", "Unsupported",
-    "Unsupported", "Unsupported", "Unsupported", "Unsupported",
-    "Unsupported", "Unsupported", "Unsupported", "Unsupported"
-};
-
-static gboolean
-flv_demux_negotiate_video_caps(FlvDemux* filter, guint codec_id)
-{
-    gboolean result = FALSE;
-    GstCaps *caps = NULL;
-    gchar *mime_type = flv_video_mime_type[codec_id];
-    gchar *codec_name = flv_video_codec_name[codec_id];
-    GstEvent *caps_event = NULL;
-
-    if (mime_type == NULL || filter->metadata == NULL)
-        return FALSE;
-
-    caps = gst_caps_new_simple (mime_type, NULL, NULL);
-
-    // Set width and height
-    if (filter->metadata->width != 0)
-        gst_caps_set_simple (caps, "width", G_TYPE_INT, filter->metadata->width, NULL);
-
-    if (filter->metadata->height != 0)
-        gst_caps_set_simple (caps, "height", G_TYPE_INT, filter->metadata->height, NULL);
-
-    // Set framerate
-    if (filter->metadata->framerate != 0)
-        gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION,
-                (gint)(filter->metadata->framerate*100), 100, NULL);
-
-    //Set PAR only if both par_x and par_y are defined
-    if (filter->metadata->par_x != 0 && filter->metadata->par_y != 0)
-        gst_caps_set_simple (caps, "pixel-aspect-ratio", GST_TYPE_FRACTION,
-                filter->metadata->par_x, filter->metadata->par_y, NULL);
-
-    caps_event = gst_event_new_caps(caps);
-    if (caps_event)
-        result = gst_pad_push_event(filter->video_src_pad, caps_event);
-    gst_caps_unref (caps);
-
-    if (result) {
-        filter->video_codec_id = codec_id;
-
-        if (filter->queued_tags == NULL)
-            filter->queued_tags = gst_tag_list_new_empty ();
-
-        gst_tag_list_add (filter->queued_tags, GST_TAG_MERGE_REPLACE,
-              GST_TAG_VIDEO_CODEC, codec_name, NULL);
-
-        /* Push tags only if we don't expect more tags */
-        if (!filter->has_audio || filter->audio_linked) {
-            GstEvent *event = gst_event_new_tag (filter->queued_tags);
-            gst_element_send_event(GST_ELEMENT(filter), event);
-            filter->queued_tags = NULL;
-        }
-    }
-    return result;
-}
-
-static GstFlowReturn
-flv_demux_parse_video_tag(FlvDemux* filter, guchar* data, gsize size)
-{
-    FlvVideoTag video_tag;
-    GstBuffer* out;
-    GstMapInfo info;
-    GstFlowReturn result = GST_FLOW_OK;
-    gint parse_result;
-    gboolean need_push_tags = FALSE;
-    FlvParser* parser = &filter->parser;
-    gboolean is_keyframe;
-    GstClockTime prev_frame_duration;
-
-    parse_result = flv_parser_read_video_tag(parser, data, size, &video_tag);
-    if (parse_result != FLV_PARSER_OK) {
-        //fprintf(stderr, "flv_demux_chain() : Error parsing buffer : %d\n", parse_result);
-        return GST_FLOW_ERROR;
-    }
-
-    is_keyframe = (video_tag.frame_type == FLV_VIDEO_FRAME_KEY);
-    filter->has_video = TRUE;
-
-    /* Create video pad if it's not initialized yet */
-    if (!filter->video_src_pad) {
-        //fprintf(stderr, "Creating video pad...\n");
-        filter->video_src_pad =
-            gst_pad_new_from_template (gst_element_class_get_pad_template
-            (GST_ELEMENT_GET_CLASS (filter), "video"), "video");
-
-        gst_pad_set_query_function (filter->video_src_pad,
-            GST_DEBUG_FUNCPTR (flv_demux_src_query));
-        gst_pad_set_event_function (filter->video_src_pad,
-            GST_DEBUG_FUNCPTR (flv_demux_src_event));
-
-        /* Activate pad */
-        if (!gst_pad_set_active (filter->video_src_pad, TRUE)) {
-            return GST_FLOW_ERROR;
-        }
-
-        /* Set caps for newly crated pad */
-        if (!flv_demux_negotiate_video_caps(filter, video_tag.codec_id)) {
-            gst_object_unref(filter->video_src_pad);
-            filter->video_src_pad = NULL;
-            return GST_FLOW_ERROR;
-        }
-        need_push_tags = TRUE;
-
-        /* Fixate caps */
-        gst_pad_use_fixed_caps (filter->video_src_pad);
-
-        /* We need to set caps before adding */
-        if (!gst_element_add_pad (GST_ELEMENT (filter), filter->video_src_pad)) {
-            return GST_FLOW_ERROR;
-        }
-
-        //Send no_more_pads only if we don't expect pads
-        if (filter->audio_src_pad || !filter->has_audio) {
-            gst_element_no_more_pads(GST_ELEMENT(filter));
-        }
-    }
-
-    // If the video encoding is unsupported return OK as we've parsed the tag anyway.
-    if(FLVDEMUX_VIDEO_FORMAT_VP6 != video_tag.codec_id &&
-       FLVDEMUX_VIDEO_FORMAT_VP6_ALPHA != video_tag.codec_id) {
-        if(GST_CLOCK_TIME_NONE == filter->video_prev_timestamp) {
-            gst_element_message_full(GST_ELEMENT(filter), GST_MESSAGE_WARNING, GST_STREAM_ERROR_CODEC_NOT_FOUND, GST_STREAM_ERROR_DEMUX, g_strdup("No video decoder for this encoding"), NULL, ("flvdemux.c"), ("flv_demux_parse_video_tag"), 0);
-        }
-        filter->video_prev_timestamp = filter->current_timestamp;
-        return GST_FLOW_OK;
-    }
-
-    /* Renegotiate caps if changed */
-    if (filter->video_codec_id != video_tag.codec_id) {
-        flv_demux_negotiate_video_caps(filter, video_tag.codec_id);
-    }
-
-    /* Push tags if necessary */
-    if (filter->queued_tags && need_push_tags) {
-        GstEvent *event = gst_event_new_tag (filter->queued_tags);
-        gst_element_send_event(GST_ELEMENT(filter), event);
-        filter->queued_tags = NULL;
-    }
-
-    /* Create buffer and push data */
-    out = gst_buffer_new_allocate(NULL, video_tag.video_packet_size, NULL);
-    if (out == NULL) {
-        return GST_FLOW_ERROR;
-    }
-
-    /* Calculate last frame length */
-    if (filter->video_prev_timestamp != GST_CLOCK_TIME_NONE && !filter->video_discont) {
-        prev_frame_duration = filter->current_timestamp - filter->video_prev_timestamp;
-        if (filter->video_frame_duration == GST_CLOCK_TIME_NONE
-                || filter->video_frame_duration < prev_frame_duration) {
-            filter->video_frame_duration = prev_frame_duration;
-        }
-    }
-    filter->video_prev_timestamp = filter->current_timestamp;
-
-    /* Fill in buffer */
-    if (!gst_buffer_map(out, &info, GST_MAP_WRITE)) {
-        // INLINE - gst_buffer_unref()
-        gst_buffer_unref(out);
-        return GST_FLOW_ERROR;
-    }
-
-    memcpy(info.data, data + video_tag.video_packet_offset, video_tag.video_packet_size);
-
-    gst_buffer_unmap(out, &info);
-
-    GST_BUFFER_TIMESTAMP(out) = filter->current_timestamp;
-    GST_BUFFER_DURATION(out) = filter->video_frame_duration;
-    GST_BUFFER_OFFSET(out) = filter->video_offset++;
-    GST_BUFFER_OFFSET_END(out) = filter->video_offset;
-
-    if (!is_keyframe)
-        GST_BUFFER_FLAG_SET (out, GST_BUFFER_FLAG_DELTA_UNIT);
-
-    filter->segment.position = GST_BUFFER_TIMESTAMP (out);
-
-    /* Handle discontinuity */
-    if (filter->video_discont) {
-        GstEvent *new_segment = NULL;
-        GstSegment segment;
-        GST_BUFFER_FLAG_SET(out, GST_BUFFER_FLAG_DISCONT);
-        gst_segment_copy_into(&filter->segment, &segment);
-        new_segment = gst_event_new_segment(&segment);
-        gst_pad_push_event (filter->video_src_pad, new_segment);
-        filter->video_discont = FALSE;
-    }
-
-    /* Add keyframes to index */
-    if (is_keyframe) {
-        flv_demux_index_add_entry(filter, filter->current_timestamp, filter->last_file_position);
-    }
-
-    /* Push data downstream */
-    result = gst_pad_push (filter->video_src_pad, out);
-    if (result == GST_FLOW_OK) {
-        filter->video_linked = TRUE;
-    } else if (result == GST_FLOW_NOT_LINKED) {
-        filter->video_linked = FALSE;
-    }
-
-    return result;
-}
-
-static GstFlowReturn
-flv_demux_parse_next_block(FlvDemux* filter, guchar* data, gsize size)
-{
-    FlvParser* parser = &filter->parser;
-    gint  parse_result = FLV_PARSER_OK;
-    GstFlowReturn result = GST_FLOW_OK;
-
-    switch (parser->state) {
-        case FLV_PARSER_EXPECT_HEADER: {
-            FlvHeader header;
-            parse_result = flv_parser_read_header(parser, data, size, &header);
-            if (parse_result == FLV_PARSER_OK) {
-                //fprintf(stderr, "Parsed header. file version : %d, has video : %d, has audio : %d\n",
-                //        header.file_version, header.has_video_tags, header.has_audio_tags);
-                filter->has_audio = header.has_audio_tags;
-                filter->has_video = header.has_video_tags;
-            } else {
-                //fprintf(stderr, "flv_demux_chain() : Error parsing buffer : %d\n", parse_result);
-                result = GST_FLOW_ERROR;
-            }
-            break;
-        }
-
-        case FLV_PARSER_EXPECT_SKIP_BLOCK: {
-            parse_result = flv_parser_skip(parser, data, size);
-            if (parse_result != FLV_PARSER_OK) {
-                //fprintf(stderr, "flv_demux_chain() : Error parsing buffer : %d\n", parse_result);
-                result = GST_FLOW_ERROR;
-            }
-            break;
-        }
-
-        case FLV_PARSER_EXPECT_TAG_PREFIX: {
-            FlvTagPrefix    tag;
-            guint64         file_position = parser->file_position;
-            parse_result = flv_parser_read_tag_prefix(parser, data, size, &tag);
-            if (parse_result == FLV_PARSER_OK) {
-                filter->current_timestamp = (GstClockTime)tag.timestamp * GST_MSECOND;
-                filter->last_file_position = file_position;
-            } else {
-                result = GST_FLOW_ERROR;
-            }
-            break;
-        }
-
-        case FLV_PARSER_EXPECT_VIDEO_TAG_BODY: {
-            result = flv_demux_parse_video_tag(filter, data, size);
-            break;
-        }
-
-        case FLV_PARSER_EXPECT_AUDIO_TAG_BODY: {
-            result = flv_demux_parse_audio_tag(filter, data, size);
-            break;
-        }
-
-        case FLV_PARSER_EXPECT_SCRIPT_DATA_TAG_BODY: {
-            FlvScriptDataReader reader;
-            parse_result = flv_parser_read_script_data_tag(parser,
-                    data, size, &reader);
-
-            if (parse_result == FLV_PARSER_OK && filter->metadata) {
-                if (flv_script_data_read(&reader, filter->metadata) &&
-                    NULL != filter->metadata->tag_list &&
-                    GST_IS_TAG_LIST(filter->metadata->tag_list))
-                {
-                    /* Add discovered tags to queue */
-                    if (!filter->queued_tags) {
-                        filter->queued_tags = gst_tag_list_copy(filter->metadata->tag_list);
-                    } else {
-                        GstTagList* temp = NULL;
-                        temp = gst_tag_list_merge(filter->queued_tags,
-                                filter->metadata->tag_list, GST_TAG_MERGE_REPLACE);
-                        gst_tag_list_free(filter->queued_tags);
-                        filter->queued_tags = temp;
-                    }
-                }
-
-                // check if we have a key frame list, if we do copy it over to the main list
-                if (!filter->copied_metadata_keyframes && (filter->metadata->keyframes != NULL)) {
-                    guint index;
-                    GArray *metalist = filter->metadata->keyframes;
-                    for (index = 0; index < metalist->len; index++) {
-                        FlvKeyframe entry = g_array_index(metalist, FlvKeyframe, index);
-                        flv_demux_index_add_entry(filter, entry.time, entry.fileposition);
-                    }
-                    filter->copied_metadata_keyframes = TRUE;
-                }
-            } else {
-                //fprintf(stderr, "flv_demux_chain() : Error parsing buffer : %d\n", parse_result);
-                result = GST_FLOW_ERROR;
-            }
-            break;
-        }
-        default: {
-            //fprintf(stderr, "flv_demux_chain() : Illegal state\n");
-            result = GST_FLOW_ERROR;
-            break;
-        }
-    }
-
-    if (result == GST_FLOW_ERROR) {
-        gst_element_message_full(GST_ELEMENT(filter), GST_MESSAGE_ERROR, GST_STREAM_ERROR, GST_STREAM_ERROR_DEMUX, g_strdup("Failed to demux FLV stream"), NULL, ("flvdemux.c"), ("flv_demux_parse_next_block"), 0);
-    }
-
-    return result;
-}
-
-/* chain function
- * this function does the actual processing
- */
-static GstFlowReturn flv_demux_chain (GstPad * pad, GstObject *parent, GstBuffer * buf)
-{
-    //fprintf(stderr, "===flv_demux_chain()\n");
-    FlvDemux *filter;
-    GstAdapter *adapter;
-    GstFlowReturn result = GST_FLOW_OK;
-
-    filter = FLV_DEMUX (parent);
-
-    if (filter->is_flushing || filter->is_eos_received) {
-        // INLINE - gst_buffer_unref()
-        gst_buffer_unref(buf);
-        return GST_FLOW_FLUSHING;
-    }
-
-    adapter = filter->adapter;
-
-    if (filter->need_parser_flush) {
-        filter->need_parser_flush = FALSE;
-        gst_adapter_clear(adapter);
-        if (GST_BUFFER_OFFSET(buf) != 0) {
-            flv_parser_seek(&filter->parser, GST_BUFFER_OFFSET(buf));
-        } else {
-            flv_parser_reset(&filter->parser);
-        }
-    }
-
-    gst_adapter_push (adapter, buf);
-
-    while(gst_adapter_available(adapter) >= filter->parser.next_block_size) {
-        gsize block_size = filter->parser.next_block_size;
-        guchar* data = (guchar*)gst_adapter_map(adapter, (guint)block_size);
-        if (data) {
-            result = flv_demux_parse_next_block(filter, data, block_size);
-            gst_adapter_unmap(adapter);
-            gst_adapter_flush(adapter, (guint)block_size);
-            if (result != GST_FLOW_OK)
-                break;
-        } else {
-            gst_adapter_unmap(adapter);
-        }
-    }
-
-    return result;
-}
-
-static gboolean flv_demux_do_indexing_pull(FlvDemux* filter,
-        GstClockTime indexFrom, GstClockTime indexTo)
-{
-    FlvParser temp_parser;
-    guint64 pos;
-    GstClockTime time;
-    GstFlowReturn flow_ret;
-    FlvParserResult parser_ret;
-    GstBuffer* block = NULL;
-
-    /* Init temporary parser */
-    flv_parser_init(&temp_parser);
-
-    /* Find last known position and seek parser if necessary */
-    if (flv_demux_index_lookup(filter, indexFrom, &time, &pos))
-        flv_parser_seek(&temp_parser, pos);
-
-    /* Parse file until beyond required time */
-    while (time < indexTo) {
-        FlvTagPrefix tag_prefix;
-        GstMapInfo info;
-
-        pos = temp_parser.file_position;
-        /* Read additional byte that holds frame info */
-        flow_ret = gst_pad_pull_range(filter->sink_pad, temp_parser.file_position,
-                (guint)(temp_parser.next_block_size + 1), &block);
-        if (flow_ret != GST_FLOW_OK) {
-            return FALSE;
-        }
-
-        if (!gst_buffer_map(block, &info, GST_MAP_READ)) {
-            return FALSE;
-        }
-
-        parser_ret = flv_parser_read_tag_prefix(&temp_parser, info.data,
-                info.size, &tag_prefix);
-        if (parser_ret != GST_FLOW_OK) {
-            gst_buffer_unmap(block, &info);
-            // INLINE - gst_buffer_unref()
-            gst_buffer_unref(block);
-            return FALSE;
-        }
-
-        time = tag_prefix.timestamp * GST_MSECOND;
-
-        /* Add index if necessary */
-        if (tag_prefix.tag_type == FLV_TAG_TYPE_VIDEO) {
-            guint8 frame_info = info.data[temp_parser.parsed_block_size];
-            gboolean is_keyframe = ((frame_info & 0xF0) >> 4) == 1;
-            if (is_keyframe) {
-                flv_demux_index_add_entry(filter, time, pos);
-            }
-        } else if (tag_prefix.tag_type == FLV_TAG_TYPE_AUDIO && !filter->has_video) {
-            flv_demux_index_add_entry(filter, time, pos);
-        }
-        gst_buffer_unmap(block, &info);
-// INLINE - gst_buffer_unref()
-        gst_buffer_unref(block);
-
-        /* Seek parser to next tag */
-        flv_parser_seek(&temp_parser, temp_parser.file_position + temp_parser.next_block_size);
-    }
-    return TRUE;
-}
-
-static void flv_demux_loop (GstPad * pad)
-{
-    //fprintf(stderr, "===flv_demux_loop()\n");
-    FlvDemux *filter;
-    gint result = GST_FLOW_OK;
-    GstBuffer* block = NULL;
-    GstMapInfo info;
-
-    filter = FLV_DEMUX (GST_OBJECT_PARENT (pad));
-    if (filter == NULL) {
-        gst_pad_pause_task(pad);
-        return;
-    }
-
-    //fprintf(stderr, "Pulling %d bytes at %d\n", (int)filter->parser.next_block_size,
-    //        (int)filter->parser.file_position);
-    result = gst_pad_pull_range(pad, filter->parser.file_position,
-            (guint)filter->parser.next_block_size, &block);
-    if (result == GST_FLOW_OK) {
-        if (!gst_buffer_map(block, &info, GST_MAP_READ)) {
-            result = GST_FLOW_EOS;
-        }
-
-        if (result == GST_FLOW_OK) {
-            result = flv_demux_parse_next_block(filter, info.data, info.size);
-            gst_buffer_unmap(block, &info);
-            // INLINE - gst_buffer_unref()
-            gst_buffer_unref(block);
-        }
-
-        if (result == GST_FLOW_OK)
-            return;
-    }
-
-    //Something went wrong
-    //const gchar *reason = gst_flow_get_name(result);
-    //fprintf(stderr, "pausing task, reason : %s (%d)\n", reason, result);
-
-    gst_pad_pause_task(pad);
-
-    if (result == GST_FLOW_EOS) {
-        flv_demux_push_src_event(filter, gst_event_new_eos ());
-    } else if (result == GST_FLOW_ERROR) {
-        gst_element_message_full(GST_ELEMENT(filter), GST_MESSAGE_ERROR, GST_STREAM_ERROR, GST_STREAM_ERROR_DEMUX,
-            g_strdup("Failed to demux FLV stream"), NULL, ("flvdemux.c"), ("flv_demux_loop"), 0);
-    }
-}
-
-static gboolean flv_demux_activatemode(GstPad *pad, GstObject *parent, GstPadMode mode, gboolean active)
-{
-    gboolean res = FALSE;
-    FlvDemux *filter = FLV_DEMUX(parent);
-
-    switch (mode) {
-        case GST_PAD_MODE_PUSH:
-            filter->is_pulling = FALSE;
-            res = TRUE;
-            break;
-        case GST_PAD_MODE_PULL:
-            filter->is_pulling = TRUE;
-            if (active) {
-                res = gst_pad_start_task (filter->sink_pad, (GstTaskFunction) flv_demux_loop, filter->sink_pad, NULL);
-            } else {
-                res = gst_pad_stop_task (filter->sink_pad);
-            }
-            break;
-        default:
-            /* unknown scheduling mode */
-            res = FALSE;
-            break;
-    }
-
-  return res;
-}
-
-/* If we can pull that's prefered */
-static gboolean
-flv_demux_sink_activate (GstPad * sinkpad, GstObject *parent)
-{
-    //fprintf(stderr, "===flv_demux_sink_activate()\n");
-    GstQuery *query = NULL;
-    gboolean pull_mode = FALSE;
-
-    query = gst_query_new_scheduling ();
-
-    if (!gst_pad_peer_query (sinkpad, query)) {
-        gst_query_unref (query);
-    } else {
-        pull_mode = gst_query_has_scheduling_mode_with_flags (query, GST_PAD_MODE_PULL, GST_SCHEDULING_FLAG_SEEKABLE);
-        gst_query_unref (query);
-    }
-
-    if (pull_mode) {
-        return gst_pad_activate_mode (sinkpad, GST_PAD_MODE_PULL, TRUE);
-    } else {
-        return gst_pad_activate_mode (sinkpad, GST_PAD_MODE_PUSH, TRUE);
-    }
-}
-
-static gboolean
-flv_demux_src_query (GstPad * pad, GstObject *parent, GstQuery * query)
-{
-    //fprintf(stderr, "===flv_demux_src_query: (%s)\n", gst_query_type_get_name(GST_QUERY_TYPE(query)));
-    gboolean res = TRUE;
-    FlvDemux *filter;
-
-    filter = FLV_DEMUX (parent);
-
-    switch (GST_QUERY_TYPE(query)) {
-        case GST_QUERY_DURATION:
-        {
-            GstFormat format;
-
-            gst_query_parse_duration(query, &format, NULL);
-            /* duration is time only */
-            if (format != GST_FORMAT_TIME || !filter->metadata) {
-                res = gst_pad_query_default(pad, parent, query);
-                break;
-            }
-            //fprintf(stderr, "===flv_demux_src_query: returning duration %ld\n",  (long int)(filter->metadata->duration / 1000000));
-            gst_query_set_duration(query, GST_FORMAT_TIME, filter->metadata->duration);
-            break;
-        }
-
-        case GST_QUERY_LATENCY:
-        default:
-        {
-            GstPad *peer;
-
-            if ((peer = gst_pad_get_peer(filter->sink_pad))) {
-                /* query latency on peer pad */
-                res = gst_pad_query(peer, query);
-                gst_object_unref(peer);
-            } else {
-                /* no peer, we don't know */
-                res = FALSE;
-            }
-            break;
-        }
-    }
-
-    return res;
-}
-
-static gboolean
-flv_demux_sink_query (GstPad* pad, GstObject *parent, GstQuery* query)
-{
-    gboolean result = TRUE;
-    switch (GST_QUERY_TYPE(query))
-    {
-        case GST_QUERY_CUSTOM:
-        {
-            GstStructure *s = gst_query_get_structure(query);
-            if (gst_structure_has_name(s, GETRANGE_QUERY_NAME))
-                gst_structure_set(s, GETRANGE_QUERY_SUPPORTS_FIELDNANE,
-                                     GETRANGE_QUERY_SUPPORTS_FIELDTYPE,
-                                     TRUE,
-                                     NULL);
-            break;
-        }
-        default:
-            result = gst_pad_query_default(pad, parent, query);
-            break;
-    }
-    return result;
-}
-
-static gboolean
-flv_demux_seek_pull(FlvDemux* filter, GstEvent* event)
-{
-    GstFormat format;
-    GstSeekFlags flags;
-    GstSeekType start_type, stop_type;
-    gint64 start, stop;
-    gdouble rate;
-    gboolean update, flush, keyframe, res = TRUE;
-    GstSegment seeksegment;
-
-    gst_event_parse_seek(event, &rate, &format, &flags,
-            &start_type, &start, &stop_type, &stop);
-#if JFXMEDIA_DEBUG
-    fprintf(stderr, "FLV: seek pull : start_type %d, start %lld, stop_type %d, stop %lld\n", start_type, start, stop_type, stop);
-#endif
-    // Non-time format and negative playback rate are not supported.
-    if (format != GST_FORMAT_TIME || rate <= 0) {
-        return FALSE;
-    }
-
-    flush = flags & GST_SEEK_FLAG_FLUSH;
-    keyframe = flags & GST_SEEK_FLAG_KEY_UNIT;
-
-    if (flush) {
-        /* Flush start up and downstream to make sure data flow and loops are
-           idle */
-        //fprintf(stderr, "===flv_demux_seek_pull() : FLUSH\n");
-        // Upstream
-        gst_pad_push_event (filter->sink_pad, gst_event_new_flush_start ());
-        // Downstream
-        flv_demux_push_src_event(filter, gst_event_new_flush_start ());
-    } else {
-        //fprintf(stderr, "===flv_demux_seek_pull() : PAUSE\n");
-        /* Pause the pulling task */
-        //gst_pad_pause_task (filter->sink_pad);
-    }
-
-    /* Take the stream lock */
-    GST_PAD_STREAM_LOCK (filter->sink_pad);
-
-    if (flush) {
-        /* Stop flushing upstream we need to pull */
-        gst_pad_push_event (filter->sink_pad, gst_event_new_flush_stop (TRUE));
-    }
-
-    /* Work on a copy until we are sure the seek succeeded. */
-    memcpy (&seeksegment, &filter->segment, sizeof (GstSegment));
-
-    //fprintf(stderr, "Segment before : %" GST_SEGMENT_FORMAT "\n", &seeksegment);
-    /* Apply the seek to our segment */
-    gst_segment_do_seek (&seeksegment, rate, format, flags,
-            start_type, start, stop_type, stop, &update);
-    //fprintf(stderr, "Segment after : %" GST_SEGMENT_FORMAT "\n", &seeksegment);
-
-    if (flush || seeksegment.position != filter->segment.position) {
-        /* Do the actual seeking */
-        GstClockTime time;
-        guint64 pos;
-
-        /* Find nearest keyframe. If there are no index entries yet,
-         * parsing will start from the beginning of file */
-        if (!flv_demux_index_lookup(filter, seeksegment.start, &time, &pos)) {
-            time = 0;
-            pos = 0;
-        }
-
-        /* Index file up to seek position if it's not indexed yet. */
-        if ((seeksegment.start - time) > 5 * GST_SECOND) {
-            flv_demux_do_indexing_pull(filter, time, seeksegment.start);
-            flv_demux_index_lookup(filter, seeksegment.start, &time, &pos);
-        }
-
-        /* Seek parser to keyframe if there's one found.
-         * Otherwise reset it to the beginning of file. */
-        if (pos != 0) {
-            flv_parser_seek(&filter->parser, pos);
-        } else {
-            flv_parser_reset(&filter->parser);
-        }
-
-        /* Adjust segment if it's keyframe seek. */
-        if (keyframe) {
-            if (time < (GstClockTime)seeksegment.start) {
-                seeksegment.start = time;
-            }
-            seeksegment.position = time;
-        }
-    }
-
-    if (flush) {
-        // Downstream
-        flv_demux_push_src_event(filter, gst_event_new_flush_stop (TRUE));
-    }
-    if (res) {
-        /* Ok seek succeeded, take the newly configured segment */
-        //fprintf(stderr, "Segment final : %" GST_SEGMENT_FORMAT "\n", &seeksegment);
-        memcpy (&filter->segment, &seeksegment, sizeof (GstSegment));
-        if (filter->segment.flags & GST_SEEK_FLAG_SEGMENT) {
-            gst_element_post_message (GST_ELEMENT (filter),
-                    gst_message_new_segment_start (GST_OBJECT (filter),
-                    filter->segment.format, filter->segment.position));
-        }
-        filter->audio_discont = TRUE;
-        filter->video_discont = TRUE;
-    }
-
-    gst_pad_start_task (filter->sink_pad,
-            (GstTaskFunction)flv_demux_loop, filter->sink_pad, NULL);
-
-    GST_PAD_STREAM_UNLOCK (filter->sink_pad);
-
-    return res;
-}
-
-static gboolean
-flv_demux_seek_push(FlvDemux* filter, GstEvent* event)
-{
-    GstFormat format;
-    GstSeekFlags flags;
-    GstSeekType start_type, stop_type;
-    gint64 start, stop;
-    gdouble rate;
-    gboolean update, flush, keyframe, res = TRUE;
-    GstSegment seeksegment;
-
-    gst_event_parse_seek(event, &rate, &format, &flags,
-            &start_type, &start, &stop_type, &stop);
-
-    // Non-time format and negative playback rate are not supported.
-    if (format != GST_FORMAT_TIME || rate <= 0) {
-        return FALSE;
-    }
-
-    flush = flags & GST_SEEK_FLAG_FLUSH;
-    keyframe = flags & GST_SEEK_FLAG_KEY_UNIT;
-
-    /* Work on a copy until we are sure the seek succeeded. */
-    memcpy (&seeksegment, &filter->segment, sizeof (GstSegment));
-
-    //fprintf(stderr, "Segment before : %" GST_SEGMENT_FORMAT "\n", &seeksegment);
-    /* Apply the seek to our segment */
-    gst_segment_do_seek (&seeksegment, rate, format, flags,
-            start_type, start, stop_type, stop, &update);
-    //fprintf(stderr, "Segment after : %" GST_SEGMENT_FORMAT "\n", &seeksegment);
-
-    if (flush || seeksegment.position != filter->segment.position) {
-        /* Do the actual seeking */
-        GstClockTime time;
-        guint64 pos;
-
-        /* Find nearest keyframe. If there are no index entries yet,
-         * parsing will start from the beginning of file */
-        if (!flv_demux_index_lookup(filter, seeksegment.start, &time, &pos)) {
-            time = 0;
-            pos = 0;
-        }
-
-        /* Adjust segment if it's keyframe seek. */
-        if (keyframe) {
-            if (time < (GstClockTime)seeksegment.start) {
-                seeksegment.start = time;
-            }
-            seeksegment.position = time;
-        }
-
-        /* Push seek event adjusted to bytes upstream. */
-        res = gst_pad_push_event (filter->sink_pad,
-            gst_event_new_seek (seeksegment.rate, GST_FORMAT_BYTES,
-                GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE,
-                GST_SEEK_TYPE_SET, pos,
-                GST_SEEK_TYPE_NONE, 0));
-    }
-
-    if (res) {
-        /* Ok seek succeeded, take the newly configured segment */
-        //fprintf(stderr, "Segment final : %" GST_SEGMENT_FORMAT "\n", &seeksegment);
-        memcpy (&filter->segment, &seeksegment, sizeof (GstSegment));
-        if (filter->segment.flags & GST_SEEK_FLAG_SEGMENT) {
-            gst_element_post_message (GST_ELEMENT (filter),
-                    gst_message_new_segment_start (GST_OBJECT (filter),
-                    filter->segment.format, filter->segment.position));
-        }
-        filter->audio_discont = TRUE;
-        filter->video_discont = TRUE;
-    }
-
-    return res;
-}
-
-static gboolean flv_demux_src_event (GstPad * pad, GstObject *parent, GstEvent * event)
-{
-    //fprintf(stderr, "===flv_demux_src_event() : %s\n", gst_event_type_get_name(GST_EVENT_TYPE(event)));
-    gboolean res = TRUE;
-    FlvDemux *filter;
-
-    filter = FLV_DEMUX (parent);
-
-    switch (GST_EVENT_TYPE (event)) {
-        case GST_EVENT_SEEK:
-            if (filter->is_pulling) {
-                res = flv_demux_seek_pull(filter, event);
-            } else {
-                res = flv_demux_seek_push(filter, event);
-            }
-// INLINE - gst_event_unref()
-            gst_event_unref (event);
-            break;
-        default:
-            res = gst_pad_push_event (filter->sink_pad, event);
-            break;
-    }
-
-    return res;
-}
-
-static gint
-compare_keyframes(FlvKeyframe *first, FlvKeyframe *second)
-{
-    if (first->time < second->time) {
-        return -1;
-    }
-    if (first->time == second->time) {
-        return 0;
-    }
-    return 1;
-}
-
-static void
-flv_demux_index_add_entry(FlvDemux* filter, GstClockTime index_time, guint64 index_pos)
-{
-    FlvKeyframe frame;
-    GList *foundEntry;
-
-    frame.time = index_time;
-    frame.fileposition = index_pos;
-
-    // OK if keyframes is NULL, it'll just return NULL
-    foundEntry = g_list_find_custom(filter->keyframes, &frame, (GCompareFunc)compare_keyframes);
-    if (foundEntry == NULL) {
-        // not a duplicate, insert it into the list
-#if JFXMEDIA_DEBUG
-        fprintf(stderr, " Inserting key frame: time %lld\n", (long long)GST_TIME_AS_MSECONDS(index_time));
-#endif
-        filter->keyframes = g_list_insert_sorted(filter->keyframes, g_slice_copy(sizeof(FlvKeyframe), &frame), (GCompareFunc)compare_keyframes);
-    }
-}
-
-static gboolean
-flv_demux_index_lookup(FlvDemux* filter,
-        GstClockTime time, GstClockTime *index_time, guint64 *index_pos)
-{
-    FlvKeyframe *frame = NULL;
-    GList *keyframes = g_list_first(filter->keyframes);
-
-    if (!keyframes) {
-        return FALSE;
-    }
-
-    // check endpoints
-    if (((FlvKeyframe*)g_list_first(keyframes)->data)->time > time) {
-        return FALSE;
-    }
-    if (((FlvKeyframe*)g_list_last(keyframes)->data)->time < time) {
-        return FALSE;
-    }
-
-    // I don't think a binary search really buys us anything here, maybe if the table was 10x the size, but these tend to be pretty small
-    while (keyframes != NULL) {
-        FlvKeyframe *entry = (FlvKeyframe*)keyframes->data;
-        if (entry->time == time) {
-            frame = entry;
-            break;
-        } else if (entry->time > time) {
-            // went over, previous entry will have to suffice
-            frame = (FlvKeyframe*)keyframes->prev->data;
-            break;
-        }
-        keyframes = g_list_next(keyframes);
-    }
-
-    if (frame) {
-#if JFXMEDIA_DEBUG
-        fprintf(stderr, "FLV: Seek index (%0.2f): %0.2fs, %lld\n", (double)GST_TIME_AS_SECONDS(time), (double)GST_TIME_AS_SECONDS(frame->time), (unsigned long long)frame->fileposition);
-#endif
-        *index_time = frame->time;
-        *index_pos = frame->fileposition;
-        return TRUE;
-    }
-    return FALSE;
-}
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvdemux.h	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef __FLVDEMUX_H__
-#define __FLVDEMUX_H__
-
-#include <gst/gst.h>
-#include <gst/base/gstadapter.h>
-
-#include "flvparser.h"
-
-G_BEGIN_DECLS
-#define TYPE_FLV_DEMUX \
-  (flv_demux_get_type())
-#define FLV_DEMUX(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST((obj),TYPE_FLV_DEMUX,FlvDemux))
-#define FLV_DEMUX_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass),TYPE_FLV_DEMUX,FlvDemuxClass))
-#define IS_FLV_DEMUX(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj),TYPE_FLV_DEMUX))
-#define IS_FLV_DEMUX_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass),TYPE_FLV_DEMUX))
-
-#define FLVDEMUX_AUDIO_FORMAT_MP3       2
-#define FLVDEMUX_VIDEO_FORMAT_VP6       4
-#define FLVDEMUX_VIDEO_FORMAT_VP6_ALPHA 5
-
-typedef struct _FlvDemux FlvDemux;
-typedef struct _FlvDemuxClass FlvDemuxClass;
-
-struct _FlvDemux
-{
-    GstElement element;
-
-    GstPad *sink_pad;
-
-    GstAdapter *adapter;
-    FlvParser parser;
-    gboolean is_pulling;
-    gboolean need_parser_flush;
-
-    //Stream properties
-    gboolean has_video;
-    gboolean has_audio;
-
-    //metadata
-    FlvMetadata*    metadata;           /* Metadata read from onMetaData tag */
-    GstTagList*     queued_tags;        /* Tags waiting push */
-
-    //Indexing and seeking
-    guint64         last_file_position; /* Position of tag prefix within file */
-    GstClockTime    current_timestamp;  /* Timestamp of last frame */
-    GList*          keyframes;          /* Sorted list of FlvKeyframe, only used if no list exists in the metadata */
-    gboolean        copied_metadata_keyframes;  /* Set to TRUE once we've processed the keyframe list from metadata */
-    GstSegment      segment;
-    gboolean        is_flushing;
-    gboolean        is_eos_received;
-
-    //Source pads
-    GstPad          *audio_src_pad;
-    GstPad          *video_src_pad;
-
-    //Audio runtime info
-    guint           sound_format;
-    gboolean        audio_linked;
-    guint           audio_offset;
-    gboolean        audio_discont;
-    GstClockTime    audio_prev_timestamp;
-    GstClockTime    audio_frame_duration;
-
-    //Video runtime info
-    guint           video_codec_id;
-    gboolean        video_linked;
-    guint           video_offset;
-    gboolean        video_discont;
-    GstClockTime    video_prev_timestamp;
-    GstClockTime    video_frame_duration;
-
-};
-
-struct _FlvDemuxClass
-{
-  GstElementClass parent_class;
-};
-
-GType flv_demux_get_type (void);
-
-G_END_DECLS
-
-#endif
-
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvmetadata.c	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,669 +0,0 @@
-/*
- * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "flvmetadata.h"
-#include "flvparser.h"
-
-#include <string.h>
-
-GST_DEBUG_CATEGORY_EXTERN (fxm_plugin_debug);
-#define GST_CAT_DEFAULT fxm_plugin_debug
-
-
-static double FLV_READ_DOUBLE_BE(guchar* src) {
-    /* XXX: Use union here */
-    double r = 0;
-    guchar* t = (guchar*)(&r);
-    t[0] = src[7];
-    t[1] = src[6];
-    t[2] = src[5];
-    t[3] = src[4];
-    t[4] = src[3];
-    t[5] = src[2];
-    t[6] = src[1];
-    t[7] = src[0];
-    return r;
-};
-
-/* ScriptData Readers */
-
-/*!
- * \brief Reads UI8 value and advances stream position by 1 byte.
- */
-static gboolean
-flv_script_data_read_ui8(FlvScriptDataReader* reader, guint8* dest);
-
-/*!
- * \brief Reads UI32 value and advances stream position by 4 bytes.
- */
-static gboolean
-flv_script_data_read_ui32(FlvScriptDataReader* reader, guint32* dest);
-
-/*!
- * \brief Reads DOUBLE value and advances stream position by 8 bytes.
- */
-static gboolean
-flv_script_data_read_double(FlvScriptDataReader* reader, gdouble* dest);
-
-/*!
- * \brief Reads SCRIPTDATASTRING value and advances stream position.
- *
- * Caller is responsible for freeing dest when no longer needed.
- */
-static gboolean
-flv_script_data_read_string(FlvScriptDataReader* reader, gchar** dest, gboolean longString);
-
-/*!
- * \brief Callback function for variable handlers.
- *
- * This callback function must read variable of specified type from the stream
- * and properly advance reader's position.
- *
- * \param reader        FlvScriptDataReader that performs reading.
- * \param value_name    Name of the value. This parameter might be NULL for nested arrays.
- * \param value_type    Type of value to read.
- *
- * \return  TRUE if reading completed successfully and position advanced properly,
- *          FALSE otherwise.
- */
-typedef gboolean (*FlvScriptDataValueHandler)(FlvScriptDataReader* reader,
-        gchar* value_name, gint value_type, void* param);
-
-/*!
- * \brief Reads ECMA array and invokes specified callback for every value in array.
- */
-static gboolean
-flv_script_data_read_object(FlvScriptDataReader* reader,
-        FlvScriptDataValueHandler callback, void* callback_param);
-
-/*!
- * \brief Reads ECMA array and invokes specified callback for every value in array.
- */
-static gboolean
-flv_script_data_read_ecma(FlvScriptDataReader* reader,
-        FlvScriptDataValueHandler callback, void* callback_param);
-
-/*!
- * \brief Reads strict array and invokes specified handler for every value in array.
- */
-static gboolean
-flv_script_data_read_strict_array(FlvScriptDataReader* reader,
-        FlvScriptDataValueHandler callback, void* callback_param);
-
-/* Handlers */
-/*!
- * \brief Value handler for top-level values in onMetaData tag.
- *
- * This callback should be called with pointer to FLVMetaData as param.
- */
-static gboolean
-flv_metadata_value_handler(FlvScriptDataReader* reader,
-        gchar* value_name, gint value_type, void* param);
-
-/*!
- * \brief Value handler for values on arbitrary nesting level that should be skipped.
- */
-static gboolean
-flv_metadata_skip_handler(FlvScriptDataReader* reader,
-        gchar* value_name, gint value_type, void* param);
-
-FlvMetadata *flv_metadata_new()
-{
-    FlvMetadata *metadata = g_malloc(sizeof(FlvMetadata));
-
-    if (metadata)
-    {
-        metadata->duration = GST_CLOCK_TIME_NONE;
-        metadata->file_size = 0;
-        metadata->can_seek_to_end = 0;
-        metadata->video_codec_id = 0;
-        metadata->video_data_rate = 0;
-        metadata->width = 0;
-        metadata->height = 0;
-        metadata->par_x = 0;
-        metadata->par_y = 0;
-        metadata->framerate = 0;
-        metadata->audio_codec_id = 0;
-        metadata->audio_data_rate = 0;
-        metadata->audio_sample_size = 0;
-        metadata->is_stereo = 0;
-        metadata->tag_list = NULL;
-        metadata->keyframes = NULL;
-    }
-
-    return metadata;
-}
-
-void flv_metadata_free(FlvMetadata *metadata)
-{
-    if (metadata->tag_list) {
-        gst_tag_list_free(metadata->tag_list);
-        metadata->tag_list = NULL;
-    }
-
-    if (metadata->keyframes) {
-        g_array_free(metadata->keyframes, TRUE);
-        metadata->keyframes = NULL;
-    }
-
-    g_free(metadata);
-}
-
-gboolean
-flv_script_data_read(FlvScriptDataReader* reader, FlvMetadata* metadata)
-{
-    guint8 value_type;
-    gchar* str;
-    gboolean result;
-
-    /* Parse only 'onMetaData' blocks, return TRUE for any other valid blocks. */
-    if (!flv_script_data_read_ui8(reader, &value_type))
-        return TRUE;
-    if (value_type != FLV_SCRIPT_DATA_TYPE_STRING)
-        return TRUE;
-    if (!flv_script_data_read_string(reader, &str, FALSE))
-        return FALSE;
-    if (strcmp(str, "onMetaData") != 0) {
-        g_free(str);
-        return TRUE;
-    }
-    g_free(str);
-
-    /*onMetaData block should have ECMA Array type. Return FALSE for other types. */
-    if (!flv_script_data_read_ui8(reader, &value_type))
-        return FALSE;
-    if (value_type != FLV_SCRIPT_DATA_TYPE_ECMA)
-        return FALSE;
-
-    /* Initialize metadata->tags member */
-    if (metadata->tag_list == NULL)
-        metadata->tag_list = gst_tag_list_new_empty();
-
-    /* Read tag contents */
-    result =  flv_script_data_read_ecma(reader,
-            flv_metadata_value_handler, metadata);
-
-    /* Reset allocated memory if something went wrong */
-    if (!result) {
-        gst_tag_list_free(metadata->tag_list);
-        metadata->tag_list = NULL;
-    }
-
-    return result;
-}
-
-static gboolean
-flv_script_data_read_ui8(FlvScriptDataReader* reader, guint8* dest)
-{
-    if (reader->position + 1 > reader->end) {
-        return FALSE;
-    }
-    *dest = *reader->position;
-    reader->position++;
-    return TRUE;
-}
-
-static gboolean
-flv_script_data_read_ui32(FlvScriptDataReader* reader, guint32* dest)
-{
-    if (reader->position + 4 > reader->end) {
-        return FALSE;
-    }
-    *dest = GST_READ_UINT32_BE(reader->position);
-    reader->position+=4;
-    return TRUE;
-}
-
-
-static gboolean
-flv_script_data_read_double(FlvScriptDataReader* reader, gdouble* dest)
-{
-    if (reader->position + 8 > reader->end) {
-        return FALSE;
-    }
-    *dest = FLV_READ_DOUBLE_BE(reader->position);
-    reader->position+=8;
-    return TRUE;
-}
-
-static gboolean
-flv_script_data_read_string(FlvScriptDataReader* reader, gchar** dest, gboolean longString)
-{
-    gsize length;
-
-    /* Read length of string */
-    if ((reader->position + (longString ? 4 : 2)) > reader->end)
-        return FALSE;
-    if (longString) {
-        length = GST_READ_UINT32_BE(reader->position);
-        reader->position += 4;
-    } else {
-        length = GST_READ_UINT16_BE(reader->position);
-        reader->position += 2;
-    }
-
-    /* Alloc buffer and copy string into it */
-    if ((reader->position + length) > reader->end)
-        return FALSE;
-
-    if (length >= G_MAXSIZE - 1)
-        return FALSE;
-
-    *dest = g_malloc(length + 1);
-    if (*dest == NULL)
-        return FALSE;
-    memcpy(*dest, reader->position, length);
-    (*dest)[length] = 0;
-    reader->position += length;
-
-    return TRUE;
-}
-
-static gboolean
-flv_script_data_read_object(FlvScriptDataReader* reader,
-        FlvScriptDataValueHandler callback, void* callback_param)
-{
-    gchar* var_name;
-    guint8 value_type;
-    gboolean result;
-
-    while (reader->position < reader->end) {
-        if ((reader->position + 3) > reader->end)
-            return FALSE;
-        if ((reader->position[0] == 0) && (reader->position[1] == 0)
-                && reader->position[2] == 9) {
-            /* This is special case - object terminator */
-            var_name = NULL;
-            value_type = FLV_SCRIPT_DATA_TYPE_TERMINATOR;
-            reader->position += 3;
-        } else {
-            /* Read variable name */
-            if (!flv_script_data_read_string(reader, &var_name, FALSE)) {
-                return FALSE;
-            }
-
-            /* Read value type */
-            if (!flv_script_data_read_ui8(reader, &value_type)) {
-                g_free(var_name);
-                return FALSE;
-            }
-        }
-
-        /* Invoke callback */
-        result = callback(reader, var_name, value_type, callback_param);
-
-        if (var_name != NULL)
-            g_free(var_name);
-
-        if (value_type == FLV_SCRIPT_DATA_TYPE_TERMINATOR)
-            return TRUE;
-
-        if (!result)
-            return FALSE;
-
-    }
-
-    /* Return TRUE upon reaching end of ScriptData, because some videos
-     * don't have required terminator after object.*/
-    return TRUE;
-}
-
-static gboolean
-flv_script_data_read_ecma(FlvScriptDataReader* reader,
-        FlvScriptDataValueHandler callback, void* callback_param)
-{
-    guint32 size;
-    gchar* var_name;
-    guint8 value_type;
-    gboolean result;
-
-    /* Read approximate size of ECMA array and ignore it */
-    if (!flv_script_data_read_ui32(reader, &size))
-        return FALSE;
-
-    while (reader->position < reader->end) {
-        if ((reader->position + 3) > reader->end)
-            return FALSE;
-        if ((reader->position[0] == 0) && (reader->position[1] == 0)
-                && reader->position[2] == 9) {
-            /* This is special case - ECMA terminator */
-            var_name = NULL;
-            value_type = FLV_SCRIPT_DATA_TYPE_TERMINATOR;
-            reader->position += 3;
-        } else {
-            /* Read variable name */
-            if (!flv_script_data_read_string(reader, &var_name, FALSE)) {
-                return FALSE;
-            }
-
-            /* Read value type */
-            if (!flv_script_data_read_ui8(reader, &value_type)) {
-                g_free(var_name);
-                return FALSE;
-            }
-
-        }
-
-        /* Invoke callback */
-        result = callback(reader, var_name, value_type, callback_param);
-
-        if (var_name != NULL)
-            g_free(var_name);
-
-        if (value_type == FLV_SCRIPT_DATA_TYPE_TERMINATOR)
-            return TRUE;
-
-        if (!result)
-            return FALSE;
-
-    }
-
-    /* Return TRUE upon reaching end of ScriptData, because some videos
-     * don't have required terminator after ECMA array.*/
-    return TRUE;
-}
-
-static gboolean
-flv_script_data_read_strict_array(FlvScriptDataReader* reader,
-        FlvScriptDataValueHandler callback, void* callback_param)
-{
-    guint32 size;
-    guint32 i;
-    guint8 value_type;
-    gboolean result;
-
-    /* Read size of array and ignore it */
-    if (!flv_script_data_read_ui32(reader, &size))
-        return FALSE;
-
-    for (i = 0; i < size; i++) {
-        if (!flv_script_data_read_ui8(reader, &value_type))
-            return FALSE;
-
-        /* Invoke callback */
-        result = callback(reader, NULL, value_type, callback_param);
-
-        if (!result)
-            return FALSE;
-
-    }
-    return TRUE;
-}
-
-static gboolean
-flv_script_read_keyframe_array(FlvScriptDataReader* reader,
-        gchar *value_name, GArray *keyframes)
-{
-    guint32 size, readSize;
-    guint32 i;
-    guint8 value_type;
-    gdouble double_value;
-    gint whichField = 0;
-
-    /* Read size of array */
-    if (!flv_script_data_read_ui32(reader, &size))
-        return FALSE;
-    readSize = size;
-
-    if (strcmp(value_name, "times") == 0) {
-        whichField = 1;
-    } else if (strcmp(value_name, "filepositions") == 0) {
-        whichField = 2;
-    }
-    /* if keyframes is already populated, make sure we have the right size */
-    if (keyframes->len > 0) {
-        if (keyframes->len > (guint)size) {
-            // if keyframes is longer, remove the trailing entries
-            g_array_set_size(keyframes, size);
-        } else if (keyframes->len < (guint)size) {
-            // else adjust readSize to skip incoming trailing entries
-            readSize = (guint32)keyframes->len;
-        }
-    }
-
-    for (i = 0; i < size; i++, readSize--) {
-        if (!flv_script_data_read_ui8(reader, &value_type))
-            return FALSE;
-
-        if (value_type != FLV_SCRIPT_DATA_TYPE_DOUBLE) {
-            return FALSE;
-        }
-
-        if (!flv_script_data_read_double(reader, &double_value)) {
-            return FALSE;
-        }
-
-        if (readSize > 0 && whichField > 0) {
-            FlvKeyframe entry;
-            if (whichField == 1) {
-                entry.time = (GstClockTime)(double_value * GST_SECOND);
-                entry.fileposition = 0;
-            } else if (whichField == 2) {
-                entry.time = 0;
-                entry.fileposition = (guint64)double_value;
-            }
-            g_array_append_vals(keyframes, &entry, 1);
-        }
-    }
-    return TRUE;
-}
-
-static gboolean flv_metadata_keyframe_handler(FlvScriptDataReader* reader,
-        gchar *value_name, gint value_type, void *param)
-{
-    gboolean result = TRUE;
-    FlvMetadata* metadata = (FlvMetadata*)param;
-
-    switch (value_type) {
-        case FLV_SCRIPT_DATA_TYPE_TERMINATOR:
-            /* Just return true for ECMA terminator */
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_STRICT:
-            if (!metadata->keyframes) {
-                metadata->keyframes = g_array_new(FALSE, TRUE, sizeof(FlvKeyframe));
-            }
-
-            result &= flv_script_read_keyframe_array(reader, value_name, metadata->keyframes);
-
-            if (!result) {
-                g_array_free(metadata->keyframes, TRUE);
-                metadata->keyframes = NULL;
-            }
-            break;
-
-        default:
-            /* Non-handled type */
-            result = FALSE;
-            break;
-    }
-
-    return result;
-}
-
-static gboolean
-flv_metadata_value_handler(FlvScriptDataReader* reader,
-        gchar* value_name, gint value_type, void* param)
-{
-    gdouble double_value;
-    guint8 boolean_value;
-    gchar* string_value;
-    gboolean result = TRUE;
-    FlvMetadata* metadata = (FlvMetadata*)param;
-
-    switch (value_type) {
-        case FLV_SCRIPT_DATA_TYPE_DOUBLE:
-            result = flv_script_data_read_double(reader, &double_value);
-            if (!result)
-                break;
-
-            if (strcmp(value_name, "duration") == 0) {
-                metadata->duration = (GstClockTime)(double_value * GST_SECOND);
-                gst_tag_list_add (metadata->tag_list, GST_TAG_MERGE_REPLACE,
-                    GST_TAG_DURATION, metadata->duration, NULL);
-            } else if (strcmp(value_name, "filesize") == 0) {
-                metadata->file_size = (gint)double_value;
-            } else if (strcmp(value_name, "videocodecid") == 0) {
-                metadata->video_codec_id = (gint)double_value;
-            } else if (strcmp(value_name, "videodatarate") == 0) {
-                metadata->video_data_rate = double_value;
-            } else if (strcmp(value_name, "width") == 0) {
-                metadata->width = (gint)double_value;
-            } else if (strcmp(value_name, "height") == 0) {
-                metadata->height = (gint)double_value;
-            } else if (strcmp(value_name, "AspectRatioX") == 0) {
-                metadata->par_x = (gint)double_value;
-            } else if (strcmp(value_name, "AspectRatioY") == 0) {
-                metadata->par_y = (gint)double_value;
-            } else if (strcmp(value_name, "framerate") == 0) {
-                metadata->framerate = double_value;
-            } else if (strcmp(value_name, "audiocodecid") == 0) {
-                metadata->audio_codec_id = (gint)double_value;
-            } else if (strcmp(value_name, "audiosamplesize") == 0) {
-                metadata->audio_sample_size = (gint)double_value;
-            }
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_BOOL:
-            result = flv_script_data_read_ui8(reader, &boolean_value);
-            if (!result)
-                break;
-
-            if (strcmp(value_name, "canSeekToEnd") == 0) {
-                metadata->can_seek_to_end = boolean_value;
-            } else if (strcmp(value_name, "stereo") == 0) {
-                metadata->is_stereo = boolean_value;
-            }
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_STRING:
-        case FLV_SCRIPT_DATA_TYPE_LONG_STRING:
-            result = flv_script_data_read_string(reader, &string_value, value_type == FLV_SCRIPT_DATA_TYPE_LONG_STRING);
-            if (!result)
-                break;
-            // Register the tag if needed so it shows up
-            if (!gst_tag_exists(value_name)) {
-                gst_tag_register(value_name, GST_TAG_FLAG_META, G_TYPE_STRING, value_name, "FLV Metadata Tag", NULL);
-            }
-            gst_tag_list_add(metadata->tag_list, GST_TAG_MERGE_REPLACE, value_name, string_value, NULL);
-            g_free(string_value);
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_OBJECT:
-                // Only read the keyframe metadata once
-            if ((strcmp(value_name, "keyframes") == 0) && (metadata->keyframes == NULL)) {
-                result &= flv_script_data_read_object(reader, flv_metadata_keyframe_handler, param);
-            } else {
-                result &= flv_script_data_read_object(reader, flv_metadata_skip_handler, param);
-            }
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_MOVIE_CLIP:
-            // Per AMF version 0: "This type is not supported and is reserved for future use."
-            result = FALSE;
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_NULL:
-        case FLV_SCRIPT_DATA_TYPE_UNDEFINED:
-            // Nothing follows
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_REFERENCE:
-            // U16, two byte index follows
-            // this is just an index to some other object in this script tag, we can safely ignore this
-            reader->position += 2;
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_ECMA:
-            result &= flv_script_data_read_ecma(reader, flv_metadata_skip_handler, param);
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_TERMINATOR:
-            /* Just return true for ECMA terminator */
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_STRICT:
-            result &= flv_script_data_read_strict_array(reader, flv_metadata_skip_handler, param);
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_DATE:
-            // Skip date value (64 bits milliseconds + 16 bits time zone == 80 bits == 10 bytes)
-            reader->position += 10;
-            break;
-
-        default:
-            /* Non-handled type */
-            result = FALSE;
-            break;
-    }
-    return result;
-}
-
-static gboolean
-flv_metadata_skip_handler(FlvScriptDataReader* reader,
-        gchar* value_name, gint value_type, void* param)
-{
-    gdouble double_value;
-    guint8 boolean_value;
-    gchar* string_value;
-    gboolean result = TRUE;
-
-    switch (value_type) {
-        case FLV_SCRIPT_DATA_TYPE_DOUBLE:
-            result = flv_script_data_read_double(reader, &double_value);
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_BOOL:
-            result = flv_script_data_read_ui8(reader, &boolean_value);
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_STRING:
-            result = flv_script_data_read_string(reader, &string_value, FALSE);
-            if (result)
-                g_free(string_value);
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_OBJECT:
-            result &= flv_script_data_read_object(reader, flv_metadata_skip_handler, param);
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_ECMA:
-            result &= flv_script_data_read_ecma(reader, flv_metadata_skip_handler, param);
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_TERMINATOR:
-            /* Just return true for terminator */
-            break;
-
-        case FLV_SCRIPT_DATA_TYPE_STRICT:
-            result &= flv_script_data_read_strict_array(reader, flv_metadata_skip_handler, param);
-            break;
-
-        default:
-            /* Non-handled type */
-            return FALSE;
-    }
-    return result;
-}
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvmetadata.h	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef __FLV_METADATA_H__
-#define __FLV_METADATA_H__
-
-#include <gst/gst.h>
-
-
-#define FLV_SCRIPT_DATA_TYPE_DOUBLE (0)
-#define FLV_SCRIPT_DATA_TYPE_BOOL (1)
-#define FLV_SCRIPT_DATA_TYPE_STRING (2)
-#define FLV_SCRIPT_DATA_TYPE_OBJECT (3)
-#define FLV_SCRIPT_DATA_TYPE_MOVIE_CLIP (4)
-#define FLV_SCRIPT_DATA_TYPE_NULL (5)
-#define FLV_SCRIPT_DATA_TYPE_UNDEFINED (6)
-#define FLV_SCRIPT_DATA_TYPE_REFERENCE (7)
-#define FLV_SCRIPT_DATA_TYPE_ECMA (8)
-#define FLV_SCRIPT_DATA_TYPE_TERMINATOR (9)
-#define FLV_SCRIPT_DATA_TYPE_STRICT (10)
-#define FLV_SCRIPT_DATA_TYPE_DATE (11)
-#define FLV_SCRIPT_DATA_TYPE_LONG_STRING (12)
-
-
-typedef struct _FlvScriptDataReader FlvScriptDataReader;
-typedef struct _FlvKeyframe FlvKeyframe;
-typedef struct _FlvMetadata FlvMetadata;
-
-struct _FlvScriptDataReader {
-    guchar*         position;
-    guchar*         end;
-};
-
-struct _FlvKeyframe {
-    GstClockTime    time;
-    guint64         fileposition;
-};
-
-struct _FlvMetadata {
-    //Metadata
-    GstClockTime duration;
-    gint file_size;
-    gboolean can_seek_to_end;
-    gint video_codec_id;
-    gdouble video_data_rate;
-    gint width;
-    gint height;
-    gint par_x;
-    gint par_y;
-    gdouble framerate;
-    gint audio_codec_id;
-    gint audio_data_rate;
-    gint audio_sample_size;
-    gboolean is_stereo;
-
-    //List of custom tags
-    GstTagList* tag_list;
-
-    // keyframe list, from onMetaData
-    GArray *keyframes;   // GArray of FlvKeyframe
-};
-
-/*!
- * \brief Allocate a new metadata structure
- */
-FlvMetadata *flv_metadata_new();
-
-/*!
- * \brief Free a previously allocated metadata structure, including anything it contains that has been allocated
- */
-void flv_metadata_free(FlvMetadata *metadata);
-
-/*!
- * \brief Attempts to read onMetaData tag from FLV file.
- */
-gboolean
-flv_script_data_read(FlvScriptDataReader* reader,
-        FlvMetadata* metadata);
-
-#endif
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvparser.c	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,354 +0,0 @@
-/*
- * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "flvparser.h"
-
-#include <string.h>
-
-GST_DEBUG_CATEGORY_EXTERN (fxm_plugin_debug);
-#define GST_CAT_DEFAULT fxm_plugin_debug
-
-/*
- * FLV File Structure:
- *
- * Header               FLV_HEADER
- * Prev tag size        FLV_TAG_SUFFIX  Always 0, skip this
- * Tag prefix           FLV_TAG_PREFIX
- * Tag data             UI8[]           Data body
- * Tag suffix           FLV_TAG_SUFFIX  Previous tag length including its header
- * ...
- * Last tag prefix      FLV_TAG_PREFIX
- * Tag data             UI8[]           Data body
- * Last tah suffix      FLV_TAG_SUFFIX  Previous tag length including its header
- */
-
-/*
- * FLV_HEADER:
- * Signature            UI8     'F'
- * Signature            UI8     'L'
- * Signature            UI8     'V'
- * Version              UI8     File Version (0x01 for FLV version 1)
- * TypeFlagsReserved    UB[5]   Must be 0
- * TypeFlagsAudio       UB[1]   Audio tags are present
- * TypeFagsReserved     UB[1]   Must be 0
- * TypeFlagsVideo       UB[1]   Video tags are present
- * DataOffset           UI32    Size of Header
- */
-#define FLV_HEADER_SIZE (9)
-
-#define FLV_HEADER_FLAG_HAS_VIDEO_TAGS (0x01)
-#define FLV_HEADER_FLAG_HAS_AUDIO_TAGS (0x04)
-#define FLV_HEADER_FLAG_RESERVED       (0xFA)
-
-/*
- * FLV_TAG_PREFIX
- * TagType              UI8     Type of Tag (8: Audio, 9: Video, 18: Script data)
- * DataSize             UI24    Length of data in the Data field
- * Timestamp            UI24    Time in ms at which the data in this tags applies
- * TimestampExtended    UI8     Extention of timestamp field
- * StreamID             UI24    Always 0
- */
-
-#define FLV_TAG_PREFIX_SIZE (11)
-
-/*
- * FLV_TAG_SUFFIX
- * Tag size             UI32    Previous tag size including its header
- */
-#define FLV_TAG_SUFFIX_SIZE (4)
-
-/*
- * FLV_AUDIO_TAG_BODY
- * SoundFormat          UB[4]
- * SoundRate            UB[2]
- * SoundSize            UB[1]   0 - 8bit, 1 - 16bit
- * SoundType            UB[1]   0 - Mono, 1 - Stereo
- * AudioCodecData       UI8[]
- * AudioPacketData      UI8[]
- */
-#define FLV_AUDIO_PREFIX_LENGTH (1)
-
-static gsize
-flv_audio_format_data_size[16] = {
-    0, 0, 0, 0, /* PCM, ADPCM, MP3, PCM */
-    0, 0, 0, 0, /* Nelly, Nelly, Nelly, G.711 */
-    0, 0, 1, 0, /* G.711, reserved, AAC, Unused */
-    0, 0, 0, 0  /* Unused, Unused, MP3, Device-specific */
-};
-
-/*
- * FLV_VIDEO_TAG_BODY
- * FrameType            UB[4]
- * CodecID              UB[4]
- * VideoCodecData       UI8[]   See flv_video_codec_data_size
- * VideoPacket
- */
-#define FLV_VIDEO_PREFIX_LENGTH (1)
-
-static gsize
-flv_video_codec_data_size[16] = {
-    0, 0, 0, 0, /* Unused, JPEG, Sorenson, Screen video */
-    1, 1, 0, 6, /* VP6, VP6 w. Alpha, Screen video v 2, AVC */
-    0, 0, 0, 0, /* Unused */
-    0, 0, 0, 0  /* Unused */
-};
-
-void
-flv_parser_init(FlvParser* parser)
-{
-    parser->state = FLV_PARSER_EXPECT_HEADER;
-    parser->parsed_block_size = 0;
-    parser->file_position = 0;
-    parser->next_block_size = FLV_HEADER_SIZE;
-}
-
-void
-flv_parser_reset(FlvParser* parser)
-{
-    parser->state = FLV_PARSER_EXPECT_HEADER;
-    parser->parsed_block_size = 0;
-    parser->file_position = 0;
-    parser->next_block_size = FLV_HEADER_SIZE;
-}
-
-FlvParserResult
-flv_parser_read_header(FlvParser* parser,
-        guchar* buffer, gsize buffer_size, FlvHeader* header)
-{
-    gsize data_offset;
-
-    /* Check state */
-    if (parser->state != FLV_PARSER_EXPECT_HEADER)
-        return FLV_PARSER_INVALID_STATE;
-
-    /* Check length */
-    if (buffer_size < FLV_HEADER_SIZE)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    /* Check signature */
-    if (buffer[0] != 'F' || buffer[1] != 'L' || buffer[2] != 'V')
-        return FLV_PARSER_BAD_STREAM;
-
-    /* Get version */
-    header->file_version = buffer[3];
-    if (header->file_version != 1)
-        return FLV_PARSER_UNSUPPORTED_STREAM;
-
-    /* Check if stream has valid flags */
-    if ((buffer[4] & FLV_HEADER_FLAG_RESERVED) != 0)
-        return FLV_PARSER_BAD_STREAM;
-
-    /* Get whether the stream has audio and video tags */
-    header->has_audio_tags =
-            ((buffer[4] & FLV_HEADER_FLAG_HAS_AUDIO_TAGS) != 0);
-    header->has_video_tags =
-            ((buffer[4] & FLV_HEADER_FLAG_HAS_VIDEO_TAGS) != 0);
-
-    /* Read data offset */
-    data_offset = GST_READ_UINT32_BE(buffer + 5);
-    if (data_offset < FLV_HEADER_SIZE)
-        return FLV_PARSER_BAD_STREAM;
-
-    /* Update parser and return */
-    parser->parsed_block_size = FLV_HEADER_SIZE;
-    parser->file_position += parser->parsed_block_size;
-    parser->next_block_size = (data_offset == FLV_HEADER_SIZE) ?
-            FLV_TAG_SUFFIX_SIZE
-            : data_offset - FLV_HEADER_SIZE + FLV_TAG_SUFFIX_SIZE;
-
-    parser->state = FLV_PARSER_EXPECT_SKIP_BLOCK;
-    return FLV_PARSER_OK;
-}
-
-FlvParserResult
-flv_parser_skip(FlvParser* parser,
-        guchar* buffer, gsize buffer_size)
-{
-    if (parser->state != FLV_PARSER_EXPECT_SKIP_BLOCK)
-        return FLV_PARSER_INVALID_STATE;
-
-    if (buffer_size < parser->next_block_size)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    /* Update parser and return */
-    parser->parsed_block_size = parser->next_block_size;
-    parser->file_position += parser->parsed_block_size;
-    parser->next_block_size = FLV_TAG_PREFIX_SIZE;
-    parser->state = FLV_PARSER_EXPECT_TAG_PREFIX;
-    return FLV_PARSER_OK;
-}
-
-FlvParserResult
-flv_parser_read_tag_prefix(FlvParser* parser,
-        guchar* buffer, gsize buffer_size, FlvTagPrefix* tag)
-{
-    guint stream_id;
-    if (parser->state != FLV_PARSER_EXPECT_TAG_PREFIX)
-        return FLV_PARSER_INVALID_STATE;
-
-    if (buffer_size < FLV_TAG_PREFIX_SIZE)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    //Fill tag
-    tag->tag_type = buffer[0];
-    tag->body_size = FLV_READ_UINT24_BE(buffer + 1);
-    tag->timestamp = FLV_READ_TS32(buffer + 4);
-
-    //Check that StreamID is 0
-    stream_id = FLV_READ_UINT24_BE(buffer + 8);
-    if (stream_id != 0)
-        return FLV_PARSER_UNSUPPORTED_STREAM;
-
-    /* Update parser and return */
-    parser->parsed_block_size = FLV_TAG_PREFIX_SIZE;
-    parser->file_position += parser->parsed_block_size;
-    parser->next_block_size = tag->body_size + FLV_TAG_SUFFIX_SIZE;
-    switch (tag->tag_type) {
-        case FLV_TAG_TYPE_AUDIO:
-            parser->state = FLV_PARSER_EXPECT_AUDIO_TAG_BODY;
-            break;
-        case FLV_TAG_TYPE_VIDEO:
-            parser->state = FLV_PARSER_EXPECT_VIDEO_TAG_BODY;
-            break;
-        case FLV_TAG_TYPE_SCRIPT_DATA:
-            parser->state = FLV_PARSER_EXPECT_SCRIPT_DATA_TAG_BODY;
-            break;
-        default:
-            return FLV_PARSER_UNSUPPORTED_STREAM;
-    }
-    return FLV_PARSER_OK;
-}
-
-FlvParserResult
-flv_parser_read_audio_tag(FlvParser* parser,
-        guchar* buffer, gsize buffer_size, FlvAudioTag* audio_tag)
-{
-    if (parser->state != FLV_PARSER_EXPECT_AUDIO_TAG_BODY)
-        return FLV_PARSER_INVALID_STATE;
-
-    if (buffer_size < parser->next_block_size)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    //Fill format info
-    audio_tag->sound_format = (buffer[0] & 0xF0) >> 4;
-    audio_tag->sampling_rate = (buffer[0] & 0x0C) >> 2;
-    audio_tag->is_16bit = ((buffer[0] & 0x02) != 0);
-    audio_tag->is_stereo = ((buffer[0] & 0x01) != 0);
-
-    //Fill audio packet info
-    audio_tag->audio_packet_offset = FLV_AUDIO_PREFIX_LENGTH +
-            flv_audio_format_data_size[audio_tag->sound_format];
-    audio_tag->audio_packet_size = parser->next_block_size
-            - FLV_TAG_SUFFIX_SIZE - audio_tag->audio_packet_offset;
-
-    // Make sure packet_offset and size are correct.
-    if (audio_tag->audio_packet_offset > buffer_size)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    if (audio_tag->audio_packet_size <= 0)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    if ((buffer_size - audio_tag->audio_packet_offset) < audio_tag->audio_packet_size)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    /* Update parser and return */
-    parser->parsed_block_size = parser->next_block_size;
-    parser->file_position += parser->parsed_block_size;
-    parser->next_block_size = FLV_TAG_PREFIX_SIZE;
-    parser->state = FLV_PARSER_EXPECT_TAG_PREFIX;
-    return FLV_PARSER_OK;
-}
-
-FlvParserResult
-flv_parser_read_video_tag(FlvParser* parser,
-        guchar* buffer, gsize buffer_size, FlvVideoTag* video_tag)
-{
-    if (parser->state != FLV_PARSER_EXPECT_VIDEO_TAG_BODY)
-        return FLV_PARSER_INVALID_STATE;
-
-    if (buffer_size < parser->next_block_size)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    //Fill format info
-    video_tag->frame_type = (buffer[0] & 0xF0) >> 4;
-    video_tag->codec_id = buffer[0] & 0x0F;
-
-    video_tag->video_packet_offset = FLV_VIDEO_PREFIX_LENGTH
-            + flv_video_codec_data_size[video_tag->codec_id];
-
-    video_tag->video_packet_size = parser->next_block_size
-            - FLV_TAG_SUFFIX_SIZE - video_tag->video_packet_offset;
-
-    // Make sure packet_offset and size are correct.
-    if (video_tag->video_packet_offset > buffer_size)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    if (video_tag->video_packet_size <= 0)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    if ((buffer_size - video_tag->video_packet_offset) < video_tag->video_packet_size)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    /* Update parser and return */
-    parser->parsed_block_size = parser->next_block_size;
-    parser->file_position += parser->parsed_block_size;
-    parser->next_block_size = FLV_TAG_PREFIX_SIZE;
-    parser->state = FLV_PARSER_EXPECT_TAG_PREFIX;
-    return FLV_PARSER_OK;
-}
-
-FlvParserResult
-flv_parser_read_script_data_tag(FlvParser* parser,
-        guchar* buffer, gsize buffer_size,
-        FlvScriptDataReader* script_data_reader)
-{
-    if (parser->state != FLV_PARSER_EXPECT_SCRIPT_DATA_TAG_BODY)
-        return FLV_PARSER_INVALID_STATE;
-
-    if (buffer_size < parser->next_block_size)
-        return FLV_PARSER_BUFFER_UNDERRUN;
-
-    //Fill iterator
-    script_data_reader->position = buffer;
-    script_data_reader->end = buffer + parser->next_block_size
-            - FLV_TAG_SUFFIX_SIZE;
-
-    /* Update parser and return */
-    parser->parsed_block_size = parser->next_block_size;
-    parser->file_position += parser->parsed_block_size;
-    parser->next_block_size = FLV_TAG_PREFIX_SIZE;
-    parser->state = FLV_PARSER_EXPECT_TAG_PREFIX;
-    return FLV_PARSER_OK;
-}
-
-FlvParserResult
-flv_parser_seek(FlvParser* parser, guint64 new_position)
-{
-    parser->state = FLV_PARSER_EXPECT_TAG_PREFIX;
-    parser->file_position = new_position;
-    parser->parsed_block_size = 0;
-    parser->next_block_size = FLV_TAG_PREFIX_SIZE;
-    return FLV_PARSER_OK;
-}
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/vp6/flvparser.h	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef __FLV_PARSER_H__
-#define __FLV_PARSER_H__
-
-#include <gst/gst.h>
-#include "flvmetadata.h"
-
-/* Definitions of parse results */
-typedef enum {
-    FLV_PARSER_OK, //Pasring completed successfully
-    FLV_PARSER_BUFFER_UNDERRUN, //Buffer is not as long as expected
-    FLV_PARSER_BAD_STREAM, //Stream in wrong format
-    FLV_PARSER_UNSUPPORTED_STREAM, //Stream of wrong version or with unrecognized tags
-    FLV_PARSER_INVALID_STATE //Parser is not in appropriate state for this method call
-} FlvParserResult;
-
-/* Definitions of parser states */
-typedef enum {
-    FLV_PARSER_EXPECT_HEADER, //Parser expects header
-    FLV_PARSER_EXPECT_SKIP_BLOCK, //Parser expects skip block after header
-    FLV_PARSER_EXPECT_TAG_PREFIX, //Parser expects
-    FLV_PARSER_EXPECT_VIDEO_TAG_BODY, //Parser expects video tag body
-    FLV_PARSER_EXPECT_AUDIO_TAG_BODY, //Parser expects audio tag body
-    FLV_PARSER_EXPECT_SCRIPT_DATA_TAG_BODY, //Parser expects ScriptData tag body
-    FLV_PARSER_EOF
-} FlvParserState;
-
-#define FLV_TAG_TYPE_AUDIO (8)
-#define FLV_TAG_TYPE_VIDEO (9)
-#define FLV_TAG_TYPE_SCRIPT_DATA (18)
-
-#define FLV_VIDEO_CODEC_VP6 (4)
-#define FLV_VIDEO_FRAME_KEY (1)
-
-typedef struct _FlvParser FlvParser;
-typedef struct _FlvHeader FlvHeader;
-typedef struct _FlvTagPrefix FlvTagPrefix;
-typedef struct _FlvAudioTag FlvAudioTag;
-typedef struct _FlvVideoTag FlvVideoTag;
-
-struct _FlvParser {
-    FlvParserState  state;
-    guint64         file_position;
-    gsize           parsed_block_size;
-    gsize           next_block_size;
-};
-
-struct _FlvHeader {
-    gint            file_version;
-    gboolean        has_audio_tags;
-    gboolean        has_video_tags;
-};
-
-struct _FlvTagPrefix {
-    guchar          tag_type;
-    gsize           body_size;
-    gint            timestamp;
-};
-
-struct _FlvAudioTag {
-    guchar          sound_format;
-    guchar          sampling_rate;
-    gboolean        is_16bit;
-    gboolean        is_stereo;
-    gsize           audio_packet_offset;
-    gsize           audio_packet_size;
-};
-
-struct _FlvVideoTag {
-    guchar          codec_id;
-    guchar          frame_type;
-    gsize           video_packet_offset;
-    gsize           video_packet_size;
-};
-
-/*!
- * \brief Initialize parsing context
- */
-void
-flv_parser_init(FlvParser* parser);
-
-/*!
- * \brief Resets parsing context to the beginning of file
- */
-void
-flv_parser_reset(FlvParser* parser);
-
-/*!
- * \brief Parse FLV Header
- */
-FlvParserResult
-flv_parser_read_header(FlvParser* parser,
-        guchar* buffer, gsize buffer_size, FlvHeader* header);
-
-/*!
- * \brief Skip data block
- */
-FlvParserResult
-flv_parser_skip(FlvParser* parser,
-        guchar* buffer, gsize buffer_size);
-
-/*!
- * \brief Parse Tag prefix
- */
-FlvParserResult
-flv_parser_read_tag_prefix(FlvParser* parser,
-        guchar* buffer, gsize buffer_size, FlvTagPrefix* tag);
-
-/*!
- * \brief Parse Audio tag
- */
-FlvParserResult
-flv_parser_read_audio_tag(FlvParser* parser,
-        guchar* buffer, gsize buffer_size, FlvAudioTag* audio_tag);
-
-/*!
- * \brief Parse Video tag
- */
-FlvParserResult
-flv_parser_read_video_tag(FlvParser* parser,
-        guchar* buffer, gsize buffer_size, FlvVideoTag* video_tag);
-
-/*!
- * \brief Parse Script Data tag. Returns reader.
- */
-FlvParserResult
-flv_parser_read_script_data_tag(FlvParser* parser,
-        guchar* buffer, gsize buffer_size, FlvScriptDataReader* reader);
-
-/*!
- * \brief Seek parser to another position in the stream that corresponds to the
- * beginning of the tag.
- */
-FlvParserResult
-flv_parser_seek(FlvParser* parser, guint64 new_position);
-
-/* Support macros */
-#define FLV_READ_UINT24_BE(data) ((GST_READ_UINT16_BE(data) << 8) | \
-    GST_READ_UINT8 (data + 2))
-
-
-#define FLV_READ_TS32(data) ((GST_READ_UINT16_BE(data) << 8)| \
-    GST_READ_UINT8 (data + 2) | (GST_READ_UINT8(data + 3) << 24))
-
-#endif /* __FLVPARSE_H__ */
-
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/vp6/fxmplugin.c	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include <gst/gst.h>
-#include "fxmplugin.h"
-#include "vp6decoder.h"
-#include "flvdemux.h"
-
-GST_DEBUG_CATEGORY (fxm_plugin_debug);
-#define GST_CAT_DEFAULT fxm_plugin_debug
-
-/* entry point to initialize the plug-in
- * initialize the plug-in itself
- * register the element factories and other features
- */
-
-gboolean
-fxm_plugin_init (GstPlugin * plugin)
-{
-    gboolean result = TRUE;
-    //fprintf(stderr, "===fxm_plugin_init()\n");
-    // debug category for fltering log messages
-    GST_DEBUG_CATEGORY_INIT (fxm_plugin_debug, "fxmplugin",
-            0, "JMC FXM Plugin");
-
-    result &= gst_element_register (plugin, "vp6decoder", 250, TYPE_VP6_DECODER);
-    result &= gst_element_register (plugin, "flvdemux", 70, TYPE_FLV_DEMUX);
-    return result;
-}
-
-
-gboolean
-fxm_plugin_register_static()
-{
-    //fprintf(stderr, "===fxm_plugin_register_static()\n");
-    gboolean r = gst_plugin_register_static(
-            GST_VERSION_MAJOR,
-            GST_VERSION_MINOR,
-            "fxmplugin",
-            "FXM plugin",
-            fxm_plugin_init,
-            "1.0", //VERSION,
-            "Proprietary",
-            "JMC",
-            "JMC",
-            "http://javafx.com/"
-            );
-    //fprintf(stderr, "gst_plugin_register_static returned : %d\n", r);
-    return r;
-}
-
-#ifdef FXM_STANDALONE
-
-#define PACKAGE "JMC"
-
-static gboolean
-fxm_init (GstPlugin * plugin)
-{
-    gboolean result = TRUE;
-    //fprintf(stderr, "===fxm_plugin_init()\n");
-    // debug category for fltering log messages
-    GST_DEBUG_CATEGORY_INIT (fxm_plugin_debug, "fxmplugin",
-            0, "JMC FXM Plugin");
-
-    result &= gst_element_register (plugin, "vp6decoder", 250, TYPE_VP6_DECODER);
-    result &= gst_element_register (plugin, "flvdemux", 70, TYPE_FLV_DEMUX);
-    return result;
-}
-
-GST_PLUGIN_DEFINE (
-           GST_VERSION_MAJOR,
-           GST_VERSION_MINOR,
-           "fxmplugin",
-           "FXM plugin",
-           fxm_plugin_init,
-           "1.0",
-           "Proprietary",
-       "JMC",
-           "http://javafx.com/");
-
-#endif
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/vp6/fxmplugin.h	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef __FXMPLUGIN_H__
-#define __FXMPLUGIN_H__
-
-#include <gst/gst.h>
-
-gboolean
-fxm_plugin_register_static();
-
-#endif
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/vp6/vp6decoder.c	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,976 +0,0 @@
-/*
- * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <gst/gst.h>
-#include <string.h>
-
-#include "vp6decoder.h"
-
-
-GST_DEBUG_CATEGORY_EXTERN (fxm_plugin_debug);
-#define GST_CAT_DEFAULT fxm_plugin_debug
-
-#define ENABLE_POST_PROCESSING  FALSE
-
-#define TMP_INPUT_BUF_INITIAL_SIZE 65536
-#define TMP_INPUT_BUF_PADDING      64
-
-/* the capabilities of the inputs and outputs.
- *
- * describe the real formats here.
- */
-static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
-    GST_PAD_SINK,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("video/x-vp6; video/x-vp6-flash; video/x-vp6-alpha")
-    );
-
-static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
-    GST_PAD_SRC,
-    GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("video/x-raw-yuv, format=(string)YV12; "
-                     "video/x-raw-yvua420p, format=(string)YVUA")
-    );
-
-
-/***********************************************************************************
- * Substitution for
- * G_DEFINE_TYPE (VP6Decoder, vp6decoder, GstElement, GST_TYPE_ELEMENT);
- ***********************************************************************************/
-#define vp6decoder_parent_class parent_class
-static void vp6decoder_init          (VP6Decoder      *self);
-static void vp6decoder_class_init    (VP6DecoderClass *klass);
-static gpointer vp6decoder_parent_class = NULL;
-static void     vp6decoder_class_intern_init (gpointer klass)
-{
-    vp6decoder_parent_class = g_type_class_peek_parent (klass);
-    vp6decoder_class_init ((VP6DecoderClass*) klass);
-}
-
-GType vp6decoder_get_type (void)
-{
-    static volatile gsize gonce_data = 0;
-// INLINE - g_once_init_enter()
-    if (g_once_init_enter (&gonce_data))
-    {
-        GType _type;
-        _type = g_type_register_static_simple (GST_TYPE_ELEMENT,
-               g_intern_static_string ("VP6Decoder"),
-               sizeof (VP6DecoderClass),
-               (GClassInitFunc) vp6decoder_class_intern_init,
-               sizeof(VP6Decoder),
-               (GInstanceInitFunc) vp6decoder_init,
-               (GTypeFlags) 0);
-        g_once_init_leave (&gonce_data, (gsize) _type);
-    }
-    return (GType) gonce_data;
-}
-
-/***********************************************************************************
- * Init stuff
- ***********************************************************************************/
-static GstStateChangeReturn vp6decoder_change_state (GstElement* element, GstStateChange transition);
-
-static gboolean vp6decoder_sink_event (GstPad * pad, GstObject *parent, GstEvent * event);
-static gboolean vp6decoder_set_caps (GstPad * pad, GstObject *parent, GstCaps * caps);
-static GstFlowReturn vp6decoder_chain (GstPad * pad, GstObject *parent, GstBuffer * buf);
-
-static gboolean vp6decoder_src_query (GstPad * pad, GstObject *parent, GstQuery * query);
-static gboolean vp6decoder_src_event (GstPad * pad, GstObject *parent, GstEvent * event);
-
-/* QoS helper functions */
-static void vp6decoder_reset_qos(VP6Decoder *filter);
-static void vp6decoder_update_qos(VP6Decoder *filter, gdouble proportion,
-        GstClockTimeDiff diff, GstClockTime timestamp);
-static gboolean vp6decoder_do_qos(VP6Decoder* filter, GstClockTime timestamp, gboolean is_keyframe);
-static void destroy_vp6_decoders(VP6Decoder *filter);
-
-static int parse_vp6alpha_header(guint8 *packet, int packetSize, guint8 **colorBitstream, int *colorBitstreamSize, guint8 **alphaBitstream, int *alphaBitstreamSize)
-{
-    /*
-         What Google said about the vp6a bitstream header:
-         1 byte w/h offset
-         3 byte offset to alpha bitstream
-         n bytes yv12 bitstream
-         n bytes alpha bitstream
-
-
-         What I discovered:
-         1 byte, always zero (maybe w/h offset as above)
-         2 byte offset to alpha bitstream
-         n bytes yv12 bitstream
-         n bytes alpha bitstream
-
-         Bit streams seem to be video/x-vp6, not video/x-vp6-flash
-     */
-    int offset = (packet[1] << 8) | packet[2];
-
-    // Not sure what other error detection I could do here...
-    if (offset + 3 < packetSize) {
-        *colorBitstream = packet + 3;
-        *colorBitstreamSize = offset - 3; // offset is first partition size
-        *alphaBitstream = packet + offset + 3;
-        *alphaBitstreamSize = packetSize - (offset + 3);
-#if 0
-        {
-            guint8 *ptr;
-            fprintf(stderr, "vp6a packet %p, size %d\n", packet, packetSize);
-            fprintf(stderr, " header: %02x %02x %02x\n", packet[0], packet[1], packet[2]);
-            ptr = *colorBitstream;
-            fprintf(stderr, " color header: %02x %02x %02x %02x %02x %02x %02x %02x\n", ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]);
-            ptr = *alphaBitstream;
-            fprintf(stderr, " alpha header: %02x %02x %02x %02x %02x %02x %02x %02x\n", ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]);
-            fprintf(stderr, " - width offset %d, height offset %d\n", (packet[0] >> 4) & 0x0f, packet[0] & 0x0f);
-            fprintf(stderr, " - alpha offset %d (%x)\n", offset, offset);
-        }
-#endif
-        return 1;
-    }
-
-    return 0;
-}
-
-/*
- Probe a packet to determine which
- */
-static on2_codec_iface_t *probe_vp6_packet(guint8 *packet, int packetSize, gint *stream_width, gint *stream_height)
-{
-    on2_codec_err_t ret;
-    on2_codec_stream_info_t info;
-    info.sz = sizeof(on2_codec_stream_info_t);
-
-    // Try each known interface until we get a hit
-    // vp6
-    ret = on2_codec_peek_stream_info(&on2_codec_vp6_algo, packet, (unsigned int)packetSize, &info);
-    if (ON2_CODEC_OK == ret) {
-        GST_DEBUG("[probe] Using vp6 decoder\nstream info: w=%u, h=%u, is_kf=%u", info.w, info.h, info.is_kf);
-
-        *stream_width = info.w;
-        *stream_height = info.h;
-
-        return &on2_codec_vp6_algo;
-    }
-
-    // vp6f
-    ret = on2_codec_peek_stream_info(&on2_codec_vp6f_algo, packet, (unsigned int)packetSize, &info);
-    if (ON2_CODEC_OK == ret) {
-        GST_DEBUG("[probe] Using vp6f decoder\nstream info: w=%u, h=%u, is_kf=%u", info.w, info.h, info.is_kf);
-
-        *stream_width = info.w;
-        *stream_height = info.h;
-
-        return &on2_codec_vp6f_algo;
-    }
-
-    return NULL;
-}
-
-static gboolean check_vp6_decoders(VP6Decoder *filter, guint8 *probePacket, int packetSize)
-{
-    guint8 *cb = probePacket;
-    int cbSize = packetSize;
-    on2_codec_iface_t *vp6Algo = NULL, *vp6aAlgo = NULL;
-    gint stream_width = 0, stream_height = 0;
-    gint alpha_stream_width = 0, alpha_stream_height = 0;
-
-    if (filter->decodeAlpha) {
-        guint8 *ab;
-        int abSize;
-
-        // get pointer to color bitstream data, we'll use that to probe
-        if (!parse_vp6alpha_header(cb, cbSize, &cb, &cbSize, &ab, &abSize)) {
-            GST_ERROR("Bad vp6a bitstream detected!");
-            return FALSE;
-        }
-
-        vp6aAlgo = probe_vp6_packet(ab, abSize, &alpha_stream_width, &alpha_stream_height);
-        if (!vp6aAlgo) {
-            GST_ERROR("No supported vp6a bitstream detected!");
-            return FALSE;
-        }
-    }
-
-    vp6Algo = probe_vp6_packet(cb, cbSize, &stream_width, &stream_height);
-    if (!vp6Algo) {
-        GST_ERROR("No supported vp6 bitstream detected!");
-        return FALSE;
-    }
-
-    // Decoder does not exist or frame size has changed - we need to recreate decoder
-    if (!filter->decoder) {
-        if (filter->decodeAlpha) {
-            if (vp6Algo != vp6aAlgo || stream_width != alpha_stream_width || stream_height != alpha_stream_height) {
-                GST_ERROR("Color and alpha bitsreams must have the same parameters!");
-                return FALSE;
-            }
-
-            filter->alphaDecoder = (on2_codec_ctx_t *)g_malloc(sizeof(on2_codec_ctx_t));
-            if (!filter->alphaDecoder) {
-                GST_ERROR("Unable to allocate decoder context!");
-                return FALSE;
-            }
-
-            if (on2_codec_dec_init(filter->alphaDecoder, vp6aAlgo, NULL, ENABLE_POST_PROCESSING ? ON2_CODEC_USE_POSTPROC : 0)) {
-                GST_ERROR("Failed to initialize alpha decoder: %s", on2_codec_error(filter->alphaDecoder));
-                return FALSE;
-            }
-        }
-
-        filter->decoder = (on2_codec_ctx_t *)g_malloc(sizeof(on2_codec_ctx_t));
-        if (!filter->decoder) {
-            GST_ERROR("Unable to allocate decoder context!");
-            return FALSE;
-        }
-
-        if (on2_codec_dec_init(filter->decoder, vp6Algo, NULL, ENABLE_POST_PROCESSING ? ON2_CODEC_USE_POSTPROC : 0)) {
-            GST_ERROR("Failed to initialize decoder: %s", on2_codec_error(filter->decoder));
-            return FALSE;
-        }
-    }
-    else if ((stream_width > 0 && stream_width != filter->encoded_width) ||
-             (stream_height > 0 && stream_height != filter->encoded_height) ||
-             vp6Algo != filter->decoder->iface ||
-             filter->alphaDecoder && ((alpha_stream_width > 0 && alpha_stream_width != filter->encoded_width) ||
-                                      (alpha_stream_height > 0 && alpha_stream_height != filter->encoded_height) ||
-                                      vp6aAlgo != filter->alphaDecoder->iface))
-    {
-        GST_ERROR("Dynamic resolution or interface are not supported!");
-        return FALSE;
-    }
-
-    return TRUE;
-}
-
-static void destroy_vp6_decoders(VP6Decoder *filter)
-{
-    if (filter->decoder) {
-        on2_codec_destroy(filter->decoder);
-        g_free(filter->decoder);
-        filter->decoder = NULL;
-    }
-
-    if (filter->alphaDecoder) {
-        on2_codec_destroy(filter->alphaDecoder);
-        g_free(filter->alphaDecoder);
-        filter->alphaDecoder = NULL;
-    }
-}
-
-/* initialize the vp6decoderfilter's class */
-static void
-vp6decoder_class_init (VP6DecoderClass * klass)
-{
-    //fprintf(stderr, "===vp6decoder_class_init()\n");
-    GObjectClass *gobject_class;
-    GstElementClass *element_class;
-
-    gobject_class = G_OBJECT_CLASS (klass);
-    element_class = GST_ELEMENT_CLASS (klass);
-
-    gst_element_class_set_details_simple(element_class,
-        "VP6Decoder",
-        "Codec/Decoder/Video",
-        "ON2 based VP6 decoder",
-        "Oracle Corporation");
-
-    gst_element_class_add_pad_template (element_class,
-        gst_static_pad_template_get (&src_factory));
-    gst_element_class_add_pad_template (element_class,
-        gst_static_pad_template_get (&sink_factory));
-
-    element_class->change_state = vp6decoder_change_state;
-}
-
-/* initialize the new element
- * instantiate pads and add them to element
- * set pad calback functions
- * initialize instance structure
- */
-static void
-vp6decoder_init (VP6Decoder * filter)
-{
-    //fprintf(stderr, "===vp6decoder_init()\n");
-
-    //Create sink
-    filter->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink");
-    gst_pad_set_event_function (filter->sinkpad, vp6decoder_sink_event);
-    gst_pad_set_chain_function (filter->sinkpad, vp6decoder_chain);
-
-    gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
-
-    //Create src
-    filter->srcpad = gst_pad_new_from_static_template (&src_factory, "src");
-    gst_pad_set_query_function (filter->srcpad, vp6decoder_src_query);
-    gst_pad_set_event_function (filter->srcpad, vp6decoder_src_event);
-    gst_pad_use_fixed_caps (filter->srcpad);
-
-    gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
-
-    //Set defaults
-    filter->need_set_caps = TRUE;
-    filter->width = 0;
-    filter->height = 0;
-    filter->encoded_width = 0;
-    filter->encoded_height = 0;
-    filter->have_par = FALSE;
-    filter->par_num = 0;
-    filter->par_den = 0;
-    filter->framerate_num = 25;
-    filter->framerate_den = 1;
-    filter->tmp_input_buf = NULL;
-    filter->tmp_input_buf_size = 0;
-
-    filter->decoder = NULL;
-    filter->alphaDecoder = NULL;
-
-    //Segment
-    gst_segment_init(&filter->segment, GST_FORMAT_TIME);
-    filter->segment_event = NULL;
-
-    //QoS
-    vp6decoder_reset_qos(filter);
-}
-
-static GstStateChangeReturn vp6decoder_change_state (GstElement* element, GstStateChange transition)
-{
-    VP6Decoder *filter = NULL;
-    GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
-
-    filter = VP6_DECODER (element);
-    switch (transition) {
-        case GST_STATE_CHANGE_NULL_TO_READY: {
-            // make sure we don't have any stale decoder contexts
-            destroy_vp6_decoders(filter);
-
-            // Just in case free previous buffer
-            if (filter->tmp_input_buf)
-            {
-                g_free((gpointer)filter->tmp_input_buf);
-                filter->tmp_input_buf = NULL;
-                filter->tmp_input_buf_size = 0;
-            }
-            filter->tmp_input_buf = (guint8*)g_malloc(TMP_INPUT_BUF_INITIAL_SIZE + TMP_INPUT_BUF_PADDING);
-            filter->tmp_input_buf_size = TMP_INPUT_BUF_INITIAL_SIZE + TMP_INPUT_BUF_PADDING;
-            if (filter->tmp_input_buf == NULL)
-                return GST_STATE_CHANGE_FAILURE;
-        }
-            break;
-        case GST_STATE_CHANGE_READY_TO_PAUSED:
-            filter->need_set_caps = TRUE;
-            break;
-        case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
-            vp6decoder_reset_qos(filter);
-            break;
-        default:
-            break;
-    }
-
-    ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-    if (ret == GST_STATE_CHANGE_FAILURE)
-        return ret;
-
-    switch (transition) {
-        case GST_STATE_CHANGE_READY_TO_NULL:
-            // Free temp buffer
-            if (filter->tmp_input_buf) {
-                g_free((gpointer)filter->tmp_input_buf);
-                filter->tmp_input_buf = NULL;
-                filter->tmp_input_buf_size = 0;
-            }
-
-            if (filter->segment_event != NULL) {
-                // INLINE - gst_event_unref()
-                gst_event_unref (filter->segment_event);
-                filter->segment_event = NULL;
-            }
-
-            // Destroy decoder
-            destroy_vp6_decoders(filter);
-            break;
-        default:
-            break;
-    }
-
-    return ret;
-}
-
-static gboolean vp6decoder_sink_event (GstPad * pad, GstObject *parent, GstEvent * event)
-{
-    gboolean ret = FALSE;
-    VP6Decoder *filter = NULL;
-
-    //fprintf(stderr, "===vp6decoder_sink_event() : %s\n",  gst_event_type_get_name(GST_EVENT_TYPE(event)));
-
-    filter = VP6_DECODER (parent);
-    switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_FLUSH_START:
-        //fprintf(stderr, "===vp6decoder_sink_event() : GST_EVENT_FLUSH_START\n");
-        ret = gst_pad_push_event (filter->srcpad, event);
-        break;
-    case GST_EVENT_FLUSH_STOP:
-        //fprintf(stderr, "===vp6decoder_sink_event() : GST_EVENT_FLUSH_STOP\n");
-        ret = gst_pad_push_event (filter->srcpad, event);
-        break;
-    case GST_EVENT_EOS:
-        //fprintf(stderr, "===vp6decoder_sink_event() : GST_EVENT_EOS\n");
-        ret = gst_pad_push_event (filter->srcpad, event);
-        break;
-    case GST_EVENT_SEGMENT: {
-        GstSegment segment;
-
-        gst_event_copy_segment (event, &segment);
-
-        //Use segment if it has time format, mark that segment needed otherwise.
-        if (segment.format == GST_FORMAT_TIME) {
-            gst_segment_copy_into (&segment, &filter->segment);
-        }
-
-        vp6decoder_reset_qos(filter);
-        if (filter->need_set_caps) {
-            if (filter->segment_event != NULL) {
-                // INLINE - gst_event_unref()
-                gst_event_unref (filter->segment_event);
-            }
-            filter->segment_event = gst_event_copy(event);
-            // INLINE - gst_event_unref()
-            gst_event_unref (event);
-            ret = TRUE;
-        } else {
-            ret = gst_pad_push_event (filter->srcpad, event);
-        }
-
-        break;
-    }
-    case GST_EVENT_CAPS: {
-        GstCaps *caps;
-
-        gst_event_parse_caps (event, &caps);
-        vp6decoder_set_caps(pad, parent, caps);
-
-        // INLINE - gst_event_unref()
-        gst_event_unref (event);
-        ret = TRUE;
-        break;
-    }
-    default:
-        ret = gst_pad_push_event (filter->srcpad, event);
-        break;
-    }
-    return ret;
-}
-
-/* this function handles the link with other elements */
-static gboolean vp6decoder_set_caps (GstPad * pad, GstObject *parent, GstCaps * caps)
-{
-    VP6Decoder *filter = NULL;
-    GstStructure *s = NULL;
-    const gchar *sinkCapsName = NULL;
-
-    filter = VP6_DECODER (parent);
-    if (pad == filter->sinkpad) {
-        s = gst_caps_get_structure (caps, 0);
-
-        // Check if we have alpha
-        sinkCapsName = gst_structure_get_name(s);
-        if (sinkCapsName != NULL)
-            filter->decodeAlpha = (NULL != strstr("video/x-vp6-alpha", sinkCapsName));
-
-        //Check if we have par
-        filter->have_par = gst_structure_get_fraction (s, "pixel-aspect-ratio",
-          &filter->par_num, &filter->par_den);
-        //parse the par. If the par isn't specified by sink caps, use 1:1
-        if (!filter->have_par) {
-            filter->par_num = 1;
-            filter->par_den = 1;
-        }
-
-        // Check if we have framerate. If the framerate isn't specified by sink caps, use 25 fps
-        if (!gst_structure_get_fraction (s, "framerate", &filter->framerate_num, &filter->framerate_den))
-        {
-            filter->framerate_num = 25;
-            filter->framerate_den = 1;
-        }
-
-        // Make sure framerate is valid
-        if (filter->framerate_num <= 0 || filter->framerate_den <= 0)
-        {
-            filter->framerate_num = 25;
-            filter->framerate_den = 1;
-        }
-
-        // Get dimensions
-        if (!gst_structure_get_int (s, "width", &filter->width))
-            filter->width = 0;
-
-        if (!gst_structure_get_int (s, "height", &filter->height))
-            filter->height = 0;
-
-        // Calculate encoded sizes from width, height
-        filter->encoded_width = filter->width + (filter->width & 1);
-        filter->encoded_height = filter->height + (filter->height & 1);
-
-        //Raise flag to change caps on next frame
-        filter->need_set_caps = TRUE;
-    }
-
-    return TRUE;
-}
-
-/* chain function
- * this function does the actual processing
- */
-static GstFlowReturn vp6decoder_chain (GstPad * pad, GstObject *parent, GstBuffer * buf)
-{
-    VP6Decoder *filter = NULL;
-    GstMapInfo info;
-    GstBuffer *out = NULL;
-    GstCaps *caps = NULL;
-    guint8 *colorBits = NULL;
-    int colorSize = 0;
-    guint8 *alphaBits = NULL;
-    int alphaSize = 0;
-    gint i = 0;
-    ADDR_ALIGN on2_image_t *img = NULL;
-    ADDR_ALIGN on2_image_t *alphaImg = NULL;
-    on2_codec_iter_t iter = NULL;
-    gint result = GST_FLOW_OK;
-    ADDR_ALIGN gint src_len = 0;
-
-    gint stride_y = 0;
-    gint stride_v = 0;
-    gint stride_u = 0;
-    gint stride_a = 0;
-
-    gint out_size = 0;          //Output buffer size in bytes
-    gint out_size_y = 0;        //Buffer size for Y component
-    gint out_size_v = 0;       //Buffer size for U&V components
-    gint out_size_u = 0;
-    gint out_size_a = 0;
-
-    gint offset_y = 0;      //Offset of topmost Y row from the beginning of buffer
-    gint offset_u = 0;      //Offset of topmost U row from the beginning of buffer
-    gint offset_v = 0;      //Offset of topmost V row from the beginning of buffer
-    gint offset_a = 0;      //Offset of topmost A row from the beginning of buffer
-
-    guchar *dest = NULL;        //Destination buffer
-    gboolean is_keyframe = FALSE;
-
-    GstEvent *caps_event = NULL;
-
-    filter = VP6_DECODER (parent);
-
-    is_keyframe = !GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_DELTA_UNIT);
-
-    if (!gst_buffer_map(buf, &info, GST_MAP_READ)) {
-        // INLINE - gst_buffer_unref()
-        gst_buffer_unref (buf);
-
-        gst_element_message_full(GST_ELEMENT(filter), GST_MESSAGE_ERROR, GST_STREAM_ERROR, GST_STREAM_ERROR_DECODE, g_strdup("Failed to check or create decoder context!"), NULL, ("vp6decoder.c"), ("vp6decoder_chain"), 0);
-        return GST_FLOW_ERROR;
-    }
-
-    // probe and allocate proper decoder context
-    if (!check_vp6_decoders(filter, info.data, info.size)) {
-        gst_buffer_unmap(buf, &info);
-        // INLINE - gst_buffer_unref()
-        gst_buffer_unref (buf);
-
-        gst_element_message_full(GST_ELEMENT(filter), GST_MESSAGE_ERROR, GST_STREAM_ERROR, GST_STREAM_ERROR_DECODE, g_strdup("Failed to check or create decoder context!"), NULL, ("vp6decoder.c"), ("vp6decoder_chain"), 0);
-        return GST_FLOW_ERROR;
-    }
-
-    /* Update QoS data and do QoS */
-    if (!vp6decoder_do_qos(filter, GST_BUFFER_TIMESTAMP(buf), is_keyframe)) {
-        filter->qos_discont = TRUE;
-        //fprintf(stderr, "vp6decoder: QoS skipping frame\n");
-        gst_buffer_unmap(buf, &info);
-        // INLINE - gst_buffer_unref()
-        gst_buffer_unref (buf);
-        return GST_FLOW_OK;
-    }
-
-    /* Workaround for VP6 decoder buffer underflow bug:
-     * copy data to intermediate buffer of larger size */
-    src_len = info.size;
-    if (filter->tmp_input_buf_size < (src_len + TMP_INPUT_BUF_PADDING))
-    {
-      filter->tmp_input_buf = (guint8*)g_realloc((gpointer)filter->tmp_input_buf, (src_len + TMP_INPUT_BUF_PADDING));
-      filter->tmp_input_buf_size = (src_len + TMP_INPUT_BUF_PADDING);
-    }
-
-    if (!filter->tmp_input_buf)
-    {
-        GST_ERROR("Unable to reallocate tmp buffer");
-        gst_buffer_unmap(buf, &info);
-        // INLINE - gst_buffer_unref()
-        gst_buffer_unref (buf);
-        return GST_FLOW_ERROR;
-    }
-
-    memcpy(filter->tmp_input_buf, info.data, src_len);
-    memset(filter->tmp_input_buf+src_len, 0, (filter->tmp_input_buf_size - src_len));
-    gst_buffer_unmap(buf, &info);
-
-    if (filter->decodeAlpha) {
-        if (!parse_vp6alpha_header(filter->tmp_input_buf, src_len, &colorBits, &colorSize, &alphaBits, &alphaSize)) {
-            // INLINE - gst_buffer_unref()
-            gst_buffer_unref (buf);
-
-            gst_element_message_full(GST_ELEMENT(filter), GST_MESSAGE_ERROR, GST_STREAM_ERROR, GST_STREAM_ERROR_DECODE, g_strdup("Failed to parse VP6A header"), NULL, ("vp6decoder.c"), ("vp6decoder_chain"), 0);
-            return GST_FLOW_ERROR;
-        }
-    } else {
-        colorBits = filter->tmp_input_buf;
-        colorSize = src_len;
-    }
-
-    //Decode frame
-    if (on2_codec_decode(filter->decoder, colorBits, colorSize, NULL, 0)) {
-// INLINE - gst_buffer_unref()
-        gst_buffer_unref (buf);
-
-        gst_element_message_full(GST_ELEMENT(filter), GST_MESSAGE_ERROR, GST_STREAM_ERROR, GST_STREAM_ERROR_DECODE, g_strdup("Failed to decode VP6 stream"), NULL, ("vp6decoder.c"), ("vp6decoder_chain"), 0);
-        return GST_FLOW_ERROR;
-    }
-    if (filter->decodeAlpha) {
-        if (on2_codec_decode(filter->alphaDecoder, alphaBits, alphaSize, NULL, 0)) {
-// INLINE - gst_buffer_unref()
-            gst_buffer_unref (buf);
-            gst_element_message_full(GST_ELEMENT(filter), GST_MESSAGE_ERROR, GST_STREAM_ERROR, GST_STREAM_ERROR_DECODE, g_strdup("Failed to decode VP6A stream"), NULL, ("vp6decoder.c"), ("vp6decoder_chain"), 0);
-            return GST_FLOW_ERROR;
-        }
-    }
-
-    img = on2_codec_get_frame(filter->decoder, &iter);
-    if (img == 0) {
-// INLINE - gst_buffer_unref()
-        gst_buffer_unref (buf);
-        gst_element_message_full(GST_ELEMENT(filter), GST_MESSAGE_ERROR, GST_STREAM_ERROR, GST_STREAM_ERROR_DECODE, g_strdup("VP6 internal error"), NULL, ("vp6decoder.c"), ("vp6decoder_chain"), 0);
-        return GST_FLOW_ERROR;
-    }
-    // unflip images if necessary
-    if (img->stride[PLANE_Y] < 0) {
-        // on2_img_flip only adjust strides and pointers, it leaves memory intact
-        // so this is not an expensive operation and it make further math a lot easier to deal with...
-        on2_img_flip(img);
-    }
-
-    if (filter->decodeAlpha) {
-        iter = NULL;
-        alphaImg = on2_codec_get_frame(filter->alphaDecoder, &iter);
-        if (alphaImg == 0) {
-// INLINE - gst_buffer_unref()
-            gst_buffer_unref (buf);
-            gst_element_message_full(GST_ELEMENT(filter), GST_MESSAGE_ERROR, GST_STREAM_ERROR, GST_STREAM_ERROR_DECODE, g_strdup("VP6 internal error"), NULL, ("vp6decoder.c"), ("vp6decoder_chain"), 0);
-            return GST_FLOW_ERROR;
-        }
-        if (alphaImg->stride[PLANE_Y] < 0) {
-            on2_img_flip(alphaImg);
-        }
-    }
-
-    if (filter->height == 0)
-        filter->height = (gint)img->d_h;
-
-    if ((filter->encoded_height == 0) || (filter->encoded_height != (gint)img->d_h)) {
-        filter->encoded_height = img->d_h + (img->d_h & 1); // add a row for odd height
-        filter->need_set_caps = TRUE;
-    }
-
-    if (filter->width == 0)
-        filter->width = (gint)img->d_w;
-
-    if ((filter->encoded_width == 0) || (filter->encoded_width != (gint)img->d_w)) {
-        filter->encoded_width = img->d_w + (img->d_w & 1); // add a pixel for odd width
-        filter->need_set_caps = TRUE;
-    }
-
-    stride_y = img->stride[PLANE_Y];
-    stride_v = img->stride[PLANE_V];
-    stride_u = img->stride[PLANE_U];
-    if (alphaImg) {
-        stride_a = alphaImg->stride[PLANE_Y];
-    }
-
-    out_size_y = stride_y * filter->encoded_height;
-    out_size_v = stride_v * filter->encoded_height / 2;
-    out_size_u = stride_u * filter->encoded_height / 2;
-    out_size_a = stride_a * filter->encoded_height;
-
-    // if we have alpha, then place it immediately after luma so we can do a single LUMA+ALPHA texture update in prism
-    offset_y = 0;
-    if (alphaImg) {
-        offset_a = offset_y + out_size_y;
-        offset_v = offset_a + out_size_a;
-        offset_u = offset_v + out_size_v;
-    } else {
-        offset_v = offset_y + out_size_y;
-        offset_u = offset_v + out_size_v;
-        offset_a = 0;
-    }
-
-    // check if any settings changed
-    // base purely on size since it will represent changes in both offset and stride
-    if ((filter->plane_size[PLANE_Y] != out_size_y)
-        || (filter->plane_size[PLANE_V] != out_size_v)
-        || (filter->plane_size[PLANE_U] != out_size_u)
-        || (filter->plane_size[PLANE_ALPHA] != out_size_a))
-    {
-        filter->plane_size[PLANE_Y] = out_size_y;
-        filter->plane_size[PLANE_V] = out_size_v;
-        filter->plane_size[PLANE_U] = out_size_u;
-        filter->plane_size[PLANE_ALPHA] = out_size_a;
-        filter->need_set_caps = TRUE;
-    }
-
-    if (filter->need_set_caps) {
-        if (filter->decodeAlpha) {
-            caps = gst_caps_new_simple ("video/x-raw-yvua420p",
-                                        "format", G_TYPE_STRING, "YVUA",
-                                        "framerate", GST_TYPE_FRACTION, filter->framerate_num, filter->framerate_den,
-                                        "pixel-aspect-ratio", GST_TYPE_FRACTION, filter->par_num, filter->par_den,
-
-                                        "offset-y", G_TYPE_INT, offset_y,
-                                        "offset-v", G_TYPE_INT, offset_v,
-                                        "offset-u", G_TYPE_INT, offset_u,
-                                        "offset-a", G_TYPE_INT, offset_a,
-
-                                        "stride-y", G_TYPE_INT, stride_y,
-                                        "stride-v", G_TYPE_INT, stride_v,
-                                        "stride-u", G_TYPE_INT, stride_u,
-                                        "stride-a", G_TYPE_INT, stride_a,
-
-                                        "width", G_TYPE_INT, filter->width,
-                                        "height", G_TYPE_INT, filter->height,
-
-                                        "encoded-width", G_TYPE_INT, filter->encoded_width,
-                                        "encoded-height", G_TYPE_INT, filter->encoded_height,
-
-                                        NULL);
-        } else {
-            caps = gst_caps_new_simple ("video/x-raw-yuv",
-                                        "format", G_TYPE_STRING, "YV12",
-                                        "framerate", GST_TYPE_FRACTION, filter->framerate_num, filter->framerate_den,
-                                        "pixel-aspect-ratio", GST_TYPE_FRACTION, filter->par_num, filter->par_den,
-
-                                        "offset-y", G_TYPE_INT, offset_y,
-                                        "offset-v", G_TYPE_INT, offset_v,
-                                        "offset-u", G_TYPE_INT, offset_u,
-
-                                        "stride-y", G_TYPE_INT, stride_y,
-                                        "stride-v", G_TYPE_INT, stride_v,
-                                        "stride-u", G_TYPE_INT, stride_u,
-
-                                        "width", G_TYPE_INT, filter->width,
-                                        "height", G_TYPE_INT, filter->height,
-
-                                        "encoded-width", G_TYPE_INT, filter->encoded_width,
-                                        "encoded-height", G_TYPE_INT, filter->encoded_height,
-
-                                        NULL);
-        }
-
-
-        caps_event = gst_event_new_caps(caps);
-        if (caps_event)
-            gst_pad_push_event(filter->srcpad, caps_event);
-        gst_caps_unref (caps);
-
-        if (filter->segment_event != NULL) {
-            gst_pad_push_event (filter->srcpad, filter->segment_event);
-            filter->segment_event = NULL;
-        }
-
-        filter->need_set_caps = FALSE;
-    }
-
-    out_size = out_size_y + out_size_v + out_size_u + out_size_a;
-
-    /* now copy over the area contained in offset_x,offset_y,
-    * frame_width, frame_height */
-    out = gst_buffer_new_allocate(NULL, out_size, NULL);
-    if (out != NULL) {
-        GstMapInfo info;
-        if (gst_buffer_map(out, &info, GST_MAP_WRITE)) {
-            dest = info.data;
-            GST_BUFFER_TIMESTAMP(out) = GST_BUFFER_TIMESTAMP(buf);
-            GST_BUFFER_DURATION(out) = GST_BUFFER_DURATION(buf);
-            GST_BUFFER_OFFSET(out) = GST_BUFFER_OFFSET(buf);
-            GST_BUFFER_OFFSET_END(out) = GST_BUFFER_OFFSET_END(buf);
-            if (filter->qos_discont || GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_DISCONT)) {
-                GST_BUFFER_FLAG_SET(out, GST_BUFFER_FLAG_DISCONT);
-                filter->qos_discont = FALSE;
-            }
-
-            memcpy(dest + offset_y, img->planes[PLANE_Y], out_size_y);
-            memcpy(dest + offset_v, img->planes[PLANE_V], out_size_v);
-            memcpy(dest + offset_u, img->planes[PLANE_U], out_size_u);
-
-            if (alphaImg) {
-                memcpy(dest + offset_a, alphaImg->planes[PLANE_Y], out_size_a);
-            }
-
-            gst_buffer_unmap(out, &info);
-
-            //Push decoded frame
-            result = gst_pad_push (filter->srcpad, out);
-        }
-    }
-
-    /* don't need it anymore now */
-    // INLINE - gst_buffer_unref()
-    gst_buffer_unref (buf);
-
-    return GST_FLOW_OK;
-}
-
-static gboolean vp6decoder_src_query (GstPad * pad, GstObject *parent, GstQuery * query)
-{
-    VP6Decoder *filter = NULL;
-    GstPad *peer = NULL;
-    gboolean res = FALSE;
-
-    //fprintf(stderr, "===vp6decoder_src_query %s()\n",  gst_query_type_get_name(GST_QUERY_TYPE(query)));
-
-    filter = VP6_DECODER (parent);
-
-    if (!(peer = gst_pad_get_peer (filter->sinkpad))) {
-        return FALSE;
-    }
-
-    /* forward to peer for total */
-    res = gst_pad_query (peer, query);
-
-    gst_object_unref (peer);
-
-    return res;
-}
-
-static gboolean vp6decoder_src_event (GstPad * pad, GstObject *parent, GstEvent * event)
-{
-    VP6Decoder *filter = NULL;
-    gboolean res = FALSE;
-    GstQOSType type;
-    gdouble proportion;
-    GstClockTimeDiff diff;
-    GstClockTime ts;
-
-    //fprintf(stderr, "===vp6decoder_src_event() %s\n",  gst_event_type_get_name(GST_EVENT_TYPE(event)));
-
-    filter = VP6_DECODER (parent);
-
-    switch (GST_EVENT_TYPE(event)) {
-    case GST_EVENT_QOS:
-        gst_event_parse_qos(event, &type, &proportion, &diff, &ts);
-        vp6decoder_update_qos(filter, proportion, diff, ts);
-        res = gst_pad_push_event (filter->sinkpad, event);
-        break;
-    default:
-        res = gst_pad_push_event (filter->sinkpad, event);
-    }
-    return res;
-}
-
-/* QoS helper functions */
-static void vp6decoder_reset_qos(VP6Decoder *filter)
-{
-    vp6decoder_update_qos(filter, 0.5, 0, GST_CLOCK_TIME_NONE);
-    filter->frames_received = 0;
-    filter->keyframes_received = 0;
-    filter->delta_sequence = 0;
-    filter->qos_dropping = 0;
-}
-
-static void vp6decoder_update_qos(VP6Decoder *filter, gdouble proportion,
-        GstClockTimeDiff diff, GstClockTime timestamp)
-{
-    GST_OBJECT_LOCK(filter);
-
-    filter->qos_proportion = proportion;
-    filter->qos_diff = diff;
-    filter->qos_timestamp = timestamp;
-
-    GST_OBJECT_UNLOCK(filter);
-}
-
-static gboolean vp6decoder_do_qos(VP6Decoder* filter, GstClockTime timestamp, gboolean is_keyframe)
-{
-    GstClockTime segment_ts;
-    int expected_delta;
-    GstClockTime expected_keyframe_ts;
-    GstClockTime qos_running_ts;
-
-    /* Do QoS only while playing */
-    if (GST_STATE(filter) != GST_STATE_PLAYING)
-        return TRUE;
-
-    segment_ts = gst_segment_to_position(&filter->segment, GST_FORMAT_TIME, timestamp);
-
-    filter->frames_received++;
-    if (is_keyframe) {
-        /* Keyframes are never dropped */
-        filter->keyframes_received++;
-        filter->delta_sequence = 0;
-        filter->qos_dropping = FALSE;
-        return TRUE;
-    }
-
-    filter->delta_sequence++;
-
-    /* If dropping frames already, continue dropping until next keyframe*/
-    if (filter->qos_dropping)
-        return FALSE;
-
-    /* Don't do QoS if last frame arrived on time,
-     * timestamp is outside of segment
-     * or there's no valid QoS message
-     * or no keyframes received yet*/
-    if (filter->qos_diff <= 0
-                || segment_ts == GST_CLOCK_TIME_NONE
-                || filter->qos_timestamp == GST_CLOCK_TIME_NONE
-                || filter->keyframes_received == 0)
-        return TRUE;
-
-    /* Calculate expected count of frames until keyframe */
-    expected_delta = filter->frames_received / filter->keyframes_received + 15 - filter->delta_sequence;
-
-    /* Calculate ts of expected keyframe */
-    expected_keyframe_ts = expected_delta * filter->framerate_den * GST_SECOND /
-                filter->framerate_num + segment_ts;
-
-    /* Calculate running ts from QoS */
-    qos_running_ts = filter->qos_timestamp + filter->qos_diff * 2;
-
-    if (expected_keyframe_ts <= qos_running_ts && filter->qos_proportion >= 4.0) {
-        filter->qos_dropping = TRUE;
-        return FALSE;
-    }
-
-    return TRUE;
-}
--- a/modules/javafx.media/src/main/native/gstreamer/plugins/vp6/vp6decoder.h	Thu Nov 02 15:33:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#ifndef __VP6_DECODER_H__
-#define __VP6_DECODER_H__
-
-#include <gst/gst.h>
-
-#define ON2_CODEC_DISABLE_COMPAT 1
-
-#include <on2_decoder_config.h>
-
-// Define some compatibility macros to avoid having to pepper the source with conditionals
-// Constants
-#define ON2_CODEC_OK                    ON2_DEC_OK
-// Types
-#define on2_codec_iface_t               on2_dec_iface_t
-#define on2_codec_ctx_t                 on2_dec_ctx_t
-#define on2_codec_iter_t                on2_dec_iter_t
-#define on2_codec_err_t                 on2_dec_err_t
-#define on2_codec_stream_info_t         on2_dec_stream_info_t
-// Globals
-#define on2_codec_vp6_algo              on2_dec_vp6_algo
-#define on2_codec_vp6f_algo             on2_dec_vp6f_algo
-// Functions
-#define on2_codec_dec_init(aa,bb,cc,dd) on2_dec_init(aa,bb)
-#define on2_codec_destroy               on2_dec_destroy
-#define on2_codec_decode                on2_dec_decode
-#define on2_codec_get_frame             on2_dec_get_frame
-#define on2_codec_error                 on2_dec_error
-#define on2_codec_peek_stream_info      on2_dec_peek_stream_info
-
-// These are available in all cases
-#include <on2_decoder.h>
-#include <on2_image.h>
-#include <vp6.h>
-
-
-#ifdef WIN32
-#define ADDR_ALIGN __declspec(align(32))
-#else // WIN32
-#define ADDR_ALIGN __attribute__((aligned(32)))
-#endif // WIN32
-
-
-G_BEGIN_DECLS
-
-/* #defines don't like whitespacey bits */
-#define TYPE_VP6_DECODER \
-  (vp6decoder_get_type())
-#define VP6_DECODER(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST((obj),TYPE_VP6_DECODER,VP6Decoder))
-#define VP6_DECODER_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass),TYPE_VP6_DECODER,VP6DecoderClass))
-#define IS_VP6_DECODER(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj),TYPE_VP6_DECODER))
-#define IS_VP6_DECODER_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass),TYPE_VP6_DECODER))
-
-typedef struct _VP6Decoder      VP6Decoder;
-typedef struct _VP6DecoderClass VP6DecoderClass;
-
-struct _VP6Decoder
-{
-    //Base structure
-    GstElement element;
-
-    // Pads
-    GstPad *sinkpad, *srcpad;
-
-    //Decoding context
-    on2_codec_ctx_t *decoder;
-    on2_codec_ctx_t *alphaDecoder;
-
-    //Caps
-    gboolean            need_set_caps;
-    gint                width, height;                  /* Display size of image */
-    gint                encoded_width, encoded_height;  /* Actual size of image stored in buffer */
-    gint                framerate_num;
-    gint                framerate_den;
-    gboolean            have_par;
-    gint                par_num, par_den;
-    gboolean            decodeAlpha;        /* vp6-alpha stream, bitstream needs to be parsed before splitting and sending to decoder contexts */
-
-    // image plane sizes, use to detect changes in plane layout
-    gint                plane_size[4];
-
-    //Temporary buffer
-    ADDR_ALIGN guint8  *tmp_input_buf;      /* Temp buffer used to send compressed data to decoder */
-    gint                tmp_input_buf_size; /* Size in bytes of temp buffer */
-
-    //Current segment
-    GstSegment          segment;
-
-    //Last QoS message data
-    gdouble             qos_proportion;     /* proportion member of QoS event */
-    GstClockTimeDiff    qos_diff;           /* diff member of QoS event */
-    GstClockTime        qos_timestamp;      /* timestamp member of QoS event */
-
-    //QoS runtime data
-    gboolean            qos_dropping;       /* TRUE if filter is dropping frame */
-    gboolean            qos_discont;        /* TRUE to set DISCONT flag for next buffer */
-    int                 frames_received;    /* total number of frames received */
-    int                 keyframes_received; /* total number of keyframes received */
-    int                 delta_sequence;     /* count of delta frames from last keyframe */
-
-    GstEvent *segment_event;
-};
-
-struct _VP6DecoderClass
-{
-  GstElementClass parent_class;
-};
-
-GType vp6decoder_get_type (void);
-
-G_END_DECLS
-
-#endif
--- a/modules/javafx.media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/gstreamer/projects/linux/fxplugins/Makefile	Mon Nov 06 15:40:16 2017 -0800
@@ -45,7 +45,7 @@
 PACKAGES_INCLUDES := $(shell pkg-config --cflags glib-2.0)
 PACKAGES_LIBS := $(shell pkg-config --libs glib-2.0 gobject-2.0)
 
-LDFLAGS = -L$(BUILD_DIR) -lgstreamer-lite $(PACKAGES_LIBS) 
+LDFLAGS = -L$(BUILD_DIR) -lgstreamer-lite $(PACKAGES_LIBS)
 
 ifeq ($(ARCH), x32)
     CFLAGS += -m32
@@ -59,21 +59,6 @@
           javasource/javasource.c            \
           javasource/marshal.c
 
-ifneq ($(strip $(ON2_SRCDIR)),)
-DIRLIST += vp6
-
-INCLUDES += -I$(ON2_SRCDIR)/include \
-            -I$(ON2_SRCDIR)/src \
-            -I$(ON2_SRCDIR)/config/linux
-
-SOURCES += vp6/flvdemux.c    \
-           vp6/flvmetadata.c \
-           vp6/flvparser.c   \
-           vp6/vp6decoder.c
-
-CFLAGS += -DENABLE_ON2_DECODER
-endif
-
 OBJ_DIRS = $(addprefix $(OBJBASE_DIR)/,$(DIRLIST))
 OBJECTS = $(patsubst %.c,$(OBJBASE_DIR)/%.o,$(SOURCES))
 
--- a/modules/javafx.media/src/main/native/gstreamer/projects/mac/fxplugins/Makefile	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/gstreamer/projects/mac/fxplugins/Makefile	Mon Nov 06 15:40:16 2017 -0800
@@ -66,22 +66,7 @@
             progressbuffer/posix/filecache.c   \
             javasource/javasource.c            \
             javasource/marshal.c               \
-            avcdecoder/avcdecoder.c            
-
-ifneq ($(strip $(ON2_SRCDIR)),)
-DIRLIST += vp6
-
-INCLUDES += -I$(ON2_SRCDIR)/include \
-            -I$(ON2_SRCDIR)/src     \
-            -I$(ON2_SRCDIR)/config/mac
-
-C_SOURCES += vp6/flvdemux.c    \
-             vp6/flvmetadata.c \
-             vp6/flvparser.c   \
-             vp6/vp6decoder.c
-
-CFLAGS += -DENABLE_ON2_DECODER
-endif
+            avcdecoder/avcdecoder.c
 
 OBJ_DIRS = $(addprefix $(OBJBASE_DIR)/,$(DIRLIST))
 OBJECTS  = $(patsubst %.c,$(OBJBASE_DIR)/%.o,$(C_SOURCES))
--- a/modules/javafx.media/src/main/native/gstreamer/projects/win/fxplugins/Makefile	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/gstreamer/projects/win/fxplugins/Makefile	Mon Nov 06 15:40:16 2017 -0800
@@ -31,7 +31,7 @@
 
 LDFLAGS = -out:$(shell cygpath -ma $(TARGET)) -nologo -incremental:no -libpath:$(shell cygpath -ma $(BUILD_DIR)) -dll $(SYSTEM_LIBS) \
           -nodefaultlib:libcmt -manifest -manifestfile:$(MANIFEST) -manifestuac:"level='asInvoker' uiAccess='false'" -implib:$(IMPLIB) \
-          -subsystem:windows -tlbid:1 -dynamicbase -nxcompat -errorreport:queue 
+          -subsystem:windows -tlbid:1 -dynamicbase -nxcompat -errorreport:queue
 
 OBJBASE_DIR = $(BUILD_DIR)/obj/plugins
 SRCBASE_DIR = ../../../plugins
@@ -101,7 +101,7 @@
     O1FLAGS = -O1
     O2FLAGS = -O2
 else # debug
-    LDFLAGS += -debug -pdb:$(PDB) 
+    LDFLAGS += -debug -pdb:$(PDB)
     CFLAGS += -D_DEBUG -Oy- -RTC1 -MDd -DENABLE_VISUAL_STUDIO_MEMORY_LEAKS_DETECTION -wd"4018" -wd"4244" -wd"4274" -Zi -Fd$(PDB)
     O1FLAGS = -Od
     O2FLAGS = -Od
@@ -114,23 +114,6 @@
     LDFLAGS += -MACHINE:x64
 endif
 
-ifneq ($(strip $(ON2_SRCDIR)),)
-DIRLIST += vp6
-
-INCLUDES += -I$(shell cygpath -ma "$(ON2_SRCDIR)/include") \
-            -I$(shell cygpath -ma "$(ON2_SRCDIR)/src") \
-            -I$(shell cygpath -ma "$(ON2_SRCDIR)/config/win")
-
-LDFLAGS += $(shell cygpath -ma "$(ON2_LIB)")
-
-C_SOURCES += vp6/flvdemux.c    \
-             vp6/flvmetadata.c \
-             vp6/flvparser.c   \
-             vp6/vp6decoder.c
-
-CFLAGS += -DENABLE_ON2_DECODER
-endif
-
 LIBS = $(addprefix $(BUILD_DIR)/,$(MODULES))
 
 export BASECLASSES_DIR
--- a/modules/javafx.media/src/main/native/jfxmedia/MediaManagement/MediaTypes.h	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/jfxmedia/MediaManagement/MediaTypes.h	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,9 +34,6 @@
 #define CONTENT_TYPE_MP3    "audio/mp3"
 #define CONTENT_TYPE_MPA    "audio/mpeg"
 #define CONTENT_TYPE_WAV    "audio/x-wav"
-#define CONTENT_TYPE_JFX    "video/x-javafx"
-#define CONTENT_TYPE_FLV    "video/x-flv"
-#define CONTENT_TYPE_FXM    "video/x-fxm"
 #define CONTENT_TYPE_MP4    "video/mp4"
 #define CONTENT_TYPE_M4A    "audio/x-m4a"
 #define CONTENT_TYPE_M4V    "video/x-m4v"
--- a/modules/javafx.media/src/main/native/jfxmedia/PipelineManagement/Track.h	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/jfxmedia/PipelineManagement/Track.h	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,6 @@
 
         // Video encodings
         H264,
-        VP6,                // On2 VP6
 
         // custom encoding
         CUSTOM
--- a/modules/javafx.media/src/main/native/jfxmedia/platform/gstreamer/GstAVPlaybackPipeline.cpp	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/jfxmedia/platform/gstreamer/GstAVPlaybackPipeline.cpp	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -739,12 +739,7 @@
 
         strMimeType = gst_structure_get_name(pStructure);
 
-        if (strMimeType.find("video/x-vp6-flash") != string::npos) {
-            encoding = CTrack::VP6;
-        } else if (strMimeType.find("video/x-vp6-alpha") != string::npos) {
-            encoding = CTrack::VP6;
-            hasAlpha = true;
-        } else if (strMimeType.find("video/x-h264") != string::npos) {
+        if (strMimeType.find("video/x-h264") != string::npos) {
             encoding = CTrack::H264;
         } else {
             encoding = CTrack::CUSTOM;
--- a/modules/javafx.media/src/main/native/jfxmedia/platform/gstreamer/GstPipelineFactory.cpp	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/jfxmedia/platform/gstreamer/GstPipelineFactory.cpp	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,9 +57,6 @@
     m_ContentTypes.push_back(CONTENT_TYPE_MP3);
     m_ContentTypes.push_back(CONTENT_TYPE_MPA);
     m_ContentTypes.push_back(CONTENT_TYPE_WAV);
-    m_ContentTypes.push_back(CONTENT_TYPE_JFX);
-    m_ContentTypes.push_back(CONTENT_TYPE_FLV);
-    m_ContentTypes.push_back(CONTENT_TYPE_FXM);
     m_ContentTypes.push_back(CONTENT_TYPE_MP4);
     m_ContentTypes.push_back(CONTENT_TYPE_M4A);
     m_ContentTypes.push_back(CONTENT_TYPE_M4V);
@@ -101,10 +98,7 @@
     //***** Initialize the return pipeline
     *ppPipeline = NULL;
 
-    if (CONTENT_TYPE_JFX == locator->GetContentType() ||
-        CONTENT_TYPE_FLV == locator->GetContentType() ||
-        CONTENT_TYPE_FXM == locator->GetContentType() ||
-        CONTENT_TYPE_MP4 == locator->GetContentType() ||
+    if (CONTENT_TYPE_MP4 == locator->GetContentType() ||
         CONTENT_TYPE_M4A == locator->GetContentType() ||
         CONTENT_TYPE_M4V == locator->GetContentType())
     {
@@ -115,14 +109,7 @@
             return ERROR_GSTREAMER_VIDEO_SINK_CREATE;
 #endif // !(ENABLE_APP_SINK && !ENABLE_NATIVE_SINK)
 
-        if (CONTENT_TYPE_JFX == locator->GetContentType() ||
-            CONTENT_TYPE_FLV == locator->GetContentType() ||
-            CONTENT_TYPE_FXM == locator->GetContentType())
-        {
-            uRetCode = CreateFLVPipeline(pSource, pVideoSink, (CPipelineOptions*) pOptions, ppPipeline);
-            if (ERROR_NONE != uRetCode)
-                return uRetCode;
-        } else if (CONTENT_TYPE_MP4 == locator->GetContentType() ||
+        if (CONTENT_TYPE_MP4 == locator->GetContentType() ||
                    CONTENT_TYPE_M4A == locator->GetContentType() ||
                    CONTENT_TYPE_M4V == locator->GetContentType())
         {
@@ -477,42 +464,6 @@
 }
 
 /**
-    *  GstElement* CreateFLVPipeline(GstElement* source, char* demux_factory,
-    *                              char* audiodec_factory, char* videodec_factory,
-    *                              GstElement* audiosink, GstElement* videosink)
-    *
-    *  @param  source              Pipeline source element; must not be NULL.
-    *  @param  demux_factory       Name of the demuxer factory.
-    *  @param  audiodec_factory    Name of the audio decoder factory.
-    *  @param  videodec_factory    Name of the video decoder factory.
-    *  @param  audiosink           The audio sink element; if NULL one will be created internally.
-    *  @param  videosink           The video sink element; if NULL one will be created internally.
-    *
-    *  @return An audio-visual playback pipeline for FLV playback.
-    */
-uint32_t CGstPipelineFactory::CreateFLVPipeline(GstElement* source, GstElement* pVideoSink,
-                                                CPipelineOptions* pOptions, CPipeline** ppPipeline)
-{
-#if TARGET_OS_WIN32
-    return CreateAVPipeline(source, "flvdemux", "dshowwrapper", false, "vp6decoder", pVideoSink,
-                            pOptions, ppPipeline);
-#elif TARGET_OS_MAC
-    return CreateAVPipeline(source, "flvdemux", "audioconverter", true, "vp6decoder", pVideoSink,
-                            pOptions, ppPipeline);
-#elif TARGET_OS_LINUX
-#if ENABLE_GST_FFMPEG
-    return CreateAVPipeline(source, "flvdemux", "ffdec_mp3", true,
-                            "ffdec_vp6f", pVideoSink, pOptions, ppPipeline);
-#else
-    return CreateAVPipeline(source, "flvdemux", "avaudiodecoder", false, "vp6decoder", pVideoSink,
-                            pOptions, ppPipeline);
-#endif // ENABLE_GST_FFMPEG
-#else
-    return ERROR_PLATFORM_UNSUPPORTED;
-#endif // TARGET_OS_WIN32
-}
-
-/**
     *  GstElement* CreateMP4Pipeline(GstElement* source, char* demux_factory,
     *                              char* audiodec_factory, char* videodec_factory,
     *                              GstElement* audiosink, GstElement* videosink)
--- a/modules/javafx.media/src/main/native/jfxmedia/platform/gstreamer/GstPipelineFactory.h	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/jfxmedia/platform/gstreamer/GstPipelineFactory.h	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,7 +56,6 @@
     GstCaps*    FrameTypeToCaps(CVideoFrame::FrameType format);
     void        NegotiatePixelFormat(GstElement* pVideoSink, CPipelineOptions* pOptions);
 
-    uint32_t    CreateFLVPipeline(GstElement* source, GstElement* videosink, CPipelineOptions* pOptions, CPipeline** ppPipeline);
     uint32_t    CreateMP4Pipeline(GstElement* source, GstElement* videosink, CPipelineOptions* pOptions, CPipeline** ppPipeline);
     uint32_t    CreateMp3AudioPipeline(GstElement* source, CPipelineOptions* pOptions, CPipeline** ppPipeline);
     uint32_t    CreateWavPcmAudioPipeline(GstElement* source, CPipelineOptions* pOptions, CPipeline **ppPipeline);
--- a/modules/javafx.media/src/main/native/jfxmedia/platform/ios/EventDispatcher.h	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/jfxmedia/platform/ios/EventDispatcher.h	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,8 +43,6 @@
 
     // Video encodings
     H264,
-    VP6,                // On2 VP6
-    VP8,
 
     // text encodings
     ANSITEXT,           // plain text (ANSI)
--- a/modules/javafx.media/src/main/native/vs_project/plugins/plugins.vcxproj	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/vs_project/plugins/plugins.vcxproj	Mon Nov 06 15:40:16 2017 -0800
@@ -41,21 +41,6 @@
     <ClCompile Include="..\..\gstreamer\plugins\progressbuffer\win32\filecache.c">
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WINDOWS;_USRDLL;ENABLE_PULL_MODE=1;HAVE_CONFIG_H=on2_codecs_config.h;ENABLE_SOURCE_SEEKING=1;GSTREAMER_LITE;GST_REMOVE_DEPRECATED;GST_REMOVE_DISABLED;GST_DISABLE_GST_DEBUG;GST_DISABLE_LOADSAVE;G_DISABLE_DEPRECATED;G_DISABLE_ASSERT;G_DISABLE_CHECKS;_WINDLL;_MBCS;INITGUID;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ClCompile Include="..\..\gstreamer\plugins\vp6\flvdemux.c">
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WINDOWS;_USRDLL;ENABLE_PULL_MODE=1;HAVE_CONFIG_H=on2_codecs_config.h;ENABLE_SOURCE_SEEKING=1;GSTREAMER_LITE;GST_REMOVE_DEPRECATED;GST_REMOVE_DISABLED;GST_DISABLE_GST_DEBUG;GST_DISABLE_LOADSAVE;G_DISABLE_DEPRECATED;G_DISABLE_ASSERT;G_DISABLE_CHECKS;_WINDLL;_MBCS;INITGUID;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ClCompile Include="..\..\gstreamer\plugins\vp6\flvmetadata.c">
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WINDOWS;_USRDLL;ENABLE_PULL_MODE=1;HAVE_CONFIG_H=on2_codecs_config.h;ENABLE_SOURCE_SEEKING=1;GSTREAMER_LITE;GST_REMOVE_DEPRECATED;GST_REMOVE_DISABLED;GST_DISABLE_GST_DEBUG;GST_DISABLE_LOADSAVE;G_DISABLE_DEPRECATED;G_DISABLE_ASSERT;G_DISABLE_CHECKS;_WINDLL;_MBCS;INITGUID;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ClCompile Include="..\..\gstreamer\plugins\vp6\flvparser.c">
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WINDOWS;_USRDLL;ENABLE_PULL_MODE=1;HAVE_CONFIG_H=on2_codecs_config.h;ENABLE_SOURCE_SEEKING=1;GSTREAMER_LITE;GST_REMOVE_DEPRECATED;GST_REMOVE_DISABLED;GST_DISABLE_GST_DEBUG;GST_DISABLE_LOADSAVE;G_DISABLE_DEPRECATED;G_DISABLE_ASSERT;G_DISABLE_CHECKS;_WINDLL;_MBCS;INITGUID;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ClCompile Include="..\..\gstreamer\plugins\vp6\fxmplugin.c">
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WINDOWS;_USRDLL;ENABLE_PULL_MODE=1;HAVE_CONFIG_H=on2_codecs_config.h;ENABLE_SOURCE_SEEKING=1;GSTREAMER_LITE;GST_REMOVE_DEPRECATED;GST_REMOVE_DISABLED;GST_DISABLE_GST_DEBUG;GST_DISABLE_LOADSAVE;G_DISABLE_DEPRECATED;G_DISABLE_ASSERT;G_DISABLE_CHECKS;_WINDLL;_MBCS;INITGUID;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ClCompile Include="..\..\gstreamer\plugins\vp6\vp6decoder.c">
-      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_WINDOWS;_USRDLL;ENABLE_PULL_MODE=1;HAVE_CONFIG_H=on2_codecs_config.h;ENABLE_SOURCE_SEEKING=1;GSTREAMER_LITE;GST_REMOVE_DEPRECATED;GST_REMOVE_DISABLED;GST_DISABLE_GST_DEBUG;GST_DISABLE_LOADSAVE;G_DISABLE_DEPRECATED;G_DISABLE_ASSERT;G_DISABLE_CHECKS;_WINDLL;_MBCS;INITGUID;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{87CF0F6E-87BD-4CB5-A6A1-841F81F17842}</ProjectGuid>
--- a/modules/javafx.media/src/main/native/vs_project/plugins/plugins.vcxproj.filters	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.media/src/main/native/vs_project/plugins/plugins.vcxproj.filters	Mon Nov 06 15:40:16 2017 -0800
@@ -10,9 +10,6 @@
     <Filter Include="dshowwrapper">
       <UniqueIdentifier>{56564e42-f8d2-4a48-8b90-8d65e262180a}</UniqueIdentifier>
     </Filter>
-    <Filter Include="vp6">
-      <UniqueIdentifier>{37cedb7f-c7ac-4904-931a-c9f1a3ada3ea}</UniqueIdentifier>
-    </Filter>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\gstreamer\plugins\javasource\javasource.c">
@@ -42,21 +39,6 @@
     <ClCompile Include="..\..\gstreamer\plugins\dshowwrapper\Src.cpp">
       <Filter>dshowwrapper</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\gstreamer\plugins\vp6\flvdemux.c">
-      <Filter>vp6</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\gstreamer\plugins\vp6\flvmetadata.c">
-      <Filter>vp6</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\gstreamer\plugins\vp6\flvparser.c">
-      <Filter>vp6</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\gstreamer\plugins\vp6\fxmplugin.c">
-      <Filter>vp6</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\gstreamer\plugins\vp6\vp6decoder.c">
-      <Filter>vp6</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\gstreamer\plugins\fxplugins.c" />
   </ItemGroup>
 </Project>
\ No newline at end of file
--- a/modules/javafx.web/src/main/java/com/sun/javafx/webkit/PasteboardImpl.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.web/src/main/java/com/sun/javafx/webkit/PasteboardImpl.java	Mon Nov 06 15:40:16 2017 -0800
@@ -73,11 +73,12 @@
         if (fxImage != null) {
             ClipboardContent content = new ClipboardContent();
             content.putImage(fxImage);
+            String fileExtension = wcImage.getFrame().getFileExtension();
             try {
-                File imageDump = File.createTempFile("jfx", ".png");
+                File imageDump = File.createTempFile("jfx", "." + fileExtension);
                 imageDump.deleteOnExit();
                 ImageIO.write(UIClientImpl.toBufferedImage(fxImage),
-                    "png",
+                    fileExtension,
                     imageDump);
                 content.putFiles(Arrays.asList(imageDump));
             } catch (IOException | SecurityException e) {
--- a/modules/javafx.web/src/main/java/com/sun/javafx/webkit/UIClientImpl.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.web/src/main/java/com/sun/javafx/webkit/UIClientImpl.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -349,9 +349,10 @@
             if (isImageSource) {
                 Object platformImage = image.getWidth() > 0 && image.getHeight() > 0 ?
                         image.getPlatformImage() : null;
+                String fileExtension = image.getFileExtension();
                 if (platformImage != null) {
                     try {
-                        File temp = File.createTempFile("jfx", ".png");
+                        File temp = File.createTempFile("jfx", "." + fileExtension);
                         temp.deleteOnExit();
                         ImageIO.write(
                             toBufferedImage(Toolkit.getImageAccessor().fromPlatformImage(
@@ -359,7 +360,7 @@
                                     platformImage
                                 )
                             )),
-                            "png",
+                            fileExtension,
                             temp);
                         content.put(DataFormat.FILES, Arrays.asList(temp));
                     } catch (IOException | SecurityException e) {
--- a/modules/javafx.web/src/main/java/com/sun/javafx/webkit/prism/WCImageDecoderImpl.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.web/src/main/java/com/sun/javafx/webkit/prism/WCImageDecoderImpl.java	Mon Nov 06 15:40:16 2017 -0800
@@ -59,6 +59,7 @@
     private PrismImage[] images;
     private volatile byte[] data;
     private volatile int dataSize = 0;
+    private String fileNameExtension;
 
     static {
         log = Logger.getLogger(WCImageDecoderImpl.class.getName());
@@ -82,8 +83,7 @@
     }
 
     @Override protected String getFilenameExtension() {
-        /// retrieve image format from reader
-        return ".img";
+        return "." + fileNameExtension;
     }
 
     private boolean imageSizeAvilable() {
@@ -210,6 +210,7 @@
             if (imageHeight < metadata.imageHeight) {
                 imageHeight = metadata.imageHeight;
             }
+            fileNameExtension = l.getFormatDescription().getExtensions().get(0);
         }
     };
 
@@ -226,8 +227,9 @@
     private static final class Frame extends WCImageFrame {
         private WCImage image;
 
-        private Frame(WCImage image) {
+        private Frame(WCImage image, String extension) {
             this.image = image;
+            this.image.setFileExtension(extension);
         }
 
         @Override public WCImage getFrame() {
@@ -275,7 +277,7 @@
                         hashCode(), idx, type));
             }
             PrismImage img = getPrismImage(idx, frame);
-            return new Frame(img);
+            return new Frame(img, fileNameExtension);
         }
         if (log.isLoggable(Level.FINE)) {
             log.fine(String.format("%X FAILED getFrame(%d)", hashCode(), idx));
--- a/modules/javafx.web/src/main/java/com/sun/webkit/graphics/WCImage.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.web/src/main/java/com/sun/webkit/graphics/WCImage.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,11 +29,20 @@
 
 public abstract class WCImage extends Ref {
     private WCRenderQueue rq;
+    private String fileExtension;
 
     public abstract int getWidth();
 
     public abstract int getHeight();
 
+    public String getFileExtension() {
+        return fileExtension;
+    }
+
+    public void setFileExtension(String fileExtension) {
+        this.fileExtension = fileExtension;
+    }
+
     public Object getPlatformImage() {return null;}
 
     protected abstract String toDataURL(String mimeType);
--- a/modules/javafx.web/src/main/native/Source/WebCore/bridge/jni/jsc/BridgeUtils.cpp	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.web/src/main/native/Source/WebCore/bridge/jni/jsc/BridgeUtils.cpp	Mon Nov 06 15:40:16 2017 -0800
@@ -271,6 +271,9 @@
                 ? static_cast<WebCore::DOMWindow*>(jlong_to_ptr(peer))->document()->frame()
                 : static_cast<WebCore::Node*>(jlong_to_ptr(peer))->document().frame();
 
+            if (!frame) {
+                return rootObject;
+            }
             rootObject = frame->script().createRootObject(frame).leakRef();
             if (rootObject) {
                 context = WebCore::getGlobalContext(&frame->script());
@@ -304,6 +307,10 @@
     JSObjectRef object;
     JSContextRef ctx;
     RefPtr<JSC::Bindings::RootObject> rootObject(checkJSPeer(peer, peer_type, object, ctx));
+    if (rootObject.get() == NULL) {
+        throwNullPointerException(env);
+        return NULL;
+    }
 
     return WebCore::executeScript(env, object, ctx, rootObject.get(), str);
 }
@@ -319,6 +326,10 @@
     JSContextRef ctx;
     RefPtr<JSC::Bindings::RootObject> rootObject(checkJSPeer(peer, peer_type, object, ctx));
 
+    if (rootObject.get() == NULL) {
+        throwNullPointerException(env);
+        return NULL;
+    }
     JSStringRef name = WebCore::asJSStringRef(env, str);
     JSValueRef value = JSObjectGetProperty(ctx, object, name, NULL);
     JSStringRelease(name);
@@ -335,7 +346,10 @@
     JSObjectRef object;
     JSContextRef ctx;
     RefPtr<JSC::Bindings::RootObject> rootObject(checkJSPeer(peer, peer_type, object, ctx));
-
+    if (rootObject.get() == NULL) {
+        throwNullPointerException(env);
+        return;
+    }
     JSStringRef name = WebCore::asJSStringRef(env, str);
     JSValueRef jsvalue = WebCore::Java_Object_to_JSValue(env, ctx, rootObject.get(), value, accessControlContext);
     JSPropertyAttributes attributes = 0;
@@ -355,7 +369,10 @@
     }
     JSObjectRef object;
     JSContextRef ctx;
-    checkJSPeer(peer, peer_type, object, ctx);
+    if (checkJSPeer(peer, peer_type, object, ctx) == NULL) {
+        throwNullPointerException(env);
+        return;
+    }
 
     JSStringRef name = WebCore::asJSStringRef(env, str);
     JSObjectDeleteProperty(ctx, object, name, NULL);
@@ -368,6 +385,10 @@
     JSObjectRef object;
     JSContextRef ctx;
     RefPtr<JSC::Bindings::RootObject> rootObject(checkJSPeer(peer, peer_type, object, ctx));
+    if (rootObject.get() == NULL) {
+        throwNullPointerException(env);
+        return NULL;
+    }
 
     JSValueRef value = JSObjectGetPropertyAtIndex(ctx, object, index, NULL);
     return WebCore::JSValue_to_Java_Object(value, env, ctx, rootObject.get());
@@ -379,6 +400,10 @@
     JSObjectRef object;
     JSContextRef ctx;
     RefPtr<JSC::Bindings::RootObject> rootObject(checkJSPeer(peer, peer_type, object, ctx));
+    if (rootObject.get() == NULL) {
+        throwNullPointerException(env);
+        return;
+    }
 
     JSValueRef jsvalue = WebCore::Java_Object_to_JSValue(env, ctx, rootObject.get(), value, accessControlContext);
     JSObjectSetPropertyAtIndex(ctx, object, (unsigned) index, jsvalue, NULL);
@@ -389,7 +414,9 @@
 {
     JSObjectRef object;
     JSContextRef ctx;
-    checkJSPeer(peer, peer_type, object, ctx);
+    if (checkJSPeer(peer, peer_type, object, ctx) == NULL) {
+        return nullptr;
+    }
 
     JSC::ExecState* exec = toJS(ctx);
     JSC::JSLockHolder lock(exec);
@@ -408,7 +435,7 @@
     JSObjectRef object;
     JSContextRef ctx;
     RefPtr<JSC::Bindings::RootObject> rootObject(checkJSPeer(peer, peer_type, object, ctx));
-    if (!rootObject || !ctx) {
+    if (!rootObject || !rootObject.get() || !ctx) {
         env->ThrowNew(getJSExceptionClass(env), "Invalid function reference");
         return NULL;
     }
@@ -445,7 +472,7 @@
     JSObjectRef object;
     JSContextRef ctx;
     RefPtr<JSC::Bindings::RootObject> rootObject(checkJSPeer(peer, peer_type, object, ctx));
-    if (!rootObject || !peer || !ctx) {
+    if (!rootObject || !rootObject.get() || !peer || !ctx) {
         return;
     }
 
--- a/modules/javafx.web/src/test/java/test/javafx/scene/web/JavaScriptBridgeTest.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/modules/javafx.web/src/test/java/test/javafx/scene/web/JavaScriptBridgeTest.java	Mon Nov 06 15:40:16 2017 -0800
@@ -683,4 +683,62 @@
             executeShouldFail(web, "sb['append(char[],,int)'](1, 2)");
         });
     }
+
+    // JDK-8187568
+    @Test(expected=NullPointerException.class)
+    public void testcheckJSPeerTostring() {
+        final JSObject doc = (JSObject) executeScript("document");
+        loadContent("<h1></h1>");
+        submit(() -> {
+            getEngine().executeScript(doc.toString());
+        });
+    }
+
+    // JDK-8187568
+    @Test(expected=NullPointerException.class)
+    public void testcheckJSPeerGetMember() {
+        final JSObject doc = (JSObject) executeScript("document");
+        submit(() -> {
+            doc.setMember("beforeload", "oldmember");
+        });
+
+        loadContent("<h1></h1>");
+        submit(() -> {
+            doc.getMember("beforeload");
+        });
+    }
+
+    // JDK-8187568
+    @Test(expected=NullPointerException.class)
+    public void testcheckJSPeerSetMember() {
+        final JSObject doc = (JSObject) executeScript("document");
+        loadContent("<h1></h1>");
+        submit(() -> {
+            doc.setMember("newMember", "newvalue");
+        });
+    }
+
+    // JDK-8187568
+    @Test(expected=NullPointerException.class)
+    public void testcheckJSPeerRemoveMember() {
+        final JSObject doc = (JSObject) executeScript("document");
+        submit(() -> {
+            doc.setMember("oldMember", "oldmember");
+        });
+        loadContent("<h1></h1>");
+        submit(() -> {
+            doc.removeMember("oldMember");
+        });
+    }
+
+    // JDK-8187568
+    @Test(expected=NullPointerException.class)
+    public void testcheckJSPeerEval() {
+        final JSObject doc = (JSObject) executeScript("document");
+        executeScript("var x = 10;");
+        loadContent("<h1></h1>");
+        submit(() -> {
+            doc.eval("x");
+        });
+    }
 }
--- a/tests/system/src/test/java/test/com/sun/javafx/application/HostServicesTest.java	Thu Nov 02 15:33:43 2017 -0700
+++ b/tests/system/src/test/java/test/com/sun/javafx/application/HostServicesTest.java	Mon Nov 06 15:40:16 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 package test.com.sun.javafx.application;
 
-import com.sun.javafx.PlatformUtil;
+import java.lang.reflect.Method;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import javafx.application.Application;
@@ -113,6 +113,13 @@
     public void testWebContext() {
         final HostServices hs = myApp.getHostServices();
         assertNotNull(hs);
-        assertNull(hs.getWebContext());
+
+        boolean nsme = false;
+        try {
+            Method m_getWebContext = HostServices.class.getMethod("getWebContext");
+        } catch (NoSuchMethodException ex) {
+            nsme = true;
+        }
+        assertTrue("Did not get the expected NoSuchMethodException", nsme);
     }
 }