Adobe Media Server provides a plug-in architecture written in C++ that lets you extend the functionality of the server. Use the Access, Authorization, and File plug-ins to build unique deployments with expanded access, authorization, and file management solutions.

For example, you can use the plug-ins to accept, reject, or redirect clients before they reach your application-level code (Access plug-in), control access to streams and server events (Authorization plug-in), and create a file I/O mechanism (File plug-in).

For information about the Adobe Media Server Plug-in architecture, see Using plug-ins to configure and optimize Flash Media Server 4.5 by Denis Bulichenko.

Workflow for developing and deploying a plug-in

Note:

For information about upgrading a plug-in, see Upgrading the plug-ins.

  1. Modify the sample plug‑in to meet your organization’s needs or write your own plug‑in.

    See Sample files.

  2. Build and compile the plug‑in for your platform.

    See Compile a plug-in.

  3. Deploy the plug‑in.

    See Deploy a plug-in.

Sample files

The server includes sample files for each plug‑in. Use these samples to learn how to use the API or use them as starting points for your own plug‑ins.

Note:

To build the default plug‑ins, use the make files. Use the make command with the -f option to run the make file.

Access plug‑in

The following sample files are installed to rootinstall\samples\plugins\access.

Filename

Description

adaptor.cpp

sample.cpp

adaptor.h

Sample Access plug‑in C++ files and header file.

AccessModuleSample.sln

AccessModuleSample.vcproj

Work files used with Microsoft Visual C++ for building an Access plug‑in in a Windows environment. You can modify the files’ values to reflect the practices in your environment.

Makefile.access

Use this file to build the default Access plug‑in on Linux.

StdAfx.h

StdAfx.cpp

Sample includes file declaration files.

Authorization plug-in

The following sample files are installed to rootinstall\samples\plugins\auth.

Filename

Description

AuthModule.cpp

Sample Authorization plug‑in C++ file.

AuthModule.sln

AuthModule.vcproj

Work files used with Microsoft Visual C++ for building an Authorization plug‑in in a Windows environment. You can modify the files’ values to reflect the practices in your environment.

Makefile.AuthModule

Use this file to build the default Authorization plug‑in on Linux.

StdAfx.h

StdAfx.cpp

Sample includes file declaration files.

File plug-in

The following sample files are installed to rootinstall\samples\plugins\file.

Filename

Description

SimpleFileAdaptor.cpp

SimpleFileAdaptor.h

Sample File plug‑in C++ file and header file.

FileModule.h

A header file that defines create and destroy functions for the plug‑in.

FileUtil.cpp

Utility functions for working with files and directories.

FileModule.sln

FileModule.vcproj

Work files used with Microsoft Visual C++ for building a File plug‑in in a Windows environment. You can modify the files’ values to reflect the practices in your environment.

Makefile.FileModule

Use this file to build the default File plug‑in on Linux.

StdAfx.h

StdAfx.cpp

Sample includes file declaration files.

Header files

The following header files define the plug‑in API and are installed to rootinstall\samples\plugins\include: FmsAdaptor.h, FmsAuthActions.h, FmsAuthAdaptor.h, FmsAuthEvents.h, FmsFileAdaptor.h, FmsMedia.h, and IFCAccessAdaptor.h.

Compile a plug-in

Use Microsoft® Visual Studio .NET 2003, Microsoft Visual C++ 2005, or Microsoft Visual Studio .NET 2008 to compile plug‑ins in Windows. Use GNU Compiler Collection 3.4.x to compile plug‑ins in Linux.

Note:

The Authorization plug-in and the Access plug-in have compilation warnings that are harmless. Ignore the warnings as you compile.

Build the plug‑in as a Release. If you build the plug‑in as Debug the modules don’t load with the server process.

Plug‑ins are implemented as shared library (DLL) files in Windows systems and as shared object (SO) files in Linux systems. The filenames are: libconnect.dll/libconenct.so, AuthModule.dll/AuthModule.so, and FileModule.dll/FileModule.so.

To build on a 64-bit version of a linux GCC compiler, use the -m32 switch and -B option for GCC. Point the -B switch to the /usr/lib32 libraries.

An Access plug‑in must have the name libconnect.dll/libconnect.so. Authorization plug‑ins and File plug‑ins can have any name.

Deploy a plug-in

Once deployed, a plug‑in plugs into a server process. The plug‑in is loaded during the process start-up and unloaded during process shutdown. For example, when a vhost is restarted a new core process starts up and loads a copy of an Authorization plug‑in. When the vhost stops, the core process unloads the Authorization plug‑in.

  1. Do one of the following to stop the server:

    • In Windows, choose Start > Control Panel > Administrative Tools > Services. Select Adobe Media Server (FMS) from the Services list and click Stop.

    • In Linux, open a shell window and go to the directory where the server is installed: cd /opt/adobe/ams. Enter the following: ./server stop.

  2. Copy the compiled plug‑in DLL or SO files to one of the following folders:

    • rootinstall/modules/access

    • rootinstall/modules/auth

    • rootinstall/modules/fileio

    Note:

    Do not change the folder names. If you’re deploying multiple Authorization plug‑ins, copy all the plug‑ins into the /auth folder.

  3. Do one of the following to start the server:

    • In Windows, choose Start > Control Panel > Administrative Tools > Services. Select Adobe Media Server (FMS) from the Services list and click Start.

    • In Linux, open a shell window and go to the directory where the server is installed: cd /opt/adobe/ams. Enter the following: ./server start.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy