equal
deleted
inserted
replaced
27 #include <gst/gst.h> |
27 #include <gst/gst.h> |
28 #include <string.h> |
28 #include <string.h> |
29 #include <stdlib.h> |
29 #include <stdlib.h> |
30 |
30 |
31 GST_DEBUG_CATEGORY_STATIC (aud_recbin_cat); // define category (statically) |
31 GST_DEBUG_CATEGORY_STATIC (aud_recbin_cat); // define category (statically) |
|
32 #ifdef GST_CAT_DEFAULT |
|
33 #undef GST_CAT_DEFAULT |
|
34 #endif |
|
35 |
32 #define GST_CAT_DEFAULT aud_recbin_cat // set as default |
36 #define GST_CAT_DEFAULT aud_recbin_cat // set as default |
33 |
37 |
34 /** Macro to enable weak ref monitoring, used to track |
38 /** Macro to enable weak ref monitoring, used to track |
35 * ref / unref problems. |
39 * ref / unref problems. |
36 * NOTE : DO NOT USE IN HARDWARE, can be used in EMULATOR ONLY */ |
40 * NOTE : DO NOT USE IN HARDWARE, can be used in EMULATOR ONLY */ |
54 /** The caps expected to be supported by a sink pad */ |
58 /** The caps expected to be supported by a sink pad */ |
55 GstCaps* sinkCaps; |
59 GstCaps* sinkCaps; |
56 /** The caps expected to be supported by a src pad */ |
60 /** The caps expected to be supported by a src pad */ |
57 GstCaps* srcCaps; |
61 GstCaps* srcCaps; |
58 } FilterData; |
62 } FilterData; |
59 |
63 #ifdef ENABLE_CAPS_FILTER |
60 /** Create the capability filter */ |
64 /** Create the capability filter */ |
61 static GstElement* sCreateCapsFilter( GstCaps* encCaps); |
65 static GstElement* sCreateCapsFilter( GstCaps* encCaps); |
|
66 #endif |
62 |
67 |
63 /** Creates the element , which accepts \a sinkcaps and |
68 /** Creates the element , which accepts \a sinkcaps and |
64 * provides \a srccaps on the src pad */ |
69 * provides \a srccaps on the src pad */ |
65 GstElement* sCreateCompatibleFilter(GstFactoryListType type, |
70 GstElement* sCreateCompatibleFilter(GstFactoryListType type, |
66 const gchar* name, GstCaps* sinkcaps, GstCaps* srccaps); |
71 const gchar* name, GstCaps* sinkcaps, GstCaps* srccaps); |
535 #endif //ENABLE_CAPS_FILTER |
540 #endif //ENABLE_CAPS_FILTER |
536 if ( encbin ) |
541 if ( encbin ) |
537 gst_object_unref( encbin ); |
542 gst_object_unref( encbin ); |
538 return NULL; |
543 return NULL; |
539 } |
544 } |
|
545 #ifdef ENABLE_CAPS_FILTER |
540 /** Create the caps filter */ |
546 /** Create the caps filter */ |
541 GstElement* sCreateCapsFilter( GstCaps* encCaps) |
547 GstElement* sCreateCapsFilter( GstCaps* encCaps) |
542 { |
548 { |
543 GstElement* audiofilter = NULL; |
549 GstElement* audiofilter = NULL; |
544 |
550 |
550 |
556 |
551 g_object_set( G_OBJECT(audiofilter), "caps",encCaps,NULL); |
557 g_object_set( G_OBJECT(audiofilter), "caps",encCaps,NULL); |
552 |
558 |
553 return audiofilter; |
559 return audiofilter; |
554 } |
560 } |
555 |
561 #endif |
556 /** Create a filter, which accepts \a encCaps on sink pad and |
562 /** Create a filter, which accepts \a encCaps on sink pad and |
557 * provides \a muxCaps on the src pad */ |
563 * provides \a muxCaps on the src pad */ |
558 GstElement* sCreateCompatibleFilter(GstFactoryListType type, |
564 GstElement* sCreateCompatibleFilter(GstFactoryListType type, |
559 const gchar* name, GstCaps* sinkcaps, GstCaps* srccaps) |
565 const gchar* name, GstCaps* sinkcaps, GstCaps* srccaps) |
560 { |
566 { |