• Home
  • Raw
  • Download

Lines Matching refs:demux

344 gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream,
347 GstTSDemux * demux, gboolean hard);
351 static void gst_ts_demux_check_and_sync_streams (GstTSDemux * demux,
380 GstTSDemux *demux = GST_TS_DEMUX_CAST (object); in gst_ts_demux_dispose() local
382 gst_flow_combiner_free (demux->flowcombiner); in gst_ts_demux_dispose()
390 GstTSDemux *demux = GST_TS_DEMUX_CAST (object); in gst_ts_demux_finalize() local
392 gst_event_replace (&demux->segment_event, NULL); in gst_ts_demux_finalize()
395 gst_event_replace (&demux->tag_event, NULL); in gst_ts_demux_finalize()
397 g_mutex_clear (&demux->lock); in gst_ts_demux_finalize()
484 GstTSDemux *demux = (GstTSDemux *) base; in gst_ts_demux_reset() local
486 demux->rate = 1.0; in gst_ts_demux_reset()
487 g_mutex_lock (&demux->lock); in gst_ts_demux_reset()
488 gst_event_replace (&demux->segment_event, NULL); in gst_ts_demux_reset()
491 gst_event_replace (&demux->tag_event, NULL); in gst_ts_demux_reset()
493 g_mutex_unlock (&demux->lock); in gst_ts_demux_reset()
495 if (demux->global_tags) { in gst_ts_demux_reset()
496 gst_tag_list_unref (demux->global_tags); in gst_ts_demux_reset()
497 demux->global_tags = NULL; in gst_ts_demux_reset()
500 if (demux->previous_program) { in gst_ts_demux_reset()
501 mpegts_base_deactivate_and_free_program (base, demux->previous_program); in gst_ts_demux_reset()
502 demux->previous_program = NULL; in gst_ts_demux_reset()
505 demux->have_group_id = FALSE; in gst_ts_demux_reset()
506 demux->group_id = G_MAXUINT; in gst_ts_demux_reset()
508 demux->last_seek_offset = -1; in gst_ts_demux_reset()
509 demux->program_generation = 0; in gst_ts_demux_reset()
511 demux->mpeg_pts_offset = 0; in gst_ts_demux_reset()
515 gst_ts_demux_init (GstTSDemux * demux) in gst_ts_demux_init() argument
517 MpegTSBase *base = (MpegTSBase *) demux; in gst_ts_demux_init()
524 demux->flowcombiner = gst_flow_combiner_new (); in gst_ts_demux_init()
525 demux->requested_program_number = -1; in gst_ts_demux_init()
526 demux->program_number = -1; in gst_ts_demux_init()
527 demux->latency = DEFAULT_LATENCY; in gst_ts_demux_init()
530 g_mutex_init (&demux->lock); in gst_ts_demux_init()
538 GstTSDemux *demux = GST_TS_DEMUX (object); in gst_ts_demux_set_property() local
544 demux->requested_program_number = g_value_get_int (value); in gst_ts_demux_set_property()
547 demux->emit_statistics = g_value_get_boolean (value); in gst_ts_demux_set_property()
550 demux->send_scte35_events = g_value_get_boolean (value); in gst_ts_demux_set_property()
553 demux->latency = g_value_get_int (value); in gst_ts_demux_set_property()
564 GstTSDemux *demux = GST_TS_DEMUX (object); in gst_ts_demux_get_property() local
568 g_value_set_int (value, demux->requested_program_number); in gst_ts_demux_get_property()
571 g_value_set_boolean (value, demux->emit_statistics); in gst_ts_demux_get_property()
574 g_value_set_boolean (value, demux->send_scte35_events); in gst_ts_demux_get_property()
577 g_value_set_int (value, demux->latency); in gst_ts_demux_get_property()
585 gst_ts_demux_get_duration (GstTSDemux * demux, GstClockTime * dur) in gst_ts_demux_get_duration() argument
587 MpegTSBase *base = (MpegTSBase *) demux; in gst_ts_demux_get_duration()
591 if (!demux->program) { in gst_ts_demux_get_duration()
592 GST_DEBUG_OBJECT (demux, "No active program yet, can't provide duration"); in gst_ts_demux_get_duration()
601 demux->program->pcr_pid); in gst_ts_demux_get_duration()
613 GstTSDemux *demux; in gst_ts_demux_srcpad_query() local
616 demux = GST_TS_DEMUX (parent); in gst_ts_demux_srcpad_query()
617 base = GST_MPEGTS_BASE (demux); in gst_ts_demux_srcpad_query()
627 if (gst_ts_demux_get_duration (demux, &dur)) in gst_ts_demux_srcpad_query()
633 GST_DEBUG_OBJECT (demux, "only query duration on TIME is supported"); in gst_ts_demux_srcpad_query()
654 latency = demux->latency; in gst_ts_demux_srcpad_query()
681 if (gst_ts_demux_get_duration (demux, &dur)) { in gst_ts_demux_srcpad_query()
688 GST_DEBUG_OBJECT (demux, "only TIME is supported for query seeking"); in gst_ts_demux_srcpad_query()
930 GstTSDemux *demux = (GstTSDemux *) base; in gst_ts_demux_do_seek() local
941 GST_DEBUG_OBJECT (demux, "seek event, %" GST_PTR_FORMAT, event); in gst_ts_demux_do_seek()
944 GST_DEBUG_OBJECT (demux, "Cannot process seek event now, delaying"); in gst_ts_demux_do_seek()
954 GST_WARNING_OBJECT (demux, "Negative rate not supported"); in gst_ts_demux_do_seek()
959 GST_WARNING_OBJECT (demux, "seek flags 0x%x are not supported", in gst_ts_demux_do_seek()
966 GST_LOG_OBJECT (demux, "Before seek, output segment %" GST_SEGMENT_FORMAT, in gst_ts_demux_do_seek()
970 demux->rate = rate; in gst_ts_demux_do_seek()
973 GST_DEBUG_OBJECT (demux, "Seek failed in gst_segment_do_seek()"); in gst_ts_demux_do_seek()
977 GST_DEBUG_OBJECT (demux, in gst_ts_demux_do_seek()
982 g_mutex_lock (&demux->lock); in gst_ts_demux_do_seek()
992 demux->program->pcr_pid); in gst_ts_demux_do_seek()
994 GST_WARNING_OBJECT (demux, in gst_ts_demux_do_seek()
996 g_mutex_unlock (&demux->lock); in gst_ts_demux_do_seek()
1001 demux->last_seek_offset = base->seek_offset; in gst_ts_demux_do_seek()
1003 demux->reset_segment = (!(flags & GST_SEEK_FLAG_ACCURATE)); in gst_ts_demux_do_seek()
1006 gst_event_replace (&demux->segment_event, NULL); in gst_ts_demux_do_seek()
1008 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in gst_ts_demux_do_seek()
1030 gst_event_take (&demux->segment_event, in gst_ts_demux_do_seek()
1033 gst_event_set_seqnum (demux->segment_event, base->last_seek_seqnum); in gst_ts_demux_do_seek()
1034 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in gst_ts_demux_do_seek()
1039 g_mutex_unlock (&demux->lock); in gst_ts_demux_do_seek()
1053 GstTSDemux *demux = GST_TS_DEMUX (parent); in gst_ts_demux_srcpad_event() local
1060 res = mpegts_base_handle_seek_event ((MpegTSBase *) demux, pad, event); in gst_ts_demux_srcpad_event()
1082 GstTSDemux *demux = (GstTSDemux *) base; in push_event() local
1108 if (demux->global_tags == NULL) { in push_event()
1109 demux->global_tags = gst_tag_list_copy (taglist); in push_event()
1114 gst_tag_list_set_scope (demux->global_tags, GST_TAG_SCOPE_GLOBAL); in push_event()
1117 demux->global_tags = gst_tag_list_make_writable (demux->global_tags); in push_event()
1118 gst_tag_list_insert (demux->global_tags, taglist, GST_TAG_MERGE_REPLACE); in push_event()
1120 clean_global_taglist (demux->global_tags); in push_event()
1129 if (G_UNLIKELY (demux->program == NULL) && GST_EVENT_TYPE (event) == GST_EVENT_TAG) { in push_event()
1130 gst_event_take(&demux->tag_event, event); in push_event()
1132 } else if (G_UNLIKELY (demux->program == NULL)) { in push_event()
1137 if (G_UNLIKELY (demux->program == NULL)) { in push_event()
1143 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in push_event()
1161 gst_ts_demux_push_pending_data (demux, stream, NULL); in push_event()
1174 gst_ts_demux_push_pending_data (demux, stream, NULL); in push_event()
1190 GstTSDemux *demux = (GstTSDemux *) base; in handle_psi() local
1196 if (demux->send_scte35_events) { in handle_psi()
1197 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in handle_psi()
1227 sit->pts_adjustment), demux->program->pcr_pid); in handle_psi()
1242 sit->pts_adjustment), demux->program->pcr_pid); in handle_psi()
1259 demux->mpeg_pts_offset, "running-time-map", GST_TYPE_STRUCTURE, in handle_psi()
1271 GstTSDemux *demux = (GstTSDemux *) base; in sink_query() local
1281 if (gst_ts_demux_get_duration (demux, &duration) && duration > 0 in sink_query()
1286 GST_LOG_OBJECT (demux, "bitrate query byte length: %" G_GINT64_FORMAT in sink_query()
1399 GstTSDemux *demux = GST_TS_DEMUX (base); in create_pad_for_stream() local
1412 GST_LOG_OBJECT (demux, in create_pad_for_stream()
1429 GST_LOG_OBJECT (demux, "ac3 audio"); in create_pad_for_stream()
1480 GST_LOG_OBJECT (demux, "mpeg video"); in create_pad_for_stream()
1490 GST_LOG_OBJECT (demux, "mpeg audio"); in create_pad_for_stream()
1500 GST_LOG_OBJECT (demux, "private data"); in create_pad_for_stream()
1508 GST_LOG_OBJECT (demux, "ac4 audio"); in create_pad_for_stream()
1516 GST_LOG_OBJECT (demux, "ac3 audio"); in create_pad_for_stream()
1526 GST_LOG_OBJECT (demux, "ac3 audio"); in create_pad_for_stream()
1535 GST_LOG_OBJECT (demux, "teletext"); in create_pad_for_stream()
1545 GST_LOG_OBJECT (demux, "subtitling"); in create_pad_for_stream()
1637 GST_WARNING_OBJECT (demux, in create_pad_for_stream()
1648 GST_WARNING_OBJECT (demux, in create_pad_for_stream()
1672 GST_WARNING_OBJECT (demux, in create_pad_for_stream()
1684 GST_WARNING_OBJECT (demux, in create_pad_for_stream()
1699 GST_WARNING_OBJECT (demux, in create_pad_for_stream()
1727 GST_WARNING_OBJECT (demux, in create_pad_for_stream()
1731 GST_WARNING_OBJECT (demux, "Opus, but no extension descriptor"); in create_pad_for_stream()
1830 GST_ERROR_OBJECT (demux, in create_pad_for_stream()
1851 GST_ERROR_OBJECT (demux, in create_pad_for_stream()
1884 GST_LOG_OBJECT (demux, "dirac"); in create_pad_for_stream()
1900 GST_WARNING_OBJECT (demux, "0xea private stream type found but " in create_pad_for_stream()
1933 GST_WARNING_OBJECT (demux, in create_pad_for_stream()
1950 GST_ELEMENT_WARNING (demux, STREAM, DEMUX, in create_pad_for_stream()
1983 GST_DEBUG_OBJECT (demux, in create_pad_for_stream()
1994 g_strdup_printf ("audio_%01x_%04x", demux->program_generation, in create_pad_for_stream()
2001 g_strdup_printf ("video_%01x_%04x", demux->program_generation, in create_pad_for_stream()
2008 g_strdup_printf ("private_%01x_%04x", demux->program_generation, in create_pad_for_stream()
2013 g_strdup_printf ("subpicture_%01x_%04x", demux->program_generation, in create_pad_for_stream()
2025 GST_LOG_OBJECT (demux, in create_pad_for_stream()
2035 if (gst_event_parse_group_id (event, &demux->group_id)) in create_pad_for_stream()
2036 demux->have_group_id = TRUE; in create_pad_for_stream()
2038 demux->have_group_id = FALSE; in create_pad_for_stream()
2040 } else if (!demux->have_group_id) { in create_pad_for_stream()
2041 demux->have_group_id = TRUE; in create_pad_for_stream()
2042 demux->group_id = gst_util_group_id_next (); in create_pad_for_stream()
2046 if (demux->have_group_id) in create_pad_for_stream()
2047 gst_event_set_group_id (event, demux->group_id); in create_pad_for_stream()
2080 GstTSDemux *demux = (GstTSDemux *) base; in gst_ts_demux_stream_added() local
2088 gst_flow_combiner_add_pad (demux->flowcombiner, stream->pad); in gst_ts_demux_stream_added()
2103 demux->reset_segment = in gst_ts_demux_stream_added()
2239 gst_ts_demux_flush_streams (GstTSDemux * demux, gboolean hard) in gst_ts_demux_flush_streams() argument
2242 if (!demux->program) in gst_ts_demux_flush_streams()
2245 for (walk = demux->program->stream_list; walk; walk = g_list_next (walk)) in gst_ts_demux_flush_streams()
2246 gst_ts_demux_stream_flush (walk->data, demux, hard); in gst_ts_demux_flush_streams()
2252 GstTSDemux *demux = GST_TS_DEMUX (base); in gst_ts_demux_can_remove_program() local
2256 if (demux->program == program) { in gst_ts_demux_can_remove_program()
2259 demux->previous_program = program; in gst_ts_demux_can_remove_program()
2260 demux->program_number = -1; in gst_ts_demux_can_remove_program()
2269 GstTSDemux *demux = GST_TS_DEMUX (base); in gst_ts_demux_update_program() local
2282 activate_pad_for_stream (demux, stream); in gst_ts_demux_update_program()
2298 GstTSDemux *demux = GST_TS_DEMUX (base); in gst_ts_demux_program_started() local
2301 (gint) demux->program_number, program->program_number, in gst_ts_demux_program_started()
2302 demux->requested_program_number); in gst_ts_demux_program_started()
2304 if (demux->requested_program_number == program->program_number || in gst_ts_demux_program_started()
2305 (demux->requested_program_number == -1 && demux->program_number == -1)) { in gst_ts_demux_program_started()
2310 demux->program_number = program->program_number; in gst_ts_demux_program_started()
2311 demux->program = program; in gst_ts_demux_program_started()
2314 demux->program_generation = (demux->program_generation + 1) & 0xf; in gst_ts_demux_program_started()
2323 g_mutex_lock (&demux->lock); in gst_ts_demux_program_started()
2324 gst_event_replace (&demux->segment_event, NULL); in gst_ts_demux_program_started()
2325 g_mutex_unlock (&demux->lock); in gst_ts_demux_program_started()
2328 if (demux->previous_program) { in gst_ts_demux_program_started()
2330 GST_DEBUG_OBJECT (demux, "Draining previous program"); in gst_ts_demux_program_started()
2331 for (tmp = demux->previous_program->stream_list; tmp; tmp = tmp->next) { in gst_ts_demux_program_started()
2334 gst_ts_demux_push_pending_data (demux, stream, in gst_ts_demux_program_started()
2335 demux->previous_program); in gst_ts_demux_program_started()
2342 activate_pad_for_stream (demux, stream); in gst_ts_demux_program_started()
2349 if (demux->previous_program) { in gst_ts_demux_program_started()
2351 mpegts_base_deactivate_and_free_program (base, demux->previous_program); in gst_ts_demux_program_started()
2352 demux->previous_program = NULL; in gst_ts_demux_program_started()
2358 GST_ELEMENT_ERROR (demux, STREAM, WRONG_TYPE, in gst_ts_demux_program_started()
2381 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in gst_ts_demux_program_started()
2383 if (stream->pad && demux->tag_event) { in gst_ts_demux_program_started()
2384 GstEvent *evt = gst_event_ref (demux->tag_event); in gst_ts_demux_program_started()
2389 gst_event_replace (&demux->tag_event, NULL); in gst_ts_demux_program_started()
2392 gst_element_no_more_pads ((GstElement *) demux); in gst_ts_demux_program_started()
2399 GstTSDemux *demux = GST_TS_DEMUX (base); in gst_ts_demux_program_stopped() local
2401 if (demux->program == program) { in gst_ts_demux_program_stopped()
2402 demux->program = NULL; in gst_ts_demux_program_stopped()
2403 demux->program_number = -1; in gst_ts_demux_program_stopped()
2409 gst_ts_demux_record_pts (GstTSDemux * demux, TSDemuxStream * stream, in gst_ts_demux_record_pts() argument
2413 MpegTSBase *base = GST_MPEGTS_BASE (demux); in gst_ts_demux_record_pts()
2426 mpegts_packetizer_pts_to_ts (MPEG_TS_BASE_PACKETIZER (demux), in gst_ts_demux_record_pts()
2427 MPEGTIME_TO_GSTTIME (pts), demux->program->pcr_pid); in gst_ts_demux_record_pts()
2430 demux->mpeg_pts_offset = in gst_ts_demux_record_pts()
2449 if (G_UNLIKELY (demux->emit_statistics)) { in gst_ts_demux_record_pts()
2456 gst_element_post_message (GST_ELEMENT_CAST (demux), in gst_ts_demux_record_pts()
2457 gst_message_new_element (GST_OBJECT (demux), st)); in gst_ts_demux_record_pts()
2462 gst_ts_demux_record_dts (GstTSDemux * demux, TSDemuxStream * stream, in gst_ts_demux_record_dts() argument
2478 mpegts_packetizer_pts_to_ts (MPEG_TS_BASE_PACKETIZER (demux), in gst_ts_demux_record_dts()
2479 MPEGTIME_TO_GSTTIME (dts), demux->program->pcr_pid); in gst_ts_demux_record_dts()
2483 if (G_UNLIKELY (demux->emit_statistics)) { in gst_ts_demux_record_dts()
2490 gst_element_post_message (GST_ELEMENT_CAST (demux), in gst_ts_demux_record_dts()
2491 gst_message_new_element (GST_OBJECT (demux), st)); in gst_ts_demux_record_dts()
2497 check_pending_buffers (GstTSDemux * demux) in check_pending_buffers() argument
2507 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in check_pending_buffers()
2517 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in check_pending_buffers()
2553 GST_DEBUG_OBJECT (demux, in check_pending_buffers()
2555 GST_MPEGTS_BASE (demux)->ignore_pcr = TRUE; in check_pending_buffers()
2556 demux->program->pcr_pid = 0x1fff; in check_pending_buffers()
2557 g_object_notify (G_OBJECT (demux), "ignore-pcr"); in check_pending_buffers()
2561 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in check_pending_buffers()
2591 ts = mpegts_packetizer_pts_to_ts (MPEG_TS_BASE_PACKETIZER (demux), in check_pending_buffers()
2592 MPEGTIME_TO_GSTTIME (lastval), demux->program->pcr_pid); in check_pending_buffers()
2607 mpegts_packetizer_set_current_pcr_offset (MPEG_TS_BASE_PACKETIZER (demux), in check_pending_buffers()
2608 offset, demux->program->pcr_pid); in check_pending_buffers()
2611 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in check_pending_buffers()
2624 mpegts_packetizer_pts_to_ts (MPEG_TS_BASE_PACKETIZER (demux), in check_pending_buffers()
2625 MPEGTIME_TO_GSTTIME (pend->pts), demux->program->pcr_pid); in check_pending_buffers()
2628 mpegts_packetizer_pts_to_ts (MPEG_TS_BASE_PACKETIZER (demux), in check_pending_buffers()
2629 MPEGTIME_TO_GSTTIME (pend->dts), demux->program->pcr_pid); in check_pending_buffers()
2643 mpegts_packetizer_pts_to_ts (MPEG_TS_BASE_PACKETIZER (demux), in check_pending_buffers()
2644 MPEGTIME_TO_GSTTIME (stream->raw_pts), demux->program->pcr_pid); in check_pending_buffers()
2650 mpegts_packetizer_pts_to_ts (MPEG_TS_BASE_PACKETIZER (demux), in check_pending_buffers()
2651 MPEGTIME_TO_GSTTIME (stream->raw_dts), demux->program->pcr_pid); in check_pending_buffers()
2662 gst_ts_demux_parse_pes_header (GstTSDemux * demux, TSDemuxStream * stream, in gst_ts_demux_parse_pes_header() argument
2702 gst_ts_demux_record_dts (demux, stream, header.DTS, bufferoffset); in gst_ts_demux_parse_pes_header()
2703 gst_ts_demux_record_pts (demux, stream, header.PTS, bufferoffset); in gst_ts_demux_parse_pes_header()
2708 check_pending_buffers (demux); in gst_ts_demux_parse_pes_header()
2716 GST_DEBUG_OBJECT (demux, in gst_ts_demux_parse_pes_header()
2772 gst_ts_demux_queue_data (GstTSDemux * demux, TSDemuxStream * stream, in gst_ts_demux_queue_data() argument
2779 GST_LOG_OBJECT (demux, "pid: 0x%04x state:%d", stream->stream.pid, in gst_ts_demux_queue_data()
2786 GST_DEBUG_OBJECT (demux, "CONTINUITY: Initialize to %d", cc); in gst_ts_demux_queue_data()
2789 GST_LOG_OBJECT (demux, "CONTINUITY: Got expected %d", cc); in gst_ts_demux_queue_data()
2805 GST_ELEMENT_WARNING_WITH_DETAILS (demux, STREAM, DEMUX, in gst_ts_demux_queue_data()
2821 GST_DEBUG_OBJECT (demux, "Didn't get the first packet of this PES"); in gst_ts_demux_queue_data()
2823 GST_LOG_OBJECT (demux, "EMPTY=>HEADER"); in gst_ts_demux_queue_data()
2831 GST_LOG_OBJECT (demux, "HEADER: Parsing PES header"); in gst_ts_demux_queue_data()
2834 gst_ts_demux_parse_pes_header (demux, stream, data, size, packet->offset); in gst_ts_demux_queue_data()
2839 GST_LOG_OBJECT (demux, "BUFFER: appending data"); in gst_ts_demux_queue_data()
2841 GST_LOG_OBJECT (demux, "resizing buffer"); in gst_ts_demux_queue_data()
2853 GST_LOG_OBJECT (demux, "DISCONT: not storing/pushing"); in gst_ts_demux_queue_data()
2873 calculate_and_push_newsegment (GstTSDemux * demux, TSDemuxStream * stream, in calculate_and_push_newsegment() argument
2876 MpegTSBase *base = (MpegTSBase *) demux; in calculate_and_push_newsegment()
2881 GST_DEBUG_OBJECT (demux, "Creating new newsegment for stream %p", stream); in calculate_and_push_newsegment()
2884 target_program = demux->program; in calculate_and_push_newsegment()
2887 g_mutex_lock (&demux->lock); in calculate_and_push_newsegment()
2888 if (demux->segment_event) { in calculate_and_push_newsegment()
2889 g_mutex_unlock (&demux->lock); in calculate_and_push_newsegment()
2892 g_mutex_unlock (&demux->lock); in calculate_and_push_newsegment()
2906 GST_DEBUG_OBJECT (demux, "lowest_pts %" G_GUINT64_FORMAT " => clocktime %" in calculate_and_push_newsegment()
2909 if (base->out_segment.format != GST_FORMAT_TIME || demux->reset_segment) { in calculate_and_push_newsegment()
2911 GST_DEBUG_OBJECT (demux, "Calculating actual segment"); in calculate_and_push_newsegment()
2927 seg->rate = demux->rate; in calculate_and_push_newsegment()
2940 GST_LOG_OBJECT (demux, "Output segment now %" GST_SEGMENT_FORMAT, in calculate_and_push_newsegment()
2943 g_mutex_lock (&demux->lock); in calculate_and_push_newsegment()
2944 if (!demux->segment_event) { in calculate_and_push_newsegment()
2945 gst_event_take (&demux->segment_event, in calculate_and_push_newsegment()
2949 gst_event_set_seqnum (demux->segment_event, base->last_seek_seqnum); in calculate_and_push_newsegment()
2951 g_mutex_unlock (&demux->lock); in calculate_and_push_newsegment()
2959 g_mutex_lock (&demux->lock); in calculate_and_push_newsegment()
2960 if (demux->segment_event) { in calculate_and_push_newsegment()
2961 GstEvent *evt = gst_event_ref (demux->segment_event); in calculate_and_push_newsegment()
2964 g_mutex_unlock (&demux->lock); in calculate_and_push_newsegment()
2967 g_mutex_unlock (&demux->lock); in calculate_and_push_newsegment()
2970 if (demux->global_tags) { in calculate_and_push_newsegment()
2972 gst_event_new_tag (gst_tag_list_ref (demux->global_tags))); in calculate_and_push_newsegment()
2993 gst_ts_demux_check_and_sync_streams (GstTSDemux * demux, GstClockTime time) in gst_ts_demux_check_and_sync_streams() argument
2997 GST_DEBUG_OBJECT (demux, in gst_ts_demux_check_and_sync_streams()
3001 if (G_UNLIKELY (demux->program == NULL)) in gst_ts_demux_check_and_sync_streams()
3022 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in gst_ts_demux_check_and_sync_streams()
3041 calculate_and_push_newsegment (demux, ps, NULL); in gst_ts_demux_check_and_sync_streams()
3382 gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream, in gst_ts_demux_push_pending_data() argument
3385 MpegTSBase *base = GST_MPEGTS_BASE (demux); in gst_ts_demux_push_pending_data()
3411 if (G_UNLIKELY (demux->program == NULL)) { in gst_ts_demux_push_pending_data()
3412 GST_LOG_OBJECT (demux, "No program"); in gst_ts_demux_push_pending_data()
3418 MpegTSBase *base = (MpegTSBase *) demux; in gst_ts_demux_push_pending_data()
3421 stream->current_size)) || demux->last_seek_offset == 0) { in gst_ts_demux_push_pending_data()
3455 base->seek_offset = demux->last_seek_offset - 200 * base->packetsize; in gst_ts_demux_push_pending_data()
3456 if (demux->last_seek_offset < 200 * base->packetsize) in gst_ts_demux_push_pending_data()
3458 demux->last_seek_offset = base->seek_offset; in gst_ts_demux_push_pending_data()
3462 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in gst_ts_demux_push_pending_data()
3509 if (G_UNLIKELY (stream->pending_ts && !check_pending_buffers (demux))) { in gst_ts_demux_push_pending_data()
3531 GST_DEBUG_OBJECT (demux, in gst_ts_demux_push_pending_data()
3538 calculate_and_push_newsegment (demux, stream, target_program); in gst_ts_demux_push_pending_data()
3631 res = gst_flow_combiner_update_flow (demux->flowcombiner, res); in gst_ts_demux_push_pending_data()
3643 if (demux->program->pcr_pid != 0x1fff) { in gst_ts_demux_push_pending_data()
3645 mpegts_packetizer_get_current_time (MPEG_TS_BASE_PACKETIZER (demux), in gst_ts_demux_push_pending_data()
3646 demux->program->pcr_pid); in gst_ts_demux_push_pending_data()
3651 gst_ts_demux_check_and_sync_streams (demux, curpcr); in gst_ts_demux_push_pending_data()
3654 gst_ts_demux_check_and_sync_streams (demux, stream->pts); in gst_ts_demux_push_pending_data()
3662 GST_LOG_OBJECT (demux, "Cleared PES data. returning %s", in gst_ts_demux_push_pending_data()
3678 gst_ts_demux_handle_packet (GstTSDemux * demux, TSDemuxStream * stream, in gst_ts_demux_handle_packet() argument
3683 GST_LOG_OBJECT (demux, "pid 0x%04x pusi:%d, afc:%d, cont:%d, payload:%p", in gst_ts_demux_handle_packet()
3691 res = gst_ts_demux_push_pending_data (demux, stream, NULL); in gst_ts_demux_handle_packet()
3701 gst_ts_demux_queue_data (demux, stream, packet); in gst_ts_demux_handle_packet()
3702 GST_LOG_OBJECT (demux, "current_size:%d, expected_size:%d", in gst_ts_demux_handle_packet()
3708 GST_LOG_OBJECT (demux, "pushing packet of size %u", stream->current_size); in gst_ts_demux_handle_packet()
3709 res = gst_ts_demux_push_pending_data (demux, stream, NULL); in gst_ts_demux_handle_packet()
3725 GstTSDemux *demux = GST_TS_DEMUX_CAST (base); in gst_ts_demux_flush() local
3727 gst_ts_demux_flush_streams (demux, hard); in gst_ts_demux_flush()
3729 g_mutex_lock (&demux->lock); in gst_ts_demux_flush()
3730 gst_event_replace (&demux->segment_event, NULL); in gst_ts_demux_flush()
3731 g_mutex_unlock (&demux->lock); in gst_ts_demux_flush()
3732 if (demux->global_tags) { in gst_ts_demux_flush()
3733 gst_tag_list_unref (demux->global_tags); in gst_ts_demux_flush()
3734 demux->global_tags = NULL; in gst_ts_demux_flush()
3738 demux->rate = 1.0; in gst_ts_demux_flush()
3746 GstTSDemux *demux = GST_TS_DEMUX_CAST (base); in gst_ts_demux_drain() local
3750 if (!demux->program) in gst_ts_demux_drain()
3753 for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { in gst_ts_demux_drain()
3756 res = gst_ts_demux_push_pending_data (demux, stream, NULL); in gst_ts_demux_drain()
3769 GstTSDemux *demux = GST_TS_DEMUX_CAST (base); in gst_ts_demux_push() local
3773 if (G_LIKELY (demux->program)) { in gst_ts_demux_push()
3774 stream = (TSDemuxStream *) demux->program->streams[packet->pid]; in gst_ts_demux_push()
3777 res = gst_ts_demux_handle_packet (demux, stream, packet, section); in gst_ts_demux_push()