QT SDK. Use encoder and decoder simultaneously

We develop a software for video conversion. When we tried to convert QT DV to QT DV with different settings the SDK don't work properly. I guess that some conflict occurs when we use encoder and decoder simultaneously.
Is is known bug? Is there any workaround?

http://jakarta.apache.org/commons/codec/

Similar Messages

  • Best practice for encoding and decoding DUT/UUT registers? Class? Cluster? Strings? Bitbanging?

    I am architectecting a LabVIEW system to charactarize silicon devices.  I am trying to decide the best way to enqueue, encode, and decode device commands executed by my test system.
    For example, a ADC or DAC device might come in both I2C and SPI flavors (same part, different interface) and have a large register map which can be represented as register names or the actual binrary value of it's address. 
    I would like my data structure to
    *) be protocol agnostic
    *) have the flexibility to program using either the memonics or hard coded addresses
    *) be agnostic to the hardware which executes the command. (
    *) I would like to enqueue mulitple commands in a row.
    I am thinking a detailed class is my best bet, but are there are examples or best practices already established?

    I agree on the detailed class inherited from a general DUT-class. Especially if you want to mix interfaces you need to keep those as far away from your top vi as possible.
    As to the 4th point i'd implement command-vi's as enque and have a in-class command-queue (or possibly just an array of commands).
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Encode and Decode 16 bit grayscale image to jpeg2000

    i am trying to convert 10 bit grayscale raw image to jpeg 2000 using J2KImageWriter and i want it to convert back to grayscale raw image but when i am converting it it gives NULL.
    Here is my code
    public class Main {
    public static void main(String[] args) {
    if(args.length!=4)
    System.out.println("\nEnter imagefile height width header\n");
    System.exit(0);
    String filename=args[0];
    int height=Integer.parseInt(args[1]);
    int width=Integer.parseInt(args[2]);
    int header=Integer.parseInt(args[3]);
    try
    //reading the image data
    FileInputStream imagefile=new FileInputStream(filename);
    System.out.println("\nSize of image file:"+imagefile.available());
    System.out.println("\nHeader:"+String.valueOf(header)+" bytes\n");
    imagefile.skip(header);
    short pixels[]=new short[height*width];
    int i,j,k;
    k=0;
    for(i=0;i<height;i++)
    for(j=0;j<width;j++)
    int lsb=imagefile.read();
    int msb=imagefile.read();
    pixels[k]=(short)(msb<<8 | lsb);
    k++;
    //System.out.println(String.valueOf(pixels[i][j]));
    imagefile.close();
    DataBuffer buffer=new DataBufferUShort(pixels,width*height);
    SampleModel sm=RasterFactory.createBandedSampleModel(DataBuffer.TYPE_USHORT,height,width,1);
    Raster raster=RasterFactory.createWritableRaster(sm, buffer,new Point(0,0));
    //imagedata reading complete
    //conversion to jpeg 2000
    String outfile=args[0].substring(0,args[0].lastIndexOf('.'))+".jp2";
    File outimage=new File(outfile);
    ImageOutputStream imout=ImageIO.createImageOutputStream(outimage);
    J2KImageWriteParam j2kparam=new J2KImageWriteParam();
    J2KImageWriterSpi spi=new J2KImageWriterSpi();
    J2KImageWriter j2kwriter=new J2KImageWriter(spi);
    j2kparam.setLossless(true);
    j2kparam.setComponentTransformation(false);
    j2kparam.setEncodingRate(0.5f);
    j2kparam.setFilter(J2KImageWriteParam.FILTER_53);
    j2kparam.setNumDecompositionLevels(3);
    j2kparam.setWriteCodeStreamOnly(true);
    j2kwriter.setOutput(imout);
    j2kwriter.write(null,new IIOImage(raster,null,null),j2kparam);
    imout.close();
    J2KImageReaderSpi j2kspi=new J2KImageReaderSpi();
    J2KImageReader j2kreader=new J2KImageReader(j2kspi);
    ImageInputStream imin=ImageIO.createImageInputStream(outfile);
    j2kreader.setInput(imin, true, false);
    Raster decomp_raster=j2kreader.readRaster(1, null);
    int outputdata[]=new int[width*height];
    decomp_raster.getPixels(0,0,width,height,outputdata);
    FileOutputStream fileout=new FileOutputStream("decomp");
    for(i=0;i<height*width;i++)
    short temp=(short)outputdata;
    fileout.write(Short.valueOf(temp).byteValue());
    Short a=new Short(Short.reverseBytes(temp));
    fileout.write(a.byteValue());
    fileout.close();
    catch(Exception e)
    System.out.println(e.getMessage());
    Can anybody help me with this. Actually i need to study the performance of jpeg2000 compression using different setting of parameters.
    Thanks in advance.......

    Hi,
    I am able to encode and decode the image using J2Kwriter and J2Kreader classes. But now some other issue has came up.
    When compressed losslessly, the new jpeg2000 filesize is 415245 bytes. (My original file is of size 2000000 bytes)
    But when i am doing lossy compression, it results in following file sizes.
    Below 0.5 (encoding rate) - 535 bytes.
    Greater than or equal to 0.5 - 541 bytes.
    I tried with the following values of encoding rate - 0.1, 0.3, 0.5, 0.8, 1, 1000, 100000000, 500000000.
    I m not able to understand why i am getting the same filesize even with different encoding rate.
    How should i set the encoding rate parameter to achieve my target compression ratio.
    Kindly guide me. I will be very thankful to you.
    Preeti

  • Encode and Decode Base64

    Hi All,
    I need to Encode and Decode Base64 File. 
    Please let me know if there is any Function Modules or Class Methods to achieve the requirement.
    Thanks in advance.
    Regards
    Joseph
    Message was edited by: Joseph Brown

    Hi,
    This is the encoded base64 file in XML format:
    <?xml version="1.0" encoding="UTF-8"?>
    <Z_CREFO_DOC>
    <E_PDF><![CDATA[JVBERi0xLjMKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29k
    ZT4+CnN0cmVhbQp4nE2MPQ/CMAxEd/8Kj/aQEKehIWvFh8QElTfEVNFOGUr7/0UagcTd8vSkuxmd
    FY9u6wGDLs4rRA1dhfvvCeYIaDbbZU8c9Dxk7LMGG50RGkWsHobExpj7F1NjhBzfCgG5tAR/Z0
    5pYMN6Qs9OJACxuhlY0n5Kde4aRwL/0A6e4hnWVuZHN0cmVhbQplbmRvYmoKNiAwIG9iagoxMzEK
    ZW5kb2JqCjQgMCBvYmoKPDwvVHlwZS9QYWdlL01lZGlhQm94IFswIDAgNTk1LjIyIDg0Ml0KL1Jv
    dGF0ZSAwL1BhcmVudCAzIDAgUgovUmVzb3VyY2VzPDwvUHJvY1NldFsvUERGIC9UZXh0XQovRXh0
    R1N0YXRlIDEwIDAgUgovRm9udCAxMSAwIFIKPj4KL0NvbnRlbnRzIDUgMCBSCj4+CmVuZG9iagoz
    IDAgb2JqCjw8IC9UeXBlIC9QYWdlcyAvS2lkcyBbCjQgMCBSCl0gL0NvdW50IDEKL1JvdGF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x
    ODE3IDAwMDAwIG4gCjAwMDAwMDA1NTUgMDAwMDAgbiAKMDAwMDAwMDU4NSAwMDAwMCBuIAowMDAw
    MDAwNjE1IDAwMDAwIG4gCjAwMDAwMDE3OTYgMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSAxNCAv
    Um9vdCAxIDAgUiAvSW5mbyAyIDAgUgovSUQgWyityXEclVXSeoKdpGR5FFwppSkorclxHJVV0nqC
    naRkeRRcKaUpXQo+PgpzdGFydHhyZWYKMjU5NgolJUVPRgo=]]>
    </E_PDF>
    <C_ERROR></C_ERROR>
    </Z_CREFO_DOC>
    Can i pass all these characters or i need to transform it first, extract the value of the element and decode? Finally i need to write the decoded outcome to a file (a pdf file) to the hard drive (may be with: OPEN DATASET P_DATASET FOR INPUT IN TEXT MODE ENCODING DEFAULT)
    I saw this hint but I think there should be more to it (eg. transformation of the initial decoded xml file and the writing it to hard drive using the Open Dataset for Input...):
    ****************being of report *************************
    DATA: z       TYPE string,
          encode  TYPE string,
          decode  TYPE string .
    DATA: obj  TYPE REF TO cl_http_utility,
          cref TYPE REF TO if_http_utility.
    CREATE OBJECT : obj.
    cref = obj.
    z = 'what u have to encode'.
    encode = obj->if_http_utility~encode_base64( z ) .
    decode = obj->if_http_utility~decode_base64( encode ).
    ****************end of report ***************************
    What do i need more to the above report

  • Encode and Decode the Image

    Hi,
    I have a requirement like to encode the image(anyone of type:-jpg.gif) byte Array and placed into XML file.
    I can use this xml file as datasource in BIRT,decode the byte data and bind to Image.
    so I need to encode and decode the Image with predefined Libraries,
    Could anyone Help to me.
    Thanks and Regards
    Swetha.

    Get the name of the file.
    Read the file as bytes
    Encode the bytes as base64 string
    Insert name into a XML element
    Insert base64 into a XML element
    Reverse to extract.
    Image libraries have nothing to do with that process.

  • Does xMII have encoding and decoding functuinality?

    hello,
    does xMII have encoding and decoding functionality in xMII application level?
    or xMII does not have application level encoding and decoding and users just use SSL technology or network device level encode / decode technology when they want to have data communication security?
    Sincerely, Shiroh Kinoshita - SAP Japan

    Hello (Konnichiha) Vivek,
    Thanks for your answer.
    I understand those database level and server level authorization functionality.  What I mean is :
    I mean security for data leakage during data communication between something and xMII.  does xMII have any encode and decode function during communication? 
    Sincerely, Shiroh Kinoshita

  • JPEG ENCODING AND DECODİNG WITH DCT TRANSFORMATION

    I NEED A JAVA SOURCE CODE JPEG ENCODING AND DECOD&#304;NG WITH DCT TRANSFORMATION ALSO QUANTIZATION. IT IS URGENT BECAUSE I WILL USE IT IN MY PROJECT AND I AM NOT GOOD AT JAVA . PLEASE I AM WAITING YOUR HELPS. MY MAIL IS [email protected] thank you very much

    I NEED A JAVA SOURCE CODE JPEG ENCODING AND DECOD�NG WITH DCT TRANSFORMATION ALSO QUANTIZATION. IT IS URGENT BECAUSE I WILL USE IT IN MY PROJECT AND I AM NOT GOOD AT JAVA . PLEASE I AM WAITING YOUR HELPS. MY MAIL IS [email protected] thank you very much

  • Encode and Decode

    Hai,
    Can i encode the URL rewriting and decode in next page.
    example,
    Qutation.jsp?atdmin_status=y";
    in qutation.jsp can i decode that url for re using the request
    But i want to show some text in URL .is it possible?plz give sample code
    Regards,
    john jayaraj

    Hi,
    I am able to encode and decode the image using J2Kwriter and J2Kreader classes. But now some other issue has came up.
    When compressed losslessly, the new jpeg2000 filesize is 415245 bytes. (My original file is of size 2000000 bytes)
    But when i am doing lossy compression, it results in following file sizes.
    Below 0.5 (encoding rate) - 535 bytes.
    Greater than or equal to 0.5 - 541 bytes.
    I tried with the following values of encoding rate - 0.1, 0.3, 0.5, 0.8, 1, 1000, 100000000, 500000000.
    I m not able to understand why i am getting the same filesize even with different encoding rate.
    How should i set the encoding rate parameter to achieve my target compression ratio.
    Kindly guide me. I will be very thankful to you.
    Preeti

  • What encoder and decoder recommend in Yosemite?

    I use iTunes and VLC to play all the Videos as usual.. So what encoder and decoder do you recommend better in Yosemite?

    None.
    OS X includes most that you need and VLC can handle what it can't.

  • Base40 encode and decode

    Hi
    I'm looking to compress (and decompress) some already short strings (think about the same amount of text as a search engine might show for a result).
    One of the most effective ways of compressing short strings seems to be base 40 encoding as found in the accepted answer here: http://stackoverflow.com/questions/7389252/shorten-an-already-short-string-in-java
    At least against my data, it seems to outperform LZF and Smaz.
    However, I can't for the life of me figure out how to decode it. I've even found encode and decode implementations in C, but my C is woefully inadequate to derive the Java: http://www.drdobbs.com/embedded-systems/slimming-strings-with-custom-base-40-pac/229400732
    To show willing, here's one of many attempts at writing a method to decode it:
         public String unpack(byte[] input) { //FIXME: No workie.
              ByteArrayInputStream bois = new ByteArrayInputStream(input);
              DataInputStream dis = new DataInputStream(bois);
              StringBuilder sb = new StringBuilder();
              char a,b,c;
              try {
                   while ((a = dis.readChar()) != '\0' && (b = dis.readChar()) != '\0' && (c = dis.readChar()) != '\0') {
                        sb.append(chars.charAt(a % 40));
                        sb.append(chars.charAt(b / 40 % 40));
                        sb.append(chars.charAt(c / 40 / 40));
              } catch (IOException e) {
                   throw new AssertionError(e);
              return sb.toString();
    Could anyone help me out? Thanks in advance.

    Welcome to the forum!
    >
    Could anyone help me out? Thanks in advance.
    >
    Thanks for posting the code that you tried.
    Problem #1 in your code is that you are not following the instructions from the author for decoding
    >
    Read each pair of bytes as a char ch. The first index is ch % 40, the second is ch / 40 % 40 and the last is ch / 40 / 40. Use chars to turn the index into a char. Note; I have swap the order in the code to make it simpler to decode. A 0 means you have reached the end.
    >
    You are reading three characters. Each pair of bytes represents THREE characters. You need to reach ONE character (one pair of bytes) and then break it up into three characters.
    Problem #2 is in the author's code. There is no '0' at the end. The author's code does not add a zero at the end to indicate the end of the string. The author's code also shows that some byte arrays are an odd number of characters long. That means you CANNOT read each pair as there may be a single remaining byte.
    Since you posted the code you were trying I was able to create code that works.
    I created a decode method and call it from the main method and print out the decoded results.
    import java.util.Arrays;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.io.IOException;
    class Encoder {
        public static final int BASE = 40;
        StringBuilder chars = new StringBuilder(BASE);
        byte[] index = new byte[256];
        {     chars.append('\0');
          for (char ch = 'a'; ch <= 'z'; ch++) chars.append(ch);
          for (char ch = '0'; ch <= '9'; ch++) chars.append(ch);
          chars.append("-:.");
          Arrays.fill(index, (byte) -1);
          for (byte i = 0; i < chars.length(); i++)
            index[chars.charAt(i)] = i;
        public byte[] encode(String address) {
            try {
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                DataOutputStream dos = new DataOutputStream(baos);
                for (int i = 0; i < address.length(); i += 3) {
                    switch (Math.min(3, address.length() - i)) {
                        case 1: // last one.
                            byte b = index[address.charAt(i)];
                            dos.writeByte(b);
                            break;
                        case 2:
                            char ch = (char) ((index[address.charAt(i+1)]) * 40 + index[address.charAt(i)]);
                            dos.writeChar(ch);
                            break;
                        case 3:
                            char ch2 = (char) ((index[address.charAt(i+2)] * 40 + index[address.charAt(i + 1)]) * 40 + index[address.charAt(i)]);
                            dos.writeChar(ch2);
                            break;
                  return baos.toByteArray();
            } catch (IOException e) {
                throw new AssertionError(e);
        public static void main(String[] args) {
            Encoder encoder = new Encoder();
            byte [] encodedBytes;
            String decodedString;
            for (String s : "twitter.com:2122,123.211.80.4:2122,my-domain.se:2121,www.stackoverflow.com:80".split(",")) {
                encodedBytes = encoder.encode(s);
                System.out.println(s + " (" + s.length() + " chars) encoded is " + encodedBytes.length + " bytes.");
                decodedString = encoder.decode(encodedBytes);
                System.out.println("Decoded String is [" + decodedString + "].");
        public String decode(byte[] input) { //FIXME: No workie.
            ByteArrayInputStream bois = new ByteArrayInputStream(input);
            DataInputStream dis = new DataInputStream(bois);
            StringBuilder sb = new StringBuilder();
            char a,b,c;
            int index;
                try {
            for (int i = 0; i < input.length / 2; i++) {
                    a = dis.readChar();
                    index = a % 40;
                    if (index == 0) break;
                    sb.append(chars.charAt(index));
                    index = a / 40 % 40;
                    if (index == 0) break;
                    sb.append(chars.charAt(index));
                    index = a / 40 / 40;
                    if (index == 0) break;
                    sb.append(chars.charAt(index));
            if ((input.length % 2) != 0) {
                index = dis.readByte();
                if (index != 0) sb.append(chars.charAt(index));
                } catch (IOException e) {
                    throw new AssertionError(e);
            return sb.toString();
    twitter.com:2122 (16 chars) encoded is 11 bytes.
    Decoded String is [twitter.com:2122].
    123.211.80.4:2122 (17 chars) encoded is 12 bytes.
    Decoded String is [123.211.80.4:2122].
    my-domain.se:2121 (17 chars) encoded is 12 bytes.
    Decoded String is [my-domain.se:2121].
    www.stackoverflow.com:80 (24 chars) encoded is 16 bytes.
    Decoded String is [www.stackoverflow.com:80].

  • URL Encode and Decode

    Hi Experts,
    My Oracle Version:
    BANNER                                                                         
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production         
    PL/SQL Release 11.1.0.7.0 - Production                                         
    CORE     11.1.0.7.0     Production                                                     
    TNS for 32-bit Windows: Version 11.1.0.7.0 - Production                        
    NLSRTL Version 11.1.0.7.0 - Production                                         
    5 rows selected.I got the requirement to check any URL encode and decode methods available in common for O racle and PHP,
    Since URL will be encoded in database at the time of retreiving data from database but it will be decoded in PHP without db connection.
    Hope my scenario will be clear to you, is any common function available in oracle and php for this process?

    but escape, unescape just adds %20 for empty space in the URLwell it does a bit more: it escapes all special characters that should not be in a URL, e.g.
    SQL> select utl_url.escape('#^|%µ ') escaped_url from dual
    ESCAPED_URL                                                                    
    %23%5E%7C%25%B5%20                                                             
    1 row selected.Can you give an example of how you want a completely converted url, and why?

  • Audio encoding and decoding

    hello,
    i am doing a voice-chat application.i badly need to reduce the size of the recording ,compress the audio.i have not been able to get a mixer which supports a-law or u-law encoded compression by default ;all mixers support the 16 bit PCM.please suggest a way to encode and decode in a-law or u-law.

    Please don't post in threads that are long dead and don't hijack other threads. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    I'm locking this thread now.

  • Base 64 Encoding and Decoding

    Hi,
    I am in need of a standard Java API from either sun's implementation or from SAP's implementation to perform Base64 encoding and decoding...
    Can someone please provide me the links to get the same ?
    Thanks & Regards,
    Gurushant S.H

    Hi Gurushant,
    first, welcome on SDN forums!
    About your question: See SAP's Base64 secKey encoding
    Hope it helps
    Detlev
    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

  • SOAP in XI: message use="encoded" and binding/@style="rpc"

    Hi
    Hope somebody who is familiar with XIs SOAP implementation could give the answer for my questions. Problem is that the SOAP server is not working but I am afraid that the reasons are not really simple.
    In our company we have to provide some SOAP services. I have entered as much as I could in IR ... including a simple scenario. Then imported the scenario to ID and the wizard created a number of agreements and determinations...
    As I need to describe the service to external parties, then I used IDs Web Service definition tool to generate the WSDL.
    But as the external messaging framework (for us a preprogrammed SOAP client) is fixed, I noticed that there are some differences that might matter.
    XI generated WSDL where SOAP binding has
    wsdl:binding/soap:binding/@style="document" but I would need it to be "rpc"
    And the second thing is that in binding message bodies have attribute @use="literal" but as the messages should have several parts then it should be "encoded" (and encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    also is needed then).
    Could somebody explain if these may be the reasons why the soap server does not work. And if there is a way to define soap interface so that it would have above mentioned properties as needed.
    A easy question also... I would need for a method to have an empty message... inside soap body there should be just a tag with the message name and no content. But I can not figure out how to create a message type with no datatype.
    Thanks for any input!

    Hi, Stefan
    Thanks for the answer. To clear my questions: we want to deploy XI as the SOAP server (sry I have not figured out if it is a sender or receiver channel by name - all this inbound-outbound naming in XI is quite complex). Our SOAP server/XI is actually  just one part of a big SOAP network and MAFIA it uses rpc styled SOAP messages.
    The note is really useful, but still it does not give any hint how to make a RPC styled SOAP interface. So the problem is still up for me. As I am not very familiar with WSDL bindings and SOAP... for the message it self, is there any difference as for the RPC vs DOCUMENT style is discussed? Is it possible that the physical structure of a SOAP envelope could be the same?
    And the second question: is there a way in IR to define several parts for a message. Something like:
    <message name="isiku_andmed">
      <part name="paring" type="tns:isiku_andmed_paring" />
      <part name="keha" type="tns:isiku_andmed_keha" />
    </message>

  • Url Encoding and decoding

    Hi All,
    I am trying to encode the url, pass spme parameters and decode them in another jsp.
    Encoding:
    <a href="<c:url value="abc.jsp">
                        <c:param name="folder" value="${sectionValue.foldername}"/>
                        <c:param name="filen" value="${fn:trim(sectionValue.filelink)}"/>
                        </c:url>"
                        target="_blank">${sectionValue.filename} (${sectionValue.filetype})</a>Decoding in abc.jsp
    <%
    out.clear();
         out = pageContext.pushBody();
         String path ="E:\\web\\forms\\Current\\";
         String folder = request.getParameter("folder");
         String filen = URLDecoder.decode(request.getParameter("filen"), "UTF-8");
         path=path+folder+"\\"+filen;
         System.out.println(path);
    %>When I print this path, it still is T L Fam12.19.08.pdf instead of T + L Fam12.19.08.pdf.
    It is encoding correctly , cause it is T%2bL%2520Fam12.19.08.pdf
    Thanks

    It is encoding correctly , cause it is T%2bL%2520Fam12.19.08.pdfIt looks like at least part of it has been encoded twice.
    %25 decodes to a % sign.
    So it would have been encoded once, space converts to %20
    Encoded a second time %20 --> %2520 (encodes the % sign)
    What is the value of "${sectionValue.filelink}" that you are encoding?
    Does it already have the %20 in it?

Maybe you are looking for

  • Dead Google Search Links in Safari

    After making a Google search, I hit the 'back' button, only to find all of the links on the page frozen. This happens ALL the time in my Safari Google searches. Is anybody experiencing a similar issue? For example: 1) I search "Martin Luther King" in

  • Differcence between  2-tier and 3-tier

    hiii,       diff between 2-tier and 3-tier sap architecture??

  • MF8280CW scan result is a white page

    Hey everybody, hey Canon ! I'm having a serious trouble scanning with my brand new Canon i-SENSYS MF8280CW and I was wondering if someone else is experiencing or has experienced any similar issue : all scanned documents are white, no content shows on

  • Problem using a library with an EAR file (ServletNotFoundException)

    Hello I'm trying to use a library (J2EE library project) an associated it to an Enterprise Application Project. The application was built using the Spring MVC framework. When I did deploy I got the following warning: Apr 25, 2006 9:44:17 AM /userOut/

  • Mapping Roles/Groups between OBIEE 11g and Oracle EBS R12

    Hi, We are implementing OBIEE 11g with Oracle EBS R12 as source system. Also we are using Out of the box RPD for Oracle EBS R12. But we are facing lot of challenges to map OBIEE 11g groups and EBS roles and responsibilities. We do not have prior expe