basic help (for implementing osx smart folders)

Discuss issues related to PS3 Media Server development (only for programmers)

Re: basic help (for implementing osx smart folders)

Postby glebb » Sat May 26, 2012 8:37 pm

First version ready, but it comes with a TWIST :) I wrote it with Groovy.

About the implementation, it was actually much easier than I thought. The osx mdfind does all the work, there was no need to manually parse anything.

Check it out: https://github.com/glebb/pms-osx-smartfolder
glebb
 
Posts: 20
Joined: Mon May 21, 2012 4:20 pm
Location: Finland

Re: basic help (for implementing osx smart folders)

Postby glebb » Sun May 27, 2012 8:13 pm

I ran into some problems, regarding video streaming. Maybe you can help?

1. Normal .avi files are served with mencoder transcoding by default (if the same file is served from normal folder, no transcoding is on by default)
2. Files offered with tsmuxer transcoding fail to play.

All other media, music and pictures, seem to work ok.

The structure I create in the plugin is:
VirtualFolder
.. -VirtualFolder
.... -RealFile
.... -RealFile

Is there something I'm missing?

The trace shows this:
Code: Select all
NFO  2012-05-27 22:10:29.242 [New I/O server worker #1-12] Starting transcode/remux of Blade.Runner.1982.FiNAL.CUT.720p.HDDVD.x264-SiNNERS.mkv
INFO  2012-05-27 22:10:29.244 [New I/O server worker #1-12] The video will not play or show a black screen on the ps3...
ERROR 2012-05-27 22:10:34.863 [New I/O server worker #1-12] There is no inputstream to return for Blade.Runner.1982.FiNAL.CUT.720p.HDDVD.x264-SiNNERS.mkv [tsMuxeR]
WARN  2012-05-27 22:10:39.234 [Process Destroyer] Sending kill -14 to the Unix process: 89710


When playing the same file from normal folder tsmuxer works correctly. Also if using mencoder, it works correctly even from OSX Smart Folder. Only tsmuxer fails.
glebb
 
Posts: 20
Joined: Mon May 21, 2012 4:20 pm
Location: Finland

Re: basic help (for implementing osx smart folders)

Postby glebb » Sun May 27, 2012 9:22 pm

Hmm, maybe DLNAResource.addChild(DLNAResource child) is doing something that I'm not expecting.
glebb
 
Posts: 20
Joined: Mon May 21, 2012 4:20 pm
Location: Finland

Re: basic help (for implementing osx smart folders)

Postby glebb » Sun May 27, 2012 10:30 pm

Ah. It was just a case of not calling resolve(). Live and learn.
glebb
 
Posts: 20
Joined: Mon May 21, 2012 4:20 pm
Location: Finland

Re: basic help (for implementing osx smart folders)

Postby glebb » Mon May 28, 2012 7:42 am

I'm clueless. I'm guessing the problem is somehow related to how I populate the folders. I'm currently just doing addChild in the beginning, when the plugin is loaded. Should I create my own types instead of VirtualFolders and override discoverChildren() and/or refreshChildren()? At least DLNAMediaInfo seems to be null when I'm debugging, which might cause the forced default transcoding for every video file (still doesn't explain why tsmuxer fails though). The resolve() gets the mediainfo correct, but should I call it myself somewhere?
glebb
 
Posts: 20
Joined: Mon May 21, 2012 4:20 pm
Location: Finland

Re: basic help (for implementing osx smart folders)

Postby glebb » Tue May 29, 2012 7:01 pm

Ok. So discoverChildren is the method where childs should be added. Should help.
>back to tinkering.
glebb
 
Posts: 20
Joined: Mon May 21, 2012 4:20 pm
Location: Finland

Re: basic help (for implementing osx smart folders)

Postby taconaut » Tue May 29, 2012 7:41 pm

discoverChildren is being called the first time a folder is being browsed on the renderer, refreshChildren all subsequent times.
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 1071
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

Re: basic help (for implementing osx smart folders)

Postby dmitche3 » Fri Jan 25, 2013 5:37 pm

I'm trying to debug PMS and I found this posting regarding why I can't get the externals to work.
Taconaut, can you update/repost the links below when you get a moment as they are no longer valid as to explain how to get Eclipse to work in debug.
Thanks!

taconaut wrote:pms hasn't been set up to load plugins contained in the external libraries when debugging. This will be added when pms-mlx gets merged into pms.

If you want to debug the plugin you have to do this:
As the relative path of the plugins directory isn't the same when running from eclipse or when packaged, you have to load the plugins dir from a properites file (click) and configure the version in a properties file to run from eclipse (click) and when packaged (click). Then you can put the plugins into /src/main/external-resources/plugins.

If you need a running example, check out pms-mlx and pms-plugins in my github repo, load all projects contained in these two repos into eclipse. When running pms, you'll be able to set a break point in the plugins and debug them.
dmitche3
 
Posts: 30
Joined: Mon Jan 21, 2013 11:55 pm

Previous

Return to Developers

Who is online

Users browsing this forum: No registered users and 3 guests