Hi,
I'll try to get two birds with a stone.
Using Wireshark traces in ns-3 is possible (writing a NetDevice that reads a cap file is quite easy), but one should address the things that Peter mentioned. In particular all the headers up to the IP one will have to be changed (again, can be done), and the device will have a somewhat strange microseconds time synchronisation.
Anyway, it is possible, but... why ?
Pcap traces are "good" because they represent real traffic, but your PcapReplayApplication would have to just inject the data originating from one node, and even then one would have to carefully select what it's sent. E.g., no ARP packets, or RS/RA, NS/ND, and so on.
Moreover, there will always be room for strange things. For example, a packet may be delayed in the real system due to ARP, and in ns-3 too. However the cap registers the time AFTER the delay (when the packet has been sent on the wire), not the time the packet was passed to the IP layer. Weirdnesses.
If you decide to replay your packets at a lower layer (a PcapReplayNetDevice) you'd still have some issues. How to deal with the carrier sense ? You can't just inject the data on the wire blindly.
Summarizing: first one should clarify what are the goals and limitations of this replay system.
About the UdpTrace apps you found, they create a stream of data that is equivalent to the one that an app streaming an MPEG file would produce. I think you should re-read the docs and the source code.
The difference is not small. When you stream a video, there's a lot of transcoding, packetization, fragmentation and so on. The app uses a trace that "just" say when and how many data have been generated and are being feed to the UDP layer by an app that would stream a given video. As a side note, this trace is just a text file, and the docs point to the webpages where you can find such scripts and data.
This works for UDP, but it wouldn't work at all for adaptive streaming, since... well, it's too long to explain, but you can think to it.
It can be used for TCP too, but (again) the application is blind to the network conditions.
Last line: check the code. If you don't understand the docs, always read the code.
Hope this helps,
T.