×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    10

    Webcam/Camera direct URL access with MWS?

    When I've used Raccoon in the past, I liked being able to directly access the webcam feature with a URL, e.g.

    http://my.url.com/camera?size=1

    That functionality isn't available in the Mobile Web Server, but does anyone have a quick PSP page or some other way to easily implement this? I tried looking into adding this functionality in the REST API of the MWS, but it appears that the camera functionality takes a picture, saves it locally, and the serves up the saved file. I just want to serve a small 320x240 image from the camera directly to the browser via URL.

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    457

    Re: Webcam/Camera direct URL access with MWS?

    Hi,

    Quote Originally Posted by wturnage View Post
    That functionality isn't available in the Mobile Web Server, but does anyone have a quick PSP page or some other way to easily implement this? I tried looking into adding this functionality in the REST API of the MWS, but it appears that the camera functionality takes a picture, saves it locally, and the serves up the saved file. I just want to serve a small 320x240 image from the camera directly to the browser via URL.
    If I recall correctly, invoking the camera from within a request handler and directly returning a taken picture does not work using Python.

    However, as MWS now (version 1.3 ->) uses exactly the same S60 port of Apache httpd as is used in Raccoon and PAMP you should be able to install the camera module of Raccoon onto MWS and get the same functionality.

    The only problem is that for MWS you need to build the module using a larger set of (Platform Security) capabilities and have it signed using something else than a self-signed certificate. If you are interested in trying this out, drop me mail and I can build the module and the sis-file for you, but you will have to sign it yourself at SymbianSigned.

    Br,
    Johan

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

    Re: Webcam/Camera direct URL access with MWS?

    Johan-

    Thanks for the info. I think I might be able to come up with a workaround using the existing camera application in MWS, however, I can't find any documentation about it and whether or not it can take parameters. Does it allow for any of this? Essentially, I just want to call:

    .py?application=-5&action=take_picture_silent

    but be able to specify that the image returned is 320x240

  4. #4
    Nokia Developer Expert
    Join Date
    Sep 2007
    Posts
    60

    Re: Webcam/Camera direct URL access with MWS?

    Quote Originally Posted by wturnage View Post
    Johan-

    Thanks for the info. I think I might be able to come up with a workaround using the existing camera application in MWS, however, I can't find any documentation about it and whether or not it can take parameters. Does it allow for any of this? Essentially, I just want to call:

    .py?application=-5&action=take_picture_silent

    but be able to specify that the image returned is 320x240
    You can do it that way (POST with URL you mentioned, and parse the picture) but there is no way of setting the resolution. If you want to have more control over the camera, you need to do your own code.

  5. #5
    Registered User
    Join Date
    Feb 2008
    Posts
    21

    Re: Webcam/Camera direct URL access with MWS?

    hello,
    which phone you use? n95? cause I also wanted a smaller image, but the lowest possible resolution of the n95 is 640,480

    i did it that way:
    def take_photo():
    img = camera.take_photo(size = (640,480))
    size = 480, 320
    image = img.resize(size)
    image.save(PICTURE_FILE) # PICTURE_FILE is the path
    return file(PICTURE_FILE).read()

    hope this helps!
    regards,
    Askin

Similar Threads

  1. direct access to memory
    By mihaicezar in forum Python
    Replies: 1
    Last Post: 2006-02-16, 23:33
  2. Direct Screen Access
    By reinio in forum Symbian C++
    Replies: 1
    Last Post: 2002-12-20, 13:59
  3. Direct input access and Accesskey
    By alexma in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2002-09-03, 10:59
  4. How to use direct screen access in release 6.2
    By cl_max1mum in forum Symbian User Interface
    Replies: 1
    Last Post: 2001-12-05, 20:22
  5. Direct screen access question?
    By in forum Symbian C++
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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