INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3   Go Down

Author Topic: open source iPhone sync api [proposal]  (Read 44625 times)

cracksloth

  • Recent member
  • *
  • Posts: 12
open source iPhone sync api [proposal]
« on: November 06, 2008, 01:48:30 pm »

There are a *lot* of programs that would benefit from the ability to sync with the iPhone.  What the community needs is a separate open source project purely dedicated as a sync api (with iPhones/iPods/whatever).  This way, many interested groups can contribute and maintain the code over time as Apple plays with their code.  I think this is the only sensible course of action because maintaining this code is far too time intensive for all interested parties to maintain individually.  Unfortunately, it will require the dedication of one of those parties to get it started and breathe some life and momentum into the project.  Such skills are beyond me so consider this a call to action to any coders out there.  Just get something started and see if it takes off.  This battle with Apple is ridiculous but it is certainly worth fighting.


Perhaps, the relevant code from MC could be released to help get this started?
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #1 on: November 07, 2008, 12:37:55 pm »

As an iPhone developer, and an iPod/MediaCenter user I would be interesed in participating and or contributing to this endvor.

How about it J River?
Logged

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: open source iPhone sync api
« Reply #2 on: November 07, 2008, 02:21:07 pm »

I'm not a programmer, I just manage a department full of them.  I volunteer for beta testing.
I already beta test for J River and also for Melloware (see plugins forum).

I have 4 ipods in the household and am missing the ability to sync to the newer ones immensely.
Logged

cracksloth

  • Recent member
  • *
  • Posts: 12
Re: open source iPhone sync api
« Reply #3 on: November 10, 2008, 01:04:27 am »

That is absolutely wonderful, gvanbrunt!!!  I was hoping to hear something back from jriver by now either for or against the release of relevant code.  Is anyone aware of any other code sources (preferably open) that have had some rudimentary luck in syncing with the iphone in the past?

Don't get me wrong, jriver is completely entitled to hold onto their code but I just want to present the idea that it may be in their best interests in the long run.  It distributes development out of house and will help prevent alienating users of Apple devices (there are a lot of us).  Hopefully it would even garner new users - not everyone is in love with iTunes you know.  I am certainly not an Apple fan-boy but, like many others, I do like my iPhone and because it is central to my daily operations, I am forced to use software that can interface with it.  It is simply not practical for me to buy and carry around a separate mp3 player.

So, gvanbrunt...  since you are an iPhone developer, here is a question:  Would it be more practical from a development point of view to create a native iPhone app that can sync media files wirelessly over a network?  Not only does this have the wow factor but it might also bypass some security restrictions if the iPhone app were to deposit music/video/images directly into the iPhone's library.
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #4 on: November 10, 2008, 04:40:54 pm »

Unfortunatnly the iPhone or iPod touch music files are off limits for any applications using their public API. That includes all apps available via the app store. So that won't work. It could be done with a "jailbroken" device, but that defeats the "easy" approch for most users.

I think until Apple decides to stop locking users into using iTunes to sync their phones, its not going to be seemless.

What has to be done is a separte app that pulls info from MediaCenter and recreates that in iTunes. Then you can sync your device from iTunes. Not ideal, but not that bad either...

Not exactly an iPhone developer task, but since I'm also very familar with .NET I might try to whip something up that hooks into both programs API's and does the trick.... that is unless JRiver has any plans to go this route.
Logged

cracksloth

  • Recent member
  • *
  • Posts: 12
Re: open source iPhone sync api
« Reply #5 on: November 11, 2008, 01:01:31 am »

hmm, i personally wouldn't mind jailbreaking my iphone to use MC exclusively...  i believe that adding benefits to jailbreaking an iphone is likely the best way to put pressure on apple to stop their tyranny of control.  jailbreaking has become a relatively easy process and i'm certain those that have done so already would love the customization MC has to offer.  just food for thought.
Logged

raldo

  • Citizen of the Universe
  • *****
  • Posts: 1102
Re: open source iPhone sync api
« Reply #6 on: November 11, 2008, 09:38:13 am »

Unfortunatnly the iPhone or iPod touch music files are off limits for any applications using their public API. That includes all apps available via the app store....

Yup. I recently posted a suggestion, where a sync plugin hooks up via itunes instead: MC Sync Plugin - Suggestion on how to deal with ITunes.... The interface towards ITunes has already been made (iTSfv) and making a connection between iTsfv and a jrmc plugin should be "easy".

(The main problem is that any "plugin" solution requires work from JRiver...)
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #7 on: November 11, 2008, 06:26:33 pm »

ITsfv just uses the public iTunes COM API AFAIK. It may use some private calls, but I don't think so. It is not neccessary or even beneficial to create a plug in.

I took a quick look at the iTunes API and it can be done on that side. It's been quite a while since I looked at MC's API and plug in structure, so I'll have to look at that next.
Logged

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: open source iPhone sync api
« Reply #8 on: November 11, 2008, 08:02:57 pm »

I'm using ITSFV now.  I'm forced to do it this way since my library is flac, and unreadable by itunes.
So, MC syncs to a virtual device and converts to mp3.
This costs me ~15GB of additional disk space (not a huge deal).
Then I have to use ITSFV to sync that folder with the itunes database.
Then I have to fire up itunes to sync the database changes to the ipod.
Not fun, but it gets the job done.
I'm fine with using itunes to sync, since I'm pretty sure any JRiver produced sync functionality, or any 3rd party plugin, would only handle music and maybe photos.  We'd still need itunes for the apps and firmware updates.  No way to completely cut it out.
I'd like to cut out the itsfv middleman though.
I'm willing to lay down a few dollars for it, whatever the source may be.
Logged

ThoBar

  • Citizen of the Universe
  • *****
  • Posts: 992
  • Was confishy
Re: open source iPhone sync api
« Reply #9 on: November 11, 2008, 08:56:24 pm »

I posted about this this option .. http://www.getsharepod.com/fordevelopers/

I'd be happy to chip in if it gets the job done...
Logged

cracksloth

  • Recent member
  • *
  • Posts: 12
Re: open source iPhone sync api
« Reply #10 on: November 12, 2008, 01:21:24 am »

interesting, confishy - nice find.  this sounds like it would work.  why wouldn't JR just license this?
Logged

cracksloth

  • Recent member
  • *
  • Posts: 12
Re: open source iPhone sync api
« Reply #11 on: November 12, 2008, 01:23:53 am »

of somewhat relevance, check out:
http://lifehacker.com/5083668/vlc4iphone-ports-vlc-media-player-to-you-guessed-it
vlc would allow video playback without transcoding.  requires an iphone jailbreak but i thought it might add a little fuel to the MC iphone app idea.  would be nice just to move videos over without post-processing.
Logged

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: open source iPhone sync api
« Reply #12 on: November 12, 2008, 06:14:59 am »

I posted about this this option .. http://www.getsharepod.com/fordevelopers/

I'd be happy to chip in if it gets the job done...

$299....wow, I'm sure there's enough of us wanting this done that we could cover that investment.
Logged

ThoBar

  • Citizen of the Universe
  • *****
  • Posts: 992
  • Was confishy
Re: open source iPhone sync api
« Reply #13 on: November 13, 2008, 12:39:06 am »

$299....wow, I'm sure there's enough of us wanting this done that we could cover that investment.

The problem is getting the plugin developed - someone has to do it. If there is anyone out there willing to do so.. sing out!
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #14 on: November 14, 2008, 12:50:07 pm »

I'll try throwing something together this weekend. Don't expect it to be pretty.  :)

I know I can pull playlists/song, tag info, and artwork over. I'm not sure if any kind of format conversions would be possible though, as I don't think the MC API supports it. I only took a quick look though. I think that just like syncing via MC you'll pick from a list of playlists to sync and It'll copy the info into iTunes. Then you can sync from there.

If anyone has any brilliant idea's about how to handle conversions, I'm all ears.
Logged

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: open source iPhone sync api
« Reply #15 on: November 14, 2008, 03:10:41 pm »

My entire library is ripped to flac, so I'd definitely need it done.
MC already handles the conversion if you specify a misc. handheld.
That's what glynor and I do now.
Then I point itunes to that temp mp3 folder.

Maybe you could attach something to that portion of the program as it already handles the sync.
Let MC do that part, then when it finishes, you pick up and sync the temp folder of converted mp3's to the ipod.

Also, ratings coming back from the ipod to MC is important to me.

Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: open source iPhone sync api
« Reply #16 on: November 16, 2008, 12:23:43 am »

I'll try throwing something together this weekend. Don't expect it to be pretty.  :)

I know I can pull playlists/song, tag info, and artwork over. I'm not sure if any kind of format conversions would be possible though, as I don't think the MC API supports it. I only took a quick look though. I think that just like syncing via MC you'll pick from a list of playlists to sync and It'll copy the info into iTunes. Then you can sync from there.

If anyone has any brilliant idea's about how to handle conversions, I'm all ears.

I was actually mulling this kind of project over myself, and had done some preliminary testing with the iTunes SDK. The only thing I could really come up with as far as file conversions was to use MC's API to run a search for stacked files for any file it ran into that wouldn't be supported by iTunes. Not ideal, but it was at least an option.

Personally, I really think this is something that should be integrated into MC itself. The file conversion and stacking logic is already there, and MC already handles transferring play stats and volume leveling information for supported iPods. Wouldn't it be simpler for MC to just offer to sync to iTunes for those unsupported iPods?
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #17 on: November 18, 2008, 07:08:50 pm »

Sorry for the lateness in replies. I went to paint my wall on Sunday only to find that the gas fireplace was installed by the previous owner in a very unsafe manner. Picture bathroom silicone INSIDE the vent for starters. Not to mention a hole big enough to fit my hand through in the vapor berrier. No wonder it was drafty in there. I guess he realized this, so to compensate he packed as much insulation in the gap between the wall and the fireplace. After all, its a well known fact that the R value increases with the more you pack into a small space... :) Needless to say, this needed some attention before winter sets in. I live in Canada, so this can be somewhat of a problem...

Then to top it all off, I got sick for two days. I actually haven't been that sick in as long as I can remember. Nothing like getting kicked when you're down. Finally starting to feel somewhat better though.

Anyhow.... What I was thinking for syncing non-mp3 types, was being able to specify an alternat "root" directory for files that arn't in an iTunes compatible format. This would be the directory of the Misc device that some users currently use. That is the best I can come up with so far. It's a two step process, but still far quicker than what we currently have to do...
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #18 on: November 18, 2008, 10:23:24 pm »

Well, here's what I got so far:



Sort of like the MC iTunes sync interface. I have no way to pull the icons for the different types of lists as the API doesn't specify what "type" of playlist it is. It also doesn't currently have All Albums, All Photes etc. Does anyone need those?
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #19 on: November 18, 2008, 10:32:34 pm »

Actually, I can get the type of playlist. It's via a semi-documented part of the API. Still, not going to worry about that till I get something working....
Logged

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: open source iPhone sync api
« Reply #20 on: November 19, 2008, 12:21:04 pm »

gvanbrunt:

If I understand where you're going with this, there's still several steps involved.
Perhaps you can use an event, if one is fired, when a handheld sync in MC finishes that would prompt whether you'd like to launch your itunessync plugin.
Without that, I'd guess this would be the process.
1) Play songs on ipod and make rating changes.
2) Dock the ipod.
3) Sync with itunes, to get rating changes into the itunes database.
4) Run your itunessync plugin in MC, to get rating changes updated in MC and any new songs added to itunes.
5) Back to itunes to do another sync.
6) Ipod is now current and matching MC.

AmIRight?
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #21 on: November 19, 2008, 01:33:04 pm »

Yes that is right. Your not going to have one step access as long as Apple keep playing games with opening the db on thier devices. Now that many iPhone "competetors" are starting to hit the market, they may relent, but I seriourly doubt it.
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #22 on: November 19, 2008, 02:18:34 pm »

By the way, I forgot to mention that Sharepod doesn't work with version 2.0 and above iPhones and iPod touches. They face the same problems that J River does; you can't include direct support if Apple keeps trying to block you. If you don't like the situation, don't forget to complain heavily in the appropriate areas on Apple's site.

We can only hope that someone slaps Apple with the same type of lawsuits that the "evil M$" faced by bundling IE with the OS. Apple wants to control even the ring tones you can put on your phones, which is crazy. Despite their funny ads on TV, Apple doesn't give an iTurd about its customers, except for how much it can make off them. And before any Mac Fan-boys flame me with the how much better they are etc, I develop for Mac and own a power-book. I didn't say their products were worse than MS only that their business practices are. Until we stop eating the iTurds with our iSpoons, it isn’t going to get any better. :)

And please no flame wars, this was mostly in jest, but point is clear; Apple is to blame, and we need to fight back.

This project is a temporary band-aid until they stop their current practices. It isn't going to be perfect, but it's better than nothing...
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #23 on: November 19, 2008, 02:24:17 pm »

Oh yeah, the iTunes sdk also include some "Convert" functions that I may be able to use to do format conversions. That is if J River doesn't include this in its API soon.... wink wink.  I don't know much about them at this point, but perhaps that would cut out the sync to a fake device stage... I may also be able to do the actual "iTunes device sync(s)" from the plug in... This would again speed things up.
Logged

bwaldron

  • Regular Member
  • World Citizen
  • ***
  • Posts: 147
Re: open source iPhone sync api
« Reply #24 on: November 19, 2008, 03:31:19 pm »

We can only hope that someone slaps Apple with the same type of lawsuits that the "evil M$" faced by bundling IE with the OS.

I don't want to see the legal system involved (nor did I in MS's case). Apple is well within its rights to do what they're doing -- much as I hate it. What I'd like to see is their strategy backfire on them, and consumers turn to other options.
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #25 on: November 19, 2008, 04:13:35 pm »

Monopolistic practices are illegal in most western countries. The only question is if they have a monopoly or not.

Like I said though, lets not turn this into a legal debate. It's not entirely Apples fault either, they have contracts with lables (songs, movies) in which they must protect the contents on their devices. This is partly to do with illegal downloading etc. That said, it might actually be to Apples benefit to be taken to court. If they rule that what they are doing is illegal, they will have to comply and open things up. That means the labels will have to re-think their current contacts. I'm sure they won't want a lucrative source such as the iTunes store to dry up for them.

My point is, to keep the pressure on Apple. That is all we as consumers can do. And to complain to your governments about the unfair practices so they can get involved. These are big players here, with billions of dollars at stake. It will take govenment pressure for things to change.

Actually I think one other option for change is a public sync API to be developed for ALL players. If someone were to put pressure on the device makers to come up with one api, that would pretty much force Apple to comply. They would be the only player on the block that didn't support it... Or perhaps J River could come up with one and nudge some of the other device makers to go along...
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #26 on: November 19, 2008, 04:23:30 pm »

I have some more good news about the iTunes API. I actually may be able to do the entire sync via the plug in, without using the iTunes library at all! If the device is in "manual sync mode" you can push tunes on and off at will. I've run into some problems with artwork in my experiments, but this really looks promising.

I just need to find a way to correlate the tracks between MC and those already on the device.
Logged

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: open source iPhone sync api
« Reply #27 on: November 19, 2008, 06:27:12 pm »

That sounds much better.
I'd be willing to do some testing for you as things materialize.
I'll be available other than the week of Dec 1-4.
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #28 on: November 19, 2008, 06:40:33 pm »

I'm posting a snipit of a personal message I got from Matt:

Quote
Hi there,

Would it be possible to wrap the file and playlist transfer up into discrete calls?

If so, it might be possible to make a new handheld plugin that would just snap into our existing handheld framework.

A handheld plugin has two main jobs:

1) Return a list of files on the device
2) Accept transfers of files and playlists

The management of what to sync is done by Media Center.

Best,
-Matt

This would defiantly be possible and certainly make my life easier. The only thing is I primarily program in C# not C++, so this would be more difficult for me, but not impossible, if that were the only language available. Unless of course there are plans to expose it via COM etc...then it's wide open. Either way I could do it.
If you could let me know some more details, I’m sure many would be greatly appreciative.

Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: open source iPhone sync api
« Reply #29 on: November 19, 2008, 07:19:22 pm »

Let us take a closer look at the handheld plugin system and get back with you.  It's not something we've released publicly before.

I can say that the plugin itself would have to be a C++ class.  We're moving away from COM as it's a problem on portable installs, in cross-platform setups, etc.

I think a C++ class could be a thin wrapper that loads and uses a .NET assembly, although it's not something I have experience with.
Logged
Matt Ashland, JRiver Media Center

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #30 on: November 19, 2008, 10:00:18 pm »

Ya, that's more or less what I planned to do. Wrapper in C++ and the guts in C#. It's not so much that c# is better, but you can't beat the .NET framework for fast application building. Com is pretty ugly to deal with, that is for sure. .NET interop is a much better route anyway as you get the best of both worlds. There is even support for scripting and dynamic langs, so COM isn't really even needed anymore, at least as an intermediary.

I haven't really done much native to .NET interop in a while, but if I remember correctly, it isn't much work to tranform a COM API into a .NET api... You just put the "stubs/proxies" in a C++ managed dll and your done. so to speak... Hell, you can even build the documentation from the comments etc. Not to mention that you still don't even alienate COM as you can get that for "free" as part of the framework. IOW the dll can be exposed to com, but doesn't have to... It's so easy to do, it could be done as part of the installer. Or if you don't want to deal with the headaches of the API at all, make it available only as part of the sdk. Or have the COM option only there for developers that require it, and make them do the REGASM.

If you want to do away with COM, perhaps this is route to go in 13? You have a lot of options this way. Hopefull you will also be able to offer more in the way of the API because of simplified development.

Anyways, just rambling, I'm sure you've considered this route before...
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: open source iPhone sync api
« Reply #31 on: November 20, 2008, 11:12:55 am »

I've attached the define of the portable drive interface.  You would need to create an IPortableDrive and expose it with a DLL function CreatePortableDrive(...).  This is much like several of the other plugin types.

The IDispatch pointers are MJFilesAutomation pointers.

I know an example plugin would be helpful, but I don't think we will have time to provide one any time soon.  Getting Media Center to load a custom plugin will also require some coding on our side, but for now, you could replace / hijack the existing handheld plugin.

Code: [Select]
#pragma once

// current interface version
#define HH_INTERFACE_VERSION 7

// device types
#define DEVICETYPE_UNKNOWN -1
#define DEVICETYPE_PORTABLEDRIVE 0
#define DEVICETYPE_SPECIFIC 1
#define DEVICETYPE_WMDM 2
#define DEVICETYPE_IPOD 3
#define DEVICETYPE_PROXY 4

// playlist formats
#define PLAYLIST_FORMAT_M3U_RELATIVE 0
#define PLAYLIST_FORMAT_M3U_FULL 1
#define PLAYLIST_FORMAT_M3U_FULL_NO_DRIVE 2
#define PLAYLIST_FORMAT_ASX_RELATIVE 3
#define PLAYLIST_FORMAT_ASX_FULL 4
#define PLAYLIST_FORMAT_ASX_FULL_NO_DRIVE 5
#define PLAYLIST_FORMAT_PLP_FULL_NO_DRIVE 6
#define PLAYLIST_FORMAT_M3U_FULL_NO_DRIVE_WITH_COMMENTS 7

// plugin names
#define PLUGINNAME_PORTABLEDRIVES _T("Portable Drives")

// no playlists
#define NO_PLAYLISTS _T("NO_PLAYLISTS")

// general defines
#define PDT_LIST_DELIMITER _T(";")
#define WMDM_E_PERMISSION -1003
#define WM_DRM_PROGRESS (WM_USER + 300)

// action defines
#define HH_MENU_ACTION_BUILD 0
#define HH_MENU_ACTION_PROCESS 1

// menu items
#define IDM_HH_MENU_ITEM 1
#define IDM_HH_MENU_ITEM_DELETE IDM_HH_MENU_ITEM

// commands
#define IDM_HH_UPLOAD (WM_USER + 1)
#define IDM_HH_SEND_PLAYLISTINFO (WM_USER + 2)
#define IDM_HH_PREPARE_TO_SYNC (WM_USER + 3)
#define IDM_HH_CLEANUP_SYNC (WM_USER + 4)
#define IDM_HH_RESET_PLAYCOUNTS (WM_USER + 5)
#define IDM_HH_UPDATE_DEVICE_INFO (WM_USER + 6)
#define IDM_HH_SET_MJ_AUTOMATION (WM_USER + 7)
#define IDM_HH_PREPARE_FOR_UPLOAD (WM_USER + 8)
#define IDM_HH_EJECT (WM_USER + 9)
#define IDM_HH_EDIT_DVD_INFO (WM_USER + 10)

// plugin callback
class IPortableDriveCallback
{
public:
virtual void PortableDrive_RefreshUI() = 0;
virtual void PortableDrive_GetRootFiles() = 0;
virtual void PortableDrive_Progress(int nCurrent, int nTotal, BOOL * pbCancel) = 0;
virtual void PortableDrive_CloseDevice() = 0;
virtual void PortableDrive_EnumerateDevices() = 0;
};

// plugin interface
class IPortableDrive
{
public:
virtual ~IPortableDrive() { }
virtual HRESULT Initialize(BSTR * bstrDeviceInfo) = 0;
virtual HRESULT GetMemoryInfo(BSTR bstrPath, LONGLONG * pTotalSize, LONGLONG * pAvailableSize, LONG * pError) = 0;
virtual HRESULT GetFiles(BSTR bstrPath, IDispatch * pdispFiles, LONG * pError) = 0;
virtual HRESULT GetTreeItem(BSTR bstrPath, BSTR * pItem, LONG * pHasChildren, LONG * pError) = 0;
virtual HRESULT GetDeviceIcon(LONGLONG * phIcon) = 0;
virtual HRESULT GetLastError(BSTR * pError) = 0;
virtual HRESULT Menu(BSTR bstrPath, LONG nAction, LONG nParam, LONG * pError) = 0;
virtual HRESULT ProcessCommand(BSTR bstrInfo, LONG lCommand, IDispatch * pDispatch, BSTR * pItem, LONG * pError) = 0;
virtual HRESULT Cancel() = 0;
};

typedef IPortableDrive * (* CreatePortableDriveFunc)(IPortableDriveCallback * pCallback);
Logged
Matt Ashland, JRiver Media Center

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: open source iPhone sync api
« Reply #32 on: November 20, 2008, 01:19:19 pm »

So this may be a stupid question, but if this plugin becomes a handheld plugin, will we still be able to tell iTunes to sync our iPhone apps and Outlook Calendar, etc? If so, this will give us the best of all worlds. MC's awesome organization abilities and iTunes ability to fully back up and sync our iPods.

Can't wait! :)
Logged

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: open source iPhone sync api
« Reply #33 on: November 20, 2008, 02:42:36 pm »

So this may be a stupid question, but if this plugin becomes a handheld plugin, will we still be able to tell iTunes to sync our iPhone apps and Outlook Calendar, etc? If so, this will give us the best of all worlds. MC's awesome organization abilities and iTunes ability to fully back up and sync our iPods.

Can't wait! :)

Yes, Doof, that is correct.  Within itunes, you have checkboxes in the tabs for each media type to specify what you do/don't want itunes to manage for syncing.  I would allow itunes to handle the apps and videos, and have MC handle the music and maybe podcasts if those were part of the plugin.
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #34 on: November 20, 2008, 02:55:30 pm »

Just to add to what zxsix said, once you change a device to manual sync, in iTunes it no longer automatically syncs music, videos, etc. You drag and drop them from the main library to the device. As for calandars and apps, those still Automaticaly sync. So yes you would get the best of both worlds. And if you jailbreak your phone, then you the best of all three worlds... :)
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #35 on: November 20, 2008, 03:10:08 pm »

Matt:  Thanks I'll mess around with this abit tonight. If you could provide some brief descriptions of a couple of things, I would appreciate it. If this is covered by looking at some of the existing examples, don't bother to answer, I'll find that out later... :)

1. First the initialize function is passed a string (or is passed out), what is it used for?
2. Many functions have a pError pointer, what is this used for? Errors obviously, but there is a GetLastError function. Why two? My guess is one and the same, just two different ways of dealing with it.
3. What are the specs on the icon in GetDeviceIcon...
4. Menu - totally in the dark on that one.
5. ProcessCommand - I need some info on that one as well.
6. How does MC detect when a device is connected or not?

Thanks
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #36 on: November 23, 2008, 03:58:52 pm »

I've been doing some snooping and found that another player that has recently added iPhone support is actually using itunesmobiledevice.dll to sync to the device. While this offers the device to be synced without iTunes opening, it still requires iTunes to be installed or at least the "common files" directory to be copied from a working iTunes install.

I don't see any other advantages to this method compared to using the actual API to get the job done. But there are some disadvantages. If apple changes the dll, it may stop working at a future date. In fact this has already happened in version 8.0 as one of the structures had changed. Since this is also part of the route that jailbreaking uses it seems very likely that this dll will change, and probably very significantly at some future date. So I'm going to continue down the API route at this point. That is unless anyone can point out why the other method may be preferred.

Comments?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: open source iPhone sync api
« Reply #37 on: December 02, 2008, 02:48:09 pm »

I just thought I'd mention that I'm waiting with bated breath.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Cheburashka

  • Junior Woodchuck
  • **
  • Posts: 72
Re: open source iPhone sync api
« Reply #38 on: December 02, 2008, 04:10:32 pm »

I thought I would point out, while you are doing this, that there are (at least) two other iPod/iTunes incompatibilities in JRiver at the moment:

1.     With iPods JRiver is capable of synching with, songs referenced by .cue files are not synched correctly.  Instead of synching just the song, the entire file is synched, taking up much more space and causing the free space calculation to fail.

2.     JRiver cannot tag .m4* files, although there are publicly available api's for doing this.
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #39 on: December 02, 2008, 06:12:01 pm »

And I thought no one cared... :) I didn't get any response to the questions I asked so I figured there was limited interest in plug in. I guess everyone is mostly like me in scratching their heads about what is needed by everyone. Still, there has been a lot of feedback earlier that gives me a lot to go on.

Sorry, for the delay though. I was out of town for a while. Duty calls and I have to make a living. :) I will be playing around with the interface provided by Matt over the next couple of days. After I see what I can do with it I can make plans on how to proceed. I can then probably give everyone some kind of idea how long things will take. Not very long for a first version I would think. Can't speculate on what features it will have until I find out what I can do with information Matt provided.

Just so you know. I too want this working ASAP as I would love to be able to sync my iPhone without the current gymnastics. :)
Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: open source iPhone sync api
« Reply #40 on: December 02, 2008, 07:57:46 pm »

I didn't get any response to the questions I asked so I figured there was limited interest in plug in.

Well, I didn't want to be a pain in the ass about it, but if it will make you feel better I'll bug you about it every day.  ;D
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #41 on: December 02, 2008, 08:25:08 pm »

LOL

K, I get the point. I'll try to stay on top of it and keep you all updated.
Logged

Cheburashka

  • Junior Woodchuck
  • **
  • Posts: 72
Re: open source iPhone sync api
« Reply #42 on: December 02, 2008, 09:00:30 pm »

And I thought no one cared... :) I didn't get any response to the questions I asked so I figured there was limited interest in plug in. I guess everyone is mostly like me in scratching their heads about what is needed by everyone. Still, there has been a lot of feedback earlier that gives me a lot to go on.

I care, I just -- and I mean no disrespect by this -- have some doubt as to whether it will turn out to be possible to make one that is useful.  I'm inclined, although I recognize that I could be mistaken, that for performance reasons this functionality has to be built into jriver.
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re: open source iPhone sync api
« Reply #43 on: December 03, 2008, 07:44:58 am »

Well performance can't be an issue for me either as I have a 16GB model iPhone. I have a 80GB iPod that I intend to do testing on. It already takes 1 1/2 hours to completly load it. Also, I don't think iTunes is any faster or slower at syncing than JRiver. The bottleneck is the speed of USB not software. Unless you have a really slow computer...
Logged

Cheburashka

  • Junior Woodchuck
  • **
  • Posts: 72
Re: open source iPhone sync api
« Reply #44 on: December 03, 2008, 05:56:29 pm »

I would think that passing through iTunes would create, not a bottleneck, but rather add a substantial latency.  Consider that, especially with transcoding, jriver has to tell itunes about the file, itunes has to load the file, scanning it, then jriver has to tell itunes to put the file on the iPod/iPhone.  So, the file is being read twice.

For me maybe its worse than other people, because I access my music files from a server over a gigabit network.  So adding an additional time the file has to be read will actually have a significant impact.  (I suspect there are more people with jriver doing this than have spoken up.)

And jriver _is_ substantially slower to sync than iTunes, because jriver wants to re-randomize random playlists on each sync, whereas itunes just replaces the songs you listened to or skipped.  That, actually, is an important feature, while you're at it.
Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: open source iPhone sync api
« Reply #45 on: December 03, 2008, 07:45:22 pm »

Well, the alternative is that we don't use the newer iPods with MC at all. The only avenue left to us, thanks to Apple, is to do it via plugin through iTunes.

So personally I think the latency will be acceptable.
Logged

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: open source iPhone sync api
« Reply #46 on: December 03, 2008, 08:39:40 pm »

I agree....by any means necessary.
I have a touch now, but will consider adding two iphones next year when my current contract ends.
Even with an iphone, I wouldn't see a problem with clicking on it to initiate a sync that starts at bedtime and is finished before it's time to go to work.
For those already owning an iphone....does syncing prevent you from receiving calls?
Is that where the issue lies for you, or is it because you can't take the iphone into the bedroom with you since it's tethered to a pc in another room being syncd?

Logged

Cheburashka

  • Junior Woodchuck
  • **
  • Posts: 72
Re: open source iPhone sync api
« Reply #47 on: December 04, 2008, 01:02:55 pm »

Well, the alternative is that we don't use the newer iPods with MC at all. The only avenue left to us, thanks to Apple, is to do it via plugin through iTunes.

So personally I think the latency will be acceptable.

No, that isn't right.  The two other alternatives are: 1) Interfacing directly with the .dll, and 2) Implementing new synch code rather than talking to an Apple api (which is what jriver used to do).
Logged

Cheburashka

  • Junior Woodchuck
  • **
  • Posts: 72
Re: open source iPhone sync api
« Reply #48 on: December 04, 2008, 01:05:27 pm »


Is that where the issue lies for you, or is it because you can't take the iphone into the bedroom with you since it's tethered to a pc in another room being syncd?


The latter.   You can receive calls while synching, but it interrupts the synch.  With jriver (but not iTunes) the synch is then restarted from scratch, not resumed, when you put the phone back in the cradle.  Who knows what the plugin will do.
Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5908
  • Farm Animal Stupid
Re: open source iPhone sync api
« Reply #49 on: December 05, 2008, 07:25:29 am »

No, that isn't right.  The two other alternatives are: 1) Interfacing directly with the .dll, and 2) Implementing new synch code rather than talking to an Apple api (which is what jriver used to do).

So when can we expect your plugin?
Logged
Pages: [1] 2 3   Go Up