# chopmydata

The chopmydata element takes an incoming stream and chops it up into randomly sized buffers. Size of outgoing buffers are determined by the max-size, min-size, and step-size properties.

## Example launch line

     gst-launch-1.0 -v audiotestsrc num-buffers=10 ! chopmydata min-size=100
     max-size=200 step-size=2 ! fakesink -v

This pipeline will create 10 buffers that are by default 2048 bytes each (1024 samples each), and chop them up into buffers that range in size from 100 bytes to 200 bytes, with the restriction that sizes are a multiple of 2. This restriction is important, because the default sample size for audiotestsrc is 2 bytes (one channel, 16-bit audio).

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──chopmydata

## Factory details

Authors: – David Schleef <ds></ds>

Classification: – `Generic`

Rank – none

Plugin – debugutilsbad

Package – GStreamer Bad Plug-ins

## Pad Templates

### `sink`

    ANY

Presence – always

Direction – sink

Object type – GstPad

### `src`

    ANY

Presence – always

Direction – src

Object type – GstPad

## Properties

### max-size

    “max-size” gint

Maximum size of outgoing buffers

Flags : Read / Write

Default value : 4096

### min-size

    “min-size” gint

Minimum size of outgoing buffers

Flags : Read / Write

Default value : 1

### step-size

    “step-size” gint

Step increment for random buffer sizes

Flags : Read / Write

Default value : 1

The results of the search are