added nested playlist support to the storage module
This commit is contained in:
parent
387630b03c
commit
7be7d6b0d9
|
@ -1,16 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE storageClientFactory [
|
||||
|
||||
<!ELEMENT storageClientFactory (testStorage, webStorage) >
|
||||
<!ELEMENT storageClientFactory (testStorage|webStorage) >
|
||||
|
||||
<!ELEMENT testStorage (playlist*) >
|
||||
<!ELEMENT testStorage (playlist*, audioClip*) >
|
||||
<!ATTLIST testStorage tempFiles CDATA #REQUIRED >
|
||||
|
||||
<!ELEMENT playlist (playlistElement*) >
|
||||
<!ATTLIST playlist id NMTOKEN #REQUIRED >
|
||||
<!ATTLIST playlist playlength NMTOKEN #REQUIRED >
|
||||
|
||||
<!ELEMENT playlistElement (audioClip) >
|
||||
<!ELEMENT playlistElement ((audioClip|playlist), fadeInfo?) >
|
||||
<!ATTLIST playlistElement id NMTOKEN #REQUIRED >
|
||||
<!ATTLIST playlistElement relativeOffset NMTOKEN #REQUIRED >
|
||||
|
||||
|
@ -19,6 +19,11 @@
|
|||
<!ATTLIST audioClip playlength NMTOKEN #REQUIRED >
|
||||
<!ATTLIST audioClip uri CDATA #REQUIRED >
|
||||
|
||||
<!ELEMENT fadeInfo EMPTY >
|
||||
<!ATTLIST fadeInfo id NMTOKEN #REQUIRED >
|
||||
<!ATTLIST fadeInfo fadeIn NMTOKEN #REQUIRED >
|
||||
<!ATTLIST fadeInfo fadeOut NMTOKEN #REQUIRED >
|
||||
|
||||
<!ELEMENT webStorage (location) >
|
||||
<!ATTLIST webStorage tempFiles CDATA #REQUIRED >
|
||||
|
||||
|
@ -30,19 +35,35 @@
|
|||
]>
|
||||
<storageClientFactory>
|
||||
<testStorage tempFiles="file:///tmp/tempPlaylist">
|
||||
<playlist id="1" playlength="01:30:00.000">
|
||||
<playlistElement id="101" relativeOffset="0" >
|
||||
<audioClip id="10001" playlength="01:00:00.000"
|
||||
uri="file:var/test1.mp3" />
|
||||
<playlist id="1" playlength="00:00:34.000" >
|
||||
<playlistElement id="101" relativeOffset="0" >
|
||||
<audioClip id="10001" playlength="00:00:11.000"
|
||||
uri="file:var/test1.mp3" />
|
||||
</playlistElement>
|
||||
<playlistElement id="102" relativeOffset="01:00:00.000" >
|
||||
<audioClip id="10002" playlength="00:30:00.000"
|
||||
uri="file:var/test2.mp3" />
|
||||
<playlistElement id="102" relativeOffset="00:00:11.000000" >
|
||||
<audioClip id="10002" playlength="00:00:12.000000"
|
||||
uri="file:var/test2.mp3" />
|
||||
<fadeInfo id="9901" fadeIn="00:00:02.000000"
|
||||
fadeOut="00:00:01.500000" />
|
||||
</playlistElement>
|
||||
<playlistElement id="103" relativeOffset="00:00:23.000000" >
|
||||
<playlist id="2" playlength="00:00:11.000000" >
|
||||
<playlistElement id="111" relativeOffset="0" >
|
||||
<audioClip id="10003" playlength="00:00:11.000"
|
||||
uri="file:var/test3.mp3" />
|
||||
</playlistElement>
|
||||
</playlist>
|
||||
</playlistElement>
|
||||
</playlist>
|
||||
<playlist id="2" playlength="00:00:11.000000" >
|
||||
<playlistElement id="111" relativeOffset="0" >
|
||||
<audioClip id="10003" playlength="00:00:11.000"
|
||||
uri="file:var/test3.mp3" />
|
||||
</playlistElement>
|
||||
</playlist>
|
||||
<audioClip id="10001" playlength="01:00:00.000"
|
||||
uri="file:var/test1.mp3" />
|
||||
<audioClip id="10002" playlength="00:30:00.000"
|
||||
uri="file:var/test2.mp3" />
|
||||
</testStorage>
|
||||
<webStorage tempFiles="file:///tmp/tempPlaylist" >
|
||||
<location server="localhost" port="80"
|
||||
path="/storage/var/xmlrpc/xrLocStor.php" />
|
||||
</webStorage>
|
||||
</storageClientFactory>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<!ATTLIST playlist id NMTOKEN #REQUIRED >
|
||||
<!ATTLIST playlist playlength NMTOKEN #REQUIRED >
|
||||
|
||||
<!ELEMENT playlistElement (audioClip) >
|
||||
<!ELEMENT playlistElement ((audioClip|playlist), fadeInfo?) >
|
||||
<!ATTLIST playlistElement id NMTOKEN #REQUIRED >
|
||||
<!ATTLIST playlistElement relativeOffset NMTOKEN #REQUIRED >
|
||||
|
||||
|
@ -16,20 +16,43 @@
|
|||
<!ATTLIST audioClip id NMTOKEN #REQUIRED >
|
||||
<!ATTLIST audioClip playlength NMTOKEN #REQUIRED >
|
||||
<!ATTLIST audioClip uri CDATA #REQUIRED >
|
||||
|
||||
<!ELEMENT fadeInfo EMPTY >
|
||||
<!ATTLIST fadeInfo id NMTOKEN #REQUIRED >
|
||||
<!ATTLIST fadeInfo fadeIn NMTOKEN #REQUIRED >
|
||||
<!ATTLIST fadeInfo fadeOut NMTOKEN #REQUIRED >
|
||||
]>
|
||||
<testStorage tempFiles="file:///tmp/tempPlaylist">
|
||||
<playlist id="1" playlength="01:30:00.000">
|
||||
<playlistElement id="101" relativeOffset="0" >
|
||||
<audioClip id="10001" playlength="01:00:00.000"
|
||||
uri="file:var/test1.mp3" />
|
||||
<playlist id="1" playlength="00:00:34.000" >
|
||||
<playlistElement id="101" relativeOffset="0" >
|
||||
<audioClip id="10001" playlength="00:00:11.000"
|
||||
uri="file:var/test10001.mp3" />
|
||||
</playlistElement>
|
||||
<playlistElement id="102" relativeOffset="01:00:00.000" >
|
||||
<audioClip id="10002" playlength="00:30:00.000"
|
||||
uri="file:var/test2.mp3" />
|
||||
<playlistElement id="102" relativeOffset="00:00:11.000000" >
|
||||
<audioClip id="10002" playlength="00:00:12.000000"
|
||||
uri="file:var/test10002.mp3" />
|
||||
<fadeInfo id="9901" fadeIn="00:00:02.000000"
|
||||
fadeOut="00:00:01.500000" />
|
||||
</playlistElement>
|
||||
<playlistElement id="103" relativeOffset="00:00:23.000000" >
|
||||
<playlist id="2" playlength="00:00:11.000000" >
|
||||
<playlistElement id="111" relativeOffset="0" >
|
||||
<audioClip id="10003" playlength="00:00:11.000"
|
||||
uri="file:var/test10003.mp3" />
|
||||
</playlistElement>
|
||||
</playlist>
|
||||
</playlistElement>
|
||||
</playlist>
|
||||
<playlist id="2" playlength="00:00:11.000000" >
|
||||
<playlistElement id="111" relativeOffset="0" >
|
||||
<audioClip id="10003" playlength="00:00:11.000"
|
||||
uri="file:var/test10003.mp3" />
|
||||
</playlistElement>
|
||||
</playlist>
|
||||
<audioClip id="10001" playlength="01:00:00.000"
|
||||
uri="file:var/test1.mp3" />
|
||||
uri="file:var/test10001.mp3" />
|
||||
<audioClip id="10002" playlength="00:30:00.000"
|
||||
uri="file:var/test2.mp3" />
|
||||
uri="file:var/test10002.mp3" />
|
||||
<audioClip id="10003" playlength="00:30:00.000"
|
||||
uri="file:var/test10003.mp3" />
|
||||
</testStorage>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: fgerlits $
|
||||
Version : $Revision: 1.14 $
|
||||
Version : $Revision: 1.15 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storage/src/TestStorageClientTest.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -159,7 +159,7 @@ TestStorageClientTest :: getAllPlaylistsTest(void)
|
|||
{
|
||||
Ptr<std::vector<Ptr<Playlist>::Ref> >::Ref
|
||||
playlistVector = tsc->getAllPlaylists(dummySessionId);
|
||||
CPPUNIT_ASSERT(playlistVector->size() == 1);
|
||||
CPPUNIT_ASSERT(playlistVector->size() == 2);
|
||||
|
||||
Ptr<Playlist>::Ref playlist = (*playlistVector)[0];
|
||||
CPPUNIT_ASSERT((int) (playlist->getId()->getId()) == 1);
|
||||
|
@ -200,7 +200,7 @@ TestStorageClientTest :: audioClipTest(void)
|
|||
Ptr<std::vector<Ptr<AudioClip>::Ref> >::Ref
|
||||
audioClipVector
|
||||
= tsc->getAllAudioClips(dummySessionId);
|
||||
CPPUNIT_ASSERT(audioClipVector->size() == 2);
|
||||
CPPUNIT_ASSERT(audioClipVector->size() == 3);
|
||||
|
||||
audioClip = (*audioClipVector)[0];
|
||||
CPPUNIT_ASSERT((int) (audioClip->getId()->getId()) == 10001);
|
||||
|
@ -231,7 +231,7 @@ TestStorageClientTest :: acquireAudioClipTest(void)
|
|||
}
|
||||
string audioClipUri("file://");
|
||||
audioClipUri += get_current_dir_name();
|
||||
audioClipUri += "/var/test2.mp3";
|
||||
audioClipUri += "/var/test10002.mp3";
|
||||
CPPUNIT_ASSERT(*(audioClip->getUri()) == audioClipUri);
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue