[iPhone]About SQLite & UPnP

Discussion in 'Mac Programming' started by 134iPhone, Apr 30, 2008.

  1. 134iPhone macrumors newbie

    Joined:
    Apr 30, 2008
    #1
    Hi guys,

    I'm newbie about iPhone and SQLite. The basic idea of my application is discovering all the available MediaServers on the local network via Wi-Fi, displaying all the available multimedia files on the chosen server, and finally plays the chosen multimedia file. It's based on UPnP.

    Ideally, this application should be quite iPoddish, thus I want to follow the list-style (Playlists/ Artists/ Song /Videos …) of iPod, but not to bother the users with the click-click-click traditional directories.

    So my questions are :

    What does iPhone do to form these lists? Does it use the SQLite to store the multimedia files and retrieve their descriptions on SQL query to form a required list?

    Since my application aims mainly at the remote multimedia resources, should I get the description of each file stored on the MediaServer at the beginning and store all of them in the SQLite database on iPhone so that the different lists could be formed from them?

    Could someone be so kind to answer these questions? Thanks a lot.:)
     
  2. Krevnik macrumors 68040

    Krevnik

    Joined:
    Sep 8, 2003
    #2
    If you are streaming from a media server, your data should come from the media server.

    However, it is also a good idea to cache that data (not the media itself, per se) if you have already gotten it, since it can save a lot of network traffic if done correctly.

    What I would do is copy data from the server into a cache DB for that server. However, each 'block' of data should only be grabbed and cached if the user asks for it via the UI in the first place. Don't get too grabby with the server if the user never navigates the playlist, for example.

    Now, to detect changes, you can use hashes. Hash the contents of a playlist (the titles, etc). Now, when you have a cache and want to see if it changed, you just ask the server to compare the hash you have with the one it has. You might not be able to do this if you are using a UPnP AV server though.

    It can be fairly complicated, but good luck.
     
  3. 134iPhone thread starter macrumors newbie

    Joined:
    Apr 30, 2008
  4. michelle21 macrumors regular

    Joined:
    Jun 29, 2007
    #4
    Sounds familiar, Want to share ideas... We have an 8 + month head start on you if your just starting now.

    www.mooncatventures.com
     

Share This Page