pcap-writer

This tracer provides an easy way to save data flowing in a specified pad using the pcap format.

It can also wrap the dataflow inside fake IpV4/UDP headers so those pcap can then be reused with the pcapparse element.

It can be used to easily record/replay some parts of a WebRTC session without requiring to modify the GStreamer pipeline.

Parameters:

  • output-dir (string, default: "tracer_pcaps"): The directory where to save .pcap files
  • fake-protocol (['udp', 'none'], default: "udp"): the fake headers to add to packets

Example:

$ GST_TRACERS=pcap-writer(target-factory=rtph264pay) gst-launch-1.0 videotestsrc num-buffers=15 ! x264enc tune=zerolatency ! video/x-h264,profile=constrained-baseline ! rtph264pay seqnum-offset=0 ! rtph264depay ! fakesink

Then this can be replayed with:

$ gst-launch-1.0 filesrc location="tracer_pcaps/pipeline0>rtph264pay0>src.pcap" ! pcapparse ! \
  "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)42c015, a-framerate=(string)30" ! \
  rtph264depay ! avdec_h264 ! fakesink silent=false -v -m

Named constants

Pcap-writer-fake-protocol

Members

udp (0) – Udp
none (1) – None

GstPcapWriter

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstTracer
                ╰──GstPcapWriter

Properties

fake-protocol

“fake-protocol” Pcap-writer-fake-protocol *

Protocol to fake in pcap files

Flags : Read / Write

Default value : udp (0)


output-dir

“output-dir” gchararray

Directory where to save pcap files

Flags : Read / Write

Default value : tracer_pcaps


pad-path

“pad-path” gchararray

Pad path to target

Flags : Read / Write / Construct

Default value : NULL


target-factory

“target-factory” gchararray

Factory name to target

Flags : Read / Write / Construct

Default value : NULL


The results of the search are