mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
ext/metadata/Makefile.am: Add some relevant variables to CFLAGS and LIBADD, for example our compiler warnings paramters.
Original commit message from CVS: * ext/metadata/Makefile.am: Add some relevant variables to CFLAGS and LIBADD, for example our compiler warnings paramters. * ext/metadata/gstbasemetadata.c: (gst_base_metadata_strip_push_buffer), (gst_base_metadata_calculate_offsets), (gst_base_metadata_src_event), (gst_base_metadata_sink_activate): * ext/metadata/gstmetadatademux.c: (gst_metadata_demux_init), (gst_metadata_demux_set_property), (gst_metadata_demux_dispose): * ext/metadata/gstmetadatamux.c: (gst_metadata_mux_init), (gst_metadata_mux_set_property), (gst_metadata_mux_get_property), (gst_metadata_mux_dispose), (gst_metadata_mux_create_chunks_from_tags): * ext/metadata/metadata.c: (metadata_dispose): * ext/metadata/metadataexif.c: (metadataparse_exif_content_foreach_entry_func), (metadatamux_exif_for_each_tag_in_list): * ext/metadata/metadataiptc.c: (metadatamux_iptc_for_each_tag_in_list): * ext/metadata/metadatamuxjpeg.c: (metadatamux_jpeg_lazy_update), (metadatamux_jpeg_reading): * ext/metadata/metadatamuxpng.c: (metadatamux_png_reading): * ext/metadata/metadataparsejpeg.c: (metadataparse_jpeg_reading): * ext/metadata/metadataparsepng.c: * ext/metadata/metadataparseutil.h: * ext/metadata/metadataxmp.c: (metadataparse_xmp_tag_list_add), (metadatamux_xmp_create_chunk_from_tag_list): Fix a million warnings that showed up after the above change.
This commit is contained in:
parent
5203ce7e15
commit
19407ba0a1
14 changed files with 65 additions and 50 deletions
32
ChangeLog
32
ChangeLog
|
@ -1,3 +1,35 @@
|
|||
2008-01-31 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* ext/metadata/Makefile.am:
|
||||
Add some relevant variables to CFLAGS and LIBADD, for example our
|
||||
compiler warnings paramters.
|
||||
|
||||
* ext/metadata/gstbasemetadata.c:
|
||||
(gst_base_metadata_strip_push_buffer),
|
||||
(gst_base_metadata_calculate_offsets),
|
||||
(gst_base_metadata_src_event), (gst_base_metadata_sink_activate):
|
||||
* ext/metadata/gstmetadatademux.c: (gst_metadata_demux_init),
|
||||
(gst_metadata_demux_set_property), (gst_metadata_demux_dispose):
|
||||
* ext/metadata/gstmetadatamux.c: (gst_metadata_mux_init),
|
||||
(gst_metadata_mux_set_property), (gst_metadata_mux_get_property),
|
||||
(gst_metadata_mux_dispose),
|
||||
(gst_metadata_mux_create_chunks_from_tags):
|
||||
* ext/metadata/metadata.c: (metadata_dispose):
|
||||
* ext/metadata/metadataexif.c:
|
||||
(metadataparse_exif_content_foreach_entry_func),
|
||||
(metadatamux_exif_for_each_tag_in_list):
|
||||
* ext/metadata/metadataiptc.c:
|
||||
(metadatamux_iptc_for_each_tag_in_list):
|
||||
* ext/metadata/metadatamuxjpeg.c: (metadatamux_jpeg_lazy_update),
|
||||
(metadatamux_jpeg_reading):
|
||||
* ext/metadata/metadatamuxpng.c: (metadatamux_png_reading):
|
||||
* ext/metadata/metadataparsejpeg.c: (metadataparse_jpeg_reading):
|
||||
* ext/metadata/metadataparsepng.c:
|
||||
* ext/metadata/metadataparseutil.h:
|
||||
* ext/metadata/metadataxmp.c: (metadataparse_xmp_tag_list_add),
|
||||
(metadatamux_xmp_create_chunk_from_tag_list):
|
||||
Fix a million warnings that showed up after the above change.
|
||||
|
||||
2008-01-31 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* ext/soup/gstsouphttpsrc.c: (_do_init),
|
||||
|
|
|
@ -19,8 +19,8 @@ libgstmetadata_la_SOURCES = gstmetadata.c \
|
|||
libgstmetadata_ladir = $(includedir)/gstreamer-@GST_MAJORMINOR@/metadata
|
||||
libgstmetadata_la_HEADERS = metadatatags.h
|
||||
|
||||
libgstmetadata_la_CFLAGS = $(METADATA_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS)
|
||||
libgstmetadata_la_LIBADD = $(METADATA_LIBS) -lgsttag-@GST_MAJORMINOR@ $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS)
|
||||
libgstmetadata_la_CFLAGS = $(METADATA_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
|
||||
libgstmetadata_la_LIBADD = $(METADATA_LIBS) -lgsttag-@GST_MAJORMINOR@ $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS)
|
||||
libgstmetadata_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||
|
||||
noinst_HEADERS = gstmetadatademux.h \
|
||||
|
|
|
@ -692,8 +692,6 @@ gst_base_metadata_strip_push_buffer (GstBaseMetadata * base,
|
|||
if (inject_len) {
|
||||
|
||||
for (i = 0; i < inject_len; ++i) {
|
||||
int res;
|
||||
|
||||
if (inject[i].offset_orig >= offset_orig) {
|
||||
if (G_LIKELY (inject_begin || inject[i].offset_orig > offset_orig)) {
|
||||
if (inject[i].offset_orig < offset_orig + size_buf_in) {
|
||||
|
@ -838,8 +836,6 @@ inject:
|
|||
striped_so_far = 0;
|
||||
j = 0;
|
||||
for (i = 0; i < inject_len; ++i) {
|
||||
int res;
|
||||
|
||||
while (j < strip_len) {
|
||||
if (strip[j].offset_orig < inject[i].offset_orig)
|
||||
striped_so_far += bsize_strip[j++];
|
||||
|
@ -873,9 +869,6 @@ inject:
|
|||
|
||||
}
|
||||
|
||||
|
||||
done:
|
||||
|
||||
if (prepend_size) {
|
||||
if (injected_bytes == 0 && striped_bytes == 0) {
|
||||
GstBuffer *new_buf =
|
||||
|
@ -1141,7 +1134,6 @@ static gboolean
|
|||
gst_base_metadata_calculate_offsets (GstBaseMetadata * base)
|
||||
{
|
||||
int i, j;
|
||||
guint32 append_size;
|
||||
guint32 bytes_striped, bytes_inject;
|
||||
MetadataChunk *strip = META_DATA_STRIP_CHUNKS (base->metadata).chunk;
|
||||
MetadataChunk *inject = META_DATA_INJECT_CHUNKS (base->metadata).chunk;
|
||||
|
@ -1484,7 +1476,7 @@ gst_base_metadata_src_event (GstPad * pad, GstEvent * event)
|
|||
goto done;
|
||||
start = filter->duration + start;
|
||||
}
|
||||
start_type == GST_SEEK_TYPE_SET;
|
||||
start_type = GST_SEEK_TYPE_SET;
|
||||
|
||||
if (filter->prepend_buffer) {
|
||||
gst_buffer_unref (filter->prepend_buffer);
|
||||
|
@ -1509,7 +1501,7 @@ gst_base_metadata_src_event (GstPad * pad, GstEvent * event)
|
|||
goto done;
|
||||
stop = filter->duration + stop;
|
||||
}
|
||||
stop_type == GST_SEEK_TYPE_SET;
|
||||
stop_type = GST_SEEK_TYPE_SET;
|
||||
|
||||
gst_base_metadata_translate_pos_to_orig (filter, stop, &stop, NULL, 0);
|
||||
|
||||
|
@ -1814,8 +1806,6 @@ gst_base_metadata_sink_activate (GstPad * pad)
|
|||
ret = gst_base_metadata_pull_range_parse (filter);
|
||||
}
|
||||
|
||||
done:
|
||||
|
||||
if (ret) {
|
||||
gst_pad_activate_pull (pad, FALSE);
|
||||
gst_pad_activate_push (filter->srcpad, FALSE);
|
||||
|
|
|
@ -310,19 +310,14 @@ static void
|
|||
gst_metadata_demux_init (GstMetadataDemux * filter,
|
||||
GstMetadataDemuxClass * gclass)
|
||||
{
|
||||
GstElementClass *klass = GST_ELEMENT_GET_CLASS (filter);
|
||||
|
||||
gst_base_metadata_set_option_flag (GST_BASE_METADATA (filter),
|
||||
META_OPT_EXIF | META_OPT_IPTC | META_OPT_XMP | META_OPT_DEMUX);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gst_metadata_demux_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstMetadataDemux *filter = GST_METADATA_DEMUX (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case ARG_PARSE_ONLY:
|
||||
if (g_value_get_boolean (value))
|
||||
|
@ -360,8 +355,6 @@ gst_metadata_demux_get_property (GObject * object, guint prop_id,
|
|||
static void
|
||||
gst_metadata_demux_dispose (GObject * object)
|
||||
{
|
||||
GstMetadataDemux *filter = NULL;
|
||||
|
||||
G_OBJECT_CLASS (metadata_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
|
|
|
@ -290,8 +290,6 @@ gst_metadata_mux_class_init (GstMetadataMuxClass * klass)
|
|||
static void
|
||||
gst_metadata_mux_init (GstMetadataMux * filter, GstMetadataMuxClass * gclass)
|
||||
{
|
||||
GstElementClass *klass = GST_ELEMENT_GET_CLASS (filter);
|
||||
|
||||
gst_base_metadata_set_option_flag (GST_BASE_METADATA (filter),
|
||||
META_OPT_EXIF | META_OPT_IPTC | META_OPT_XMP | META_OPT_MUX);
|
||||
|
||||
|
@ -301,8 +299,6 @@ static void
|
|||
gst_metadata_mux_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstMetadataMux *filter = GST_METADATA_MUX (object);
|
||||
|
||||
switch (prop_id) {
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
|
@ -314,9 +310,6 @@ static void
|
|||
gst_metadata_mux_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
guint8 option =
|
||||
gst_base_metadata_get_option_flag (GST_BASE_METADATA (object));
|
||||
|
||||
switch (prop_id) {
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
|
@ -329,8 +322,6 @@ gst_metadata_mux_get_property (GObject * object, guint prop_id,
|
|||
static void
|
||||
gst_metadata_mux_dispose (GObject * object)
|
||||
{
|
||||
GstMetadataMux *filter = NULL;
|
||||
|
||||
G_OBJECT_CLASS (metadata_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
|
@ -362,10 +353,8 @@ gst_metadata_mux_create_chunks_from_tags (GstBaseMetadata * base)
|
|||
{
|
||||
|
||||
GstMetadataMux *filter = GST_METADATA_MUX (base);
|
||||
GstMessage *msg;
|
||||
GstTagSetter *setter = GST_TAG_SETTER (filter);
|
||||
const GstTagList *taglist = gst_tag_setter_get_tag_list (setter);
|
||||
GstEvent *event;
|
||||
guint8 *buf = NULL;
|
||||
guint32 size = 0;
|
||||
|
||||
|
|
|
@ -168,6 +168,9 @@ metadata_dispose (MetaData ** meta_data)
|
|||
else
|
||||
metadatamux_png_dispose (&(*meta_data)->format_data.png_mux);
|
||||
break;
|
||||
case IMG_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
metadata_chunk_array_free (&(*meta_data)->strip_chunks);
|
||||
|
|
|
@ -428,7 +428,7 @@ metadataparse_exif_content_foreach_entry_func (ExifEntry * entry,
|
|||
{
|
||||
char buf[2048];
|
||||
MEUserData *meudata = (MEUserData *) user_data;
|
||||
GType type;
|
||||
GType type = G_TYPE_NONE;
|
||||
ExifByteOrder byte_order;
|
||||
const gchar *tag = metadataparse_exif_get_tag_from_exif (entry->tag, &type);
|
||||
|
||||
|
@ -656,7 +656,7 @@ metadatamux_exif_for_each_tag_in_list (const GstTagList * list,
|
|||
entry->components = strlen (value) + 1;
|
||||
entry->size =
|
||||
exif_format_get_size (entry->format) * entry->components;
|
||||
entry->data = value;
|
||||
entry->data = (guint8 *) value;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -667,7 +667,7 @@ metadatamux_exif_for_each_tag_in_list (const GstTagList * list,
|
|||
ExifShort v_short;
|
||||
|
||||
if (G_TYPE_UINT == type) {
|
||||
gst_tag_list_get_uint (list, tag, &value);
|
||||
gst_tag_list_get_uint (list, tag, (guint *) & value);
|
||||
} else {
|
||||
gst_tag_list_get_int (list, tag, &value);
|
||||
}
|
||||
|
|
|
@ -444,7 +444,7 @@ metadatamux_iptc_for_each_tag_in_list (const GstTagList * list,
|
|||
iptc_dataset_set_tag (dataset, record, iptc_tag);
|
||||
|
||||
if (gst_tag_list_get_string (list, tag, &tag_value)) {
|
||||
iptc_dataset_set_data (dataset, tag_value, strlen (tag_value),
|
||||
iptc_dataset_set_data (dataset, (guint8 *) tag_value, strlen (tag_value),
|
||||
IPTC_DONT_VALIDATE);
|
||||
g_free (tag_value);
|
||||
tag_value = NULL;
|
||||
|
|
|
@ -296,7 +296,7 @@ metadatamux_jpeg_lazy_update (JpegMuxData * jpeg_data)
|
|||
static const char XmpHeader[] = "http://ns.adobe.com/xap/1.0/";
|
||||
|
||||
metadatamux_wrap_chunk (&jpeg_data->inject_chunks->chunk[i],
|
||||
XmpHeader, sizeof (XmpHeader), 0xFF, 0xE1);
|
||||
(guint8 *) XmpHeader, sizeof (XmpHeader), 0xFF, 0xE1);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -375,9 +375,6 @@ metadatamux_jpeg_reading (JpegMuxData * jpeg_data, guint8 ** buf,
|
|||
gboolean jfif_found = FALSE;
|
||||
|
||||
static const char JfifHeader[] = "JFIF";
|
||||
static const unsigned char ExifHeader[] =
|
||||
{ 0x45, 0x78, 0x69, 0x66, 0x00, 0x00 };
|
||||
static const char XmpHeader[] = "http://ns.adobe.com/xap/1.0/";
|
||||
|
||||
*next_start = *buf;
|
||||
|
||||
|
|
|
@ -176,8 +176,6 @@ metadatamux_png_reading (PngMuxData * png_data, guint8 ** buf,
|
|||
guint32 * bufsize, const guint32 offset, const guint8 * step_buf,
|
||||
guint8 ** next_start, guint32 * next_size);
|
||||
|
||||
static void metadatamux_make_crc_table (guint32 crc_table[]);
|
||||
|
||||
static guint32 metadatamux_update_crc (guint32 crc, guint8 * buf, guint32 len);
|
||||
|
||||
static guint32 metadatamux_calc_crc (guint8 * buf, guint32 len);
|
||||
|
@ -423,8 +421,6 @@ metadatamux_png_reading (PngMuxData * png_data, guint8 ** buf,
|
|||
guint32 chunk_size = 0;
|
||||
MetadataChunk chunk;
|
||||
|
||||
static const char XmpHeader[] = "XML:com.adobe.xmp";
|
||||
|
||||
*next_start = *buf;
|
||||
|
||||
if (*bufsize < 8) {
|
||||
|
@ -475,7 +471,7 @@ done:
|
|||
* @len: size in bytes of @buf
|
||||
*
|
||||
* Calculates the CRC of a data buffer for a seed @crc.
|
||||
* @see_also: #metadatamux_make_crc_table #metadatamux_calc_crc
|
||||
* @see_also: #metadatamux_calc_crc
|
||||
*
|
||||
* Returns: the CRC of the bytes buf[0..len-1].
|
||||
*/
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "metadataparsejpeg.h"
|
||||
#include "metadataparseutil.h"
|
||||
|
||||
#ifdef HAVE_IPTC
|
||||
#include <libiptcdata/iptc-jpeg.h>
|
||||
|
@ -434,8 +435,6 @@ metadataparse_jpeg_reading (JpegParseData * jpeg_data, guint8 ** buf,
|
|||
} else if (mark[1] == 0xE1) { /* may be it is Exif or XMP */
|
||||
|
||||
if (chunk_size >= 8) { /* size2 'EXIF' 0x00 0x00 */
|
||||
guint8 ch;
|
||||
|
||||
if (*bufsize < 6) {
|
||||
*next_size = (*buf - *next_start) + 6;
|
||||
ret = META_PARSING_NEED_MORE_DATA;
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
*/
|
||||
|
||||
#include "metadataparsepng.h"
|
||||
#include "metadataparseutil.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -72,5 +72,14 @@ extern MetadataParsingReturn
|
|||
metadataparse_util_jump_chunk (guint32 * read, guint8 ** buf,
|
||||
guint32 * bufsize, guint8 ** next_start, guint32 * next_size);
|
||||
|
||||
extern MetadataParsingReturn
|
||||
metadataparse_util_hold_chunk (guint32 * read, guint8 ** buf,
|
||||
guint32 * bufsize, guint8 ** next_start,
|
||||
guint32 * next_size, GstAdapter ** adapter);
|
||||
|
||||
extern MetadataParsingReturn
|
||||
metadataparse_util_jump_chunk (guint32 * read, guint8 ** buf,
|
||||
guint32 * bufsize, guint8 ** next_start, guint32 * next_size);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_METADATAPARSE_UTIL_H__ */
|
||||
|
|
|
@ -289,7 +289,7 @@ metadataparse_xmp_tag_list_add (GstTagList * taglist, GstTagMergeMode mode,
|
|||
|
||||
buf = gst_adapter_peek (adapter, size);
|
||||
|
||||
xmp = xmp_new (buf, size);
|
||||
xmp = xmp_new ((gchar *) buf, size);
|
||||
if (!xmp)
|
||||
goto done;
|
||||
|
||||
|
@ -338,7 +338,9 @@ metadatamux_xmp_create_chunk_from_tag_list (guint8 ** buf, guint32 * size,
|
|||
if (val) {
|
||||
xmp_chunk = gst_value_get_buffer (val);
|
||||
if (xmp_chunk)
|
||||
xmp = xmp_new (GST_BUFFER_DATA (xmp_chunk), GST_BUFFER_SIZE (xmp_chunk));
|
||||
xmp =
|
||||
xmp_new ((gchar *) GST_BUFFER_DATA (xmp_chunk),
|
||||
GST_BUFFER_SIZE (xmp_chunk));
|
||||
}
|
||||
|
||||
if (NULL == xmp)
|
||||
|
@ -825,9 +827,13 @@ metadatamux_xmp_for_each_tag_in_list (const GstTagList * list,
|
|||
|
||||
uint32_t options = 0;
|
||||
|
||||
#ifdef XMP_1_99_5
|
||||
if (xmp_get_property (xmp, smap->schema, stagmap->xmp_tag,
|
||||
NULL, &options)) {
|
||||
#else
|
||||
if (xmp_get_property_and_bits (xmp, smap->schema, stagmap->xmp_tag,
|
||||
NULL, &options)) {
|
||||
|
||||
#endif
|
||||
if (XMP_IS_PROP_SIMPLE (options)) {
|
||||
#ifdef XMP_1_99_5
|
||||
xmp_set_property (xmp, smap->schema, stagmap->xmp_tag, value, 0);
|
||||
|
|
Loading…
Reference in a new issue