×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    10

    Drawing on video canvas

    hi

    the next simple code play a video

    Player player = Manager.createPlayer(_url);
    player.realize();
    player.prefetch();

    VideoControl vc = (VideoControl)player.getControl("VideoControl");

    if (vc != null){
    vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO , canvas);
    vc.setDisplayLocation(0,0);
    vc.setDisplaySize(100,100);
    vc.setVisible(true);
    }
    player.start();


    I want to draw on top of the video, can some amend the code in a way that when drawing on canvas it will be on top the video.

    I saw in other threads here that OverlayControl can do the trick somehow.if I am not mistaken OverlayControl is relevant for imageeffect and not video.
    Can someone assist?
    I am using n95

    Tamir

  2. #2
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: Drawing on video canvas

    Unfortunately drawing on top of the video is not possible on (all) devices. It might be possible to do that on some devices but at least on Nokia devices not.

    Hartti

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    10

    Re: Drawing on video canvas

    hi Hartti

    Can you give me code example for devices that can draw on top of video canvas.


    Tamir

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Drawing on video canvas

    Hi Tamir,

    you can start taking a look at OverlayControl JavaDocs, since they contain useful infos (and some code) to start understanding how to use it to draw on top of videos:

    http://www.forum.nokia.com/ME_Develo...ayControl.html

    Note that, as told by hartti, it's currently not supported on Nokia devices.

    Pit

  5. #5
    Registered User
    Join Date
    Jun 2008
    Posts
    10

    Re: Drawing on video canvas

    Hi

    What about something like extending the Player class and somehow intercating with the function that does the drawing on the Graphics object.

    Is this very complex to implement on nokia jvm

    Tamir

  6. #6
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: Drawing on video canvas

    Potential solutions:
    1) Use Symbian C++ (Python/PyS60 might also do the trick, I do not know)
    2) get snapshots in a row, draw those on the screen and draw on top of those images (you will not achieve great frame rate though)
    3) change your application logic/behavior so that you do not have to draw on top of the video

    The workaround you are suggesting does not work, as you do not have low-level access to the players.

    Hartti

  7. #7
    Registered User
    Join Date
    Jun 2008
    Posts
    10

    Re: Drawing on video canvas

    hi

    I saw that the limitation is also true when Player is playing animated GIF.

    Is there any workaround for this issue?
    Is the any way to draw on top of animated gif?


    Tamir

  8. #8
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Drawing on video canvas

    Well, not a solution (since the answers above are still valid, even for GIFs when used within a Player), but a workaround:

    you could export the single frames of your gif, and reproduce its animation with Java code (so, with single Graphics drawImage() method calls). Done that, you'll be able to draw over that what you prefer, since you'll not be using Player objects anymore.
    I know it's not an easy approach, but for some tasks it could be suitable..

    Hope it helps,
    Pit

Similar Threads

  1. Drawing on top of video playback
    By cmccauley3353 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-05-01, 03:12
  2. Play video on Canvas with N 6600 doesnt work. Please help!!!
    By Robert111 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-02-22, 08:45
  3. Drawing image on Video Control
    By satish_kore in forum Mobile Java General
    Replies: 0
    Last Post: 2005-07-17, 13:01
  4. Major problem with delegation to Canvas
    By bartekn in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2003-10-08, 17:46

Posting Permissions

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