Skip to content

Commit 5a3728b

Browse files
committed
Add JSON serialize functionality
Signed-off-by: Emilia Dominiak <emilia.dominiak@intel.com>
1 parent f9986c8 commit 5a3728b

File tree

21 files changed

+416
-10
lines changed

21 files changed

+416
-10
lines changed

gef-integration.target/gef-integration.target

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<?pde version="3.8"?><target name="gef-integration" sequenceNumber="1">
2+
<?pde version="3.8"?>
3+
<target name="gef-integration" sequenceNumber="1">
34
<locations>
45
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
56
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>

org.sofproject.alsa.topo/.classpath

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
4+
<accessrules>
5+
<accessrule kind="accessible" pattern="javafx/**"/>
6+
</accessrules>
7+
</classpathentry>
48
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
59
<classpathentry kind="src" path="src"/>
610
<classpathentry kind="output" path="bin"/>

org.sofproject.alsa.topo/META-INF/MANIFEST.MF

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ Export-Package: org.sofproject.alsa.topo.conf,
1010
Require-Bundle: org.sofproject.core,
1111
org.sofproject.topo.ui
1212
Bundle-Vendor: Intel Corporation
13+
Import-Package: org.sofproject.gst.json

org.sofproject.alsa.topo/src/org/sofproject/alsa/topo/model/AlsaTopoGraph.java

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,56 @@ public void serialize() throws CoreException, IOException {
536536
}
537537
outputFile.getParent().refreshLocal(1, null);
538538
}
539+
540+
@Override
541+
public String getPipelineString() {
542+
try {
543+
ByteArrayOutputStream os = new ByteArrayOutputStream();
544+
Writer writer = new BufferedWriter(new OutputStreamWriter(os));
545+
// tlv-s
546+
tlvs.serialize(writer);
547+
548+
// vendor tokens
549+
vTokensIndex.serialize(writer);
550+
551+
// vendor tuples
552+
vTuplesIndex.serialize(writer);
553+
554+
// data
555+
dataIndex.serialize(writer);
556+
557+
// control bytes
558+
controlBytes.serialize(writer);
559+
560+
// control mixers
561+
controlMixers.serialize(writer);
562+
563+
// pcm capabilities
564+
pcmCapsIndex.serialize(writer);
539565

566+
// pcm-s
567+
pcms.serialize(writer);
568+
569+
// be-s
570+
beIndex.serialize(writer);
571+
572+
// hw-configs
573+
hwConfigs.serialize(writer);
574+
575+
// pipelines (widgets + graphs)
576+
pipelines.serialize(writer);
577+
interConnections.serialize(writer);
578+
579+
writer.close();
580+
os.close();
581+
582+
return os.toString();
583+
} catch (IOException e) {
584+
e.printStackTrace();
585+
return null;
586+
}
587+
}
588+
540589
@Override
541590
public IRemoteOpsProvider getRemoteOpsProvider() {
542591
return null; // no extra ops

org.sofproject.alsa.topo/src/org/sofproject/alsa/topo/model/AlsaTopoPipeline.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929

3030
package org.sofproject.alsa.topo.model;
3131

32+
import java.io.BufferedWriter;
33+
import java.io.ByteArrayOutputStream;
3234
import java.io.IOException;
35+
import java.io.OutputStreamWriter;
3336
import java.io.Writer;
3437
import java.util.Collection;
3538
import java.util.HashMap;

org.sofproject.fw.ui/.classpath

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
4+
<accessrules>
5+
<accessrule kind="accessible" pattern="javafx/**"/>
6+
</accessrules>
7+
</classpathentry>
48
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
59
<classpathentry kind="src" path="src"/>
610
<classpathentry kind="output" path="bin"/>

org.sofproject.gst.topo/.classpath

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
4+
<accessrules>
5+
<accessrule kind="accessible" pattern="javafx/**"/>
6+
</accessrules>
7+
</classpathentry>
48
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
9+
<classpathentry exported="true" kind="lib" path="lib/jackson-annotations-2.10.1.jar"/>
10+
<classpathentry exported="true" kind="lib" path="lib/jackson-core-2.10.1.jar"/>
11+
<classpathentry exported="true" kind="lib" path="lib/jackson-databind-2.10.1.jar"/>
512
<classpathentry kind="src" path="src"/>
13+
<classpathentry kind="lib" path="C:/Users/edominia/Downloads/jackson-annotations-2.10.1.jar" sourcepath="C:/Users/edominia/Downloads/jackson-annotations-master.zip"/>
14+
<classpathentry kind="lib" path="C:/Users/edominia/Downloads/jackson-core-2.10.1.jar" sourcepath="C:/Users/edominia/Downloads/jackson-core-master.zip"/>
15+
<classpathentry kind="lib" path="C:/Users/edominia/Downloads/jackson-databind-2.10.1.jar" sourcepath="C:/Users/edominia/Downloads/jackson-databind-master.zip"/>
616
<classpathentry kind="output" path="bin"/>
717
</classpath>

org.sofproject.gst.topo/META-INF/MANIFEST.MF

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ Require-Bundle: org.sofproject.core,
1010
org.sofproject.ui,
1111
org.sofproject.topo.ui,
1212
com.jcraft.jsch
13+
Bundle-ClassPath: lib/jackson-annotations-2.10.1.jar,
14+
lib/jackson-core-2.10.1.jar,
15+
lib/jackson-databind-2.10.1.jar,
16+
.
17+
Export-Package: org.sofproject.gst.json

org.sofproject.gst.topo/build.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ source.. = src/
22
output.. = bin/
33
bin.includes = META-INF/,\
44
.,\
5-
plugin.xml
5+
plugin.xml,\
6+
lib/jackson-annotations-2.10.1.jar,\
7+
lib/jackson-core-2.10.1.jar,\
8+
lib/jackson-databind-2.10.1.jar
66.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)