switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEGMENT:
if (G_IS_OUTPUT_STREAM (sink->stream)) {
- GstSegment segment;
+ const GstSegment *segment;
gst_event_parse_segment (event, &segment);
- if (segment.format != GST_FORMAT_BYTES) {
+ if (segment->format != GST_FORMAT_BYTES) {
GST_WARNING_OBJECT (sink, "ignored SEGMENT event in %s format",
- gst_format_get_name (segment.format));
+ gst_format_get_name (segment->format));
break;
}
if (GST_GIO_STREAM_IS_SEEKABLE (sink->stream)) {
- ret = gst_gio_seek (sink, G_SEEKABLE (sink->stream), segment.start,
+ ret = gst_gio_seek (sink, G_SEEKABLE (sink->stream), segment->start,
sink->cancel);
if (ret == GST_FLOW_OK)
- sink->position = segment.start;
+ sink->position = segment->start;
} else {
ret = GST_FLOW_NOT_SUPPORTED;
}
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEGMENT:{
GnomeVFSResult res;
- GstSegment segment;
+ const GstSegment *segment;
gst_event_parse_segment (event, &segment);
- if (segment.format != GST_FORMAT_BYTES) {
+ if (segment->format != GST_FORMAT_BYTES) {
GST_WARNING_OBJECT (sink, "ignored NEWSEGMENT event in %s format",
- gst_format_get_name (segment.format));
+ gst_format_get_name (segment->format));
break;
}
GST_LOG_OBJECT (sink, "seeking to offset %" G_GINT64_FORMAT,
- segment.start);
- res = gnome_vfs_seek (sink->handle, GNOME_VFS_SEEK_START, segment.start);
+ segment->start);
+ res = gnome_vfs_seek (sink->handle, GNOME_VFS_SEEK_START, segment->start);
if (res != GNOME_VFS_OK) {
GST_ERROR_OBJECT (sink, "Failed to seek to offset %"
- G_GINT64_FORMAT ": %s", segment.start,
+ G_GINT64_FORMAT ": %s", segment->start,
gnome_vfs_result_to_string (res));
ret = FALSE;
} else {
- sink->current_pos = segment.start;
+ sink->current_pos = segment->start;
}
break;
/* the newsegment values are used to clip the input samples
* and to convert the incomming timestamps to running time so
* we can do QoS */
- gst_event_parse_segment (event, &visual->segment);
+ gst_event_copy_segment (event, &visual->segment);
/* and forward */
res = gst_pad_push_event (visual->srcpad, event);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEGMENT:
{
- GstSegment segment;
+ const GstSegment *segment;
gst_event_parse_segment (event, &segment);
/* We don't support non time NEWSEGMENT events */
- if (segment.format != GST_FORMAT_TIME) {
+ if (segment->format != GST_FORMAT_TIME) {
gst_event_unref (event);
event = NULL;
break;
}
- gst_segment_copy_into (&segment, &ogg_pad->segment);
+ gst_segment_copy_into (segment, &ogg_pad->segment);
break;
}
case GST_EVENT_FLUSH_STOP:{
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEGMENT:
{
- GstSegment segment;
+ const GstSegment *segment;
overlay->text_eos = FALSE;
gst_event_parse_segment (event, &segment);
- if (segment.format == GST_FORMAT_TIME) {
+ if (segment->format == GST_FORMAT_TIME) {
GST_OBJECT_LOCK (overlay);
- gst_segment_copy_into (&segment, &overlay->text_segment);
+ gst_segment_copy_into (segment, &overlay->text_segment);
GST_DEBUG_OBJECT (overlay, "TEXT SEGMENT now: %" GST_SEGMENT_FORMAT,
&overlay->text_segment);
GST_OBJECT_UNLOCK (overlay);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEGMENT:
{
- GstSegment segment;
+ const GstSegment *segment;
GST_DEBUG_OBJECT (overlay, "received new segment");
gst_event_parse_segment (event, &segment);
- if (segment.format == GST_FORMAT_TIME) {
+ if (segment->format == GST_FORMAT_TIME) {
GST_DEBUG_OBJECT (overlay, "VIDEO SEGMENT now: %" GST_SEGMENT_FORMAT,
&overlay->segment);
- gst_segment_copy_into (&segment, &overlay->segment);
+ gst_segment_copy_into (segment, &overlay->segment);
} else {
GST_ELEMENT_WARNING (overlay, STREAM, MUX, (NULL),
("received non-TIME newsegment event on video input"));
break;
case GST_EVENT_SEGMENT:
{
- GstSegment segment;
+ const GstSegment *segment;
gst_event_parse_segment (event, &segment);
/* we need TIME format */
- if (segment.format != GST_FORMAT_TIME)
+ if (segment->format != GST_FORMAT_TIME)
goto newseg_wrong_format;
- GST_DEBUG_OBJECT (dec, "segment: %" GST_SEGMENT_FORMAT, &segment);
+ GST_DEBUG_OBJECT (dec, "segment: %" GST_SEGMENT_FORMAT, segment);
/* now configure the values */
- gst_segment_copy_into (&segment, &dec->segment);
+ gst_segment_copy_into (segment, &dec->segment);
dec->seqnum = gst_event_get_seqnum (event);
/* We don't forward this unless/until the decoder is initialised */
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEGMENT:
{
- gst_event_parse_segment (event, &enc->segment);
+ gst_event_copy_segment (event, &enc->segment);
res = gst_pad_push_event (enc->srcpad, event);
break;
break;
case GST_EVENT_SEGMENT:
{
- GstSegment segment;
+ const GstSegment *segment;
gst_event_parse_segment (event, &segment);
/* we need time for now */
- if (segment.format != GST_FORMAT_TIME)
+ if (segment->format != GST_FORMAT_TIME)
goto newseg_wrong_format;
- GST_DEBUG_OBJECT (dec, "segment: %" GST_SEGMENT_FORMAT, &segment);
+ GST_DEBUG_OBJECT (dec, "segment: %" GST_SEGMENT_FORMAT, segment);
/* now configure the values */
- gst_segment_copy_into (&segment, &dec->segment);
+ gst_segment_copy_into (segment, &dec->segment);
dec->seqnum = gst_event_get_seqnum (event);
if (dec->initialized)
break;
case GST_EVENT_SEGMENT:
{
- GstSegment segment;
+ const GstSegment *segment;
gst_event_parse_segment (event, &segment);
- if (segment.format == GST_FORMAT_TIME) {
- gst_segment_copy_into (&segment, &vorbisenc->segment);
+ if (segment->format == GST_FORMAT_TIME) {
+ gst_segment_copy_into (segment, &vorbisenc->segment);
}
}
/* fall through */
break;
case GST_EVENT_SEGMENT:
{
- gst_event_parse_segment (event, &filter->segment);
+ gst_event_copy_segment (event, &filter->segment);
/* don't pass the event downstream, we generate our own segment including
* the NTP time and other things we receive in caps */
forward = FALSE;
GstSegment *segment;
segment = &basertppayload->segment;
- gst_event_parse_segment (event, segment);
+ gst_event_copy_segment (event, segment);
GST_DEBUG_OBJECT (basertppayload,
"configured SEGMENT %" GST_SEGMENT_FORMAT, segment);
break;
case GST_EVENT_SEGMENT:
{
- gst_event_parse_segment (event, &demux->priv->segment);
+ gst_event_copy_segment (event, &demux->priv->segment);
demux->priv->need_newseg = TRUE;
gst_event_unref (event);
break;
case GST_EVENT_SEGMENT:
{
- gst_event_parse_segment (event, &audiorate->sink_segment);
+ gst_event_copy_segment (event, &audiorate->sink_segment);
GST_DEBUG_OBJECT (audiorate, "handle NEWSEGMENT");
#if 0
break;
case GST_EVENT_SEGMENT:
{
- gst_event_parse_segment (event, smart_encoder->segment);
+ gst_event_copy_segment (event, smart_encoder->segment);
GST_DEBUG_OBJECT (smart_encoder, "segment: %" GST_SEGMENT_FORMAT,
smart_encoder->segment);
GST_PLAY_SINK_AUDIO_CONVERT_LOCK (self);
GST_DEBUG_OBJECT (self, "Segment before %" GST_SEGMENT_FORMAT,
&self->segment);
- gst_event_parse_segment (event, &self->segment);
+ gst_event_copy_segment (event, &self->segment);
GST_DEBUG_OBJECT (self, "Segment after %" GST_SEGMENT_FORMAT,
&self->segment);
GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
GST_PLAY_SINK_VIDEO_CONVERT_LOCK (self);
GST_DEBUG_OBJECT (self, "Segment before %" GST_SEGMENT_FORMAT,
&self->segment);
- gst_event_parse_segment (event, &self->segment);
+ gst_event_copy_segment (event, &self->segment);
GST_DEBUG_OBJECT (self, "Segment after %" GST_SEGMENT_FORMAT,
&self->segment);
GST_PLAY_SINK_VIDEO_CONVERT_UNLOCK (self);
break;
case GST_EVENT_SEGMENT:
{
- gst_event_parse_segment (event, &selpad->segment);
+ gst_event_copy_segment (event, &selpad->segment);
GST_DEBUG_OBJECT (selpad, "configured SEGMENT %" GST_SEGMENT_FORMAT,
&selpad->segment);
GstStream *stream;
GstSegment segment;
- gst_event_parse_segment (event, &segment);
+ gst_event_copy_segment (event, &segment);
GST_STREAM_SYNCHRONIZER_LOCK (self);
stream = gst_pad_get_element_private (pad);
if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) {
GST_DEBUG_OBJECT (pad, "segment event: %" GST_PTR_FORMAT, event);
- gst_event_parse_segment (event, &self->video_segment);
+ gst_event_copy_segment (event, &self->video_segment);
if (self->video_segment.format != GST_FORMAT_TIME) {
GST_ERROR_OBJECT (pad, "Newsegment event in non-time format: %s",
if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) {
GST_DEBUG_OBJECT (pad, "segment event: %" GST_PTR_FORMAT, event);
- gst_event_parse_segment (event, &self->subtitle_segment);
+ gst_event_copy_segment (event, &self->subtitle_segment);
GST_DEBUG_OBJECT (pad, "New subtitle segment: %" GST_SEGMENT_FORMAT,
&self->subtitle_segment);
}
}
case GST_EVENT_SEGMENT:
{
- gst_event_parse_segment (event, &self->segment);
+ gst_event_copy_segment (event, &self->segment);
GST_DEBUG_OBJECT (self, "newsegment (%s)",
gst_format_get_name (self->segment.format));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEGMENT:
{
- GstSegment segment;
+ const GstSegment *segment;
gst_event_parse_segment (event, &segment);
- if (segment.format != GST_FORMAT_TIME)
+ if (segment->format != GST_FORMAT_TIME)
goto format_error;
GST_DEBUG_OBJECT (videorate, "handle NEWSEGMENT");
}
/* We just want to update the accumulated stream_time */
- gst_segment_copy_into (&segment, &videorate->segment);
+ gst_segment_copy_into (segment, &videorate->segment);
GST_DEBUG_OBJECT (videorate, "updated segment: %" GST_SEGMENT_FORMAT,
&videorate->segment);