Home | Stories | Reviews | Treo™ Store | Accessories | Software | Discussion | Mobile | About | Search

 
 
Leather Zip Case Palm Leather Zip Case for Pixi
Just $36.95
Innocell 1750mAh Extended Battery Seidio Innocell 1750mAh Extended Battery for Treo Pro
Just $49.95
 Leather Side Case Palm Side Case
Just $24.95
Treo Screen Protectors  (3-Pack) Screen Protectors for Treo
Just $12.95
 
Old 07/28/2009, 05:44 PM   #1 (permalink)
Member
 
i700plus's Avatar
 
Join Date: May 2006
Location: Wisconsin
Posts: 162
Thanks: 146
Thanked 15 Times in 11 Posts
Question Work in progress: Camera Server

I'm looking for people who would be willing to help with getting a camera server app onto the pre. An application would be nice but it would be awesome for someone to get a linux camera server app running first.
The biggest hurdle I see is going directly to the camera and bypassing the camera application. Does anyone know if the camera is listed as a USB device on the pre?

Some items I found was

# gphoto2 - a client program for libgphoto
# libgphoto - the library providing access to digital cameras. Patches have been applied to change hardcoded search paths.
# libusb - the library providing access to the USB-ports.

Not sure if this is any relavent information or not but anythings better than nothing!
__________________
<I accidentally the whole pre>

<Palm Pre Speed Test>


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
i700plus is offline   Reply With Quote
Old 07/28/2009, 07:24 PM   #2 (permalink)
Member
 
Join Date: Jun 2009
Posts: 275
Thanks: 4
Thanked 155 Times in 42 Posts
Default

I was working woth this a little bit. Gstreamer has the camera listed as a device, but the camera daemon interupts when you try to use it. I haven't played with it much though, since I've been busy at work.
zinge is offline   Reply With Quote
Old 07/28/2009, 08:32 PM   #3 (permalink)
Member
 
Join Date: Jun 2009
Location: Downtown LA
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default

executing a find in the devices dir returns the following.

root@castle:/sys/devices# find .|grep -i cam
./platform/omap34xx-isp/MMU_CAM
./platform/omap34xx-isp/MMU_READ_CAM
./platform/omap34xx-isp/CM_FCLKEN_CAM
./platform/omap34xx-isp/CM_ICLKEN_CAM
./platform/omap34xx-isp/CM_IDLEST_CAM
./platform/omap34xx-isp/CM_AUTOIDLE_CAM
./platform/omap34xx-isp/CM_CLKSEL_CAM
./platform/omap34xx-isp/CM_SLEEPDEP_CAM
./platform/omap34xx-isp/CM_CLKSTCTRL_CAM
./platform/omap34xx-isp/CM_CLKSTST_CAM
./platform/omap34xx-isp/RM_RSTST_CAM
./platform/omap34xx-isp/PM_WKDEP_CAM
./platform/omap34xx-isp/PM_PWSTCTRL_CAM
./platform/omap34xx-isp/PM_PWSTST_CAM
./platform/omap34xx-isp/PM_PREPWSTST_CAM
./platform/omap34xx-isp/CONTROL_PADCONF_CAM_FLD
./platform/omap34xx-isp/CONTROL_PADCONF_CAM_D1
./platform/omap34xx-isp/CONTROL_PADCONF_CAM_D5
./platform/omap34xx-isp/CONTROL_PADCONF_CAM_D7
./platform/omap34xx-isp/CONTROL_PADCONF_CAM_D9
./platform/omap34xx-isp/CONTROL_PADCONF_CAM_WEN


Additionally the Texas Instrument site says that the platform is capable of encoding video at 30 fps

www dot arm dot com/community/display_product/rw/ProductId/3609/
*sorry about the URL, post count restrictions


IVA™ 2+ (Image Video Audio) accelerator enables multi-standard (MPEG4, WMV9, RealVideo, H263, H264) encode/decode at D1 (720x480 pixels) 30 fps

Integrated image signal processor (ISP) for faster, higher-quality image capture and lower system cost
PreMenstrualSyndrome is offline   Reply With Quote
Thanked By:
Old 07/28/2009, 08:34 PM   #4 (permalink)
Member
 
Join Date: Jun 2009
Location: Downtown LA
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by zinge View Post
I was working woth this a little bit. Gstreamer has the camera listed as a device, but the camera daemon interupts when you try to use it. I haven't played with it much though, since I've been busy at work.
Would you care to share what you've tried so far? I'm interested in this also and have some bandwidth to dig into it
PreMenstrualSyndrome is offline   Reply With Quote
Old 07/28/2009, 08:42 PM   #5 (permalink)
Member
 
Join Date: Jun 2009
Location: Downtown LA
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default

additionally when the camera app is started, the timestamps on the following processes change.

-root 124 2 0 Jul26 ? 00:01:41 [omap2_mcspi]
-root 409 2 0 Jul26 ? 00:00:42 [mmcqd]
-root 15109 1 3 13:49 ? 00:06:14 /usr/bin/LunaSysMgr
-root 19699 1 0 15:20 ? 00:00:01 /usr/bin/mediaserver -l --gst-debug=1



And the following process is started (camera daemon)
-root 21465 1 1 16:38 ? 00:00:00 /usr/bin/camd -s camd_main:1
PreMenstrualSyndrome is offline   Reply With Quote
Old 07/28/2009, 09:01 PM   #6 (permalink)
Member
 
i700plus's Avatar
 
Join Date: May 2006
Location: Wisconsin
Posts: 162
Thanks: 146
Thanked 15 Times in 11 Posts
Default

interesting... I'm going to mess around with gstreamer a little and will keep you guys updated.
__________________
<I accidentally the whole pre>

<Palm Pre Speed Test>


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
i700plus is offline   Reply With Quote
Old 07/28/2009, 09:19 PM   #7 (permalink)
Member
 
Join Date: Jun 2009
Location: Downtown LA
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Here are all the file handles camd has when running (output from optware lsof)

camd 21749 root cwd DIR 254,0 4096 2 /
camd 21749 root rtd DIR 254,0 4096 2 /
camd 21749 root txt REG 254,0 63501 907 /usr/bin/camd
camd 21749 root mem REG 254,0 136537 10002 /lib/ld-2.5.so
camd 21749 root mem REG 0,13 16 1694 /dev/shm/sem.PmLogLib
camd 21749 root DEL REG 0,8 0 /SYSV41000c23
camd 21749 root mem REG 0,13 16 130260 /dev/shm/sem.camd
camd 21749 root mem REG 254,0 4228 3099 /usr/lib/libgoodabort.so
camd 21749 root mem REG 254,0 21288 3107 /usr/lib/libPmLogLib.so
camd 21749 root mem REG 254,0 36312 10041 /lib/librt-2.5.so
camd 21749 root mem REG 254,0 79648 3242 /usr/lib/libdxo.so
camd 21749 root mem REG 254,0 13439 3243 /usr/lib/libisphal.so
camd 21749 root mem REG 254,0 1386675 10009 /lib/libc-2.5.so
camd 21749 root mem REG 254,0 118620 10037 /lib/libpthread-2.5.so
camd 21749 root mem REG 254,0 13997 10015 /lib/libdl-2.5.so
camd 21749 root mem CHR 81,1 1194 /dev/video1
camd 21749 root 0u CHR 1,3 0t0 620 /dev/null
camd 21749 root 1u CHR 1,3 0t0 620 /dev/null
camd 21749 root 2u CHR 1,3 0t0 620 /dev/null
camd 21749 root 3u unix 0xcbaf1a80 0t0 130263 socket
camd 21749 root 4u unix 0xcbaf18e0 0t0 130273 socket
camd 21749 root 5w REG 0,0 0 2824 /sys/class/i2c-adapter/i2c-2/2-0033/avin
camd 21749 root 6w REG 0,0 0 2821 /sys/class/i2c-adapter/i2c-2/2-0033/mode
camd 21749 root 7w REG 0,0 0 2823 /sys/class/i2c-adapter/i2c-2/2-0033/flash_current
camd 21749 root 8w REG 0,0 0 2822 /sys/class/i2c-adapter/i2c-2/2-0033/torch_current
camd 21749 root 9w REG 0,0 0 1704 /sys/user_hw/pins/camera/flash_sync/level
camd 21749 root 10u CHR 81,1 0t0 1194 /dev/video1
camd 21749 root 11u CHR 81,0 0t0 1185 /dev/video0
PreMenstrualSyndrome is offline   Reply With Quote
Old 07/29/2009, 12:27 AM   #8 (permalink)
Member
 
Join Date: Jun 2009
Posts: 275
Thanks: 4
Thanked 155 Times in 42 Posts
Default

Output of gst-inspect camsrc:
----------------------------------------------------
Factory Details:
Long name: Video (video4linux2/raw) Source
Class: Source/Video
Description: Reads raw frames from a video4linux2 (BT8x8) device
Author(s): Ronald Bultje <rbultje@ronald.bitfreak.net>, Edgard Lima <edgard .lima@indt.org.br>
Rank: none (0)

Plugin Details:
Name: video4linux2
Description: elements for Video 4 Linux
Filename: /usr/lib/gstreamer-0.10/libgstcamsrc.so
Version: 0.10.8
License: LGPL
Source module: gst-plugins-good
Binary package: GStreamer Good Plug-ins source release
Origin URL: Unknown package origin

(02507/210314906) camd: goal changed
GObject
+----GstObject
+----GstElement
+----GstBaseSrc
+----GstPushSrc
+----GstV4l2Src

Implemented Interfaces:
GstImplementsInterface

Pad Templates:
SRC template: 'src'
Availability: Always
Capabilities:
video/x-raw-yuv
format: UYVY
framerate: 30/1
width: 480
height: 320
angle: 270

SRC template: 'src_still'
Availability: Always
Capabilities:
video/x-raw-yuv
format: UYVY
width: 2048
height: 1536
angle: 270


Element Flags:
no flags set

Element Implementation:
Has change_state() function: 0x4037cc00

Element has no clocking capabilities.
Element has no indexing capabilities.
Element has no URI handling capabilities.

Pads:
SRC: 'src_still'
Implementation:
Pad Template: 'src_still'
SRC: 'src'
Implementation:
Has getrangefunc(): gst_base_src_pad_get_range
Has custom eventfunc(): gst_base_src_event_handler
Has custom queryfunc(): gst_base_src_query
Pad Template: 'src'

Element Properties:
name : The name of the object
flags: readable, writable
String. Default: null Current: "v4l2src0"
blocksize : Size in bytes to read per buffer (0 = default)
flags: readable, writable
Unsigned Long. Range: 0 - 4294967295 Default: 4096 Curre nt: 4096
num-buffers : Number of buffers to output before sending EOS
flags: readable, writable
Integer. Range: -1 - 2147483647 Default: -1 Current: -1
typefind : Run typefind before negotiating
flags: readable, writable
Boolean. Default: false Current: false
do-timestamp : Apply current stream time to buffers
flags: readable, writable
Boolean. Default: false Current: false
device : Device location
flags: readable, writable
String. Default: "/dev/video0" Current: "/dev/video0"
device-name : Name of the device
flags: readable
String. Default: null Current: "OMAP34xx ISP"
device-fd : File descriptor of the device
flags: readable
Integer. Range: -1 - 2147483647 Default: -1 Current: -1
flags : Device type flags
flags: readable
Flags "GstV4l2DeviceTypeFlags" Default: 0x00000000, "(no ne)" Current: 0x00000000, "(none)"
(0x00000001): capture - Device supports vide o capture
queue-size : Number of buffers to be enqueud in the driver
flags: readable, writable
Unsigned Integer. Range: 1 - 16 Default: 1 Current: 4
take-picture : Take a still picture
flags: writable
Boolean. Default: false Write only
preview-duration : Preview Duration of still captured frame in milli second s
flags: readable, writable
Unsigned Integer. Range: 0 - 4294967295 Default: 0 Curre nt: 0
resume-preview : Resume Preview after still capture
flags: writable
Boolean. Default: false Write only
num : # of images are captured in a burst
flags: readable, writable
Unsigned Integer. Range: 0 - 10 Default: 2 Current: 2
burst-mode : Enable burst mode for still capture
flags: writable
Boolean. Default: false Write only
interval : Time Interval between bursts in msec.
flags: readable, writable
Unsigned Integer. Range: 0 - 4294967295 Default: 1000 Cu rrent: 500
flash-ctrl : Command to control the flash
flags: readable, writable
Unsigned Integer. Range: 0 - 2 Default: 0 Current: 0
cam-stat : Status of the camera source
flags: readable
Unsigned Integer. Range: 0 - 3 Default: 1 Current: 0
----------------------------------------------------------------

src is used for the video stream for the camera app (camera preview), and src_still is used to actually take the pictures. Other than that, I have no idea whats going on. With the amount of control built into this camera source, it seems like the camera app is using gstreamer as a backend for everything, but I can't confirm that, since I'm really just making stuff up.

Last edited by zinge; 07/29/2009 at 12:39 AM.
zinge is offline   Reply With Quote
Old 07/29/2009, 12:28 AM   #9 (permalink)
Member
 
Join Date: Jun 2009
Posts: 275
Thanks: 4
Thanked 155 Times in 42 Posts
Default

Even running that gst-inspect gets a response from camd though
zinge is offline   Reply With Quote
Old 07/29/2009, 12:31 AM   #10 (permalink)
Member
 
Join Date: Jun 2009
Posts: 275
Thanks: 4
Thanked 155 Times in 42 Posts
Default

I never ended up getting very far. I just managed to set up a gst-launch pipe that would bork the camera app until restarting. I never found out if I was actually pulling from the camera correctly because I couldn't feed it to the screen, since luna is going directly to dev/fb or whatever, and I couldn't figure out how to properly do an rstp stream to try and view it over the lan.

Originally I was trying to use vlc from the optware feed, but then found out gstreamer was already installed. My ultimate goal was to get a live feed streaming over the evdo connection and use my phone as a wireless webcam (driving cross country in a few weeks).

If you already know gstreamer this is probably easy, but I didn't, so the first thing I did was to try and pull from the mic and feed it through the headphone jack. Once I got that working, I moved on to video, but got stuck, and then started work. I haven't looked at it for about a month. Let me know if you get anywhere or could use help with anything. I'd love to have this up and running by the time I leave, even if it involves just running something from the terminal app.

Last edited by zinge; 07/29/2009 at 12:36 AM.
zinge is offline   Reply With Quote
Old 07/29/2009, 02:30 AM   #11 (permalink)
Member
 
Join Date: Jun 2009
Location: Downtown LA
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default

can you give us the gst-launch commands to get the audio feed working through the mic. I'm not getting any audio out with my arguments
PreMenstrualSyndrome is offline   Reply With Quote
Old 07/29/2009, 03:12 AM   #12 (permalink)
Member
 
Join Date: Jun 2009
Posts: 275
Thanks: 4
Thanked 155 Times in 42 Posts
Default

Quote:
Originally Posted by PreMenstrualSyndrome View Post
can you give us the gst-launch commands to get the audio feed working through the mic. I'm not getting any audio out with my arguments
Edit: Nevermind, I got it plugged in. Try this pipe:
gst-launch alsasrc ! audioconvert ! alsasink
I don't have the headphones on me atm to test it, but that should work. Easiest to hear if you plug in the included headphones and talk loudly into the mic on the headphones. Its not perfect, keeps lagging behind and going static-y, but at least you get something.

This might sound dumb, but can you pm me the results of "gst-inspect"? I tripped over a cable earlier today and managed to rip a usb port out of my computer, so I can't plug in my Pre and look it up at the moment.

Last edited by zinge; 07/29/2009 at 03:36 AM.
zinge is offline   Reply With Quote
Old 07/29/2009, 05:52 PM   #13 (permalink)
Member
 
Join Date: Jun 2009
Location: Downtown LA
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I'm still messing with gstreamer but so far have been unsuccessful in getting any audio or video feeds even trying zinge's pipe arguments
PreMenstrualSyndrome is offline   Reply With Quote
Old 07/30/2009, 03:20 AM   #14 (permalink)
Member
 
Join Date: Jun 2009
Posts: 275
Thanks: 4
Thanked 155 Times in 42 Posts
Default

Quote:
Originally Posted by PreMenstrualSyndrome View Post
I'm still messing with gstreamer but so far have been unsuccessful in getting any audio or video feeds even trying zinge's pipe arguments
Got home too late tonight to take a look. I'll try and get you a working audio pipe by tomorrow night.
zinge is offline   Reply With Quote
Old 07/31/2009, 12:38 AM   #15 (permalink)
Member
 
Join Date: Jun 2009
Posts: 275
Thanks: 4
Thanked 155 Times in 42 Posts
Default

Quote:
Originally Posted by PreMenstrualSyndrome View Post
I'm still messing with gstreamer but so far have been unsuccessful in getting any audio or video feeds even trying zinge's pipe arguments
I just tried that pipe and it works perfectly for me. Are you sure you have your volume up/sound on? Play a song in the music app and turn the volume up again, then try it out. You don't need the headphones. I just did it from the terminal app and it works fine.

gst-launch alsasrc ! audioconvert ! alsasink

It starts getting bad quick (dropping samples and giving "can't record audio fast enough" errors), but it works just to test out the mic source.
zinge is offline   Reply With Quote
Old 08/01/2009, 09:40 PM   #16 (permalink)
Member
 
Join Date: Jun 2009
Posts: 275
Thanks: 4
Thanked 155 Times in 42 Posts
Default

Anybody gotten any further with this? I've been working on writing my first WebOS app, so I haven't had a chance to play with it anymore yet.
zinge is offline   Reply With Quote
Reply


Thread Tools
Display Modes

~


All times are GMT -4. The time now is 10:54 AM.

Creating smartphone communities
Android Central - Android reviews, news and forums Crackberry - Blackberry news, reviews and community TiPb - iPhone news, accessory reviews & forums
Pre Central - Palm Pre Review, News and Community Treo Central - Treo & Centro News and Forums WMExperts - Windows Mobile Reviews & News

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
 
 

Copyright ©1999- TreoCentral. All rights reserved : Terms of Use : Privacy Policy

TREO and TreoCentral are trademarks or registered trademarks of palm, Inc. in the United States and other countries;
the TreoCentral mark and domain name are used under license from palm, Inc.
The views expressed on this website are solely those of the proprietor, or
contributors to the site, and do not necessarily reflect the views of palm, Inc.

Explore More: Crackberry | WMExperts | the iPhone Blog | Android Central | Smartphone Experts Combined Forums