{
GstClockTime res = GST_CLOCK_TIME_NONE;
MpegTSPCR *pcrtable;
+#ifdef TIZEN_FEATURE_TSDEMUX_MODIFICATION
+ GstClockTime tmp;
+#endif
PACKETIZER_GROUP_LOCK (packetizer);
pcrtable = get_pcr_table (packetizer, pcr_pid);
* We are currently ignoring the check for handling the erronous server PCR case.
*/
#ifdef TIZEN_FEATURE_TSDEMUX_MODIFICATION
- GstClockTime tmp = pcrtable->base_time + pcrtable->skew;
- if (packetizer->is_live_stream)
- {
- if (G_UNLIKELY (ABSDIFF (res, pcrtable->last_pcrtime) > 15 * GST_SECOND))
- {
- GST_WARNING ("Live Stream : Server sending erronous PCR values : Recalculating!!");
- }
- if (tmp + res > pcrtable->base_pcrtime)
- {
- res += tmp - pcrtable->base_pcrtime;
- }
- else
- res = GST_CLOCK_TIME_NONE;
- }
- else
- {
- if (G_UNLIKELY (ABSDIFF (res, pcrtable->last_pcrtime) > 15 * GST_SECOND))
- {
- GST_WARNING ("VOD Stream : Server sending erronous PCR values : Maintaining old ts value !!!");
- }
- else if (tmp + res > pcrtable->base_pcrtime)
- {
- res += tmp - pcrtable->base_pcrtime;
- }
- else
- res = GST_CLOCK_TIME_NONE;
- }
+ tmp = pcrtable->base_time + pcrtable->skew;
+ if (packetizer->is_live_stream)
+ {
+ if (G_UNLIKELY (ABSDIFF (res, pcrtable->last_pcrtime) > 15 * GST_SECOND))
+ {
+ GST_WARNING ("Live Stream : Server sending erronous PCR values : Recalculating!!");
+ }
+ if (tmp + res > pcrtable->base_pcrtime)
+ {
+ res += tmp - pcrtable->base_pcrtime;
+ }
+ else
+ res = GST_CLOCK_TIME_NONE;
+ }
+ else
+ {
+ if (G_UNLIKELY (ABSDIFF (res, pcrtable->last_pcrtime) > 15 * GST_SECOND))
+ {
+ GST_WARNING ("VOD Stream : Server sending erronous PCR values : Maintaining old ts value !!!");
+ }
+ else if (tmp + res > pcrtable->base_pcrtime)
+ {
+ res += tmp - pcrtable->base_pcrtime;
+ }
+ else
+ res = GST_CLOCK_TIME_NONE;
+ }
#else
if (G_UNLIKELY (ABSDIFF (res, pcrtable->last_pcrtime) > 15 * GST_SECOND))
res = GST_CLOCK_TIME_NONE;
}
#ifdef TIZEN_FEATURE_TSDEMUX_MODIFICATION
else if(packetizer->is_random_access){
- if(!GST_CLOCK_TIME_IS_VALID (packetizer->ra_base_time))
- packetizer->ra_base_time = pts;
- res = pts - packetizer->ra_base_time;
+ if(!GST_CLOCK_TIME_IS_VALID (packetizer->ra_base_time))
+ packetizer->ra_base_time = pts;
+ res = pts - packetizer->ra_base_time;
} else if ((packetizer->is_non_pcr_live_feed) && (GST_CLOCK_TIME_IS_VALID(pts))) {
/*
[prasenjit.c] For Live Youtube Channels , PCR flag does not come.
GST_DEBUG ("PCR Base Time reset to Current PTS");
packetizer->non_pcr_base_time = pts;
} else if ((pts - packetizer->non_pcr_base_time) < packetizer->last_live_pts) {
- GST_DEBUG ("Current PTS Less than Previous PTS !!");
GstClockTime delta = ABSDIFF ((pts - packetizer->non_pcr_base_time), packetizer->last_live_pts);
+ GST_DEBUG ("Current PTS Less than Previous PTS !!");
packetizer->non_pcr_base_time = packetizer->non_pcr_base_time - delta;
}