I have null instead of Buffer everytime when I try to grab a frame via a FrameGrabbingControl.. When I try to make a snapshot in JMSStudio from a 3gp via FOBS (it plays 3gp very well) I have below message:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at JMStudio.doSnapShot(JMStudio.java:1142)
at JMStudio.actionPerformed(JMStudio.java:385)
at java.awt.MenuItem.processActionEvent(Unknown Source)
at java.awt.MenuItem.processEvent(Unknown Source)
at java.awt.MenuComponent.dispatchEventImpl(Unknown Source)
at java.awt.MenuComponent.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
my code for frame grabbing below
public BufferedImage getFrameAsImage(int _frameNumber)
{
int i_frameFounded = p_FramePositionControl.seek(_frameNumber);
if (i_frameFounded!=_frameNumber) throw new IllegalArgumentException("Can't find frame "+_frameNumber);
I have null instead of Buffer everytime when I try to grab a frame via a FrameGrabbingControl.. When I try to make a snapshot in JMSStudio from a 3gp via FOBS (it plays 3gp very well) I have below message:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at JMStudio.doSnapShot(JMStudio.java:1142)
at JMStudio.actionPerformed(JMStudio.java:385)
at java.awt.MenuItem.processActionEvent(Unknown Source)
at java.awt.MenuItem.processEvent(Unknown Source)
at java.awt.MenuComponent.dispatchEventImpl(Unknown Source)
at java.awt.MenuComponent.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
my code for frame grabbing below
public BufferedImage getFrameAsImage(int _frameNumber)
{
int i_frameFounded = p_FramePositionControl.seek(_frameNumber);
if (i_frameFounded!=_frameNumber) throw new IllegalArgumentException("Can't find frame "+_frameNumber);
Buffer p_buffer = p_FrameGrabbingControl.grabFrame();
Image p_img = p_Buff2Image.createImage(p_buffer);
Dimension p_dim = getVideoSize();
BufferedImage p_bimg = new BufferedImage(p_dim.width,p_dim.height,BufferedImage.TYPE_INT_ARGB);
Graphics p_g = p_bimg.getGraphics();
p_g.drawImage(p_img, 0, 0, null);
p_g.dispose();
return p_bimg;
}