×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    88

    Fullscreen recording and playing

    Hi people,

    I have a strange problem on record and display a fullscreen video.

    Actually, i manage to record the video on fullscreen mode, this is the code:

    -------------------------------------------------------------------------------------
    player = Manager.createPlayer("capture://video");
    player.realize();
    record = (RecordControl)player.getControl("RecordControl");
    record.setRecordSizeLimit(300000);
    conn = (FileConnection)Connector.open(videoPath,Connector.READ_WRITE);
    if(!conn.exists()) conn.create();
    stream = conn.openOutputStream();
    record.setRecordStream(stream);
    control = (VideoControl)player.getControl("VideoControl");
    if (control != null)
    {
    control.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this);
    control.setDisplayLocation(0,0);
    control.setDisplaySize(getWidth(), getHeight());
    //control.setDisplayFullScreen(true);
    control.setVisible(true);
    }
    player.start();
    record.startRecord();
    -------------------------------------------------------------------------------------

    My problem is to display the video which I have recorded in fullscreen mode, this is the code:

    --------------------------------------------------------------------------------------
    player = Manager.createPlayer(videoPath);
    player.realize();
    control = (VideoControl)player.getControl("VideoControl");
    if (control != null)
    {
    control.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this);
    control.setDisplayLocation(0,0);
    control.setDisplaySize(getWidth(), getHeight());
    //control.setDisplayFullScreen(true);
    control.setVisible(true);
    }
    player.prefetch();
    player.start();
    ----------------------------------------------------------------------------------------

    I have also tryied to use the "control.setDisplayFullScreen(true);" method, but it is not working...

    could you please explaining me the reason of that? is it possible to have a fullscreeen video????

    I am using nokia e66 and n96 for this application.

    Thanks in advance,
    Antonio

  2. #2
    Registered User
    Join Date
    Apr 2011
    Location
    Ha Noi, Viet Nam
    Posts
    5

    Re: Fullscreen recording and playing

    Quote Originally Posted by antonio5982 View Post
    Hi people,

    I have a strange problem on record and display a fullscreen video.

    Actually, i manage to record the video on fullscreen mode, this is the code:

    -------------------------------------------------------------------------------------
    player = Manager.createPlayer("capture://video");
    player.realize();
    record = (RecordControl)player.getControl("RecordControl");
    record.setRecordSizeLimit(300000);
    conn = (FileConnection)Connector.open(videoPath,Connector.READ_WRITE);
    if(!conn.exists()) conn.create();
    stream = conn.openOutputStream();
    record.setRecordStream(stream);
    control = (VideoControl)player.getControl("VideoControl");
    if (control != null)
    {
    control.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this);
    control.setDisplayLocation(0,0);
    control.setDisplaySize(getWidth(), getHeight());
    //control.setDisplayFullScreen(true);
    control.setVisible(true);
    }
    player.start();
    record.startRecord();
    -------------------------------------------------------------------------------------

    My problem is to display the video which I have recorded in fullscreen mode, this is the code:

    --------------------------------------------------------------------------------------
    player = Manager.createPlayer(videoPath);
    player.realize();
    control = (VideoControl)player.getControl("VideoControl");
    if (control != null)
    {
    control.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this);
    control.setDisplayLocation(0,0);
    control.setDisplaySize(getWidth(), getHeight());
    //control.setDisplayFullScreen(true);
    control.setVisible(true);
    }
    player.prefetch();
    player.start();
    ----------------------------------------------------------------------------------------

    I have also tryied to use the "control.setDisplayFullScreen(true);" method, but it is not working...

    could you please explaining me the reason of that? is it possible to have a fullscreeen video????

    I am using nokia e66 and n96 for this application.

    Thanks in advance,
    Antonio
    i m trying a VideoRecoder code but it returns null. i don't know why? if you have answering, please to help me.
    when I run this code it notifies an error: "java.lang.NullPointException : 0"
    this is code :
    public void startRecording() {
    videoPath = PATH + getFileName();
    System.err.println(videoPath);
    try {
    player = Manager.createPlayer("capture://video");
    player.addPlayerListener(this);
    player.realize();

    //setup recording
    record = (RecordControl)player.getControl("RecordControl");
    record.setRecordSizeLimit(300000);
    conn = (FileConnection)Connector.open(videoPath,Connector.READ_WRITE);
    if(!conn.exists()) conn.create();
    stream = conn.openOutputStream();
    record.setRecordStream(stream);

    // Grab the video control and set it to the current display.
    control = (VideoControl)player.getControl("VideoControl");
    if (control != null) {
    control.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this);
    control.setDisplaySize(getWidth(),getHeight());
    control.setVisible(true);
    }

    player.start();
    record.startRecord();
    }
    catch(Exception e) {
    Alert erro = new Alert("Erro",e.toString(),null,AlertType.ERROR);
    Display.getDisplay(midlet).setCurrent(erro);
    e.printStackTrace();
    }
    }

    thanks
    anna nguyen

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Fullscreen recording and playing

    Quote Originally Posted by babylike89 View Post
    i m trying a VideoRecoder code but it returns null. i don't know why? if you have answering, please to help me.
    when I run this code it notifies an error: "java.lang.NullPointException : 0"

    anna nguyen
    You should try to debug the code at your end, try to find out what went wrong while running the code, try to print the values of the record, the RecordControl.
    Also let us know that whether you are testing the app on the real device or the emulator?
    use System.out.println() to test quickly where the control was stopped.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. problem while recording and playing audia simultaneously
    By srivvivek in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2008-07-09, 15:02
  2. simultaneous recording and playing
    By majid.asgari in forum Mobile Java General
    Replies: 3
    Last Post: 2007-10-17, 10:13
  3. Playing and Recording on Line
    By sunilw in forum Symbian
    Replies: 2
    Last Post: 2007-05-23, 14:56
  4. Sound recording and playing
    By sasa in forum Symbian
    Replies: 0
    Last Post: 2004-10-12, 13:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×