![]() |
|
|||
|
Help with Simple "List" plugin
I have been working on this simple plugin. It looks at a particular folder and then will list the files that exist in it.
I am having trouble even getting the menu option to even appear on the main menu.... I have attached my plugin and the its source code. Here are my questions:
Eric |
|
||||
|
Re: Help with Simple "List" plugin
Your code within the skin file looks correct.
Your code within the cs file looks correct. My guess is its a namespace issue. Since, I am not at my desktop I am unable to load the code. I did see a lot of "extra" files though, did you run through my existing documentation. That should get you to the blank tablet, and then you could copy and paste the skin & cs file. Be careful not to confiuse newmedia, newmediamodule, newmediascreen, etc. But yeah, it should be working. If that doesn't help I'll take a look at the code early in the week. -Brett
__________________
A Sample of My Beyond Media Projects: Game Library: Browse and play your ROMS, Arcade Games, and PC Games within BM! MSN Messenger for BM: Add MSN Messenger to BM. Includes MSN notifications over any module, and a chat client! PIN Plugin for BM: Add PIN protection to any module in BM, including the settings! BTV Recorded Shows: Brings the BTV Recording Library into BM with full show details. |
|
|||
|
Re: Help with Simple "List" plugin
I read the tutorial. I went back and simplified the namespaces. I am still getting the same error. This is what I am getting:
11/21/2004 09:50:56 *****Beyond Media Started (Version: 1.0.0 Build: 544) ***** 11/21/2004 09:50:56 BMMainForm.InitializeDeviceObjects initializing texture caches. 11/21/2004 09:50:57 Loading the Hotbar defaults 11/21/2004 09:50:57 BMMainForm.InitializeDeviceObjects initializing font manager. 11/21/2004 09:51:00 ************************************ Sunday, November 21, 2004 9:51:00 PM LoadSinglePlugin failed to load: C:\Documents and Settings\All Users\Application Data\SnapStream\Beyond Media\Plugins\NewMedia\SnapStream.Plugins.NewMedia .dll. System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic) at SnapStream.BeyondMedia.PluginsLoader.LoadSinglePlu gin(ParserContext context, PluginInfo plugin) at SnapStream.BeyondMedia.PluginsLoader.LoadDynamicPl ugins(ParserContext context, PluginInfoList pluginList) This is not telling me what line of code to look at. Any help would be appreciated! Thanks, Eric |
|
||||
|
Re: Help with Simple "List" plugin
Quote:
Your *.zipped compiled version has two dlls. This could be a sign of concern, it should only have 1 dll. Make sure it is looking at the new & a not the old named dll. I will offer to take a look at it in a day or two, when I get some free time. But, that is definitely what is going on. Once you do get the plugin loading, a helpful debug trick is (*I believe*): SnapStream.Logging.WriteLog("here") Although, I will have to doublecheck the exact path, but that will be helpful once it does start to load. -Brett
__________________
A Sample of My Beyond Media Projects: Game Library: Browse and play your ROMS, Arcade Games, and PC Games within BM! MSN Messenger for BM: Add MSN Messenger to BM. Includes MSN notifications over any module, and a chat client! PIN Plugin for BM: Add PIN protection to any module in BM, including the settings! BTV Recorded Shows: Brings the BTV Recording Library into BM with full show details. |
|
|||
|
Re: Help with Simple "List" plugin
Okay. I am not receiving errors now! But, I still cannot see the New Media item on the Main Menu.
Thanks, Eric |
|
||||
|
Re: Help with Simple "List" plugin
Quote:
-Brett
__________________
A Sample of My Beyond Media Projects: Game Library: Browse and play your ROMS, Arcade Games, and PC Games within BM! MSN Messenger for BM: Add MSN Messenger to BM. Includes MSN notifications over any module, and a chat client! PIN Plugin for BM: Add PIN protection to any module in BM, including the settings! BTV Recorded Shows: Brings the BTV Recording Library into BM with full show details. |
|
||||
|
Re: Help with Simple "List" plugin
Heres the working version...
(well sort of... I am not sure the heck your trying to accomplish with NewScreenUpdater so I just moved it and commented it out) I put a few dummy "items" in your list just to fill it. You had some issues with your namespace (as I suspected) I have dual monitors so I had my tutorial on the left and your code on the right and was able to fix it up real quickly. Part of the issue was your plugin.xml had: Class="SnapStream.Plugins.NewMedia.NewMediaListScr een" IT SHOULD HAVE HAD... Class="SnapStream.Plugins.NewMedia.NewMediaScreen" That is why it compiled but was giving you "null" results, I suspect. Eitherway attached is a start. You also should look at the tutorial and configure it for pre/post build events so you don't have to manually copy & paste the files each time. -Brett
__________________
A Sample of My Beyond Media Projects: Game Library: Browse and play your ROMS, Arcade Games, and PC Games within BM! MSN Messenger for BM: Add MSN Messenger to BM. Includes MSN notifications over any module, and a chat client! PIN Plugin for BM: Add PIN protection to any module in BM, including the settings! BTV Recorded Shows: Brings the BTV Recording Library into BM with full show details. |
|
|||
|
Re: Help with Simple "List" plugin
Brett,
Thanks. It is now working. I now have my bearings. I want to start playing the video that I select in the Beyond Video player. Can you show me some code that fires a file to the proper "player" from a list? I can't find an instance of that in the plugins out there. I have tried to look through the object browser, no luck! -Eric |
|
||||
|
Re: Help with Simple "List" plugin
Quote:
Code:
ShowScreen ss = new ShowScreen("VideoPlayer");
ss.Execute();
SnapStream.Commands.StandardCommands.Player.PlayVideo.Fire(new SnapStream.Commands.CommandExecuteArgs(pathName));
Code:
//up in constructor _previewWindow = new VideoPlayer(); add(_previewWindow); //in playback function _previewWindow.CloseFile(); _previewWindow.Visible = true; _previewWindow.Focus(); _previewWindow.Visible = false; _previewWindow.OpenFile(pathName); _previewWinodw.Visible = true; The third way would be write a new class that extends VideoPlayer. You could then define the HUD, and other features (such as closed caption) without having it return to the video folder module. This would be the best implementation, but for the first person to attempt it would probably be the hardest. I would go with the second method for the time being. I am *hopeful* this will change real quick with v1.1. It was mentioned way to late in the game. -Brett
__________________
A Sample of My Beyond Media Projects: Game Library: Browse and play your ROMS, Arcade Games, and PC Games within BM! MSN Messenger for BM: Add MSN Messenger to BM. Includes MSN notifications over any module, and a chat client! PIN Plugin for BM: Add PIN protection to any module in BM, including the settings! BTV Recorded Shows: Brings the BTV Recording Library into BM with full show details. |
|
|||
|
Re: Help with Simple "List" plugin
Brett,
I went with your suggestion. One thing I noticed in the code below though is that you didn't specify that I need to "hide" the current screen, like: this.Visible = false; Code:
//up in constructor _previewWindow = new VideoPlayer(); add(_previewWindow); //in playback function _previewWindow.CloseFile(); _previewWindow.Visible = true; _previewWindow.Focus(); _previewWindow.Visible = false; _previewWindow.OpenFile(pathName); _previewWinodw.Visible = true; I hate to keep bugging you about the little details, but I can't find anything out there. Maybe I'm a pioneer in BeyondMedia plugin development.... -Eric |
|
||||
|
Re: Help with Simple "List" plugin
Quote:
So ask away. Your code should look something like this to handle escaping from the playing video... Code:
public override void OnKeyDown( object sender, System.Windows.Forms.KeyEventArgs e )
{
base.OnKeyDown(sender, e);
//ADD code to handle escaping back to main menu
//this is code to return back to your module if video is playing
if(_previewWindow.visible && e.KeyCode == System.Windows.Forms.Keys.Escape)
{
//play DefaultSoundList sound
//hide preview window, unhide other widgets
_previewWindow.closeFile();
}
}
-Brett
__________________
A Sample of My Beyond Media Projects: Game Library: Browse and play your ROMS, Arcade Games, and PC Games within BM! MSN Messenger for BM: Add MSN Messenger to BM. Includes MSN notifications over any module, and a chat client! PIN Plugin for BM: Add PIN protection to any module in BM, including the settings! BTV Recorded Shows: Brings the BTV Recording Library into BM with full show details. |
|
|||
|
Re: Help with Simple "List" plugin
Would this also be how we handle FFWD and REW events? We should just check the "e.KeyCode == System.Windows.Forms.Keys.FastForward", or something like that?
- Eric |
|
||||
|
Re: Help with Simple "List" plugin
Quote:
-Brett
__________________
A Sample of My Beyond Media Projects: Game Library: Browse and play your ROMS, Arcade Games, and PC Games within BM! MSN Messenger for BM: Add MSN Messenger to BM. Includes MSN notifications over any module, and a chat client! PIN Plugin for BM: Add PIN protection to any module in BM, including the settings! BTV Recorded Shows: Brings the BTV Recording Library into BM with full show details. |
|
|||
|
Re: Help with Simple "List" plugin
Gentlemen,
I have a quick solution to the original problem. I have not delved into the specific problem of where to override certain behaviors. After we released the RC, we noted that having the VideoBrowserScreen and the VideoPlayerScreen tied together was problematic. So we split those screens up. Here is the code we use to launch the VideoPlayerScreen and have it play a certain file. Code:
private void OpenPlayer( string filename ) {
ShowScreen screenLauncher;
screenLauncher = new ShowScreen( "VideoPlayerScreen", filename );
screenLauncher.Execute();
return;
}
More later on overriding key presses... |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Upgraded/lost list in "recorded shows" | lanceluck | Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum | 5 | 08-30-2006 11:47 PM |
| THE SIMPLE SOLUTION for "Failed to Build Live TV Graph" - BTV4 | m4ng0 | Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum | 1 | 02-12-2006 12:08 PM |
| Interested in doing a NEW plugin? I have a "partial" start... | Brett | Development Discussion | 4 | 02-15-2005 07:43 PM |
| Simple and highest picture quality "Live TV" setup | onion | SnapStream Discussion | 7 | 01-21-2005 06:11 PM |
| Is there a "what's new" list for each build? | turbodb | Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum | 5 | 11-27-2004 01:27 PM |