parse_class->pre_push_frame =
GST_DEBUG_FUNCPTR (gst_aac_parse_pre_push_frame);
parse_class->src_event = GST_DEBUG_FUNCPTR (gst_aac_parse_src_event);
-
-//#ifdef TIZEN_FEATURE_AACPARSE_MODIFICATION // FIXME
- /* make full aac(adts) index table when seek */
-// parse_class->src_event = GST_DEBUG_FUNCPTR (gst_aac_parse_src_eventfunc);
-//#endif
}
aacparse->last_parsed_channels = 0;
aacparse->last_parsed_sample_rate = 0;
}
+#ifdef TIZEN_FEATURE_AACPARSE_MODIFICATION
+ GST_DEBUG ("Entering gst_aac_parse_src_eventfunc header type = %d",
+ aacparse->header_type);
+ if (aacparse->header_type == DSPAAC_HEADER_ADTS)
+ return gst_aac_parse_adts_src_eventfunc (parse, event);
+aac_seek_null_exit:
+#endif
return GST_BASE_PARSE_CLASS (parent_class)->src_event (parse, event);
+
}
#ifdef TIZEN_FEATURE_AACPARSE_MODIFICATION
return length;
}
-static gboolean
-gst_aac_parse_src_eventfunc (GstBaseParse * parse, GstEvent * event)
-{
- gboolean handled = FALSE;
- GstAacParse *aacparse;
- aacparse = GST_AAC_PARSE (parse);
-
- GST_DEBUG ("Entering gst_aac_parse_src_eventfunc header type = %d",
- aacparse->header_type);
- if (aacparse->header_type == DSPAAC_HEADER_ADTS)
- return gst_aac_parse_adts_src_eventfunc (parse, event);
- else
- goto aac_seek_null_exit;
-aac_seek_null_exit:
-
- /* call baseparse src_event function to handle event */
- handled = GST_BASE_PARSE_CLASS (parent_class)->src_event (parse, event);
- return handled;
-}
-
/**
* gst_aac_parse_adts_src_eventfunc:
* @parse: #GstBaseParse. #event
QTDEMUX_AMBISONIC_ORDER ambisonic_order;
};
-QtDemuxSphericalMetadata *spherical_metadata;
#endif /* TIZEN_FEATURE_QTDEMUX_MODIFICATION */
/* Macros for converting to/from timescale */
qtdemux->flowcombiner = gst_flow_combiner_new ();
#ifdef TIZEN_FEATURE_QTDEMUX_MODIFICATION
- spherical_metadata = (QtDemuxSphericalMetadata *)
+ qtdemux->spherical_metadata = (QtDemuxSphericalMetadata *)
malloc (sizeof (QtDemuxSphericalMetadata));
- if (spherical_metadata) {
- spherical_metadata->is_spherical = FALSE;
- spherical_metadata->is_stitched = FALSE;
- spherical_metadata->stitching_software = NULL;
- spherical_metadata->projection_type = NULL;
- spherical_metadata->stereo_mode = NULL;
- spherical_metadata->source_count = 0;
- spherical_metadata->init_view_heading = 0;
- spherical_metadata->init_view_pitch = 0;
- spherical_metadata->init_view_roll = 0;
- spherical_metadata->timestamp = 0;
- spherical_metadata->full_pano_width_pixels = 0;
- spherical_metadata->full_pano_height_pixels = 0;
- spherical_metadata->cropped_area_image_width = 0;
- spherical_metadata->cropped_area_image_height = 0;
- spherical_metadata->cropped_area_left = 0;
- spherical_metadata->cropped_area_top = 0;
- spherical_metadata->ambisonic_type = QTDEMUX_AMBISONIC_TYPE_UNKNOWN;
- spherical_metadata->ambisonic_format = QTDEMUX_AMBISONIC_TYPE_UNKNOWN;
- spherical_metadata->ambisonic_order = QTDEMUX_AMBISONIC_ORDER_UNKNOWN;
+ if (qtdemux->spherical_metadata) {
+ qtdemux->spherical_metadata->is_spherical = FALSE;
+ qtdemux->spherical_metadata->is_stitched = FALSE;
+ qtdemux->spherical_metadata->stitching_software = NULL;
+ qtdemux->spherical_metadata->projection_type = NULL;
+ qtdemux->spherical_metadata->stereo_mode = NULL;
+ qtdemux->spherical_metadata->source_count = 0;
+ qtdemux->spherical_metadata->init_view_heading = 0;
+ qtdemux->spherical_metadata->init_view_pitch = 0;
+ qtdemux->spherical_metadata->init_view_roll = 0;
+ qtdemux->spherical_metadata->timestamp = 0;
+ qtdemux->spherical_metadata->full_pano_width_pixels = 0;
+ qtdemux->spherical_metadata->full_pano_height_pixels = 0;
+ qtdemux->spherical_metadata->cropped_area_image_width = 0;
+ qtdemux->spherical_metadata->cropped_area_image_height = 0;
+ qtdemux->spherical_metadata->cropped_area_left = 0;
+ qtdemux->spherical_metadata->cropped_area_top = 0;
+ qtdemux->spherical_metadata->ambisonic_type = QTDEMUX_AMBISONIC_TYPE_UNKNOWN;
+ qtdemux->spherical_metadata->ambisonic_format = QTDEMUX_AMBISONIC_FORMAT_UNKNOWN;
+ qtdemux->spherical_metadata->ambisonic_order = QTDEMUX_AMBISONIC_ORDER_UNKNOWN;
}
#endif /* TIZEN_FEATURE_QTDEMUX_MODIFICATION */
GstQTDemux *qtdemux = GST_QTDEMUX (object);
#ifdef TIZEN_FEATURE_QTDEMUX_MODIFICATION
- if (spherical_metadata->stitching_software)
- free(spherical_metadata->stitching_software);
- if (spherical_metadata->projection_type)
- free(spherical_metadata->projection_type);
- if (spherical_metadata->stereo_mode)
- free(spherical_metadata->stereo_mode);
- if (spherical_metadata)
- free(spherical_metadata);
+ if (qtdemux->spherical_metadata) {
+ if (qtdemux->spherical_metadata->stitching_software)
+ free(qtdemux->spherical_metadata->stitching_software);
+ if (qtdemux->spherical_metadata->projection_type)
+ free(qtdemux->spherical_metadata->projection_type);
+ if (qtdemux->spherical_metadata->stereo_mode)
+ free(qtdemux->spherical_metadata->stereo_mode);
+
+ free(qtdemux->spherical_metadata);
+ qtdemux->spherical_metadata = NULL;
+ }
#endif /* TIZEN_FEATURE_QTDEMUX_MODIFICATION */
if (qtdemux->adapter) {
}
static void
-_parse_spatial_video_metadata_from_xml_string (GstQTDemux * qtdemux,
- const char *xmlStr, QtDemuxSphericalMetadata * spherical_metadata)
+_parse_spatial_video_metadata_from_xml_string (GstQTDemux * qtdemux, const char *xmlStr)
{
const char is_spherical_str[] = "<GSpherical:Spherical>";
const char is_stitched_str[] = "<GSpherical:Stitched>";
const char cropped_area_left_str[] = "<GSpherical:CroppedAreaLeftPixels>";
const char cropped_area_top_str[] = "<GSpherical:CroppedAreaTopPixels>";
+ QtDemuxSphericalMetadata * spherical_metadata = qtdemux->spherical_metadata;
+
_get_bool_value_from_xml_string (qtdemux, xmlStr, is_spherical_str,
(gboolean *) & spherical_metadata->is_spherical);
_get_bool_value_from_xml_string (qtdemux, xmlStr, is_stitched_str,
}
static void
-_send_message_to_bus (GstQTDemux * qtdemux,
- QtDemuxSphericalMetadata * spherical_metadata)
+_send_spherical_metadata_msg_to_bus (GstQTDemux * qtdemux)
{
GstTagList *taglist;
+ QtDemuxSphericalMetadata *spherical_metadata = qtdemux->spherical_metadata;
GST_DEBUG_OBJECT (qtdemux, "is_spherical = %d",
spherical_metadata->is_spherical);
if (version == RFC_AMBISONIC_SA3DBOX_VERSION_SUPPORTED) {
if (ambisonic_type == RFC_AMBISONIC_TYPE_PERIPHONIC)
- spherical_metadata->ambisonic_type = QTDEMUX_AMBISONIC_TYPE_PERIPHONIC;
+ qtdemux->spherical_metadata->ambisonic_type = QTDEMUX_AMBISONIC_TYPE_PERIPHONIC;
if (ambisonic_order == RFC_AMBISONIC_ORDER_FOA) {
if (num_channels == 4) {
- spherical_metadata->ambisonic_order = QTDEMUX_AMBISONIC_ORDER_FOA;
+ qtdemux->spherical_metadata->ambisonic_order = QTDEMUX_AMBISONIC_ORDER_FOA;
if ((ambisonic_channel_ordering == RFC_AMBISONIC_CHANNEL_ORDERING_ACN)
&& (ambisonic_normalization == RFC_AMBISONIC_NORMALIZATION_SN3D)
&& (channel_map[0] == 0) && (channel_map[1] == 1)
&& (channel_map[2] == 2) && (channel_map[3] == 3))
- spherical_metadata->ambisonic_format = QTDEMUX_AMBISONIC_FORMAT_AMBIX;
+ qtdemux->spherical_metadata->ambisonic_format = QTDEMUX_AMBISONIC_FORMAT_AMBIX;
if ((ambisonic_channel_ordering == RFC_AMBISONIC_CHANNEL_ORDERING_FUMA)
&& (ambisonic_normalization == RFC_AMBISONIC_NORMALIZATION_FUMA)
&& (channel_map[0] == 0) && (channel_map[1] == 3)
&& (channel_map[2] == 1) && (channel_map[3] == 2))
- spherical_metadata->ambisonic_format = QTDEMUX_AMBISONIC_FORMAT_AMB;
+ qtdemux->spherical_metadata->ambisonic_format = QTDEMUX_AMBISONIC_FORMAT_AMB;
}
}
}
0xa2, 0x44, 0x6c, 0x42, 0x7c, 0x64, 0x8d, 0xf4
};
+#ifdef TIZEN_FEATURE_QTDEMUX_MODIFICATION
+ static const guint8 spherical_uuid[] = {
+ 0xff, 0xcc, 0x82, 0x63, 0xf8, 0x55, 0x4a, 0x93,
+ 0x88, 0x14, 0x58, 0x7a, 0x02, 0x52, 0x1f, 0xdd
+ };
+#endif /* TIZEN_FEATURE_QTDEMUX_MODIFICATION */
+
guint offset;
/* counts as header data */
return;
}
+#ifdef TIZEN_FEATURE_QTDEMUX_MODIFICATION
+ if (memcmp (buffer + offset, spherical_uuid, 16) == 0) {
+ const char *contents;
+
+ GST_DEBUG_OBJECT (qtdemux, "spherical uuid was found");
+ contents = (char *) (buffer + offset + 16);
+ GST_DEBUG_OBJECT (qtdemux, "contents: %s\n", contents);
+
+ if (qtdemux->spherical_metadata)
+ _parse_spatial_video_metadata_from_xml_string (qtdemux, contents);
+
+ return;
+ }
+#endif /* TIZEN_FEATURE_QTDEMUX_MODIFICATION */
+
if (memcmp (buffer + offset, xmp_uuid, 16) == 0) {
GstBuffer *buf;
GstTagList *taglist;
if (ret == GST_FLOW_EOS && (qtdemux->got_moov || qtdemux->media_caps)) {
/* digested all data, show what we have */
#ifdef TIZEN_FEATURE_QTDEMUX_MODIFICATION
- if (spherical_metadata)
- _send_message_to_bus (qtdemux, spherical_metadata);
+ if (qtdemux->spherical_metadata)
+ _send_spherical_metadata_msg_to_bus (qtdemux);
#endif /* TIZEN_FEATURE_QTDEMUX_MODIFICATION */
qtdemux_prepare_streams (qtdemux);
ret = qtdemux_expose_streams (qtdemux);