Input Plug-in SDK

From wiki.jriver.com
Revision as of 05:50, 4 May 2015 by Glynor (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

This SDK contains everything you need to create an input plug-in for Media Center. A Media Center plug-in has two main components, each with their own responsibilities. The first component is responsible for providing Media Center with decompressed audio data on demand. The second component is used to analyze files and save tag information.

Download the SDK

Writing a plug-in

The best way to learn about Media Center's plug-in architecture, and to eventually write your own plug-in, is to work through the example provided. It's the simplest plug-in possible, playing and analyzing RAW files. You should be able to simply make changes where necessary to this project and end up with a plug-in for your own format.

Some Considerations

Here are just a few things to remember when writing a plug-in:

  • The example plug-in was made with Microsoft Visual Studio .NET.
  • You must link to the library JRReader.lib and include the header file MJInputSource.h & MJInputSource.cpp to create a plug-in.
  • Plug-ins are provided with a really handy utility called a "reader" (JRReader.lib). Basically, a reader provides a standard way to read files, with no regard for whether the file is sitting on the hard drive or if it's an Internet URL. Whenever you need to do anything with a file, it's recommended that you use the reader. They should make your life as a developer quite a bit easier. If you base your plug-in around the example, you'll see the reader being used.