<commit_before>
#ifndef __KMS_AGNOSTIC_BIN_H__
#define __KMS_AGNOSTIC_BIN_H__

#include <gst/gst.h>

G_BEGIN_DECLS
/* #defines don't like whitespacey bits */
#define KMS_TYPE_AGNOSTIC_BIN \
  (kms_agnostic_bin_get_type())
#define KMS_AGNOSTIC_BIN(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj),KMS_TYPE_AGNOSTIC_BIN,KmsAgnosticBin))
#define KMS_AGNOSTIC_BIN_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass),KMS_TYPE_AGNOSTIC_BIN,KmsAgnosticBinClass))
#define KMS_IS_AGNOSTIC_BIN(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),KMS_TYPE_AGNOSTIC_BIN))
#define KMS_IS_AGNOSTIC_BIN_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass),KMS_TYPE_AGNOSTIC_BIN))
#define KMS_AGNOSTIC_BIN_CAST(obj) ((KmsAgnosticBin*)(obj))
typedef struct _KmsAgnosticBin KmsAgnosticBin;
typedef struct _KmsAgnosticBinClass KmsAgnosticBinClass;

#define KMS_AGNOSTIC_BIN_LOCK(elem) \
  (GST_PAD_STREAM_LOCK (KMS_AGNOSTIC_BIN_CAST (elem)->sinkpad))
#define KMS_AGNOSTIC_BIN_UNLOCK(elem) \
  (GST_PAD_STREAM_UNLOCK (KMS_AGNOSTIC_BIN_CAST (elem)->sinkpad))

struct _KmsAgnosticBin
{
  GstBin parent;

  GstPad *sinkpad;

  guint pad_count;

  GRecMutex mutex;

  GHashTable *encoded_tees;

  GstCaps *current_caps;
};

struct _KmsAgnosticBinClass
{
  GstBinClass parent_class;
};

GType kms_agnostic_bin_get_type (void);

gboolean kms_agnostic_bin_plugin_init (GstPlugin * plugin);

G_END_DECLS
#endif /* __KMS_AGNOSTIC_BIN_H__ */
<commit_msg>agnosticbin: Do not use stream lock because it can fall into a dead lock<commit_after>
#ifndef __KMS_AGNOSTIC_BIN_H__
#define __KMS_AGNOSTIC_BIN_H__

#include <gst/gst.h>

G_BEGIN_DECLS
/* #defines don't like whitespacey bits */
#define KMS_TYPE_AGNOSTIC_BIN \
  (kms_agnostic_bin_get_type())
#define KMS_AGNOSTIC_BIN(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj),KMS_TYPE_AGNOSTIC_BIN,KmsAgnosticBin))
#define KMS_AGNOSTIC_BIN_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass),KMS_TYPE_AGNOSTIC_BIN,KmsAgnosticBinClass))
#define KMS_IS_AGNOSTIC_BIN(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),KMS_TYPE_AGNOSTIC_BIN))
#define KMS_IS_AGNOSTIC_BIN_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass),KMS_TYPE_AGNOSTIC_BIN))
#define KMS_AGNOSTIC_BIN_CAST(obj) ((KmsAgnosticBin*)(obj))
typedef struct _KmsAgnosticBin KmsAgnosticBin;
typedef struct _KmsAgnosticBinClass KmsAgnosticBinClass;

#define KMS_AGNOSTIC_BIN_LOCK(elem) \
  (g_rec_mutex_lock (&KMS_AGNOSTIC_BIN_CAST ((elem))->mutex))
#define KMS_AGNOSTIC_BIN_UNLOCK(elem) \
  (g_rec_mutex_unlock (&KMS_AGNOSTIC_BIN_CAST ((elem))->mutex))

struct _KmsAgnosticBin
{
  GstBin parent;

  GstPad *sinkpad;

  guint pad_count;

  GRecMutex mutex;

  GHashTable *encoded_tees;

  GstCaps *current_caps;
};

struct _KmsAgnosticBinClass
{
  GstBinClass parent_class;
};

GType kms_agnostic_bin_get_type (void);

gboolean kms_agnostic_bin_plugin_init (GstPlugin * plugin);

G_END_DECLS
#endif /* __KMS_AGNOSTIC_BIN_H__ */

{'fraction_non_alphanumeric': 0.09465595529165212, 'fraction_numerical': 0.0, 'mean_word_length': 8.179487179487179, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7351114', 'n_tokens_mistral': 1293, 'n_tokens_neox': 1269, 'n_words': 167}