JavaFX 2.0 :: MediaPlayer Error - Media Invalid
Jul 11, 2014
I am having a problem with the JavaFX MediaPlayer playing videos with resolutions greater than 1920x1080px. For testing purpose I downloaded the example from [URL] ... and added the following error-handling:
mediaPlayer.setOnError(new Runnable) {
@Override
public void run() {
System.out.println(mediaPlayer.getError.getMessage());
System.out.println(mediaPlayer.getError.getType());
}
});
When playing a video with a resolution of 1920x1168px, the window became black and I get this console output:
[com.sun.media.jfxmediaimpl.platform.gstreamer.GSTMediaPlayer@5482fb8f] ERROR_MEDIA_INVALID: ERROR_MEDIA_INVALIDUNKNOWN
The video is encoded with h264 and aac (for audio) and is having a resolution of 1920x1168px. The error occurs with each video with a resolution greater than 1920x1080px. Vidoes with a resolution of 1920x1080px or smalle are working fine. The playback of all videos is working with VLC-Player. I tried Java 7_51 and Java 8_5.
View Replies
ADVERTISEMENT
Dec 5, 2014
I am currently making a video player which allows users to open/play videos which are stored on their computer. I am using JavaFX for this.My problem, is that sometimes when I click the button to load a video, a java.util.ConcurrentModificationException is raised. Other times, it's perfectly fine.I put the calls to .loadAndPlayMediaA() and .prepareMedia() (see below) inside a .runLater(Runnable) to try to prevent this, but it has not worked. My Code (below) is called by a listener on a button, "testButton". I have a class called JfxMediaPlayer which holds the method loadAndPlayMediaA(), and a class called MixingDeck which holds the method prepareMedia()
testButton.setOnAction(new EventHandler<ActionEvent>(){
@Override
public void handle(ActionEvent arg0) {
Platform.runLater(new Runnable(){
@Override
[code]....
View Replies
View Related
Jan 21, 2015
I am working on a UI in JavaFX and create several instances of a custom control class. The control consists of a Pane which wraps several other containers, one of which contains a Circle shape.
At one point, I instance this control and access the Circle shape directly. I transform it's center coordinates (which are always {0.0, 0.0} ) to Scene coordinates. The problem is, the transformation always yields coordinates that correspond to the upper left corner of the control's root pane.
In other words, it's as if the Circle is positioned at the upper left corner of the custom control (when, in fact, it's positioned near the lower right corner).
I have other instanced controls already in the scene, and they do not have this issue - converting the Circle's coordinates to scene coordinates works as it should.
It seems obvious that I'm accessing the Circle too soon - that perhaps the scene graph hasn't been fully traversed for the control and the Circle's position within the control's hierarchy hasn't been updated. I've verified that my attempt to access the Circle's center coordinates occurs after the control's initialize() method is executed, so how to ensure the control's scene graph has been fully updated before I try to manipulate the control...
View Replies
View Related
Apr 26, 2014
While doing trial and error got caught in the below scenario.
public class Crypt {
public static void main (String args[])
{
/*all I want is calculate a binary number (ex -: 22 , 34) using decimal base (10n).
*So, I have to convert 2 p into 10n form so I have to find n in terms of p . We have x as the input.
* The formula works as below.
*2p =10n
*p ln (2) =n ln (10)
*n = p [ln(2) / ln(10)]
*2 p = 10 p [ln(2) / ln(10)]
[Code] ....
View Replies
View Related
Aug 27, 2014
So today i was trying to compile a simple script that used to work before on Sublime Text 2, an i got the following error;
javac: invalid flag:
Usage: javac <options> <source files>
use -help for a list of possible options
I already know the script works because i didn't change anything since the last time it work, but anyways just in case i tried running a HelloWorld program just to check it out and i got the same error. The i stop trying to compiling the HelloWorld on Sublime so I went to Terminal and i got the same exact error.
View Replies
View Related
Apr 27, 2015
I get this error when I load a HTML page with WebEngine. The HTML is getting generated by an own (Java-)ServerSocket. How can I figure out where the problem is? I can load the HTML file successfully when loading the(same) generated HTML file from the local filesystem. Maybe the http headers causing these problems ? On the other hand I can load the page without problems in Firefox. How to get more information ?
View Replies
View Related
Sep 1, 2014
I have uninstalled JAVA because I needed to download the 64-bit version but no matter WHAT I do I still get the same installation error message "keyset as registered in invalid" and I was downloading it from [URL] .... I will do whatever it takes to fix this!
View Replies
View Related
Sep 25, 2014
I am currently working on modules of a java program but am having issues with this module . it gives this error code"syntax error on token '?', invalid primitive type".
This is my code:
import java.awt.*;
import java.awt.event.*;
import java.io.PrintStream;
import java.rmi.Naming;
import java.util.StringTokenizer;
[Code] .....
View Replies
View Related
Apr 5, 2015
Getting the following error at line 13.
Multiple markers at this line - void is an invalid type for the variable loadDictionaryFromFile - Syntax error on token ")", ; expected - Syntax error on token "(", ; expected
Line 13 starts public void load....
Code:
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class PirateTranslator
{
public static void main(String[] args)
[Code] .....
View Replies
View Related
Jun 25, 2014
I am new to Java and trying to learn it.I wrote the following program but while creating the method nav i am getting errors.
Error:- void is an invalid type for the variable nav
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
import java.util.*;
public class YahooHomepage {
private static WebDriver driver;
[Code] .....
View Replies
View Related
Jul 10, 2014
I am trying to encrypt a message using RSA algo but getting the following error:
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectI nputStream.java:753)
at java.io.ObjectInputStream.<init>(ObjectInputStream .java:268)
Java Code :
public static final String PUBLIC_KEY_FILE = "C:/TXT.key";
final String originalText = "Text to be encrypted ";
ObjectInputStream inputStream = null;
FileInputStream f= new FileInputStream(PUBLIC_KEY_FILE);
// getting error on the below line
inputStream = new ObjectInputStream(f);
final PublicKey publicKey = (PublicKey) inputStream.readObject();
final byte[] cipherText = encrypt(originalText, publicKey);
View Replies
View Related
Feb 24, 2014
I am using the Netbeans IDE for Java creations. What are the steps of creating a media player using Java thru Netbeans as i don't understand most of the jargon and the forms,classes,etc.I don't want to use JavaFx but plain Java Application.I am coming from a Delphi pascal background.
View Replies
View Related
Feb 22, 2015
my program is working for mp3 files but for video file it shows error "player not found".i wanna know that how it is possible if my JMFStudio is able to play videos directly
View Replies
View Related
Feb 24, 2014
i want to design a media player but my program can't play any song it is showing me error "Uncompilable source code - cannot find symbol
symbol: class MediaPanel
location: class media.Media
at media.Media.main(Media.java:28)"
This is my code.
package media;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import javax.swing.JFileChooser;
[Code] .....
I got the code from [URL] .....
View Replies
View Related
May 6, 2015
I have an app that is randomly hanging it doesn't give any error information when it hangs.
Is there at way to see what's going on when it hangs? e.g. the methods that are being called, where is the program execution at..
View Replies
View Related
Jun 12, 2015
I'd like to draw an overlay on an image. The overlay is also an image with a black background and a white foreground. Now the white pixels should be drawn on the image in red. This is possible with the code I posted below. However, the problem arises when rotating the stencil (overlay). I get some interpolation errors from the rotation on the boundaries. I tried to clip them with setClip(), but this turns the background from transparent to white. How to remove those spots? Or maybe a completely other idea of achieving an overlay on the image? I'm aware of the pixelreader and iterating through the stencils pixels and draw the respective pixels as rectangles on a Canvas' graphicContext. However, this was extremely slow, compared to the code I posted below (although it doesn't work with rotations).
Here I surrounded the errors:
The image:
The stencil:
And here is the code:
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.*;
import javafx.scene.effect.BlendMode;
import javafx.scene.image.*;
import javafx.scene.layout.HBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
[Code] .....
View Replies
View Related
May 6, 2014
My project in eclipse..I get the error below when I run MyTagUser.jsp -
HTTP Status 500 - /jsp/MyTagUser.jsp(14,0) Attribute subTitle invalid for tag Header according to TLD
org.apache.jasper.JasperException: /jsp/MyTagUser.jsp(14,0) Attribute subTitle
invalid for tag Header according to TLD
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)...et
[code]...
View Replies
View Related
May 1, 2015
I need to reject invalid input and what is best possible way to do so with the given codes:
Class:
import java.awt.Color;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
[Code] .....
View Replies
View Related
May 12, 2014
I was trying to set scripting-invalid true , but even after setting it to true I am able to use scripting. This is the web.xml under WEB-INF
<web-app>
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<scripting-invalid>
true
</scripting-invalid>
</jsp-property-group>
</jsp-config>
</web-app>
And This is the jsp page
<html>
<body>
<!-- Here I am going to use scripting like scriptlet,expression and other element like jsp declaration element -->
<%!int i=0;%>
<%System.out.println("Scriptlet");%>
<%=new String("Expression")%>
</body>
</html>
Why its not working ?
View Replies
View Related
Feb 26, 2015
import java.util.HashSet;
import java.util.ArrayList;
public class Graph
{
double [] [] adj;
graph (double [] [] a)
{
adj= new double [a.length][a.length];
for (int i=0;i<a.length;i++)
for (int j=0;j<a.length;j++)
adj[i][j]=a[i][j];
}
C:UserscDesktopGraph.java:: error: invalid method declaration; return type required
graph (double [] [] a)
View Replies
View Related
Apr 8, 2014
Well I fixed my invalid path problem
Now it is telling me that my file is not found and it is exactly where I put it and told JCreator to look for it.
this is what I get:
javac: file not found: C:Program FilesJavajdk1.8.0docsMyName.java
when I go manually to the address, it is there but for some reason Jcreator cannot find it.
View Replies
View Related
Apr 12, 2004
My code runs correctly when i run the clients one after another without using threads.I am getting this following error when i run my multi-threaded server. When a server accepts a client connection, ClientHandler is the thread that handles that client.Exception in thread "main"
java.io.StreamCorruptedException: invalid stream header at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253) at comm.DOMTransfer.<init>(DOMTransfer.java:25) at ClientHandler.<init>(ClientHandler.java:18) at GridInfo.main(GridInfo.java:34)This is where the error occurs:input = new ObjectInputStream(socket.getInputStream());
View Replies
View Related
Dec 7, 2014
import java.io.*;
public class MagicSquare
{
public static void main(String[]args)throws IOException
{
BufferedReader in=new BufferedReader (new InputStreamReader(System.in));
System.out.print("Enter a Magic Number: ");
int number=Integer.parseInt(in.readLine());
[Code] ....
//where should i enter a even number that will be outputted "invalid"
//and it only should accept odd numbers
View Replies
View Related
Apr 22, 2015
I'm trying to establish an SSL connection (using a self-signed certificate). However, I can't seem to get the handshake to work. At the moment server side, I've created the public/private key + signed certificate and then stored them in a KeyStore. I've also stored this signed certificate in a KeyStore (trustStore) client side, so it can compare.
Keys: RSA, Certificate Sig: SHA256withRSA, cipherSuite: TLS_RSA_WITH_AES_128_CBC_SHA
Client Code
// 34393570706261
SSLContext context = SSLContext.getInstance("TLS");
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
tmf.init(client_trustStore);
context.init(null, tmf.getTrustManagers(), new SecureRandom());
SSLSocketFactory socketFactory = context.getSocketFactory();
conn = (SSLSocket) socketFactory.createSocket("localhost", port);
String[] suites = new String[]{"TLS_RSA_WITH_AES_128_CBC_SHA"};
conn.setEnabledCipherSuites(suites);
[Code] ....
Errors
Quote
javax.net.ssl.SSLHandshakeException: Invalid Padding length: (number)
WARNING: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
WARNING: javax.net.ssl.SSLException: Connection has been shutdown:
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
View Replies
View Related
May 5, 2014
import java.util.Scanner;
public class Magic
{
public static void main ( String args[] )
{
Scanner in = new Scanner (System.in);
int[][] square = new int [4][4];
int sqlength = square.length;
int magicValue = sqlength * (sqlength * sqlength + 1) / 2;
[Code] ....
Here is what the output should look like.
Please enter the 4 values for row 0, separated by spaces: 1 2 3 4
Please enter the 4 values for row 1, separated by spaces: 5 6 7 8
Please enter the 4 values for row 2, separated by spaces: 9 10 11 12
Please enter the 4 values for row 3, separated by spaces: 13 14 15 16
Checking square for problems:
DIAG: VALID
ROWS: 0 1 2 3
COLS: 0 1 2 3
RANG: VALID
MAGIC: NO
Using my program it prints
DIAG: VALID
RANG: VALID
MAGIC: NO
View Replies
View Related
Sep 30, 2014
I have now slowly moving on the learning Database Connectivity.Found a simple example on one site and tried to execute it, Creating a database, connecting to it and displaying the output.
I am getting trouble with recordset in displaying all the records in the badabase. It displays the very first record correctly but if I try to enclose it in while(rs.next()) loop, it generates an error message saying "Invalid operation at current cursor position".
package database_console;
import java.sql.Statement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.ResultSet;
[code]....
View Replies
View Related