platinum hosthost app servicee是什么进程

Reva Host – Smart Web Hosting & Domains
Reliable host
Reliability service for your website
Internet tend to repeat predefined chunks as necessary
making this the first true generator on the internet.
Unlimited Bandwidth with Massive Storage
Unlimited Databases and Email Addresses
99.99% Uptime Guarantee & 24/7 Live Support
Apps Including WordPress, Drupal and Joomla
Easy to use Website Builder & one-click Setup
get freeDomain withAnnualPlan
from only$4.99/m
Reliable host
Reliability service for your website
Internet tend to repeat predefined chunks as necessary
making this the first true generator on the internet.
Unlimited Bandwidth with Massive Storage
Unlimited Databases and Email Addresses
99.99% Uptime Guarantee & 24/7 Live Support
Apps Including WordPress, Drupal and Joomla
Easy to use Website Builder & one-click Setup
get freeDomain withAnnualPlan
from only$36/m
dedicated servers
Simply dummy text for printing type
Internet tend to repeat predefined chunks as necessary
making this the first true generator on the internet.
Unlimited Bandwidth with Massive Storage
Unlimited Databases and Email Addresses
99.99% Uptime Guarantee & 24/7 Live Support
Apps Including WordPress, Drupal and Joomla
Easy to use Website Builder & one-click Setup
get freeDomain withAnnualPlan
from only$180/m
cloud computing
Simply dummy text for printing type
Internet tend to repeat predefined chunks as necessary
making this the first true generator on the internet.
Unlimited Bandwidth with Massive Storage
Unlimited Databases and Email Addresses
99.99% Uptime Guarantee & 24/7 Live Support
Apps Including WordPress, Drupal and Joomla
Easy to use Website Builder & one-click Setup
get freeDomain withAnnualPlan
from only$270/m
Make your Web site Visible to the WorldFast and flexible website creator is the easy way to build and manage a site for your businessWhat’s new at RevaHostWeb hosting services offers and new features
Host Your webSite
Makings of this the first true similar siron generator on the Internet.
CLOUD SERVERs
Makings of this the first true similar siron generator on the Internet.
Domain Names
Makings of this the first true similar siron generator on the Internet.
HOSTing SOLUTIONS
Makings of this the first true similar siron generator on the Internet.
Web Designing Services
We offer web design services for your businesses and personals.
Join Affiliate Program!
$ 1.00 per month Bronze Plan
500 GB Disk Space
100 Databases List
Free Domain Registration
1 Hosting Space
FREE Ad Coupons
Account Control Panel
FREE 24/7 Support
$ 3.00 per month Silver Plan
Unlimited Disk Space
100 Databases List
Free Domain Registration
1 Hosting Space
FREE Ad Coupons
Account Control Panel
FREE 24/7 Support
$ 5 per month Gold Plan
Unlimited Disk Space
100 Databases List
Free Domain Registration
1 Hosting Space
FREE Ad Coupons
Account Control Panel
FREE 24/7 Support
$ 10.00 per month Platinum Plan
Unlimited Disk Space
100 Databases List
Free Domain Registration
1 Hosting Space
FREE Ad Coupons
Account Control Panel
FREE 24/7 Support
We’ll just take care of it for you!
We will provide you with a hassle free web hosting service where we we take care. The majority have suffered alterations in some form injected humour, or randomiseds words which dont look the even slightly believable. If you are going to use a passagea lorem Ipsum you need to be sure there anythin embaras middle desktop publishing software like aldus pageMaker including versions.
There are many variations of passages of Lorem Ipsum available but the
There are many variations of passages of Lorem Ipsum available but the
There are many variations of passages of Lorem Ipsum available but the
What’s Included ?
Free Website Builde
Free Domain Registration
Free Instant Setup!
e-Commerce Shop Carts
Free Email Accounts
cPanel & Plesk Control Panel
Creating a New Website?
Get Building Started in 3 Easy Steps
Login to our Hosting Site Builder
Lorem Ipsum is Simply Dummy text
25 % discount
On all hosting orders
Just $10.99/year*
save big/ on domains
.com .net just 10.99 only
Why Choose Us?
Domain Registration
Web Hosting Services
Reseller Web Hosting
Virtual Servers
Dedicated Hosting
Cloud Host Servers
Apps Installs Easy
Money Back Guarantee
Secure Your Web site
Quality 24/7 Support
What People Say’s
Phere are many variations of passages of Ipsum available but the randomise words which don’t look even slightly believable. there isn’t anything hidden when looking desktop you need to be sure there isn’t anything publishing packages in the middle of generators.
- Jacob Alexander
Where are many variations of passages of Ipsum available but the randomise words which don’t look even slightly believable. there isn’t anything hidden when looking desktop you need to be sure there isn’t anything publishing packages in the middle of generators.
- Madison Ava
There are many variations of passages of Ipsum available but the randomise words which don’t look even slightly believable. there isn’t anything hidden when looking desktop you need to be sure there isn’t anything publishing packages in the middle of generators.
- Mark Richardson
REVA HOST,
P.O. BOX 38323 - 00100
NAIROBI, KENYA+
Have any Questions ?
If you have any questions, feel free to call us
PaymentsWe AcceptNo need to pay one year in advance!
Whether you need basic web hosting or high end services... or
anything in between ... pipelinehost.net is right for you!
We have plans to fit every need!
Web Hosting Made Easy!
Promotional
Pipelinehsost.net is a leading international webhosting company. Pipelinehost.net provides low cost web hosting services in addition to high end services for video professionals and everyone in between. Pipelinehost.net is for business and personal used and can handle any size storage and bandwith issues. Our servers have a very high uptime percentage and are located on a major USA backbome. Pipelinehost.net servers are state of the art and are manned 24/7 with the highest level of security. Pipelinehost.net web hosting service is unparalleled. Users can pay Pipelinehost.net monthly or yearly and all users receive all Installatron applications at no extra charge.1737人阅读
最近公司正在做关于DLNA的项目,初期在网上大概了解了一些DLNA相关知识,可以用来开发的框架有Platinum,Cling和Cybergarage。同学们可以选择适合自己的框架进行学习开发,至于为什么选择Platinum库是因为他是一个跨平台的C++库,效率较高,稳定性也很强。
下载地址:
网上的示例帖子很少,有一大部分都是蓝斯老师的,在这里要感谢他。下面开始讲解利用Platinum库开发步骤:
1.NDK下的降Platinum库编译成so文件
大家可以参考这篇博文,讲解的很详细了。
下载的Platinum为1-0-5-13_0ab854版本,博文中提到的将LOCAL_LDLIBS&+=&-laxTls改为LOCAL_LDLIBS&+=&-laxTLS新版本已经修复了。
2.Platinum库c++的实现
大家可以在目录Platinum\Source\Platform\Android\module\platinum\jni\下找到platinum-jni.cpp,这里边有示例代码:
/*****************************************************************
Android JNI Interface
Plutinosoft LLC
Author: Sylvain Rebaud ()
****************************************************************/
/*----------------------------------------------------------------------
+---------------------------------------------------------------------*/
#include &assert.h&
#include &jni.h&
#include &string.h&
#include &sys/types.h&
#include &platinum-jni.h&
#include &Platinum.h&
#include &android/log.h&
/*----------------------------------------------------------------------
+---------------------------------------------------------------------*/
NPT_SET_LOCAL_LOGGER(&platinum.android.jni&)
/*----------------------------------------------------------------------
+---------------------------------------------------------------------*/
__attribute__((constructor)) static void onDlOpen(void)
/*----------------------------------------------------------------------
JNI_OnLoad
+---------------------------------------------------------------------*/
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved)
NPT_LogManager::GetDefault().Configure(&plist:.level=FINE;.handlers=ConsoleH.ConsoleHandler.outputs=2;.ConsoleHandler.colors=.ConsoleHandler.filter=59&);
return JNI_VERSION_1_4;
com_plutinosoft_platinum_UPnP
* Signature: ()J
JNIEXPORT jlong JNICALL Java_com_plutinosoft_platinum_UPnP__1init(JNIEnv *env, jclass)
NPT_LOG_INFO(&init&);
PLT_UPnP* self = new PLT_UPnP();
return (jlong)
com_plutinosoft_platinum_UPnP
* Signature: (J)I
JNIEXPORT jint JNICALL Java_com_plutinosoft_platinum_UPnP__1start(JNIEnv *, jclass, jlong _self)
NPT_LOG_INFO(&start&);
PLT_UPnP* self = (PLT_UPnP*)_
return self-&Start();
com_plutinosoft_platinum_UPnP
* Signature: (J)I
JNIEXPORT jint JNICALL Java_com_plutinosoft_platinum_UPnP__1stop(JNIEnv *, jclass, jlong _self)
NPT_LOG_INFO(&stop&);
PLT_UPnP* self = (PLT_UPnP*)_
return self-&Stop();
编译后你会发现没有办法开启一个设备,因为PLT_UPnP中并没有加入PLT_DeviceHostReference对象,所以不能开启设备。但是在\Platinum\Source\Tests\MediaRenderer目录下大家可以找到MediaRendererTest.cpp文件:
/*****************************************************************
Platinum - Test UPnP A/V MediaRenderer
| Copyright (c) , Plutinosoft, LLC.
| All rights reserved.
| This prog you can redistribute it and/or
| modify it under the terms of the GNU General Public License
| as published by the Free Software F either version 2
| of the License, or (at your option) any later version.
| OEMs, ISVs, VARs and other distributors that combine and
| distribute commercially licensed software with Platinum software
| and do not wish to distribute the source code for the commercially
| licensed software under version 2, or (at your option) any later
| version, of the GNU General Public License (the &GPL&) must enter
| into a commercial license agreement with Plutinosoft, LLC.
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
| GNU General Public License for more details.
| You should have received a copy of the GNU General Public License
| alo see the file LICENSE.txt. If not, write to
| the Free Software Foundation, Inc.,
| 51 Franklin Street, Fifth Floor, Boston, MA
| http://www.gnu.org/licenses/gpl-2.0.html
****************************************************************/
/*----------------------------------------------------------------------
+---------------------------------------------------------------------*/
#include &PltUPnP.h&
#include &PltMediaRenderer.h&
#include &stdlib.h&
/*----------------------------------------------------------------------
+---------------------------------------------------------------------*/
struct Options {
const char* friendly_
/*----------------------------------------------------------------------
PrintUsageAndExit
+---------------------------------------------------------------------*/
static void
PrintUsageAndExit(char** args)
fprintf(stderr, &usage: %s [-f &friendly_name&]\n&, args[0]);
fprintf(stderr, &-f : optional upnp server friendly name\n&);
fprintf(stderr, &&path& : local path to serve\n&);
/*----------------------------------------------------------------------
ParseCommandLine
+---------------------------------------------------------------------*/
static void
ParseCommandLine(char** args)
const char*
tmp = args+1;
/* default values */
Options.friendly_name = NULL;
while ((arg = *tmp++)) {
if (!strcmp(arg, &-f&)) {
Options.friendly_name = *tmp++;
fprintf(stderr, &ERROR: too many arguments\n&);
PrintUsageAndExit(args);
/*----------------------------------------------------------------------
+---------------------------------------------------------------------*/
main(int /* argc */, char** argv)
/* parse command line */
ParseCommandLine(argv);
PLT_DeviceHostReference device(
new PLT_MediaRenderer(Options.friendly_name?Options.friendly_name:&Platinum Media Renderer&,
&ec7-2d91-2fb5-b757f2537e21&));
upnp.AddDevice(device);
bool added =
upnp.Start();
char buf[256];
while (gets(buf)) {
if (*buf == 'q')
if (*buf == 's') {
if (added) {
upnp.RemoveDevice(device);
upnp.AddDevice(device);
upnp.Stop();
可以看到代码中构建了一个PLT_DeviceHostReference对象,然后用upnp.AddDevice(device)添加进去,就可以正常开启一个dmr设备了。(我在实现自己的platinum-jni时,编译会报undefined reference to `PLT_MediaRenderer::PLT_MediaRenderer(char const*, bool, char const*, unsigned int, bool)的错误,可以尝试在mk文件中添加LOCAL_C_INCLUDES +=
$(PLT_SRC_ROOT)/Devices/MediaRenderer,问题解决)。
接下来我们要做的事情就是将c++中接受到的action事件反射到java层进行处理:
此时我们就要去\Platinum\Source\Devices\MediaRenderer目录下找PltMediaRenderer.cpp文件:
/*----------------------------------------------------------------------
PLT_MediaRenderer::OnAction
+---------------------------------------------------------------------*/
NPT_Result
PLT_MediaRenderer::OnAction(PLT_ActionReference&
const PLT_HttpRequestContext& context)
NPT_COMPILER_UNUSED(context);
/* parse the action name */
NPT_String name = action-&GetActionDesc().GetName();
// since all actions take an instance ID and we only support 1 instance
// verify that the Instance ID is 0 and return an error here now if not
NPT_String serviceType = action-&GetActionDesc().GetService()-&GetServiceType();
if (pare(&urn:schemas-upnp-org:service:AVTransport:1&, true) == 0) {
if (NPT_FAILED(action-&VerifyArgumentValue(&InstanceID&, &0&))) {
action-&SetError(718, &Not valid InstanceID&);
return NPT_FAILURE;
serviceType = action-&GetActionDesc().GetService()-&GetServiceType();
if (pare(&urn:schemas-upnp-org:service:RenderingControl:1&, true) == 0) {
if (NPT_FAILED(action-&VerifyArgumentValue(&InstanceID&, &0&))) {
action-&SetError(702, &Not valid InstanceID&);
return NPT_FAILURE;
/* Is it a ConnectionManager Service Action ? */
if (pare(&GetCurrentConnectionInfo&, true) == 0) {
return OnGetCurrentConnectionInfo(action);
/* Is it a AVTransport Service Action ? */
if (pare(&Next&, true) == 0) {
return OnNext(action);
if (pare(&Pause&, true) == 0) {
return OnPause(action);
if (pare(&Play&, true) == 0) {
return OnPlay(action);
if (pare(&Previous&, true) == 0) {
return OnPrevious(action);
if (pare(&Seek&, true) == 0) {
return OnSeek(action);
if (pare(&Stop&, true) == 0) {
return OnStop(action);
if (pare(&SetAVTransportURI&, true) == 0) {
return OnSetAVTransportURI(action);
if (pare(&SetPlayMode&, true) == 0) {
return OnSetPlayMode(action);
/* Is it a RendererControl Service Action ? */
if (pare(&SetVolume&, true) == 0) {
return OnSetVolume(action);
if (pare(&SetVolumeDB&, true) == 0) {
return OnSetVolumeDB(action);
if (pare(&GetVolumeDBRange&, true) == 0) {
return OnGetVolumeDBRange(action);
if (pare(&SetMute&, true) == 0) {
return OnSetMute(action);
// other actions rely on state variables
NPT_CHECK_LABEL_WARNING(action-&SetArgumentsOutFromStateVariable(), failure);
return NPT_SUCCESS;
action-&SetError(401,&No Such Action.&);
return NPT_FAILURE;
可以看到OnAction方法,此方法会在mediaRender设备接收到事件时调用
/*----------------------------------------------------------------------
PLT_MediaRenderer::OnNext
+---------------------------------------------------------------------*/
NPT_Result
PLT_MediaRenderer::OnNext(PLT_ActionReference& action)
if (m_Delegate) {
return m_Delegate-&OnNext(action);
return NPT_ERROR_NOT_IMPLEMENTED;
接着会调PltMediaRenderer的各种OnXXX(PLT_ActionReference& action)方法,在这里我们可以看到把action事件交给了m_Delegate来处理,所以我们要手动设置一个m_Delegate。在\Platinum\Source\Devices\MediaRenderer目录下有PltMediaRenderer.h头文件,定义了一个方法:// methods
virtual void SetDelegate(PLT_MediaRendererDelegate* delegate) { m_Delegate = }PLT_MediaRenderDelegate*
delegate是从这个方法里边设置进来的,所以我们需要继承PLT_MediaRenderDelagate来定义一个自己的子类,代码如下:
class IMediaActionReceiver : public PLT_MediaRendererDelegate
static const int MEDIA_RENDER_CTL_MSG_BASE = 0x100;
static const int MEDIA_RENDER_CTL_MSG_SET_AV_URL = (MEDIA_RENDER_CTL_MSG_BASE+0);
static const int MEDIA_RENDER_CTL_MSG_STOP = (MEDIA_RENDER_CTL_MSG_BASE+1);
static const int MEDIA_RENDER_CTL_MSG_PLAY = (MEDIA_RENDER_CTL_MSG_BASE+2);
static const int MEDIA_RENDER_CTL_MSG_PAUSE = (MEDIA_RENDER_CTL_MSG_BASE+3);
static const int MEDIA_RENDER_CTL_MSG_SEEK = (MEDIA_RENDER_CTL_MSG_BASE+4);
static const int MEDIA_RENDER_CTL_MSG_SETVOLUME = (MEDIA_RENDER_CTL_MSG_BASE+5);
static const int MEDIA_RENDER_CTL_MSG_SETMUTE = (MEDIA_RENDER_CTL_MSG_BASE+6);
static const int MEDIA_RENDER_CTL_MSG_SETPLAYMODE = (MEDIA_RENDER_CTL_MSG_BASE+7);
static const int MEDIA_RENDER_CTL_MSG_PRE = (MEDIA_RENDER_CTL_MSG_BASE+8);
static const int MEDIA_RENDER_CTL_MSG_NEXT = (MEDIA_RENDER_CTL_MSG_BASE+9);
virtual void ActionInflect(int cmd, const char* value, const char* data);
virtual NPT_Result OnGetCurrentConnectionInfo(PLT_ActionReference& action);
// AVTransport
virtual NPT_Result OnNext(PLT_ActionReference& action);
virtual NPT_Result OnPause(PLT_ActionReference& action);
virtual NPT_Result OnPlay(PLT_ActionReference& action);
virtual NPT_Result OnPrevious(PLT_ActionReference& action);
virtual NPT_Result OnSeek(PLT_ActionReference& action);
virtual NPT_Result OnStop(PLT_ActionReference& action);
virtual NPT_Result OnSetAVTransportURI(PLT_ActionReference& action);
virtual NPT_Result OnSetPlayMode(PLT_ActionReference& action);
// RenderingControl
virtual NPT_Result OnSetVolume(PLT_ActionReference& action);
virtual NPT_Result OnSetVolumeDB(PLT_ActionReference& action);
virtual NPT_Result OnGetVolumeDBRange(PLT_ActionReference& action);
virtual NPT_Result OnSetMute(PLT_ActionReference& action);
在相关代码中实现此类并且调用自己的ActionInflect方法来进行处理:
NPT_Result
IMediaActionReceiver::OnNext(PLT_ActionReference& action)
NPT_String curURI;
action-&GetArgumentValue(&CurrentURI&, curURI);
NPT_String metaD
action-&GetArgumentValue(&CurrentURIMetaData&, metaData);
ActionInflect(MEDIA_RENDER_CTL_MSG_NEXT, curURI.GetChars(),
metaData.GetChars());
return NPT_SUCCESS;
}ActionInflect方法代码如下:
IMediaActionReceiver::ActionInflect(int cmd, const char* value, const char* data)
NPT_LOG_INFO(&-------------------&@@@@@@@############.\n&);
JNIEnv *env = NULL;
bool isAttach =
status = jvm-&GetEnv((void**) &env, JNI_VERSION_1_4);
if(status != JNI_OK)
status = jvm-&AttachCurrentThread(&env, NULL);
if(status & 0) {
isAttach =
jstring valueString = NULL;
jstring dataString = NULL;
jclass inflectClass = g_inflectC
jmethodID inflectMethod = g_methodID;
if (inflectClass == NULL || inflectMethod == NULL)
valueString = env-&NewStringUTF(value);
dataString = env-&NewStringUTF(data);
env-&CallStaticVoidMethod(inflectClass, inflectMethod,valueString, dataString,cmd);
env-&DeleteLocalRef(valueString);
env-&DeleteLocalRef(dataString);
if (env-&ExceptionOccurred())
env-&ExceptionDescribe();
env-&ExceptionClear();
if (isAttach)
jvm-&DetachCurrentThread();
}其中jvm可以在JNI_OnLoad方法中得到,g_inflectClass跟g_methodID是你java层反射函数的Class跟方法ID(根据自身需求来定)。
下一步我们需要将事件状态值更新至所在服务列表
可以参考代码:
NPT_Result
PLT_MediaRenderer::SetupServices()
PLT_Service*
/* AVTransport */
service = new PLT_Service(
&urn:schemas-upnp-org:service:AVTransport:1&,
&urn:upnp-org:serviceId:AVTransport&,
&AVTransport&,
&urn:schemas-upnp-org:metadata-1-0/AVT/&);
NPT_CHECK_FATAL(service-&SetSCPDXML((const char*) RDR_AVTransportSCPD));
NPT_CHECK_FATAL(AddService(service));
service-&SetStateVariableRate(&LastChange&, NPT_TimeInterval(0.2f));
service-&SetStateVariable(&A_ARG_TYPE_InstanceID&, &0&);
// GetCurrentTransportActions
service-&SetStateVariable(&CurrentTransportActions&, &Play,Pause,Stop,Seek,Next,Previous&);
// GetDeviceCapabilities
service-&SetStateVariable(&PossiblePlaybackStorageMedia&, &NONE,NETWORK,HDD,CD-DA,UNKNOWN&);
service-&SetStateVariable(&PossibleRecordStorageMedia&, &NOT_IMPLEMENTED&);
service-&SetStateVariable(&PossibleRecordQualityModes&, &NOT_IMPLEMENTED&);
// GetMediaInfo
service-&SetStateVariable(&NumberOfTracks&, &0&);
service-&SetStateVariable(&CurrentMediaDuration&, &00:00:00&);
service-&SetStateVariable(&AVTransportURI&, &&);
service-&SetStateVariable(&AVTransportURIMetadata&, &&);;
service-&SetStateVariable(&NextAVTransportURI&, &NOT_IMPLEMENTED&);
service-&SetStateVariable(&NextAVTransportURIMetadata&, &NOT_IMPLEMENTED&);
service-&SetStateVariable(&PlaybackStorageMedium&, &NONE&);
service-&SetStateVariable(&RecordStorageMedium&, &NOT_IMPLEMENTED&);
service-&SetStateVariable(&RecordMediumWriteStatus&, &NOT_IMPLEMENTED&);
// GetPositionInfo
service-&SetStateVariable(&CurrentTrack&, &0&);
NPT_Result durResult = service-&SetStateVariable(&CurrentTrackDuration&, &00:00:00&);
service-&SetStateVariable(&CurrentTrackMetadata&, &&);
service-&SetStateVariable(&CurrentTrackURI&, &&);
NPT_Result relTimeResult = service-&SetStateVariable(&RelativeTimePosition&, &00:00:00&);
service-&SetStateVariable(&AbsoluteTimePosition&, &00:50:00&);
service-&SetStateVariable(&RelativeCounterPosition&, &&); // means NOT_IMPLEMENTED
service-&SetStateVariable(&AbsoluteCounterPosition&, &&); // means NOT_IMPLEMENTED
// disable indirect eventing for certain state variables
PLT_StateVariable*
var = service-&FindStateVariable(&RelativeTimePosition&);
if (var) var-&DisableIndirectEventing();
var = service-&FindStateVariable(&AbsoluteTimePosition&);
if (var) var-&DisableIndirectEventing();
var = service-&FindStateVariable(&RelativeCounterPosition&);
if (var) var-&DisableIndirectEventing();
var = service-&FindStateVariable(&AbsoluteCounterPosition&);
if (var) var-&DisableIndirectEventing();
// GetTransportInfo
service-&SetStateVariable(&TransportState&, &NO_MEDIA_PRESENT&);
service-&SetStateVariable(&TransportStatus&, &OK&);
service-&SetStateVariable(&TransportPlaySpeed&, &1&);
// GetTransportSettings
service-&SetStateVariable(&CurrentPlayMode&, &NORMAL&);
service-&SetStateVariable(&CurrentRecordQualityMode&, &NOT_IMPLEMENTED&);
/* ConnectionManager */
service = new PLT_Service(
&urn:schemas-upnp-org:service:ConnectionManager:1&,
&urn:upnp-org:serviceId:ConnectionManager&,
&ConnectionManager&);
NPT_CHECK_FATAL(service-&SetSCPDXML((const char*) RDR_ConnectionManagerSCPD));
NPT_CHECK_FATAL(AddService(service));
service-&SetStateVariable(&CurrentConnectionIDs&, &0&);
// put all supported mime types here instead
service-&SetStateVariable(&SinkProtocolInfo&, &http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_PRO,http-get:*:video/x-ms-asf:DLNA.ORG_PN=MPEG4_P2_ASF_SP_G726,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_FULL,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_BASE,http-get:*:audio/L16;rate=44100;channels=1:DLNA.ORG_PN=LPCM,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_PRO,http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM,http-get:*:video/x-ms-asf:DLNA.ORG_PN=VC1_ASF_AP_L1_WMA,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMDRM_WMABASE,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_FULL,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPLL_BASE,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC_XAC3,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMDRM_WMVSPLL_BASE,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPML_BASE,http-get:*:video/x-ms-asf:DLNA.ORG_PN=MPEG4_P2_ASF_ASP_L5_SO_G726,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL_XAC3,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAPRO,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG1,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN,http-get:*:video/x-ms-asf:DLNA.ORG_PN=MPEG4_P2_ASF_ASP_L4_SO_G726,http-get:*:audio/L16;rate=48000;channels=2:DLNA.ORG_PN=LPCM,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3X,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPML_MP3,http-get:*:video/x-ms-wmv:*,http-get:*:video/mp4:*&);
service-&SetStateVariable(&SourceProtocolInfo&, &&);
/* RenderingControl */
service = new PLT_Service(
&urn:schemas-upnp-org:service:RenderingControl:1&,
&urn:upnp-org:serviceId:RenderingControl&,
&RenderingControl&,
&urn:schemas-upnp-org:metadata-1-0/RCS/&);
NPT_CHECK_FATAL(service-&SetSCPDXML((const char*) RDR_RenderingControlSCPD));
NPT_CHECK_FATAL(AddService(service));
service-&SetStateVariableRate(&LastChange&, NPT_TimeInterval(0.2f));
service-&SetStateVariable(&Mute&, &0&);
service-&SetStateVariableExtraAttribute(&Mute&, &Channel&, &Master&);
service-&SetStateVariable(&Volume&, &100&);
service-&SetStateVariableExtraAttribute(&Volume&, &Channel&, &Master&);
service-&SetStateVariable(&VolumeDB&, &0&);
service-&SetStateVariableExtraAttribute(&VolumeDB&, &Channel&, &Master&);
service-&SetStateVariable(&PresetNameList&, &FactoryDefaults&);
return NPT_SUCCESS;
按照这些步骤,就能构建自己的dmr。说明一下自己在开发中遇到的一个问题,在构建自己的PLT_MediaRender时:
JNIEXPORT jint JNICALL Java_com_geniusgithub_mediarender_jni_PlatinumJniProxy__1startMediaRender(JNIEnv *env, jclass, jlong _self, jbyteArray _jbyteArrName,jbyteArray _jbyteArrayUUID)
PLT_UPnP* upnp = (PLT_UPnP*)_
char* dmr_name = (char*)env-&GetByteArrayElements(_jbyteArrName, 0);
    char* dmr_uuid = (char*)env-&GetByteArrayElements(_jbyteArrayUUID, 0);
PLT_MediaRenderer* mediaRender = new PLT_MediaRenderer(dmr_name,false,dmr_uuid,36439,false);
PLT_DeviceHostReference device(mediaRender);
myDevice =
upnp-&AddDevice(myDevice);
upnp-&Start();
}&span style=&font-size:18&&GetByteArrayElements有可能发生字符乱码情况,把方法中传入的jbyteArray改为jstring(相应的java层也应改变),代码改为:&/span&&pre name=&code& class=&cpp&&char* dmr_name = (char *) env-&GetStringUTFChars(name, 0);
char* dmr_uuid = (char *) env-&GetStringUTFChars(uuid, 0);&span style=&font-size:18&&乱码问题得到解决。所有要讲解的就到这了,过程中遇到了很多问题,所以写了这篇博文供大家参考,再次谢谢蓝斯博主!&/span&
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:1814次
排名:千里之外
评论:26条}

我要回帖

更多关于 hostappservice是什么 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信