[jitsi-dev] [libjitsi] Add a protocol & CaptureDevice that read rtpdump file containing rtp packet that were recorded. (#12)


#1

Also add a custom MediaDevice for convenience.

rtpdump files can be created with wireshark.
You can merge this Pull Request by running:

  git pull https://github.com/Haerezis/libjitsi rtpdumpfile

Or you can view, comment on it, or merge it online at:

  https://github.com/jitsi/libjitsi/pull/12

-- Commit Summary --

  * Add a protocol & CaptureDevice that read rtpdump file, containing rtp

-- File Changes --

    A src/org/jitsi/impl/neomedia/jmfext/media/protocol/rtpdumpfile/DataSource.java (37)
    A src/org/jitsi/impl/neomedia/jmfext/media/protocol/rtpdumpfile/RTPPacket.java (258)
    A src/org/jitsi/impl/neomedia/jmfext/media/protocol/rtpdumpfile/RtpdumpFileReader.java (118)
    A src/org/jitsi/impl/neomedia/jmfext/media/protocol/rtpdumpfile/RtpdumpMediaDevice.java (46)
    A src/org/jitsi/impl/neomedia/jmfext/media/protocol/rtpdumpfile/RtpdumpStream.java (128)

-- Patch Links --

https://github.com/jitsi/libjitsi/pull/12.patch
https://github.com/jitsi/libjitsi/pull/12.diff

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/12


#2

I've realized that the MediaDevice for convenience I've added is completely wrong : It always create a video MediaDevice, even though rtpdump can also act as an audio CaptureDevice. I think it would be confusing for the users.

I tried to think of a solution, maybe adding a MediaType argument to the constructor to choose the type of the MediaDevice, but even with this, the object will still be a MediaDevice, and not an AudioMediaDevice.

Moreover, if FMJ doesn't seems to need much for the Format of the CaptureDeviceInfo when it's a VideoFormat (just creating a Format with Constant.RTP_VP8 works), it is not happy if I do the same with audio devices.

The simpler solution I can think of is just remove the RtpdumpMediaDevice : if they want to use the rtpdump CaptureDevice, users should just create an AudioMediaDevice or MediaDevice with a CaptureDeviceInfo correctly set with the right Format etc...

What do you think?

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/12#issuecomment-49153400


#3

I change RtpdumpMediaDevice, regarding the problem I've talked about in the last comment).
Instead of extending MediaDeviceImpl, RtpdumpMediaDevice now offer a static method that create the correct
MediaDeviceImpl with the correct Format.
I tested it with jitsi-hammer.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/12#issuecomment-49429763


#4

Closed #12.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/12#event-145988036


#5

Merged after some small changes. Thank you!

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/pull/12#issuecomment-50261183