SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-24-2009, 11:48 PM
redondo_se redondo_se is offline
Sage Advanced User
 
Join Date: May 2007
Posts: 191
How do I get sage to recognize my media player plugin?

Sorry for the newb question. It's been a long time since I've done Java. I created a really simple media player plugin that implements the Media Player Plugin interface. The first thing I want to do is just find the video handle as described in the doc. All my methods are empty except:

Code:
public void load(byte majorTypeHint, byte minorTypeHint, String encodingHint, 
	  File file, String hostname, boolean timeshifted, long bufferSize) 
	  throws sage.PlaybackException
		{
		System.out.println("sage video handle = " + sage.VideoFrame.getInstance().getVideoHandle());
		}
I just have a single class file in a package like so:

Code:
package SeanWMP;

import sage.*;
import java.io.File;
import java.lang.*;

public class Player implements sage.MediaPlayer {
I compiled the class to Player.class and then used the following jar command

jar.exe cf SeanWMP.jar Player.class

Then I copied the jar file to

C:\Program Files\SageTV\SageTV\JARs

and set the following in my SageClient.properties

media_player_plugin_class/mkv=SeanWMP.Player

The debug log shows the jar being included in the classpath

Sun 1/25 0:21:11.071 classpath=C:\Program Files\SageTV\SageTV\Sage.jar;C:\Program Files\SageTV\SageTV\plugin.jar;C:\Program Files\SageTV\SageTV\;.;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;JARs\commons-jxpath-1.1.jar;JARs\commons-logging-api.jar;JARs\commons-logging.jar;JARs\jcifs-1.1.6.jar;JARs\jdic.jar;JARs\mx4j-impl.jar;JARs\mx4j-jmx.jar;JARs\mx4j-remote.jar;JARs\mx4j-tools.jar;JARs\sbbi-jmx-1.0.jar;JARs\sbbi-upnplib-1.0.3.jar;JARs\SeanWMP.jar

But later in the log I see the follwing when I try to play an mkv

Sun 1/25 0:21:23.625 ERROR Creating MediaPlayer plugin:java.lang.ClassNotFoundException: SeanWMP.Player

I must be missing something simple.

I'm on Vista Ultimate 32 bit SP1 with Java 6.11 SDK.

Thanks,
Sean
Reply With Quote
  #2  
Old 01-24-2009, 11:51 PM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
If you're on Vista with UAC the directory you need to change your properties file and maybe even drop the jar file in would be in the Virtual Store. Check the FAQ regarding Vista.

Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #3  
Old 01-25-2009, 07:58 AM
redondo_se redondo_se is offline
Sage Advanced User
 
Join Date: May 2007
Posts: 191
Thanks for the suggestion. I meant to include that UAC is disabled. The log is showing my jar in the classpath, so it has to be seeing my jar.

Note to mods, I guess I should have posted this in the customizations section.Edit>Moved per your request, justme<EDIT

Thanks,
Sean

Last edited by justme; 01-25-2009 at 12:18 PM.
Reply With Quote
  #4  
Old 01-26-2009, 10:07 AM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
You ran the jar program from the wrong dir so you lost the package info I think. Go up one dir and use SeanWMP/Player.class as the arg.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #5  
Old 01-26-2009, 10:45 AM
redondo_se redondo_se is offline
Sage Advanced User
 
Join Date: May 2007
Posts: 191
Quote:
Originally Posted by Narflex View Post
You ran the jar program from the wrong dir so you lost the package info I think. Go up one dir and use SeanWMP/Player.class as the arg.
Yes, you're right!

I actually figured that out last night but didn't have time to post that I figured it out. It's been a long time since I did Java. I forgot that the directory structure of your class files in the jar file has to match the package naming structure.

Thanks!
Reply With Quote
  #6  
Old 01-26-2009, 01:03 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by Narflex View Post
You ran the jar program from the wrong dir so you lost the package info I think. Go up one dir and use SeanWMP/Player.class as the arg.
Or use a Java IDE that makes the JAR automatically when you compile.
__________________
-- Greg
Reply With Quote
  #7  
Old 01-26-2009, 01:26 PM
redondo_se redondo_se is offline
Sage Advanced User
 
Join Date: May 2007
Posts: 191
Quote:
Originally Posted by GKusnick View Post
Or use a Java IDE that makes the JAR automatically when you compile.
Yeah, need to get one. My understanding is that eclipse is the defacto Java IDE, right? I was using notepad and vista cmd.exe.
Reply With Quote
  #8  
Old 01-26-2009, 04:43 PM
redondo_se redondo_se is offline
Sage Advanced User
 
Join Date: May 2007
Posts: 191
One more question:

Can I use a media player plugin for Live TV, or only media files?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SageTV Media Player Plugin Narflex SageTV Studio 40 04-08-2010 02:54 PM
Another BTV to Sage TV Conversion deipert SageTV Software 6 01-15-2008 03:55 PM
Media Externder cannot find Sage Server Chas_STV SageTV Media Extender 2 01-13-2008 06:15 PM
Sage Player AWS SageTV Software 0 12-19-2007 01:02 PM
Sage DVD Player vs. Zoom/TT Players Jesse SageTV Software 47 02-17-2006 02:34 PM


All times are GMT -6. The time now is 05:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.