mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
examples/onvif-server: fix werror build with clang
../subprojects/gst-rtsp-server/examples/test-onvif-server.c:346:65: warning: implicit conversion from enumeration type 'const GstSegmentFlags' to different enumeration type 'GstSeekFlags' [-Wenum-conversion] self->incoming_segment->format, self->incoming_segment->flags, ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ ../subprojects/gst-rtsp-server/examples/test-onvif-server.c:53:1: warning: unused function 'REPLAY_IS_BIN' [-Wunused-function] G_DECLARE_FINAL_TYPE (ReplayBin, replay_bin, REPLAY, BIN, GstBin); ^ /usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE' static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \ ^ <scratch space>:77:1: note: expanded from here REPLAY_IS_BIN ^ ../subprojects/gst-rtsp-server/examples/test-onvif-server.c:525:1: warning: unused function 'ONVIF_FACTORY' [-Wunused-function] G_DECLARE_FINAL_TYPE (OnvifFactory, onvif_factory, ONVIF, FACTORY, ^ /usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE' static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) { \ ^ <scratch space>:9:1: note: expanded from here ONVIF_FACTORY ^ ../subprojects/gst-rtsp-server/examples/test-onvif-server.c:525:1: warning: unused function 'ONVIF_IS_FACTORY' [-Wunused-function] /usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE' static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \ ^ <scratch space>:12:1: note: expanded from here ONVIF_IS_FACTORY ^
This commit is contained in:
parent
b2d5e4db52
commit
4319e17b0e
2 changed files with 37 additions and 9 deletions
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include <gst/rtsp-server/rtsp-server.h>
|
||||
|
||||
#include "test-onvif-server.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (onvif_server_debug);
|
||||
#define GST_CAT_DEFAULT (onvif_server_debug)
|
||||
|
||||
|
@ -49,9 +51,6 @@ G_STMT_START { \
|
|||
/* January the first, 2000 */
|
||||
#define END_DATE 3155673600 * GST_SECOND
|
||||
|
||||
|
||||
G_DECLARE_FINAL_TYPE (ReplayBin, replay_bin, REPLAY, BIN, GstBin);
|
||||
|
||||
static gchar *filename;
|
||||
|
||||
struct _ReplayBin
|
||||
|
@ -343,9 +342,9 @@ translate_segment (GstPad * pad, GstEvent * ievent)
|
|||
gst_segment_init (&self->segment, self->incoming_segment->format);
|
||||
|
||||
gst_segment_do_seek (&self->segment, self->incoming_segment->rate,
|
||||
self->incoming_segment->format, self->incoming_segment->flags,
|
||||
GST_SEEK_TYPE_SET, (guint64) istart, GST_SEEK_TYPE_SET, (guint64) istop,
|
||||
&update);
|
||||
self->incoming_segment->format,
|
||||
(GstSeekFlags) self->incoming_segment->flags, GST_SEEK_TYPE_SET,
|
||||
(guint64) istart, GST_SEEK_TYPE_SET, (guint64) istop, &update);
|
||||
|
||||
self->min_pts = istart;
|
||||
|
||||
|
@ -522,9 +521,6 @@ fail:
|
|||
|
||||
/* A simple factory to set up our replay bin */
|
||||
|
||||
G_DECLARE_FINAL_TYPE (OnvifFactory, onvif_factory, ONVIF, FACTORY,
|
||||
GstRTSPMediaFactory);
|
||||
|
||||
struct _OnvifFactory
|
||||
{
|
||||
GstRTSPMediaFactory parent;
|
||||
|
|
32
examples/test-onvif-server.h
Normal file
32
examples/test-onvif-server.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) 2019 Mathieu Duponchelle <mathieu@centricular.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
#include <gst/rtsp-server/rtsp-server.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
G_DECLARE_FINAL_TYPE (ReplayBin, replay_bin, REPLAY, BIN, GstBin);
|
||||
|
||||
G_DECLARE_FINAL_TYPE (OnvifFactory, onvif_factory, ONVIF, FACTORY,
|
||||
GstRTSPMediaFactory);
|
||||
|
||||
G_END_DECLS
|
Loading…
Reference in a new issue