SNAP flags alone make no sense and nowadays cause warnings.
{
/* Seek to 1.5s, snap before, it go to 1s */
run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
- GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE,
+ GST_SEEK_TYPE_NONE, 0,
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
1000 * GST_MSECOND, -1, 3, 0);
}
{
/* Seek to 1.5s with snap after, it should move to 2s */
run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
- GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER,
+ GST_SEEK_TYPE_NONE, 0,
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
2000 * GST_MSECOND, -1, 2, 0);
}
{
/* Snap seek without position */
run_seek_position_test (1.0, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE,
- GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE,
+ GST_SEEK_TYPE_NONE, 0,
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
2 * GST_MSECOND, -1, 2, SEGMENT_SIZE * 3 + 1);
}
{
/* Snap seek without position */
run_seek_position_test (1.0, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE,
- GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER,
+ GST_SEEK_TYPE_NONE, 0,
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
3 * GST_MSECOND, -1, 1, SEGMENT_SIZE * 3 + 1);
}
{
run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
- GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE, 1000 * GST_MSECOND,
- 3000 * GST_MSECOND, 2, 0);
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
+ 1000 * GST_MSECOND, 3000 * GST_MSECOND, 2, 0);
}
GST_END_TEST;
{
run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
- GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER, 1000 * GST_MSECOND,
- 2000 * GST_MSECOND, 1, 0);
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
+ 1000 * GST_MSECOND, 2000 * GST_MSECOND, 1, 0);
}
GST_END_TEST;
assert_equals_int (gst_date_time_get_minute (availabilityStartTime), 10);
assert_equals_int (gst_date_time_get_second (availabilityStartTime), 50);
assert_equals_int (gst_date_time_get_microsecond (availabilityStartTime), 0);
- assert_equals_float (gst_date_time_get_time_zone_offset (availabilityStartTime), 8.0);
+ assert_equals_float (gst_date_time_get_time_zone_offset
+ (availabilityStartTime), 8.0);
availabilityEndTime = mpdclient->mpd_node->availabilityEndTime;
assert_equals_int (gst_date_time_get_year (availabilityEndTime), 2015);
assert_equals_int (gst_date_time_get_second (availabilityEndTime), 50);
assert_equals_int (gst_date_time_get_microsecond (availabilityEndTime),
123456);
- assert_equals_float (gst_date_time_get_time_zone_offset (availabilityEndTime), -4.5);
+ assert_equals_float (gst_date_time_get_time_zone_offset (availabilityEndTime),
+ -4.5);
gst_mpd_client_free (mpdclient);
}
{
/* Seek to 1.5s, snap before, it go to 1s */
run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
- GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE,
+ GST_SEEK_TYPE_NONE, 0,
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
1000 * GST_MSECOND, -1, 3);
}
{
/* Seek to 1.5s with snap after, it should move to 2s */
run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
- GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER,
+ GST_SEEK_TYPE_NONE, 0,
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
2000 * GST_MSECOND, -1, 2);
}
{
run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
- GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE, 1000 * GST_MSECOND,
- 3000 * GST_MSECOND, 2);
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
+ 1000 * GST_MSECOND, 3000 * GST_MSECOND, 2);
}
GST_END_TEST;
{
run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
- GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER, 1000 * GST_MSECOND,
- 2000 * GST_MSECOND, 1);
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
+ 1000 * GST_MSECOND, 2000 * GST_MSECOND, 1);
}
GST_END_TEST;
{
/* Seek to 1.5s, snap before, it go to 1s */
run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
- GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE,
+ GST_SEEK_TYPE_NONE, 0,
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
1000 * GST_MSECOND, -1, 3);
}
{
/* Seek to 1.5s with snap after, it should move to 2s */
run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
- GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER,
+ GST_SEEK_TYPE_NONE, 0,
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
2000 * GST_MSECOND, -1, 2);
}
{
run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
- GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE, 1000 * GST_MSECOND,
- 3000 * GST_MSECOND, 2);
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
+ 1000 * GST_MSECOND, 3000 * GST_MSECOND, 2);
}
GST_END_TEST;
{
run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
- GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER, 1000 * GST_MSECOND,
- 2000 * GST_MSECOND, 1);
+ GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
+ 1000 * GST_MSECOND, 2000 * GST_MSECOND, 1);
}
GST_END_TEST;