How can i get more info about the sent data in RTP?

Hello.
I'm working with the examples AVTransmitt2 and AV Receive2 and i want to get more information about the data that it is being sent to de receiver side. In AVTrasmitt2 i only see a calling to processor.start();. How could i know each packet that AvTransmit2 sends to the other side. I want info like the size of the data, the quality, format, etc..

Hi!
As I mentioned above. RTPSocketAdapter has two inner classes, SockOutputStream and SockInputStream.
SockOutputStream have a write method which is called when RTP data is sent over the NET. SockInputStream have a read method which is called when RTP data is received.
If you for instance want to know exactly what is sent you can parse the byte array that comes into write.
Like this:
* An inner class to implement an OutputDataStream based on UDP sockets.
class SockOutputStream implements OutputDataStream {
     DatagramSocket sock;
     InetAddress addr;
     int port;
     boolean isRTCP;
     public SockOutputStream(DatagramSocket sock, InetAddress addr, int port, boolean isRTCP) {
          this.sock = sock;
          this.addr = addr;
          this.port = port;
     public int write(byte data[], int offset, int len) {
          if(isRTCP){
               parseAndPrintRTCPData(data);               
          }else{
               parseAndPrintRTPData(data);
          try {
               sock.send(new DatagramPacket(data, offset, len, addr, port));
          } catch (Exception e) {
               return -1;
          if(debug){
               System.out.println(debugName+": written "+len+" bytes to address:port: "+addr+":"+port);
          return len;
private void parseAndPrintRTPData(byte[] data) {
     // part of header, there still left SSRC and CSRC:s
     byte[] rtpHeader = new byte[8];
     System.arraycopy(data, 0, rtpHeader, 0, rtpHeader.length);
     ByteBuffer buffer = ByteBuffer.wrap(rtpHeader);
     int word = buffer.getInt();
     // version
     int v = word >>> 30;
     System.out.println("version: "+v);
     // padding
     int p = (word & 0x20000000) >>> 29;
     System.out.println("padding: "+p);
     // extension
     int x = (word & 0x10000000) >>> 28;
     System.out.println("extension: "+x);
     // CSRC count
     int cc = (word & 0x0F000000) >>> 24;
     System.out.println("CSRC: "+cc);
     // marker
     int m = (word & 0x00800000) >>> 23;
     System.out.println("marker: "+m);
     // payload type
     int pt = (word & 0x00700000) >>> 16;
     System.out.println("payload type: "+pt);
     // sequence number
     int seqNbr = (word & 0x0000FFFF);
     System.out.println("sequence number: "+seqNbr);
     // timestamp
     int timestamp = buffer.getInt();
     System.out.println("timestamp: "+timestamp);
private void parseAndPrintRTCPData(byte[] data) {
     // this only works when the RTCP packet is a Sender report (SR).
     // All RTCP packets are compound packets with a SR or Receiver report (RR) packet first.
     // part of header, there is still the report blocks (see RFC 3550).
     byte[] rtcpHeader = new byte[28];
     System.arraycopy(data, 0, rtcpHeader, 0, rtcpHeader.length);
     ByteBuffer buffer = ByteBuffer.wrap(rtcpHeader);
     int word = buffer.getInt();
     // version
     int v = word >>> 30;
     System.out.println("version: "+v);
     // padding
     int p = (word & 0x20000000) >>> 29;
     System.out.println("padding: "+p);
     // reception report count
     int rc = (word & 0x0F000000) >>> 24;
     System.out.println("reception report count: "+rc);
     // payload type, which is 200 in this case (SR=200)
     int pt = (0x00FF0000 & word) >>> 16;
     System.out.println("payload type: "+pt);
     // length
     int length = (word & 0x0000FFFF);
     System.out.println("length: "+length);
     // SSRC of sender
     int ssrc = buffer.getInt();
     System.out.println("SSRC: "+ssrc);
     // NTP timestamp
     long ntp_timestamp = buffer.getLong();
     System.out.println("NTP timestamp: "+ntp_timestamp);
     // RTP timestamp
     int rtp_timestamp = buffer.getInt();
     System.out.println("RTP timestamp: "+rtp_timestamp);
     // sender's packet count
     int nbrOfSentPackets = buffer.getInt();
     System.out.println("sender's packet count: "+nbrOfSentPackets);
     // sender's octet count
     int nbrOfSentBytes = buffer.getInt();
     System.out.println("sender's octet count: "+nbrOfSentBytes);
}I added a boolean isRTCP to the constructor so to know what sort of data is sent.
Hope this clarifies things.

Similar Messages

  • Get more info about the last errors in Oracle

    Hi all,
    There is a log in a live system where it is possible to see every minute the following error:
    Sweep Incident[48073]: failed, err=[1858]
    I know that error can happen mainly when:
    1. Trying to insert caracter field in a numeric column
    2. Using in the wrong way the function to_date()
    I need more information about that error, what can be causing the error in the system and why. Is it possible to see more information about the last errors in Oracle? For example, if a query produces an error... is it possible to see in Oracle the error and the query that caused the error?
    Hope you can help me.
    Thanks in advance.

    Thanks Niall.
    I'm not sure if I got you...
    What I found is that MMON makes snapshots of the database 'health' and stores this information in the AWR. So, it seems like in the database there could be a numeric column that is storing character fields, and when MMON works, it finds that error... is that right?
    I found the following information:
    SQL> select substr(s.username,1,18) username,
    2 substr(s.program,1,22) program,
    3 decode(s.command,
    4 0,'No Command',
    5 1,'Create Table',
    6 2,'Insert',
    7 3,'Select',
    8 6,'Update',
    9 7,'Delete',
    10 9,'Create Index',
    11 15,'Alter Table',
    12 21,'Create View',
    13 23,'Validate Index',
    14 35,'Alter Database',
    15 39,'Create Tablespace',
    16 41,'Drop Tablespace',
    17 40,'Alter Tablespace',
    18 53,'Drop User',
    19 62,'Analyze Table',
    20 63,'Analyze Index',
    21 s.command||': Other') command
    22 from
    23 v$session s,
    24 v$process p,
    25 v$transaction t,
    26 v$rollstat r,
    27 v$rollname n
    28 where s.paddr = p.addr
    29 and s.taddr = t.addr (+)
    30 and t.xidusn = r.usn (+)
    31 and r.usn = n.usn (+)
    32 order by 1;
    USERNAME PROGRAM COMMAND
    oracle@airvs1b (MMON) No Command
    SQL> select addr, pid, spid, username, serial#, program,traceid, background, latchwait, latchspin from v$process where program='oracle@airvs1b (MMON)';
    ADDR PID SPID USERNAME SERIAL# PROGRAM
    000000044A4E48A8 24 15372 oracle 1 oracle@airvs1b (MMON)
    TRACEID B LATCHWAIT LATCHSPIN
    ---------------- ---------- ------------------------ --------------- 1
    SQL> select
    2 substr(a.spid,1,9) pid,
    3 substr(b.sid,1,5) sid,
    4 substr(b.serial#,1,5) ser#,
    5 substr(b.machine,1,6) box,
    6 substr(b.username,1,10) username,
    7 b.server,
    8 substr(b.osuser,1,8) os_user,
    9 substr(b.program,1,40) program
    10 from v$session b, v$process a
    11 where
    12 b.paddr = a.addr
    13 and a.spid=15372
    14 order by spid;
    PID SID SER# BOX USERNAME SERVER OS_USER PROGRAM
    15372 1082 1 airvs1 DEDICATED oracle oracle@airvs1b (MMON)
    Is there any way I can see what MMON is doing and when is failing?
    Thank you very much.
    Edited by: user11281526 on 19-jun-2009 5:18

  • Sync Icon on Menu Bar?  What does this mean? How can I get more info on it?

    I just noticed for the first time, a SYNC icon on the Macbook Pro/Lion menu bar and it is going strong - twirling its little heart out.  Im not sure what this is or what it is doing.  Im having a feeling something got set up (I dont really know what Im doing ) that had to do with maybe syncing a calendar with Google? for an Android phone?  Is t here a way I can check out what this is and what its doing -   It just keeps twirling around so Im not sure what its doing or how long it will take and I dont know that I want it doing wh atever its doing.  Maybe it has something to do with contacts?  The only option I can find when I click on the icon, it says 'cancel sync.'  Is there a way to "get info" - and find out what its doing.  I dont want it twirlling forever as I assume thats going to eat up the battery...I dont have anything set up to sync consistently so I dont know whats its doing or whether I should stop it.  Its been going on for like over 5 minutes and that doesnt seem right to me

    If it's a one-time "glitch," you can try restarting your computer with the iPod still connected.  Try ejecting again after the restart.
    If the problem recurs, you may have a process running (other than iTunes) that is accessing the iPod's storage.  When connected, the iPod's "disk" is like other mounted volumes.  This process may be some type of utility that continously monitors your mounted volumes for security reasons, such as to prevent access by malware.
    If you know of such a program that you have running in the background, there may be a setting to exclude your iPod's disk.

  • How can I get more information about LSU of T1

    Hi,
    I've been working on a project about opensparc t1 for some days. I am now trying to figure out the functions of lsu_dctl, as well as the original thoughts about this block. But, it seems not very clear only by reading t1 codes. Where can I get some more information about lsu_dctl? Can I get some document that explain its functions and the original designing thoughts in detail?

    Hello,
    Thanks for your reply. I've read the L1 Dcache part of the OpenSPARC T1 Microarchitecture Specification, however, I still cannot figure out the meaning and function of some signals. I think I have to read other parts of the OpenSPARC T1 Microarchitecture Specification, in order to know more about the meaning of abbreviations in OpenSPARC codes.
    As for my project, my main aim is to be clear about the OpenSparc L1 Dcache. Since members in our group are all newcomers to OpenSparc, our director hopes that we can get some practical technics by reading OpenSparc codes.
    Thanks,
    Li

  • In the New group from layers, How can I get more colors on the Folders options in Photoshop CC?

    Hola
    There is any way that I can get more or make my own colors to distinguish the folders in Photoshop CC?
    Please, let me know
    Thanks

    Daniel Ulysses wrote:
    Not good
    Hope someone knows a hidden way to make more colors…
    If you're very good at writing code and willing to hack your copy of Photoshop—but, then, if you were you wouldn't be asking here, I suppose.

  • Where can I get more info about Director and Projectors?

    I would like to learn how to create interactivity within my animations-like menus and such.
    a)where can I buy Director
    b)where can I re-learn it after 10 years?
    Thanks

    you can buy new online in the Adobe store or try to find a usefull version like MX2004 or 11.5 on ebay or similar recources.
    if you can get an upgradeable version at a cheap recource it will be better to upgrade to 11.5 as to buy  the full version 11.5.
    See eligeble versions in the Adobe online store.
    best
    Wolfgang

  • HT5457 can anyone share more info about the Passbook feature.  seems like it would be useful, but nothing happens when i try to launch it on my iPhone

    how do you use the new passbook feature that appears on your iPhone with the new iSO6?  i cant seem to get it to launch, i have no ideas how to use it, it seems like it would be a great tool, HELP!

    You need to download apps that are compatible with passbook.  There are less than 20 available right now I'd say
    Such as:
    Target
    American Airlines
    Fandango
    Ticket Master
    If you click the link to the app store through passbook and get an error, use this article to fix it: http://www.macworld.com/article/2010185/fix-passbooks-app-store-error-in-ios-6.h tml
    You can also use this site: http://www.passsource.com/ to create your own cards such as Blockbuster card, petco card, petsmart card, etc
    To add to passbook once you've downloaded compatible apps try the following:
    So if you have the target app you need to go into the target app > my target> mobile coupons > scroll to bottom of page  and click "add to passbook"
    My assumption is that you need to add things to passbook through the target app or american airlines app and so on.

  • How can i get more info regarding Zoning.

    Guys,
    I have been asked to create zones with Solaris 10 on a netra.
    From where i can get documentation on this? From where i can get binaries for this.
    sunsole is not giving me more details. Do any of you have any experiance on zoning ? If yes put your feedback.
    Tx,
    S

    S,
    Zone is part of Solaris 10. So, if you have Solaris 10 installed, it relevant binaries are on the system. As for zone related documentation, you can explore the vast documentations on http://docs.sun.com/.
    One particular one which would probably of your interest would be "System Administration Guide: Solaris Containers-Resource Management and Solaris Zones", http://docs.sun.com/app/docs/doc/817-1592 .
    You have like to also explore Sun Blueprints Online, http://www.sun.com/blueprints/browsedate.html . There are some very interesting articles on applications of Solaris Container.
    Have fun.
    Regards
    S.T.Chang

  • Can I get more details about the buys I seem to have made by itunes (credit card)

    I had amounts written of my credit card for apps I did not buy (I think). Can I somehow get a more detailled review of what I bought?

    Look at your purchase history.
    iTunes Store & Mac App Store: Seeing your purchase history and ...

  • How can I get more freedom from the drum sounds?

    I am looking for a more free, less repetative sound. Before I venture to purchase an external kit or drum software I wanted to first see if there was a way to maximize my freedom within garage band itself. is there any way I can program the built-in keyboard to play drum sounds automatically as hit the key or does it have to be a tiresome process of recording each individual drum sound and then somehow making them all work together in a loop? The latter sounds like a no option option.

    To add to the above question. What I am asking is if there is a way, through the built in keyboard, to make many drum sounds coalesce together in sort of the same way as you could on a drum machine. And then I would record this coalescing of sounds and use them as the drum sound for the song.

  • How can i get more disk space on my i phone

    i purchased music from i tunes but i can't sync my i ohone it's telling me i need more room how can i get more space on the phone i have an i phone 4s.

    Transfer photos & videos from your iOS device to your computer, and then delete them off of the device.

  • HT1222 I visited the USA and bought an Apple iPhone 4 5.1.1, the latest model.  I would like to unlock it and use in my country.  How can I get it unlocked so the I can use my local micro sim card?  What info about it do you need to assist me in unlocking

    I visited the USA and bought an Apple iPhone 4 5.1.1, the latest model.  I would like to unlock it and use in my country.  How can I get it unlocked so the I can use my local micro sim card?  What info about it do you need to assist me in unlocking it?

    Sounds like you bought an AT&T no contract phone. You will need to contact AT&T for unlocking but they are only doing so for current and previous account holders. If you have never had service with them they will not unlock your phone.

  • I visited the USA and bought an Apple iPhone 4 5.1.1, the latest model.  I would like to unlock it and use in my country.  How can I get it unlocked so the I can use my local micro sim card?  What info about it do you need to assist me in unlocking it?

    I visited the USA and bought an Apple iPhone 4 5.1.1, the latest model.  I would like to unlock it and use in my country.  How can I get it unlocked so the I can use my local micro sim card?  What info about it do you need to assist me in unlocking it?

    Contact the original cellular provider, as they are the only ones that can provide unlocking.

  • How can i get more than 100 email in Mail? I can only see the latest 100. I have an hotmail account and it worked at my other mac.

    How can i get more than 100 email in Mail? I can only see the latest 100. I have an hotmail account and it worked at my other mac.

    How can i get more than 100 email in Mail? I can only see the latest 100. I have an hotmail account and it worked at my other mac.

  • My iphone 5 does not turn on anymore.  when i plug the charger in the apple icon turns on and off but the home screen never shows up.what do i do to fix it? how can i get my info back?

    My iphone 5 does not turn on anymore.  when i plug the charger in the apple icon turns on and off but the home screen never shows up.what do i do to fix it? how can i get my info back?

    from the information you provided i can't tell if it is a hardware problem or a software problem. I do have an idea though, try to press your home button and lock button at the same time.

Maybe you are looking for