Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - colinjones

Pages: 1 2 3 [4] 5 6 ... 201
It almost looks like the long list of PK_Files is the subset of media files of the particular MediaType that the data grid is to be for. eg all the media files of "LinuxMCE Video File" type, so the query only returns video files.

That doesn't seem very efficient (intuition only here!). If that is the purpose wouldn't it have been better to have used the EK_MediaType key in the pluto_media.File table and just use a normal matching Where clause?

Or is that set of PK_Files something else entirely? hmmm.... perhaps it is the subset of files it has determined are currently "available" based on which media sources are currently online/connected to the LMCE network?

How are you determining the amount of cache space consumed by the query?

I would have assumed that the query to create the collection of files would not have also retrieved the artwork. Only once Orbiter determines how many and which files are needed for the onscreen grid would it then query and return the artwork for those files only. In which case the artwork assigned shouldn't matter.....

hmmm... I don't get it, guys...

My data grids populate pretty much instantly all the time. I have about 1750 avi files, and probably lots more as mkv, mp4, etc. I usually use Filename sort mode which obviously isn't going to run the same big queries, so I just tested using Title... same results. It populates in like 0.5 seconds.

I tried /etc/init.d/mysql restart, then tried it again (on the basis that presumably restarting the SQL server would flush any caches) the first time it seemed to take about 1 second to populate, and subsequent retries back to 0.5 seconds. I note that only a relatively small percentage of my media files have artwork assigned, in case that slows things down (wouldn't think so, as it should only be retrieving the artwork for the tiles that are actually in the display at the time, so probably no more than 20 images)

When I type /etc/init.d/mysql status the SQL server had been running for 25 days and had executed about 12 million queries (ave around 5 per second), but only about 600 were considered "long". That being said, the cnf file has the "long" query defined as 2 seconds commented out, so I'm not sure how it is determining which queries are long!

Obviously I don't want my queries to take as long as yours! But I'm a bit baffled as to why they don't. (using 0710 btw)

Installation issues / Re: PV-149 - 4 port video capture card (120FPS)
« on: November 16, 2009, 09:47:09 pm »
I can't really answer your other questions, but I can give you some feedback on one of them.

It is unlikely you will want to make this device a DCE device unless you intend to write the code to make it so. A DCE device is a combination of a device template and the DCE driver code itself. Essentially, you are writing a piece of C++ code that will connect to the DCERouter via TCP/IP and be able to send and receive DCE messages to the rest of the LinuxMCE system. This device is usually responsible for converting LinuxMCE's DCE messages into actions for a particular physical device or other piece of non-LinuxMCE software. An intermediary if you will.

For instance, if you had an amplifier connected to your core via RS232, you might want to write a device that receives DCE Volume messages (Up Down, Mute, for a simple example) from LinuxMCE and converts them into data sent to the serial port to control the actual device. Similarly if the user hits Mute on the amp, you would want the device you write to send that info back to LinuxMCE so that it knows the volume is muted. In practice, such simple applications are usually not necessary as you can use the GSD (Generic Serial Device) - this is a "framework" type device that already has the complex bits of connecting to the DCE network implemented, and sends/receives DCE messages for you, then based on which message will trigger a snippet of Ruby code to do the task needed. That way you don't need to have a dev environment or write any C++, you can just insert the right Ruby snippets into the web admin.

An example of a DCE device controlling software would be the Squeezebox system. Someone wrote a DCE device that connects to the DCE system via TCP/IP and also to the SqueezeCenter software via TCP/IP (SqueezeCenter offers a TCP/IP control interface as well as the normal web interface for exactly this purpose). It then passes commands back and forward between the two.

One of the purposes of DCE is this abstraction, so that LinuxMCE can send generic commands like volume up/down, play media, etc to non-LinuxMCE systems without having to know how those commands are actually implemented. The responsible DCE device has all that information.

In your case, the hardware in question is low level and probably doesn't need to interact directly with LinuxMCE through DCE. There are many device types that do not implement DCE because they are merely children devices types of other device types that do the interaction. Imagine them like "placeholder" containers of configuration data, rather than actual do-ers!

So why do you create a device template for your card if not to communicate through DCE? Well in this case I see 2 reasons. First it allows you to configure LinuxMCE's pnp system, so that when it sees the device you can "do stuff" to ensure that the card is configured correctly for us. eg install any drivers, setup configuration options in the driver's .conf files etc. This will allow your card to be autoconfigured for LinuxMCE as it is detected.

Second, to store critical configuration data (Device Data) that the rest of the LinuxMCE can use to communicate with the card. Specifically, I am thinking Motion as an example.

As I understand it, the Motion_Wrapper is the main security DCE device for capture cards. I've never done this, but I assume that you configure your device template to be a child device of the Motion device. Motion does all the DCE communication with LinuxMCE, and I assume it just looks for its children to find the actual video, by interrogating their Device Data. Not sure if it looks for a URL or a /dev device file in the Device Data, but probably one or the other, then uses that to do the actual reading of video.

In summary, you could write a whole DCE device just to control this card, but that is a big job and reinventing the wheel. I believe you can create a non-DCE device, that is configured to be a child of a real DCE device like Motion, so that once detected LinuxMCE knows where to add the device in the system. Then configure the pnp section of your new device so that any setup/configuration that the card needs, is done. Finally, add any Device Data necessary so that the parent DCE device can access your card.

The "principles" stuff above is broadly correct, as I understand it. But most of the video/security/motion stuff is assumption - someone will correct as necessary I'm sure. Your best bet is to look carefully at other similar devices... Establish what they are configured to be children of, to verify my assumption. Investigate what types of tasks their pnp configuration does (usually a script is run). And determine what Device Data they set, so that Motion can access them.


ps. remember that LinuxMCE's pnp system is quite separate from the underlying Linux pnp. The kernel's pnp system will do the actual hardware detection, and for instance, based on the PCI ID (vendor/product) may well install the necessary kernel device driver necessary for the hardware. The hardware is now installed and working, but LinuxMCE knows nothing about it. LinuxMCE's pnp system hooks into the kernel pnp system by receiving events through the HAL. So once the kernel has done its bit, the LinuxMCE pnp system is triggered and passed pieces of information like the PCI vendor/product number, and goes about triggering the necessary Device Template based on that number to install itself (if it isn't already), so there are 2 pnps, you mostly need to worry about the LinuxMCE one, as long as the kernel successfully does its bit.


are you saying that most of the time calling up media grids on your system takes around 7 seconds?

How many media files/entries in pluto_media.file do you have?

My experience is that the first time I call up the media grids after a reload, they are marginally slower... say 2s max, then from then on they are extremely nippy! I don't get a sense at all that SQL is the bottleneck in my system. Interestingly, reloading the Router does not restart MySQL nor can I think of any reason it would be writing to tables at that point so the cache should be intact over a reload.... I assumed it more more the orbiter code itself, perhaps caching thumbnails, or other activities.

Anyway, my underlying point is, if I'm not doing anything, it certainly doesn't appear that UpdateMedia running in anyway impacts cache performance by flushing it. Although I do note there is still (0710, and 0810 I think) a bug in UM that means when you set a thumbnail for a folder this causes UM constantly to redetect this as a change, and perhaps that is constantly writing into the database.

Installation issues / Re: MCE 0710 won't install
« on: November 15, 2009, 04:45:51 am »
Firstly, if you use LMCE 0810 beta instead of 0710 you probably won't have an issue.

Your problem likely is that the 0710 kernel doesn't have a driver for that RAID chipset. You could disable the RAID hardware completely and allow the motherboard to see the SATA drives directly. Or you could try the CD install method to install Kubuntu 0710 first by manually adding drivers for that kernel (if they exist). But you are better off just using 0810 instead.

BTW, partitions and filesystems are irrelevant with the DVD install, it just blows away the partitions and creates its own.

I don't understand what you mean by the first disk in the RAID is one partition and the others are other partitions. You don't get to choose that with RAID, that's the point. The RAID controller aggregates the disks into 1 "virtual" disk, which you can then partition how you like, but you don't see the individual disks so you can't assign a particular one to be something specific. You can configure the RAID system to have several RAID containers across different disks, so that you can choose to place a partition on a particular set of disks, but if you did that for a single (first) disk, then it wouldn't be a RAID array at all, thus pointless.

A RAID 0 or 1 requires at least 2 disks (and RAID 1 requires an even number of disks), RAID 5 requires at least 3 disks. Personally, I would recommend you keep your media on a separate device like a NAS, in which case the need for RAID at all on your core is fairly low..;.

The internet based install can take a Very long time, and is susceptable to the repositories not being available and your internet connection. The DVD install is a point-in-time image which isn't the current latest version. Rebooting or restarting the install could get you past that point, or you could try the DVD for a much faster experience.

Users / Re: Atom board as core
« on: November 13, 2009, 08:21:26 pm »
Andrew - are these problems just that the regen takes a long time, or does something break? Also, are you using 330 dual core or 230?

Developers / Re: Java/ J2ME mobile orbiter
« on: November 13, 2009, 08:16:15 pm »
Bluetooth_Dongle the device that manages Bluetooth connections.

Users / Re: Playing media of a USB flash drive
« on: November 13, 2009, 01:42:04 pm »
I think you have misunderstood - but practice will help....

The whole point of the library is that nothing is treated differently, nor should it! LMCE 'aggregates' all media sources into a single location, precisely so that you do not need to know exactly where it is. If you have 10 Media Directors scrattered around the house, 3 NAS devices, a few internal drives, a couple of USB thumb drives plugged into 2 different Media Directors, and a DVD or CD in a drive somewhere.... every single Media Director displays all of this media, combined, in a single, consistent location irrespective of where YOU are or where the MEDIA is. That's the point. You can play any media, wherever it is, wherever you are, on any Media Director... and you can find it all in the exact same location whether you are selecting it from your Media Director, webpad orbiter, mobile phone/PDA orbiter, web browser orbiter, etc, etc...

Seriously, play with it for a bit and you will see exactly why it is this way.

The beauty of the library and pnp systems is that it is aware of removable media sources. When it goes through its update process every 2 mins, any existing media sources (such as a hard drive or USB drive) that has disappeared (you unplugged it, say) is hidden from the library so that it doesn't appear. When you plug it back in, it is unhidden again so that it appears again as part of the library... This way you can have media everywhere, and unplug and plug back in again with impunity... the system deals with it, and displays only what is really available... the trick is not to think about it too hard, or second guess, just let it do its thing and all will be good :)

Most mp3 media is already tagged so no issue there. Other media, you really should make an effort to tag it for simplicity (!! you only have to do it once, just do it!) but even if it is an occasion where a friend has brought over some media untagged.... so what... you browse your media directory in Filename sort mode.... every media source in the house is still aggregated into a single location for you to browse... worst case, you are no worse off than normal directory browsing on a normal computer... ie no more difficult to find. But in LMCE you could easily be far better off if the files happen to be tagged.

And btw, yes, you can view files filtered based on the source... please!! just play with the system, you will immediately find those options in the media browser menus (although in practice I doubt you will ever use them!)

Have fun!

Users / Re: Playing media of a USB flash drive
« on: November 12, 2009, 09:49:28 pm »
Currently there is no standard way in 0710 of playing data DVDs. The Disk_Drive device used to play optical media expects DVDs or CDs only. However, there is a thread in the forums you can search for where someone created some patches to allow this - I think 0810 only - and these will probably be rolled into 0810 in due course.

As for actual drives, such as a USB thumb drive - this needs to be added to the system like any other drive. It needs to be detected first - plug the drive in and wait. After several seconds the pnp system will detect the drive and ask you if you want to add it.

Your best bet is to allow it to be added and then, when prompted, tell LMCE that you want it to use the LMCE folder structure. This will create the public/data/audio|video|documents|pictures folder structure on the drive. Now you should move any media you want to be able to play on the drive into the appropriate folders. Each time the drive is plugged back into LMCE, the UpdateMedia system will scan those folders for new media and add them to the library. You will then be able to browse to them in the media browser as normal when in Filename sort mode. Or if you have tagged the media, through the other sort modes.

The critical thing is to ensure that LMCE was told to add the drive when you first plugged it in, the media is in the folders created, and that you give UpdateMedia enough time to scan that media into the system. From then on LMCE will recognise the drive whenever you plug it in, and playing media should be a snap as long as you are searching with the right sort mode and in the right location.

Developers / Re: Java/ J2ME mobile orbiter
« on: November 12, 2009, 01:06:11 pm »
can someone point me in the direction of a good virus free java game site. plz
And now, we just wait for the second spam-bot to come along and answer that question... :P

hmmm, yea strange how his profile claims to hail from the US yet his IP address is Latvia! Shall we leave as a cautionary tail, or delete summarily?!

Users / Re: Question about DLink DNS-323
« on: November 11, 2009, 12:08:59 pm »
For almost all purposes, yes! LMCE doesn't really require a huge amount of power to run. For most people the core really only runs a few extra heavy duty tasks such as MySQL and UpdateMedia, and these are not going to overly tax a dual core Atom. Most of the other extra stuff is lightweight and not "real time" anyway, meaning if they are running slower than ideal, you won't really notice anyway. Most of the heavy duty stuff is GPU work for media, and ION is more than sufficient. These things have been discussed before on the forums (I believe that Andrew's team has done some testing) and the general consensus is it will be fine. If you go ahead, make sure you post feedback (here and on the wiki). Just make sure you have at least 1GB RAM and a HDD that is large enough to deal with the OS plus any MD images you intend to run.

Users / Re: Question about DLink DNS-323
« on: November 10, 2009, 08:56:57 pm »
Have you considered using one of the new Atom 330/ION platforms? Add a second NIC using a USB device, and you'll have a viable Hybrid, with low power consumption for less than 300 Euro (if I was able to speak German, I could probably find a cheaper version still!)

Users / Re: Question about DLink DNS-323
« on: November 10, 2009, 01:07:36 pm »
is your broadband router on all the time?? then why not your core? a fundamental design principle of LMCE is that the core IS on all the time... it should not be turned off, so that it can do its job ... if you allowed it to perform as it is supposed to, then you would never have had this issue. if power consumption is an issue, then it is very easy to build an ultra-low-power core, so that this isn't an issue... realistically there isn't a reason why you "must" turn your core off, it is a preference, and I believe an ill-advised choice. rethink your strategy and you will have an easier life :)

Pages: 1 2 3 [4] 5 6 ... 201