Skip to main content

How we can copy new video items to CDS of OCAP MediaServer

3 replies [Last post]
shyam007
Offline
Joined: 2011-09-28
Points: 0

Hi,

Thank you for your help,

I have installed OCAP-RI on my Windows PC and try to access the OCAP Media Server using my ControlPoint.

I need to add some new content to MediaServer CDS, but am not able to find out the content directory of OCAP MediaServer Simulator.

Could you please tell me how we can add new media item to OCAP MediaServer CDS?

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mkorzen
Offline
Joined: 2008-03-05
Points: 0

The correct way to add non-recorded (i.e. personal) content to the network-visible CDS is via the following HN API method:
org.ocap.hn.content.ContentContainer.createContentItem(File, String, ExtendedFileAccessPermissions).

If you are just looking for a quick way to do it without writing any code, you can use the RI QA supplied DvrExerciser application:
1. From the $PLATFORMROOT directory, execute "./runRI.sh -autodvr -setup".
2. Wait for the application to load. As soon as it is loaded, its persistent storage directory is initialized and content can be copied there.
3. Create a directory named "content" under $OCAPROOT/bin/$OCAPTC/env/persistent/usr/1/6001/. Copy your content to that newly created directory.
4. Publish the personal content to the CDS as follows:
A. 2: Display Home Networking Menu
B. 1: HN Server Options
C. 2: Publish files as content items in CDS.

=> Your files should now be visible and browsable on the home network.

Best -
Marcin

shyam007
Offline
Joined: 2011-09-28
Points: 0

Thank You So much for your help.

I have followed your steps, but am not able to to see the published content on the home network because the res@protocolInfo of this content is empty

==================================================================

.<item id="1" parentID="0" restricted="0">

..<res protocolInfo="http-get:*:*:*">http://192.xx.xx.xx:4004/ocaphn/personalcontent?id=1</res>

..<dc:title>picture.jpg</dc:title>

..<upnp:class>object.item</upnp:class>

.</item>

.<item id="2" parentID="0" restricted="0">

..<res protocolInfo="http-get:*:*:*">http://192.xx.xx.xx:4004/ocaphn/personalcontent?id=2</res>

..<dc:title>my_content.mpg</dc:title>

..<upnp:class>object.item</upnp:class>

=====================================================

why OCAP server is not exposing any metadata of this newly added conetent?

I got following message after select "Publish files as content items in CDS"

Created content item idx 1,with ID=2

Unrecognized content content class: my_content.mpg

Created content item id 1, with ID=2,res:[Ljava.lang.String;@b44876bc]

keyReleased:9

I am running OCAP MediaServer on windows, do i need to change any other settings.

mkorzen
Offline
Joined: 2008-03-05
Points: 0

This looks like a bug in the RI. The stack somehow needs to figure out the mime type of the content being added. We are currently in process of drafing some porting layer changes that would allow the platform to be queried for mime-type and DLNA profile IDs of any type of content:

http://java.net/projects/ocap-ri/forums/porting-forum/topics/515-Propose...

Specifically,

/**
* Returns mime type string for the supplied content item using the specified
* DLNA profile ID transfer. This method will return mime type string, assuming
* caller has allocated memory whose size is MPE_HN_MAX_MIME_TYPE_STR_SIZE.
*
* @param contentLocation indicates content location type such as recording, tsb, etc.
* @param contentDescription structure describing content which varies depending on
* content location type provided
* @param profileIDStr retrieve mime type for content item using this profile
* @param mimeType returns mime type string using caller allocated memory of
* MPE_HN_MAX_MIME_TYPE_STR_SIZE
*/
mpe_Error mpeos_hnGetMimeTypeStr(mpe_HnStreamContentLocation contentLocation,
void* contentDescription,
char* profileIDStr,
char* mimeType);

Best -

Marcin