file-name=(string),
target-element-name=(string),
[caps=(caps)],
+ [dts=(GstClockTime)],
+ [duration=(GstClockTime)],
[offset=(uint64)],
+ [pts=(GstClockTime)],
+ [segment=((GstStructure)segment,[start=(GstClockTime)][stop=(GstClockTime)][base=(GstClockTime)][offset=(GstClockTime)][time=(GstClockTime)][postion=(GstClockTime)][duration=(GstClockTime)])],
[size=(uint64)],
[playback-time=(double,string)];
```
-Queues a buffer in an appsrc. If the pipeline state allows flow of buffers, the next action is not run until the buffer has been pushed.
+Queues a sample in an appsrc. If the pipeline state allows flow of buffers, the next action is not run until the buffer has been pushed.
* Implementer namespace: core
### Parameters
Default: (null)
+* `dts`:(optional): Buffer DTS
+
+ Possible types: `GstClockTime`
+
+ Default: (null)
+
+* `duration`:(optional): Buffer duration
+
+ Possible types: `GstClockTime`
+
+ Default: (null)
+
* `offset`:(optional): Offset within the file where the buffer will start
Possible types: `uint64`
Default: (null)
+* `pts`:(optional): Buffer PTS
+
+ Possible types: `GstClockTime`
+
+ Default: (null)
+
+* `segment`:(optional): The GstSegment to configure as part of the sample
+
+ Possible types: `(GstStructure)segment,[start=(GstClockTime)][stop=(GstClockTime)][base=(GstClockTime)][offset=(GstClockTime)][time=(GstClockTime)][postion=(GstClockTime)][duration=(GstClockTime)]`
+
+ Default: (null)
+
* `size`:(optional): Number of bytes from the file that will be pushed as a buffer
Possible types: `uint64`
GstBuffer *buffer;
guint64 offset = 0;
guint64 size = 0, read;
- gint push_buffer_ret;
+ gint push_sample_ret;
gboolean wait;
GFileInfo *finfo = NULL;
GFile *f = NULL;
GstPad *peer_pad = NULL;
GInputStream *stream = NULL;
GstValidateExecuteActionReturn res;
+ GstSegment segment;
+ GstCaps *caps = NULL;
+ GstSample *sample;
/* We will only wait for the the buffer to be pushed if we are in a state
* that allows flow of buffers (>=PAUSED). Otherwise the buffer will just
"Could read enough data, only read: %" G_GUINT64_FORMAT, read);
buffer = gst_buffer_new_wrapped (file_contents, size);
- file_contents = NULL;
+ gst_validate_action_get_clocktime (scenario,
+ action, "pts", &GST_BUFFER_PTS (buffer)
+ );
+ gst_validate_action_get_clocktime (scenario,
+ action, "dts", &GST_BUFFER_DTS (buffer)
+ );
+ gst_validate_action_get_clocktime (scenario,
+ action, "duration", &GST_BUFFER_DURATION (buffer)
+ );
{
const GValue *caps_value;
.mandatory = FALSE,
.types = "caps"
},
+ {
+ .name = "pts",
+ .description = "Buffer PTS",
+ .mandatory = FALSE,
+ .types = "GstClockTime"
+ },
+ {
+ .name = "dts",
+ .description = "Buffer DTS",
+ .mandatory = FALSE,
+ .types = "GstClockTime"
+ },
+ {
+ .name = "duration",
+ .description = "Buffer duration",
+ .mandatory = FALSE,
+ .types = "GstClockTime"
+ },
{NULL}
}),
"Queues a buffer in an appsrc. If the pipeline state allows flow of buffers, the next action is not run until the buffer has been pushed.",