• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef GST_MUX_BIN_H
17 #define GST_MUX_BIN_H
18 
19 #include <gst/gst.h>
20 
21 G_BEGIN_DECLS
22 
23 GType gst_mux_bin_get_type(void);
24 #define GST_TYPE_MUX_BIN \
25     (gst_mux_bin_get_type())
26 #define GST_MUX_BIN(obj) \
27     (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_MUX_BIN, GstMuxBin))
28 #define GST_MUX_BIN_CLASS(klass) \
29     (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_MUX_BIN, GstMuxBinClass))
30 #define GST_IS_MUX_BIN(obj) \
31     (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_MUX_BIN))
32 #define GST_IS_MUX_BIN_CLASS(klass) \
33     (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_MUX_BIN))
34 #define GST_MUX_BIN_GET_CLASS(obj) \
35     (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_MUX_BIN, GstMuxBinClass))
36 
37 struct _GstTrackInfo {
38     gchar *srcName_;
39     gchar *parseName_;
40     GstElement *src_;
41     GstElement *parse_;
42 };
43 
44 struct _GstMuxBin {
45     GstPipeline parent_;
46 
47     /* private */
48     GSList *videoSrcList_;
49     GSList *audioSrcList_;
50     GstElement *splitMuxSink_;
51 
52     gchar *path_;
53     gint outFd_;
54     gchar *mux_;
55     gint degrees_;
56     gint latitude_;
57     gint longitude_;
58 };
59 
60 struct _GstMuxBinClass {
61     GstPipelineClass parent_class;
62 };
63 
64 using GstMuxBin = struct _GstMuxBin;
65 using GstMuxBinClass = struct _GstMuxBinClass;
66 using GstTrackInfo = struct _GstTrackInfo;
67 
68 __attribute__((visibility("default"))) void gst_mux_bin_add_track(GstMuxBin *mux_bin, const char *srcName,
69     const char *parseName, bool isVideo);
70 
71 __attribute__((visibility("default"))) GType gst_mux_bin_get_type (void);
72 
73 G_END_DECLS
74 #endif // GST_MUX_BIN_H