• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) 2011 David A. Schleef <ds@schleef.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef _GST_INTER_SURFACE_H_
21 #define _GST_INTER_SURFACE_H_
22 
23 #include <gst/base/gstadapter.h>
24 #include <gst/audio/audio.h>
25 #include <gst/video/video.h>
26 
27 G_BEGIN_DECLS
28 
29 typedef struct _GstInterSurface GstInterSurface;
30 
31 struct _GstInterSurface
32 {
33   GMutex mutex;
34   gint ref_count;
35 
36   char *name;
37 
38   /* video */
39   GstVideoInfo video_info;
40   int video_buffer_count;
41 
42   /* audio */
43   GstAudioInfo audio_info;
44   guint64 audio_buffer_time;
45   guint64 audio_latency_time;
46   guint64 audio_period_time;
47 
48   GstBuffer *video_buffer;
49   GstBuffer *sub_buffer;
50   GstAdapter *audio_adapter;
51 };
52 
53 #define DEFAULT_AUDIO_BUFFER_TIME  (GST_SECOND)
54 #define DEFAULT_AUDIO_LATENCY_TIME (100 * GST_MSECOND)
55 #define DEFAULT_AUDIO_PERIOD_TIME  (25 * GST_MSECOND)
56 
57 
58 GstInterSurface * gst_inter_surface_get (const char *name);
59 void gst_inter_surface_unref (GstInterSurface *surface);
60 
61 
62 G_END_DECLS
63 
64 #endif
65