×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    17

    Unhappy realize error on video streaming client

    Hi, i am using S60 3rd Edition FP1 sdk. I want to develop a streaming client in Java (midlet) that can play videos (3gpp and MP4) using rtsp protocol. For that i have setup Drawin Streaming Server as well and it is working fine ( i checked it with QuickTime Player, VLC player and Real Time player in emulator). Here is my code:

    public void start() {
    try {

    player = Manager.createPlayer(url);
    player.addPlayerListener(this);

    if (player.getState() == player.UNREALIZED) {
    player.realize();
    // 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(176, 144);
    int width = control.getSourceWidth();
    int height = control.getSourceHeight();
    status2 = "Before: SW=" + width + "-SH=" + height + "-DW=" + control.getDisplayWidth() + "-DH=" + control.getDisplayHeight();
    }

    if (player.getState() == player.REALIZED) {
    player.start();
    }
    } catch (IOException e) {
    Alert erro = new Alert("IO Exception :", e.getMessage(), null, AlertType.ERROR);
    Display.getDisplay(midlet).setCurrent(erro);
    } catch (MediaException me) {
    Alert erro = new Alert("Media Exception :", me.getMessage(), null, AlertType.ERROR);
    Display.getDisplay(midlet).setCurrent(erro);
    } catch (SecurityException se) {
    Alert erro = new Alert("Security Exception :", se.getMessage(), null, AlertType.ERROR);
    Display.getDisplay(midlet).setCurrent(erro);
    } catch (Exception e) {
    Alert erro = new Alert("Erro", e.getMessage(), null, AlertType.ERROR);
    Display.getDisplay(midlet).setCurrent(erro);
    }
    }

    ----------------------------------
    if (mCanvas == null)
    {
    mCanvas = new VideoCanvas(this, "rtsp://localhost:554/sample_50kbit.3gp");

    }
    Display display = Display.getDisplay(this);
    //display.setCurrent(form);

    display.setCurrent(mCanvas);

    Now, whenever i run this midlet it is giving me Exception of "realize error -7002". Note: I am also self signing the midlet.
    Please help anyone.

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: realize error on video streaming client

    From the release notes of that SDK


    JSR 135: Mobile Media API

    -------------------------

    - Problems may occur when developing Java applications which use

    multimedia, e.g. problems when creating sound loops or controlling tune

    timing in mobile Java games or when playing video streaming over rtsp

    protocol by mobile Java.



    Workarounds:

    - use S60 device hardware (S60 3rd Edition Feature Pack 1) for testing

    - use S60 3rd Edition SDK for Symbian OS, for MIDP
    Hartti

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    17

    Re: realize error on video streaming client

    Hartti, this means if i want to test my streaming on emulator , i have to install S60 3rdEdition SDK ? I don't understand this, as i am using S60 3rd Edition Feature Pack 1 sdk.

  4. #4
    Registered User
    Join Date
    Apr 2008
    Posts
    17

    Re: realize error on video streaming client

    can anyone help me with it? i want to test my streaming on emulator

  5. #5
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    51

    Re: realize error on video streaming client

    Quote Originally Posted by hypatia View Post
    if (mCanvas == null)
    {
    mCanvas = new VideoCanvas(this, "rtsp://localhost:554/sample_50kbit.3gp");

    }
    Display display = Display.getDisplay(this);
    //display.setCurrent(form);

    display.setCurrent(mCanvas);

    Now, whenever i run this midlet it is giving me Exception of "realize error -7002". Note: I am also self signing the midlet.
    Please help anyone.
    maybe u should know,
    that j2me can not support RTSP/RTP protocol yet.
    u should make ur own code to send/receive RTSP message to server and parse payload from RTP packet to play that to ur video player. RTSP is run under TCP connection and RTP is under UDP connection, so u can use datagram and socket connection

    may it help.

    -Regards-
    Laili Aidi

  6. #6
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: realize error on video streaming client

    laili_aidi,

    Your statement is incorrect. RTSP streaming is supported both on Series 40 (3rd Ed FP2 ->) and S60 platforms (2nd Ed FP3 ->)

    Hartti

  7. #7
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    51

    Re: realize error on video streaming client

    hartti,,
    i get ur point but not really understand how implement that. i've send u email,and hope u can reply that. since im not succes with RTSP/RTP protocol with java, but only wuth input stream.

    regards
    adek aidi

  8. #8
    Registered User
    Join Date
    Apr 2008
    Posts
    17

    Re: realize error on video streaming client

    Ok, Harti and Adek , what i realize from your comments is in-order to stream videos to my nokia mobile (S60 2rd Ed FP3) i have to work with Symbian C++, so that i can get low level functions to work with. Is that right?

    If anybody has done successful video streaming using Java, please email me on (owais_zahid@hotmail.com) or post on this Thread.

    -owais

  9. #9
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: realize error on video streaming client

    I do not know what you mean by low-level functions... but rtsp streaming works on S60 2nd Edition FP3 devices in Java ME as well.

    Hartti

Similar Threads

  1. Replies: 1
    Last Post: 2009-02-19, 13:53
  2. Nokia VPN Client on N95 and Video Streaming problems
    By Wajahat in forum General Development Questions
    Replies: 0
    Last Post: 2007-12-10, 12:42

Posting Permissions

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