• Home
  • Raw
  • Download

Lines Matching refs:pad

41 typedef gboolean (*GstOggMapSetupFunc) (GstOggStream * pad,
43 typedef gboolean (*GstOggMapSetupFromCapsFunc) (GstOggStream * pad,
45 typedef GstClockTime (*GstOggMapToTimeFunc) (GstOggStream * pad,
47 typedef gint64 (*GstOggMapToGranuleFunc) (GstOggStream * pad,
49 typedef gint64 (*GstOggMapToGranuleposFunc) (GstOggStream * pad,
53 typedef gboolean (*GstOggMapIsGranuleposKeyFrameFunc) (GstOggStream * pad,
57 typedef gboolean (*GstOggMapIsPacketKeyFrameFunc) (GstOggStream * pad,
61 typedef gboolean (*GstOggMapIsHeaderPacketFunc) (GstOggStream * pad,
63 typedef gint64 (*GstOggMapPacketDurationFunc) (GstOggStream * pad,
65 typedef void (*GstOggMapExtractTagsFunc) (GstOggStream * pad,
68 typedef gint64 (*GstOggMapGranuleposToKeyGranuleFunc) (GstOggStream * pad,
71 typedef GstBuffer *(*GstOggMapGetHeadersFunc) (GstOggStream * pad);
72 typedef void (*GstOggMapUpdateStatsFunc) (GstOggStream * pad,
102 gst_ogg_stream_get_packet_start_time (GstOggStream * pad, ogg_packet * packet) in gst_ogg_stream_get_packet_start_time() argument
110 duration = gst_ogg_stream_get_packet_duration (pad, packet); in gst_ogg_stream_get_packet_start_time()
115 return gst_ogg_stream_granule_to_time (pad, in gst_ogg_stream_get_packet_start_time()
116 gst_ogg_stream_granulepos_to_granule (pad, in gst_ogg_stream_get_packet_start_time()
121 gst_ogg_stream_get_start_time_for_granulepos (GstOggStream * pad, in gst_ogg_stream_get_start_time_for_granulepos() argument
124 if (pad->frame_size == 0) in gst_ogg_stream_get_start_time_for_granulepos()
127 return gst_ogg_stream_granule_to_time (pad, in gst_ogg_stream_get_start_time_for_granulepos()
128 gst_ogg_stream_granulepos_to_granule (pad, granulepos)); in gst_ogg_stream_get_start_time_for_granulepos()
132 gst_ogg_stream_get_end_time_for_granulepos (GstOggStream * pad, in gst_ogg_stream_get_end_time_for_granulepos() argument
135 return gst_ogg_stream_granule_to_time (pad, in gst_ogg_stream_get_end_time_for_granulepos()
136 gst_ogg_stream_granulepos_to_granule (pad, granulepos)); in gst_ogg_stream_get_end_time_for_granulepos()
140 gst_ogg_stream_granule_to_time (GstOggStream * pad, gint64 granule) in gst_ogg_stream_granule_to_time() argument
142 if (granule == 0 || pad->granulerate_n == 0 || pad->granulerate_d == 0) in gst_ogg_stream_granule_to_time()
145 granule += pad->granule_offset; in gst_ogg_stream_granule_to_time()
149 return gst_util_uint64_scale (granule, GST_SECOND * pad->granulerate_d, in gst_ogg_stream_granule_to_time()
150 pad->granulerate_n); in gst_ogg_stream_granule_to_time()
154 gst_ogg_stream_granulepos_to_granule (GstOggStream * pad, gint64 granulepos) in gst_ogg_stream_granulepos_to_granule() argument
160 if (mappers[pad->map].granulepos_to_granule_func == NULL) { in gst_ogg_stream_granulepos_to_granule()
162 gst_ogg_stream_get_media_type (pad)); in gst_ogg_stream_granulepos_to_granule()
166 return mappers[pad->map].granulepos_to_granule_func (pad, granulepos); in gst_ogg_stream_granulepos_to_granule()
170 gst_ogg_stream_granulepos_to_key_granule (GstOggStream * pad, gint64 granulepos) in gst_ogg_stream_granulepos_to_key_granule() argument
172 if (mappers[pad->map].granulepos_to_key_granule_func) in gst_ogg_stream_granulepos_to_key_granule()
173 return mappers[pad->map].granulepos_to_key_granule_func (pad, granulepos); in gst_ogg_stream_granulepos_to_key_granule()
175 if (granulepos == -1 || granulepos == 0 || pad->granuleshift == G_MAXUINT32) { in gst_ogg_stream_granulepos_to_key_granule()
179 return granulepos >> pad->granuleshift; in gst_ogg_stream_granulepos_to_key_granule()
183 gst_ogg_stream_granule_to_granulepos (GstOggStream * pad, gint64 granule, in gst_ogg_stream_granule_to_granulepos() argument
190 if (mappers[pad->map].granule_to_granulepos_func == NULL) { in gst_ogg_stream_granule_to_granulepos()
192 gst_ogg_stream_get_media_type (pad)); in gst_ogg_stream_granule_to_granulepos()
196 return mappers[pad->map].granule_to_granulepos_func (pad, granule, in gst_ogg_stream_granule_to_granulepos()
201 gst_ogg_stream_granulepos_is_key_frame (GstOggStream * pad, gint64 granulepos) in gst_ogg_stream_granulepos_is_key_frame() argument
207 if (mappers[pad->map].is_granulepos_key_frame_func == NULL) { in gst_ogg_stream_granulepos_is_key_frame()
209 gst_ogg_stream_get_media_type (pad)); in gst_ogg_stream_granulepos_is_key_frame()
213 return mappers[pad->map].is_granulepos_key_frame_func (pad, granulepos); in gst_ogg_stream_granulepos_is_key_frame()
217 gst_ogg_stream_packet_is_key_frame (GstOggStream * pad, ogg_packet * packet) in gst_ogg_stream_packet_is_key_frame() argument
219 if (mappers[pad->map].is_packet_key_frame_func == NULL) { in gst_ogg_stream_packet_is_key_frame()
221 gst_ogg_stream_get_media_type (pad)); in gst_ogg_stream_packet_is_key_frame()
225 return mappers[pad->map].is_packet_key_frame_func (pad, packet); in gst_ogg_stream_packet_is_key_frame()
229 gst_ogg_stream_packet_is_header (GstOggStream * pad, ogg_packet * packet) in gst_ogg_stream_packet_is_header() argument
231 if (mappers[pad->map].is_header_func == NULL) { in gst_ogg_stream_packet_is_header()
233 gst_ogg_stream_get_media_type (pad)); in gst_ogg_stream_packet_is_header()
237 return mappers[pad->map].is_header_func (pad, packet); in gst_ogg_stream_packet_is_header()
241 gst_ogg_stream_get_packet_duration (GstOggStream * pad, ogg_packet * packet) in gst_ogg_stream_get_packet_duration() argument
243 if (mappers[pad->map].packet_duration_func == NULL) { in gst_ogg_stream_get_packet_duration()
245 gst_ogg_stream_get_media_type (pad)); in gst_ogg_stream_get_packet_duration()
249 return mappers[pad->map].packet_duration_func (pad, packet); in gst_ogg_stream_get_packet_duration()
254 gst_ogg_stream_extract_tags (GstOggStream * pad, ogg_packet * packet) in gst_ogg_stream_extract_tags() argument
256 if (mappers[pad->map].extract_tags_func == NULL) { in gst_ogg_stream_extract_tags()
261 mappers[pad->map].extract_tags_func (pad, packet); in gst_ogg_stream_extract_tags()
265 gst_ogg_stream_get_media_type (GstOggStream * pad) in gst_ogg_stream_get_media_type() argument
267 const GstCaps *caps = pad->caps; in gst_ogg_stream_get_media_type()
278 gst_ogg_stream_get_headers (GstOggStream * pad) in gst_ogg_stream_get_headers() argument
280 if (!mappers[pad->map].get_headers_func) in gst_ogg_stream_get_headers()
283 return mappers[pad->map].get_headers_func (pad); in gst_ogg_stream_get_headers()
287 gst_ogg_stream_update_stats (GstOggStream * pad, ogg_packet * packet) in gst_ogg_stream_update_stats() argument
289 if (!mappers[pad->map].get_headers_func) in gst_ogg_stream_update_stats()
292 mappers[pad->map].update_stats_func (pad, packet); in gst_ogg_stream_update_stats()
298 is_granulepos_keyframe_true (GstOggStream * pad, gint64 granulepos) in is_granulepos_keyframe_true() argument
304 is_packet_keyframe_true (GstOggStream * pad, ogg_packet * packet) in is_packet_keyframe_true() argument
310 granulepos_to_granule_default (GstOggStream * pad, gint64 granulepos) in granulepos_to_granule_default() argument
314 if (pad->granuleshift != 0 && pad->granuleshift != G_MAXUINT32) { in granulepos_to_granule_default()
315 keyindex = granulepos >> pad->granuleshift; in granulepos_to_granule_default()
316 keyoffset = granulepos - (keyindex << pad->granuleshift); in granulepos_to_granule_default()
325 granule_to_granulepos_default (GstOggStream * pad, gint64 granule, in granule_to_granulepos_default() argument
330 if (pad->granuleshift != 0 && pad->granuleshift != G_MAXUINT32) { in granule_to_granulepos_default()
335 keyframe_granule = pad->theora_has_zero_keyoffset ? 0 : 1; in granule_to_granulepos_default()
337 return (keyframe_granule << pad->granuleshift) | keyoffset; in granule_to_granulepos_default()
345 is_header_unknown (GstOggStream * pad, ogg_packet * packet) in is_header_unknown() argument
353 is_header_true (GstOggStream * pad, ogg_packet * packet) in is_header_true() argument
359 is_header_count (GstOggStream * pad, ogg_packet * packet) in is_header_count() argument
361 if (pad->n_header_packets_seen < pad->n_header_packets) { in is_header_count()
368 packet_duration_constant (GstOggStream * pad, ogg_packet * packet) in packet_duration_constant() argument
370 return pad->frame_size; in packet_duration_constant()
412 setup_theora_mapper (GstOggStream * pad, ogg_packet * packet) in setup_theora_mapper() argument
425 pad->granulerate_n = GST_READ_UINT32_BE (data + 22); in setup_theora_mapper()
426 pad->granulerate_d = GST_READ_UINT32_BE (data + 26); in setup_theora_mapper()
427 if (pad->granulerate_n == 0 || pad->granulerate_d == 0) { in setup_theora_mapper()
428 GST_WARNING ("Invalid frame rate %d/%d", pad->granulerate_n, in setup_theora_mapper()
429 pad->granulerate_d); in setup_theora_mapper()
430 pad->granulerate_n = 0; in setup_theora_mapper()
431 pad->granulerate_d = 0; in setup_theora_mapper()
439 pad->granulerate_n, pad->granulerate_d, par_n, par_d, w, h); in setup_theora_mapper()
442 pad->granuleshift = ((GST_READ_UINT8 (data + 40) & 0x03) << 3) + in setup_theora_mapper()
444 if (pad->granuleshift >= 63) { in setup_theora_mapper()
446 GST_WARNING ("Invalid granuleshift (%u >= 63)", pad->granuleshift); in setup_theora_mapper()
447 pad->granulerate_n = 0; in setup_theora_mapper()
448 pad->granulerate_d = 0; in setup_theora_mapper()
449 pad->granuleshift = -1; in setup_theora_mapper()
452 GST_LOG ("granshift: %d", pad->granuleshift); in setup_theora_mapper()
454 pad->is_video = TRUE; in setup_theora_mapper()
455 pad->n_header_packets = 3; in setup_theora_mapper()
456 pad->frame_size = 1; in setup_theora_mapper()
458 pad->bitrate = GST_READ_UINT24_BE (data + 37); in setup_theora_mapper()
459 GST_LOG ("bit rate: %d", pad->bitrate); in setup_theora_mapper()
464 pad->theora_has_zero_keyoffset = in setup_theora_mapper()
467 pad->caps = gst_caps_new_empty_simple ("video/x-theora"); in setup_theora_mapper()
470 gst_caps_set_simple (pad->caps, "width", G_TYPE_INT, w, "height", in setup_theora_mapper()
479 gst_caps_set_simple (pad->caps, "framerate", GST_TYPE_FRACTION, in setup_theora_mapper()
480 pad->granulerate_n, pad->granulerate_d, "pixel-aspect-ratio", in setup_theora_mapper()
487 granulepos_to_granule_theora (GstOggStream * pad, gint64 granulepos) in granulepos_to_granule_theora() argument
491 if (pad->granuleshift != 0 && pad->granuleshift != G_MAXUINT32) { in granulepos_to_granule_theora()
492 keyindex = granulepos >> pad->granuleshift; in granulepos_to_granule_theora()
493 keyoffset = granulepos - (keyindex << pad->granuleshift); in granulepos_to_granule_theora()
494 if (pad->theora_has_zero_keyoffset) { in granulepos_to_granule_theora()
504 is_granulepos_keyframe_theora (GstOggStream * pad, gint64 granulepos) in is_granulepos_keyframe_theora() argument
508 if (granulepos == (gint64) - 1 || pad->granuleshift == G_MAXUINT32) in is_granulepos_keyframe_theora()
511 frame_mask = (G_GUINT64_CONSTANT (1) << pad->granuleshift) - 1; in is_granulepos_keyframe_theora()
517 is_packet_keyframe_theora (GstOggStream * pad, ogg_packet * packet) in is_packet_keyframe_theora() argument
525 is_header_theora (GstOggStream * pad, ogg_packet * packet) in is_header_theora() argument
531 extract_tags_theora (GstOggStream * pad, ogg_packet * packet) in extract_tags_theora() argument
535 (const guint8 *) "\201theora", 7, &pad->taglist); in extract_tags_theora()
537 if (!pad->taglist) in extract_tags_theora()
538 pad->taglist = gst_tag_list_new_empty (); in extract_tags_theora()
540 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_theora()
543 if (pad->bitrate) in extract_tags_theora()
544 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_theora()
545 GST_TAG_BITRATE, (guint) pad->bitrate, NULL); in extract_tags_theora()
552 setup_dirac_mapper (GstOggStream * pad, ogg_packet * packet) in setup_dirac_mapper() argument
575 pad->is_video = TRUE; in setup_dirac_mapper()
576 pad->always_flush_page = TRUE; in setup_dirac_mapper()
577 pad->granulerate_n = header.frame_rate_numerator * 2; in setup_dirac_mapper()
578 pad->granulerate_d = header.frame_rate_denominator; in setup_dirac_mapper()
579 pad->granuleshift = 22; in setup_dirac_mapper()
580 pad->n_header_packets = 1; in setup_dirac_mapper()
581 pad->frame_size = 2; in setup_dirac_mapper()
583 pad->caps = gst_caps_new_simple ("video/x-dirac", in setup_dirac_mapper()
597 is_keyframe_dirac (GstOggStream * pad, gint64 granulepos) in is_keyframe_dirac() argument
614 granulepos_to_granule_dirac (GstOggStream * pad, gint64 gp) in granulepos_to_granule_dirac() argument
630 granule_to_granulepos_dirac (GstOggStream * pad, gint64 granule, in granule_to_granulepos_dirac() argument
639 granulepos_to_key_granule_dirac (GstOggStream * pad, gint64 gp) in granulepos_to_key_granule_dirac() argument
664 setup_vp8_mapper (GstOggStream * pad, ogg_packet * packet) in setup_vp8_mapper() argument
685 pad->is_video = TRUE; in setup_vp8_mapper()
686 pad->is_vp8 = TRUE; in setup_vp8_mapper()
687 pad->granulerate_n = fps_n; in setup_vp8_mapper()
688 pad->granulerate_d = fps_d; in setup_vp8_mapper()
689 pad->n_header_packets = 2; in setup_vp8_mapper()
690 pad->frame_size = 1; in setup_vp8_mapper()
697 pad->caps = gst_caps_new_simple ("video/x-vp8", in setup_vp8_mapper()
707 vp8_fill_header (GstOggStream * pad, const GstCaps * caps, guint8 * data) in vp8_fill_header() argument
737 setup_vp8_mapper_from_caps (GstOggStream * pad, const GstCaps * caps) in setup_vp8_mapper_from_caps() argument
742 if (!vp8_fill_header (pad, caps, data)) in setup_vp8_mapper_from_caps()
747 return setup_vp8_mapper (pad, &packet); in setup_vp8_mapper_from_caps()
751 is_keyframe_vp8 (GstOggStream * pad, gint64 granulepos) in is_keyframe_vp8() argument
765 granulepos_to_granule_vp8 (GstOggStream * pad, gint64 gpos) in granulepos_to_granule_vp8() argument
780 granule_to_granulepos_vp8 (GstOggStream * pad, gint64 granule, in granule_to_granulepos_vp8() argument
786 inv = (pad->invisible_count <= 0) ? 0x3 : pad->invisible_count - 1; in granule_to_granulepos_vp8()
795 packet_duration_vp8 (GstOggStream * pad, ogg_packet * packet) in packet_duration_vp8() argument
808 granulepos_to_key_granule_vp8 (GstOggStream * pad, gint64 granulepos) in granulepos_to_key_granule_vp8() argument
824 is_header_vp8 (GstOggStream * pad, ogg_packet * packet) in is_header_vp8() argument
834 extract_tags_vp8 (GstOggStream * pad, ogg_packet * packet) in extract_tags_vp8() argument
838 (const guint8 *) "OVP80\2 ", 7, &pad->taglist); in extract_tags_vp8()
840 if (!pad->taglist) in extract_tags_vp8()
841 pad->taglist = gst_tag_list_new_empty (); in extract_tags_vp8()
843 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_vp8()
849 get_headers_vp8 (GstOggStream * pad) in get_headers_vp8() argument
853 if (vp8_fill_header (pad, pad->caps, data)) { in get_headers_vp8()
861 update_stats_vp8 (GstOggStream * pad, ogg_packet * packet) in update_stats_vp8() argument
863 if (packet_duration_vp8 (pad, packet)) { in update_stats_vp8()
866 pad->invisible_count = -1; in update_stats_vp8()
868 pad->invisible_count++; in update_stats_vp8()
875 setup_vorbis_mapper (GstOggStream * pad, ogg_packet * packet) in setup_vorbis_mapper() argument
881 pad->version = GST_READ_UINT32_LE (data); in setup_vorbis_mapper()
886 pad->granulerate_n = GST_READ_UINT32_LE (data); in setup_vorbis_mapper()
887 pad->granulerate_d = 1; in setup_vorbis_mapper()
888 if (pad->granulerate_n == 0) { in setup_vorbis_mapper()
889 pad->granulerate_n = 0; in setup_vorbis_mapper()
890 pad->granulerate_d = 0; in setup_vorbis_mapper()
894 pad->granuleshift = 0; in setup_vorbis_mapper()
895 pad->preroll = 2; in setup_vorbis_mapper()
896 pad->last_size = 0; in setup_vorbis_mapper()
897 GST_LOG ("sample rate: %d", pad->granulerate_n); in setup_vorbis_mapper()
900 pad->bitrate_upper = GST_READ_UINT32_LE (data); in setup_vorbis_mapper()
902 pad->bitrate_nominal = GST_READ_UINT32_LE (data); in setup_vorbis_mapper()
904 pad->bitrate_lower = GST_READ_UINT32_LE (data); in setup_vorbis_mapper()
906 if (pad->bitrate_nominal > 0) in setup_vorbis_mapper()
907 pad->bitrate = pad->bitrate_nominal; in setup_vorbis_mapper()
909 if (pad->bitrate_upper > 0 && !pad->bitrate) in setup_vorbis_mapper()
910 pad->bitrate = pad->bitrate_upper; in setup_vorbis_mapper()
912 if (pad->bitrate_lower > 0 && !pad->bitrate) in setup_vorbis_mapper()
913 pad->bitrate = pad->bitrate_lower; in setup_vorbis_mapper()
915 GST_LOG ("bit rate: %d", pad->bitrate); in setup_vorbis_mapper()
917 pad->n_header_packets = 3; in setup_vorbis_mapper()
919 gst_parse_vorbis_header_packet (pad, packet); in setup_vorbis_mapper()
921 pad->caps = gst_caps_new_simple ("audio/x-vorbis", in setup_vorbis_mapper()
922 "rate", G_TYPE_INT, pad->granulerate_n, "channels", G_TYPE_INT, chans, in setup_vorbis_mapper()
929 is_header_vorbis (GstOggStream * pad, ogg_packet * packet) in is_header_vorbis() argument
937 res = gst_parse_vorbis_setup_packet (pad, packet); in is_header_vorbis()
944 extract_tags_vorbis (GstOggStream * pad, ogg_packet * packet) in extract_tags_vorbis() argument
951 (const guint8 *) "\003vorbis", 7, &pad->taglist); in extract_tags_vorbis()
953 if (!pad->taglist) in extract_tags_vorbis()
954 pad->taglist = gst_tag_list_new_empty (); in extract_tags_vorbis()
956 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_vorbis()
957 GST_TAG_ENCODER_VERSION, pad->version, in extract_tags_vorbis()
960 if (pad->bitrate_nominal > 0) in extract_tags_vorbis()
961 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_vorbis()
962 GST_TAG_NOMINAL_BITRATE, (guint) pad->bitrate_nominal, NULL); in extract_tags_vorbis()
964 if (pad->bitrate_upper > 0) in extract_tags_vorbis()
965 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_vorbis()
966 GST_TAG_MAXIMUM_BITRATE, (guint) pad->bitrate_upper, NULL); in extract_tags_vorbis()
968 if (pad->bitrate_lower > 0) in extract_tags_vorbis()
969 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_vorbis()
970 GST_TAG_MINIMUM_BITRATE, (guint) pad->bitrate_lower, NULL); in extract_tags_vorbis()
972 if (pad->bitrate) in extract_tags_vorbis()
973 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_vorbis()
974 GST_TAG_BITRATE, (guint) pad->bitrate, NULL); in extract_tags_vorbis()
979 packet_duration_vorbis (GstOggStream * pad, ogg_packet * packet) in packet_duration_vorbis() argument
988 mode = (packet->packet[0] >> 1) & ((1 << pad->vorbis_log2_num_modes) - 1); in packet_duration_vorbis()
989 size = pad->vorbis_mode_sizes[mode] ? pad->long_size : pad->short_size; in packet_duration_vorbis()
991 if (pad->last_size == 0) { in packet_duration_vorbis()
994 duration = pad->last_size / 4 + size / 4; in packet_duration_vorbis()
996 pad->last_size = size; in packet_duration_vorbis()
1007 setup_speex_mapper (GstOggStream * pad, ogg_packet * packet) in setup_speex_mapper() argument
1014 pad->granulerate_n = GST_READ_UINT32_LE (data); in setup_speex_mapper()
1015 pad->granulerate_d = 1; in setup_speex_mapper()
1016 if (pad->granulerate_n == 0) { in setup_speex_mapper()
1017 pad->granulerate_n = 0; in setup_speex_mapper()
1018 pad->granulerate_d = 0; in setup_speex_mapper()
1022 pad->granuleshift = 0; in setup_speex_mapper()
1027 pad->bitrate = GST_READ_UINT32_LE (data); in setup_speex_mapper()
1029 GST_LOG ("sample rate: %d, channels: %u", pad->granulerate_n, chans); in setup_speex_mapper()
1030 GST_LOG ("bit rate: %d", pad->bitrate); in setup_speex_mapper()
1032 pad->n_header_packets = GST_READ_UINT32_LE (packet->packet + 68) + 2; in setup_speex_mapper()
1033 pad->frame_size = GST_READ_UINT32_LE (packet->packet + 64) * in setup_speex_mapper()
1036 pad->caps = gst_caps_new_simple ("audio/x-speex", "rate", G_TYPE_INT, in setup_speex_mapper()
1037 pad->granulerate_n, "channels", G_TYPE_INT, chans, NULL); in setup_speex_mapper()
1043 extract_tags_count (GstOggStream * pad, ogg_packet * packet) in extract_tags_count() argument
1046 if (packet->bytes > 0 && pad->n_header_packets_seen == 1) { in extract_tags_count()
1047 tag_list_from_vorbiscomment_packet (packet, NULL, 0, &pad->taglist); in extract_tags_count()
1049 if (!pad->taglist) in extract_tags_count()
1050 pad->taglist = gst_tag_list_new_empty (); in extract_tags_count()
1052 if (pad->is_video) { in extract_tags_count()
1053 gst_pb_utils_add_codec_description_to_tag_list (pad->taglist, in extract_tags_count()
1054 GST_TAG_VIDEO_CODEC, pad->caps); in extract_tags_count()
1055 } else if (!pad->is_sparse && !pad->is_ogm_text && !pad->is_ogm) { in extract_tags_count()
1056 gst_pb_utils_add_codec_description_to_tag_list (pad->taglist, in extract_tags_count()
1057 GST_TAG_AUDIO_CODEC, pad->caps); in extract_tags_count()
1062 if (pad->bitrate) in extract_tags_count()
1063 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_count()
1064 GST_TAG_BITRATE, (guint) pad->bitrate, NULL); in extract_tags_count()
1072 setup_fLaC_mapper (GstOggStream * pad, ogg_packet * packet) in setup_fLaC_mapper() argument
1074 pad->granulerate_n = 0; in setup_fLaC_mapper()
1075 pad->granulerate_d = 1; in setup_fLaC_mapper()
1076 pad->granuleshift = 0; in setup_fLaC_mapper()
1078 pad->n_header_packets = 3; in setup_fLaC_mapper()
1080 pad->caps = gst_caps_new_empty_simple ("audio/x-flac"); in setup_fLaC_mapper()
1086 is_header_fLaC (GstOggStream * pad, ogg_packet * packet) in is_header_fLaC() argument
1088 if (pad->n_header_packets_seen == 1) { in is_header_fLaC()
1092 pad->granulerate_n = (packet->packet[14] << 12) | in is_header_fLaC()
1096 if (pad->n_header_packets_seen < pad->n_header_packets) { in is_header_fLaC()
1104 setup_flac_mapper (GstOggStream * pad, ogg_packet * packet) in setup_flac_mapper() argument
1111 pad->granulerate_n = (GST_READ_UINT32_BE (data + 27) & 0xFFFFF000) >> 12; in setup_flac_mapper()
1112 pad->granulerate_d = 1; in setup_flac_mapper()
1114 if (pad->granulerate_n == 0) { in setup_flac_mapper()
1115 pad->granulerate_n = 0; in setup_flac_mapper()
1116 pad->granulerate_d = 0; in setup_flac_mapper()
1120 pad->granuleshift = 0; in setup_flac_mapper()
1123 GST_DEBUG ("sample rate: %d, channels: %u", pad->granulerate_n, chans); in setup_flac_mapper()
1125 pad->n_header_packets = GST_READ_UINT16_BE (packet->packet + 7); in setup_flac_mapper()
1127 pad->caps = gst_caps_new_simple ("audio/x-flac", "rate", G_TYPE_INT, in setup_flac_mapper()
1128 pad->granulerate_n, "channels", G_TYPE_INT, chans, NULL); in setup_flac_mapper()
1134 is_header_flac (GstOggStream * pad, ogg_packet * packet) in is_header_flac() argument
1140 packet_duration_flac (GstOggStream * pad, ogg_packet * packet) in packet_duration_flac() argument
1185 extract_tags_flac (GstOggStream * pad, ogg_packet * packet) in extract_tags_flac() argument
1189 packet->packet, 4, &pad->taglist); in extract_tags_flac()
1191 if (!pad->taglist) in extract_tags_flac()
1192 pad->taglist = gst_tag_list_new_empty (); in extract_tags_flac()
1194 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_flac()
1202 setup_fishead_mapper (GstOggStream * pad, ogg_packet * packet) in setup_fishead_mapper() argument
1217 pad->skeleton_major = GST_READ_UINT16_LE (data); in setup_fishead_mapper()
1219 pad->skeleton_minor = GST_READ_UINT16_LE (data); in setup_fishead_mapper()
1233 pad->basetime = gst_util_uint64_scale (GST_SECOND, basetime_n, basetime_d); in setup_fishead_mapper()
1235 pad->basetime = -1; in setup_fishead_mapper()
1238 pad->prestime = gst_util_uint64_scale (GST_SECOND, prestime_n, prestime_d); in setup_fishead_mapper()
1240 pad->prestime = -1; in setup_fishead_mapper()
1243 if (packet->bytes >= SKELETON_FISHEAD_3_3_MIN_SIZE && pad->skeleton_major == 3 in setup_fishead_mapper()
1244 && pad->skeleton_minor > 0) { in setup_fishead_mapper()
1277 pad->total_time = lastsampletime - firstsampletime; in setup_fishead_mapper()
1279 pad->total_time = -1; in setup_fishead_mapper()
1282 GST_TIME_ARGS (pad->total_time)); in setup_fishead_mapper()
1284 && pad->skeleton_major == 4) { in setup_fishead_mapper()
1293 pad->total_time = -1; in setup_fishead_mapper()
1297 ", prestime: %" GST_TIME_FORMAT ")", pad->skeleton_major, in setup_fishead_mapper()
1298 pad->skeleton_minor, GST_TIME_ARGS (pad->basetime), in setup_fishead_mapper()
1299 GST_TIME_ARGS (pad->prestime)); in setup_fishead_mapper()
1301 pad->is_skeleton = TRUE; in setup_fishead_mapper()
1302 pad->is_sparse = TRUE; in setup_fishead_mapper()
1304 pad->caps = gst_caps_new_empty_simple ("application/x-ogg-skeleton"); in setup_fishead_mapper()
1310 gst_ogg_map_parse_fisbone (GstOggStream * pad, const guint8 * data, guint size, in gst_ogg_map_parse_fisbone() argument
1349 gst_ogg_map_add_fisbone (GstOggStream * pad, GstOggStream * skel_pad, in gst_ogg_map_add_fisbone() argument
1355 if (pad->have_fisbone) { in gst_ogg_map_add_fisbone()
1370 if (pad->granulerate_n == 0 || pad->granulerate_d == 0) { in gst_ogg_map_add_fisbone()
1371 pad->granulerate_n = GST_READ_UINT64_LE (data); in gst_ogg_map_add_fisbone()
1372 pad->granulerate_d = GST_READ_UINT64_LE (data + 8); in gst_ogg_map_add_fisbone()
1374 if (pad->granuleshift == G_MAXUINT32) { in gst_ogg_map_add_fisbone()
1375 pad->granuleshift = GST_READ_UINT8 (data + 28); in gst_ogg_map_add_fisbone()
1376 if (pad->granuleshift >= 63) { in gst_ogg_map_add_fisbone()
1378 GST_WARNING ("Invalid granuleshift (%u >= 63)", pad->granuleshift); in gst_ogg_map_add_fisbone()
1379 pad->granulerate_n = 0; in gst_ogg_map_add_fisbone()
1380 pad->granulerate_d = 0; in gst_ogg_map_add_fisbone()
1381 pad->granuleshift = -1; in gst_ogg_map_add_fisbone()
1386 pad->have_fisbone = TRUE; in gst_ogg_map_add_fisbone()
1389 pad->preroll = GST_READ_UINT32_LE (data + 24); in gst_ogg_map_add_fisbone()
1391 start_time = granulepos_to_granule_default (pad, start_granule); in gst_ogg_map_add_fisbone()
1398 pad->granulerate_n, pad->granulerate_d, pad->preroll, pad->granuleshift); in gst_ogg_map_add_fisbone()
1430 gst_ogg_map_add_index (GstOggStream * pad, GstOggStream * skel_pad, in gst_ogg_map_add_index() argument
1437 if (pad->index) { in gst_ogg_map_add_index()
1457 pad->kp_denom = GST_READ_UINT64_LE (data); in gst_ogg_map_add_index()
1458 if (pad->kp_denom == 0) in gst_ogg_map_add_index()
1459 pad->kp_denom = 1; in gst_ogg_map_add_index()
1473 firstsampletime_n, pad->kp_denom); in gst_ogg_map_add_index()
1475 lastsampletime_n, pad->kp_denom); in gst_ogg_map_add_index()
1478 firstsampletime_n, pad->kp_denom); in gst_ogg_map_add_index()
1480 lastsampletime_n, pad->kp_denom); in gst_ogg_map_add_index()
1483 pad->total_time = lastsampletime - firstsampletime; in gst_ogg_map_add_index()
1485 pad->total_time = -1; in gst_ogg_map_add_index()
1488 GST_TIME_ARGS (pad->total_time)); in gst_ogg_map_add_index()
1495 G_GINT64_FORMAT, n_keypoints, pad->kp_denom); in gst_ogg_map_add_index()
1497 pad->index = g_try_new (GstOggIndex, n_keypoints); in gst_ogg_map_add_index()
1498 if (!pad->index) in gst_ogg_map_add_index()
1515 pad->index[i].offset = offset; in gst_ogg_map_add_index()
1516 pad->index[i].timestamp = timestamp; in gst_ogg_map_add_index()
1526 pad->n_index = isize; in gst_ogg_map_add_index()
1532 so = pad->index[0].offset; in gst_ogg_map_add_index()
1533 st = pad->index[0].timestamp; in gst_ogg_map_add_index()
1534 eo = pad->index[isize - 1].offset; in gst_ogg_map_add_index()
1535 et = pad->index[isize - 1].timestamp; in gst_ogg_map_add_index()
1543 pad->idx_bitrate = gst_util_uint64_scale (8 * b, pad->kp_denom, t); in gst_ogg_map_add_index()
1545 GST_DEBUG ("bitrate %" G_GUINT64_FORMAT, pad->idx_bitrate); in gst_ogg_map_add_index()
1564 gst_ogg_map_search_index (GstOggStream * pad, gboolean before, in gst_ogg_map_search_index() argument
1574 n_index = pad->n_index; in gst_ogg_map_search_index()
1575 if (n_index == 0 || pad->index == NULL) in gst_ogg_map_search_index()
1578 ts = gst_util_uint64_scale (*timestamp, pad->kp_denom, GST_SECOND); in gst_ogg_map_search_index()
1582 gst_util_array_binary_search (pad->index, n_index, sizeof (GstOggIndex), in gst_ogg_map_search_index()
1589 GST_INFO ("found at index %u", (guint) (best - pad->index)); in gst_ogg_map_search_index()
1593 gst_util_uint64_scale (best->timestamp, GST_SECOND, pad->kp_denom); in gst_ogg_map_search_index()
1608 is_header_ogm (GstOggStream * pad, ogg_packet * packet) in is_header_ogm() argument
1617 extract_tags_ogm (GstOggStream * pad, ogg_packet * packet) in extract_tags_ogm() argument
1619 if (!(packet->packet[0] & 1) && (packet->packet[0] & 3 && pad->is_ogm_text)) { in extract_tags_ogm()
1621 (const guint8 *) "\003vorbis", 7, &pad->taglist); in extract_tags_ogm()
1626 packet_duration_ogm (GstOggStream * pad, ogg_packet * packet) in packet_duration_ogm() argument
1650 setup_ogmaudio_mapper (GstOggStream * pad, ogg_packet * packet) in setup_ogmaudio_mapper() argument
1656 pad->granulerate_n = GST_READ_UINT64_LE (data + 25); in setup_ogmaudio_mapper()
1657 pad->granulerate_d = 1; in setup_ogmaudio_mapper()
1659 GST_LOG ("sample rate: %d", pad->granulerate_n); in setup_ogmaudio_mapper()
1660 if (pad->granulerate_n == 0) { in setup_ogmaudio_mapper()
1661 pad->granulerate_n = 0; in setup_ogmaudio_mapper()
1662 pad->granulerate_d = 0; in setup_ogmaudio_mapper()
1671 pad->caps = in setup_ogmaudio_mapper()
1674 if (pad->caps) { in setup_ogmaudio_mapper()
1675 gst_caps_set_simple (pad->caps, in setup_ogmaudio_mapper()
1676 "rate", G_TYPE_INT, pad->granulerate_n, NULL); in setup_ogmaudio_mapper()
1678 pad->caps = gst_caps_new_simple ("audio/x-ogm-unknown", in setup_ogmaudio_mapper()
1680 "rate", G_TYPE_INT, pad->granulerate_n, NULL); in setup_ogmaudio_mapper()
1684 pad->n_header_packets = 1; in setup_ogmaudio_mapper()
1685 pad->is_ogm = TRUE; in setup_ogmaudio_mapper()
1691 setup_ogmvideo_mapper (GstOggStream * pad, ogg_packet * packet) in setup_ogmvideo_mapper() argument
1702 pad->is_video = TRUE; in setup_ogmvideo_mapper()
1703 pad->granulerate_n = 10000000; in setup_ogmvideo_mapper()
1708 pad->granulerate_d = (gint) CLAMP (time_unit, G_MININT, G_MAXINT); in setup_ogmvideo_mapper()
1711 pad->granulerate_n, pad->granulerate_d, in setup_ogmvideo_mapper()
1712 (double) pad->granulerate_n / pad->granulerate_d); in setup_ogmvideo_mapper()
1720 pad->caps = gst_riff_create_video_caps (fourcc, NULL, NULL, NULL, NULL, NULL); in setup_ogmvideo_mapper()
1722 if (pad->caps == NULL) { in setup_ogmvideo_mapper()
1723 pad->caps = gst_caps_new_simple ("video/x-ogm-unknown", in setup_ogmvideo_mapper()
1725 "framerate", GST_TYPE_FRACTION, pad->granulerate_n, in setup_ogmvideo_mapper()
1726 pad->granulerate_d, NULL); in setup_ogmvideo_mapper()
1728 gst_caps_set_simple (pad->caps, in setup_ogmvideo_mapper()
1729 "framerate", GST_TYPE_FRACTION, pad->granulerate_n, in setup_ogmvideo_mapper()
1730 pad->granulerate_d, in setup_ogmvideo_mapper()
1733 GST_DEBUG ("caps: %" GST_PTR_FORMAT, pad->caps); in setup_ogmvideo_mapper()
1736 pad->n_header_packets = 1; in setup_ogmvideo_mapper()
1737 pad->frame_size = 1; in setup_ogmvideo_mapper()
1738 pad->is_ogm = TRUE; in setup_ogmvideo_mapper()
1744 setup_ogmtext_mapper (GstOggStream * pad, ogg_packet * packet) in setup_ogmtext_mapper() argument
1749 pad->granulerate_n = 10000000; in setup_ogmtext_mapper()
1754 pad->granulerate_d = (gint) CLAMP (time_unit, G_MININT, G_MAXINT); in setup_ogmtext_mapper()
1757 pad->granulerate_n, pad->granulerate_d, in setup_ogmtext_mapper()
1758 (double) pad->granulerate_n / pad->granulerate_d); in setup_ogmtext_mapper()
1760 if (pad->granulerate_d <= 0) { in setup_ogmtext_mapper()
1761 pad->granulerate_n = 0; in setup_ogmtext_mapper()
1762 pad->granulerate_d = 0; in setup_ogmtext_mapper()
1766 pad->caps = gst_caps_new_simple ("text/x-raw", "format", G_TYPE_STRING, in setup_ogmtext_mapper()
1769 pad->n_header_packets = 1; in setup_ogmtext_mapper()
1770 pad->is_ogm = TRUE; in setup_ogmtext_mapper()
1771 pad->is_ogm_text = TRUE; in setup_ogmtext_mapper()
1772 pad->is_sparse = TRUE; in setup_ogmtext_mapper()
1798 setup_pcm_mapper (GstOggStream * pad, ogg_packet * packet) in setup_pcm_mapper() argument
1805 pad->granulerate_n = GST_READ_UINT32_LE (data + 16); in setup_pcm_mapper()
1806 pad->granulerate_d = 1; in setup_pcm_mapper()
1807 GST_LOG ("sample rate: %d", pad->granulerate_n); in setup_pcm_mapper()
1809 if (pad->granulerate_n == 0) { in setup_pcm_mapper()
1810 pad->granulerate_n = 0; in setup_pcm_mapper()
1811 pad->granulerate_d = 0; in setup_pcm_mapper()
1873 pad->granulerate_n = 0; in setup_pcm_mapper()
1874 pad->granulerate_d = 0; in setup_pcm_mapper()
1878 pad->n_header_packets = 2 + GST_READ_UINT32_LE (data + 24); in setup_pcm_mapper()
1882 "rate", G_TYPE_INT, pad->granulerate_n, in setup_pcm_mapper()
1884 pad->caps = caps; in setup_pcm_mapper()
1892 setup_cmml_mapper (GstOggStream * pad, ogg_packet * packet) in setup_cmml_mapper() argument
1896 pad->granulerate_n = GST_READ_UINT64_LE (data + 12); in setup_cmml_mapper()
1897 pad->granulerate_d = GST_READ_UINT64_LE (data + 20); in setup_cmml_mapper()
1898 pad->granuleshift = data[28]; in setup_cmml_mapper()
1900 if (pad->granuleshift >= 63) { in setup_cmml_mapper()
1902 GST_WARNING ("Invalid granuleshift (%u >= 63)", pad->granuleshift); in setup_cmml_mapper()
1903 pad->granulerate_n = 0; in setup_cmml_mapper()
1904 pad->granulerate_d = 0; in setup_cmml_mapper()
1905 pad->granuleshift = -1; in setup_cmml_mapper()
1908 GST_LOG ("sample rate: %d", pad->granulerate_n); in setup_cmml_mapper()
1910 if (pad->granulerate_n == 0) { in setup_cmml_mapper()
1911 pad->granulerate_n = 0; in setup_cmml_mapper()
1912 pad->granulerate_d = 0; in setup_cmml_mapper()
1913 pad->granuleshift = -1; in setup_cmml_mapper()
1917 pad->n_header_packets = 3; in setup_cmml_mapper()
1923 pad->caps = gst_caps_new_empty_simple ("text/x-cmml"); in setup_cmml_mapper()
1924 pad->always_flush_page = TRUE; in setup_cmml_mapper()
1925 pad->is_sparse = TRUE; in setup_cmml_mapper()
1926 pad->is_cmml = TRUE; in setup_cmml_mapper()
1934 setup_celt_mapper (GstOggStream * pad, ogg_packet * packet) in setup_celt_mapper() argument
1938 pad->granulerate_n = GST_READ_UINT32_LE (data + 36); in setup_celt_mapper()
1939 pad->granulerate_d = 1; in setup_celt_mapper()
1940 pad->granuleshift = 0; in setup_celt_mapper()
1941 GST_LOG ("sample rate: %d", pad->granulerate_n); in setup_celt_mapper()
1943 pad->frame_size = GST_READ_UINT32_LE (packet->packet + 44); in setup_celt_mapper()
1944 pad->n_header_packets = GST_READ_UINT32_LE (packet->packet + 56) + 2; in setup_celt_mapper()
1946 if (pad->granulerate_n == 0) { in setup_celt_mapper()
1947 pad->granulerate_n = 0; in setup_celt_mapper()
1948 pad->granulerate_d = 0; in setup_celt_mapper()
1949 pad->granuleshift = -1; in setup_celt_mapper()
1953 pad->caps = gst_caps_new_simple ("audio/x-celt", in setup_celt_mapper()
1954 "rate", G_TYPE_INT, pad->granulerate_n, NULL); in setup_celt_mapper()
1962 setup_kate_mapper (GstOggStream * pad, ogg_packet * packet) in setup_kate_mapper() argument
1970 pad->granulerate_n = GST_READ_UINT32_LE (data + 24); in setup_kate_mapper()
1971 pad->granulerate_d = GST_READ_UINT32_LE (data + 28); in setup_kate_mapper()
1972 pad->granuleshift = GST_READ_UINT8 (data + 15); in setup_kate_mapper()
1973 if (pad->granuleshift >= 63) { in setup_kate_mapper()
1975 GST_WARNING ("Invalid granuleshift (%u >= 63)", pad->granuleshift); in setup_kate_mapper()
1976 pad->granulerate_n = 0; in setup_kate_mapper()
1977 pad->granulerate_d = 0; in setup_kate_mapper()
1978 pad->granuleshift = -1; in setup_kate_mapper()
1981 GST_LOG ("sample rate: %d", pad->granulerate_n); in setup_kate_mapper()
1983 if (pad->granulerate_n == 0) { in setup_kate_mapper()
1984 pad->granulerate_n = 0; in setup_kate_mapper()
1985 pad->granulerate_d = 0; in setup_kate_mapper()
1986 pad->granuleshift = -1; in setup_kate_mapper()
1990 pad->n_header_packets = GST_READ_UINT8 (data + 11); in setup_kate_mapper()
1991 GST_LOG ("kate header packets: %d", pad->n_header_packets); in setup_kate_mapper()
1997 pad->caps = gst_caps_new_empty_simple ("subtitle/x-kate"); in setup_kate_mapper()
1999 pad->caps = gst_caps_new_empty_simple ("application/x-kate"); in setup_kate_mapper()
2002 pad->is_sparse = TRUE; in setup_kate_mapper()
2003 pad->always_flush_page = TRUE; in setup_kate_mapper()
2009 packet_duration_kate (GstOggStream * pad, ogg_packet * packet) in packet_duration_kate() argument
2035 extract_tags_kate (GstOggStream * pad, ogg_packet * packet) in extract_tags_kate() argument
2081 if (pad->taglist) { in extract_tags_kate()
2084 gst_tag_list_insert (pad->taglist, list, GST_TAG_MERGE_KEEP_ALL); in extract_tags_kate()
2087 pad->taglist = list; in extract_tags_kate()
2094 setup_opus_mapper (GstOggStream * pad, ogg_packet * packet) in setup_opus_mapper() argument
2101 pad->granulerate_n = 48000; in setup_opus_mapper()
2102 pad->granulerate_d = 1; in setup_opus_mapper()
2103 pad->granuleshift = 0; in setup_opus_mapper()
2104 pad->n_header_packets = 2; in setup_opus_mapper()
2105 pad->first_granpos = -1; in setup_opus_mapper()
2106 pad->audio_clipping = TRUE; in setup_opus_mapper()
2109 pad->granule_offset = -GST_READ_UINT16_LE (packet->packet + 10); in setup_opus_mapper()
2111 -pad->granule_offset); in setup_opus_mapper()
2114 pad->caps = gst_codec_utils_opus_create_caps_from_header (buffer, NULL); in setup_opus_mapper()
2121 is_header_opus (GstOggStream * pad, ogg_packet * packet) in is_header_opus() argument
2127 granulepos_to_granule_opus (GstOggStream * pad, gint64 granulepos) in granulepos_to_granule_opus() argument
2132 if (pad->first_granpos < 0 || granulepos < pad->first_granpos) in granulepos_to_granule_opus()
2133 pad->first_granpos = granulepos; in granulepos_to_granule_opus()
2139 packet_duration_opus (GstOggStream * pad, ogg_packet * packet) in packet_duration_opus() argument
2162 if (is_header_opus (pad, packet)) in packet_duration_opus()
2198 extract_tags_opus (GstOggStream * pad, ogg_packet * packet) in extract_tags_opus() argument
2202 (const guint8 *) "OpusTags", 8, &pad->taglist); in extract_tags_opus()
2204 if (!pad->taglist) in extract_tags_opus()
2205 pad->taglist = gst_tag_list_new_empty (); in extract_tags_opus()
2207 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_opus()
2215 setup_daala_mapper (GstOggStream * pad, ogg_packet * packet) in setup_daala_mapper() argument
2234 pad->granulerate_n = GST_READ_UINT32_LE (data + 25); in setup_daala_mapper()
2235 pad->granulerate_d = GST_READ_UINT32_LE (data + 29); in setup_daala_mapper()
2239 pad->granulerate_n, pad->granulerate_d, frame_duration, par_n, par_d, w, in setup_daala_mapper()
2242 pad->granuleshift = GST_READ_UINT8 (data + 37); in setup_daala_mapper()
2243 if (pad->granuleshift >= 63) { in setup_daala_mapper()
2245 GST_WARNING ("Invalid granuleshift (%u >= 63)", pad->granuleshift); in setup_daala_mapper()
2246 pad->granulerate_n = 0; in setup_daala_mapper()
2247 pad->granulerate_d = 0; in setup_daala_mapper()
2248 pad->granuleshift = -1; in setup_daala_mapper()
2251 GST_LOG ("granshift: %d", pad->granuleshift); in setup_daala_mapper()
2253 if (pad->granulerate_n == 0 || pad->granulerate_d == 0) { in setup_daala_mapper()
2254 GST_WARNING ("frame rate %d/%d", pad->granulerate_n, pad->granulerate_d); in setup_daala_mapper()
2255 pad->granulerate_n = 0; in setup_daala_mapper()
2256 pad->granulerate_d = 0; in setup_daala_mapper()
2257 pad->granuleshift = -1; in setup_daala_mapper()
2261 pad->is_video = TRUE; in setup_daala_mapper()
2262 pad->n_header_packets = 3; in setup_daala_mapper()
2263 pad->frame_size = 1; in setup_daala_mapper()
2265 pad->caps = gst_caps_new_empty_simple ("video/x-daala"); in setup_daala_mapper()
2268 gst_caps_set_simple (pad->caps, "width", G_TYPE_INT, w, "height", in setup_daala_mapper()
2277 gst_caps_set_simple (pad->caps, "framerate", GST_TYPE_FRACTION, in setup_daala_mapper()
2278 pad->granulerate_n, pad->granulerate_d, "pixel-aspect-ratio", in setup_daala_mapper()
2285 granulepos_to_granule_daala (GstOggStream * pad, gint64 granulepos) in granulepos_to_granule_daala() argument
2289 if (pad->granuleshift != 0 && pad->granuleshift != G_MAXUINT32) { in granulepos_to_granule_daala()
2290 keyindex = granulepos >> pad->granuleshift; in granulepos_to_granule_daala()
2291 keyoffset = granulepos - (keyindex << pad->granuleshift); in granulepos_to_granule_daala()
2299 is_granulepos_keyframe_daala (GstOggStream * pad, gint64 granulepos) in is_granulepos_keyframe_daala() argument
2303 if (granulepos == (gint64) - 1 || pad->granuleshift == G_MAXUINT32) in is_granulepos_keyframe_daala()
2306 frame_mask = (G_GUINT64_CONSTANT (1) << pad->granuleshift) - 1; in is_granulepos_keyframe_daala()
2312 is_packet_keyframe_daala (GstOggStream * pad, ogg_packet * packet) in is_packet_keyframe_daala() argument
2320 is_header_daala (GstOggStream * pad, ogg_packet * packet) in is_header_daala() argument
2326 extract_tags_daala (GstOggStream * pad, ogg_packet * packet) in extract_tags_daala() argument
2330 (const guint8 *) "\201daala", 5, &pad->taglist); in extract_tags_daala()
2332 if (!pad->taglist) in extract_tags_daala()
2333 pad->taglist = gst_tag_list_new_empty (); in extract_tags_daala()
2335 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_daala()
2338 if (pad->bitrate) in extract_tags_daala()
2339 gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, in extract_tags_daala()
2340 GST_TAG_BITRATE, (guint) pad->bitrate, NULL); in extract_tags_daala()
2672 gst_ogg_stream_setup_map (GstOggStream * pad, ogg_packet * packet) in gst_ogg_stream_setup_map() argument
2685 ret = mappers[i].setup_func (pad, packet); in gst_ogg_stream_setup_map()
2690 GST_DEBUG ("got stream type %" GST_PTR_FORMAT, pad->caps); in gst_ogg_stream_setup_map()
2691 pad->map = i; in gst_ogg_stream_setup_map()
2704 gst_ogg_stream_setup_map_from_caps (GstOggStream * pad, const GstCaps * caps) in gst_ogg_stream_setup_map_from_caps() argument
2721 ret = mappers[i].setup_from_caps_func (pad, caps); in gst_ogg_stream_setup_map_from_caps()
2726 GST_DEBUG ("got stream type %" GST_PTR_FORMAT, pad->caps); in gst_ogg_stream_setup_map_from_caps()
2727 pad->map = i; in gst_ogg_stream_setup_map_from_caps()
2740 gst_ogg_stream_setup_map_from_caps_headers (GstOggStream * pad, in gst_ogg_stream_setup_map_from_caps_headers() argument
2798 ret = gst_ogg_stream_setup_map (pad, &packet); in gst_ogg_stream_setup_map_from_caps_headers()