diff options
Diffstat (limited to 'drmsrc/src/gstdrmsrc.h')
-rwxr-xr-x | drmsrc/src/gstdrmsrc.h | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/drmsrc/src/gstdrmsrc.h b/drmsrc/src/gstdrmsrc.h new file mode 100755 index 0000000..e47802e --- /dev/null +++ b/drmsrc/src/gstdrmsrc.h @@ -0,0 +1,106 @@ +/* + * drmsrc + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: JongHyuk Choi <jhchoi.choi@samsung.com> + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, Inc., 51 + * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + + +#ifndef __GST_DRM_SRC_H__ +#define __GST_DRM_SRC_H__ + +#include <sys/types.h> +#include <gst/gst.h> +#include <gst/base/gstbasesrc.h> +#include <stdio.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> +#include <errno.h> +#include <string.h> + +#ifndef S_ISREG +#define S_ISREG(mode) ((mode)&_S_IFREG) +#endif +#ifndef S_ISDIR +#define S_ISDIR(mode) ((mode)&_S_IFDIR) +#endif +#ifndef S_ISSOCK +#define S_ISSOCK(x) (0) +#endif +#ifndef O_BINARY +#define O_BINARY (0) +#endif + +#define ENABLE_PROFILING_INFO +#ifdef ENABLE_PROFILING_INFO +#define PROFILE_FUNC_BEGIN\ + char *newname; \ + newname=__FUNCTION__; \ + gst_ta_accum_item_begin(newname,FALSE,__FILE__,__LINE__); + +#define PROFILE_FUNC_END \ + gst_ta_accum_item_end(newname,FALSE,__FILE__,__LINE__); + +#define PROFILE_BLOCK_BEGIN(name) gst_ta_accum_item_begin(name,FALSE,__FILE__,__LINE__); +#define PROFILE_BLOCK_END(name) gst_ta_accum_item_end(name,FALSE,__FILE__,__LINE__); +#define PROFILE_INIT gst_ta_init(); +#define PROFILE_SHOW_RESULT gst_ta_accum_show_result(0);//MMTA_SHOW_FILE); +#define PROFILE_CLEAR_DATA gst_ta_release(); +#else +#define PROFILE_FUNC_BEGIN +#define PROFILE_FUNC_END +#define PROFILE_BLOCK_BEGIN(name) +#define PROFILE_BLOCK_END(name) +#define PROFILE_INIT +#define PROFILE_SHOW_RESULT +#define PROFILE_CLEAR_DATA +#endif +G_BEGIN_DECLS + +#define GST_TYPE_DRM_SRC (gst_drm_src_get_type()) +#define GST_DRM_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DRM_SRC,GstDrmSrc)) +#define GST_DRM_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DRM_SRC,GstDrmSrcClass)) +#define GST_IS_DRM_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DRM_SRC)) +#define GST_IS_DRM_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DRM_SRC)) + +typedef struct _GstDrmSrc GstDrmSrc; +typedef struct _GstDrmSrcClass GstDrmSrcClass; + +struct _GstDrmSrc +{ + GstBaseSrc element; + gchar *filename; + gchar *uri; + gint fd; + guint64 read_position; + gboolean seekable; + gboolean is_regular; +}; + +struct _GstDrmSrcClass +{ + GstBaseSrcClass parent_class; +}; + +GType gst_drm_src_get_type (void); + +G_END_DECLS + +#endif /* __GST_DRM_SRC_H__ */ |