]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
transcode: try to tidy typedef/struct
authorJaroslav Kysela <perex@perex.cz>
Mon, 4 Sep 2017 15:14:37 +0000 (17:14 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 4 Sep 2017 15:14:37 +0000 (17:14 +0200)
src/transcoding/codec.h
src/transcoding/transcode/context.c
src/transcoding/transcode/helpers.c
src/transcoding/transcode/internals.h

index 148dfd30497d8b1f69ff5503230e3ba6f43ffefb..06d581839afb3ea609e77968d6b14428e9953609 100644 (file)
 #define tvh_sct_t streaming_component_type_t
 
 
-struct tvh_codec_t;
-typedef struct tvh_codec_t TVHCodec;
+struct tvh_codec;
+typedef struct tvh_codec TVHCodec;
 
-struct tvh_codec_profile_t;
-typedef struct tvh_codec_profile_t TVHCodecProfile;
+struct tvh_codec_profile;
+typedef struct tvh_codec_profile TVHCodecProfile;
 
 
 /* codec_profile_class ====================================================== */
@@ -60,17 +60,17 @@ typedef struct {
 
 /* TVHCodec ================================================================= */
 
-typedef struct tvh_codec_t {
+struct tvh_codec {
     const char *name;
     size_t size;
     const codec_profile_class_t *idclass;
     AVCodec *codec;
     const AVProfile *profiles;
     int (*profile_init)(TVHCodecProfile *, htsmsg_t *conf);
-    SLIST_ENTRY(tvh_codec_t) link;
-} TVHCodec;
+    SLIST_ENTRY(tvh_codec) link;
+};
 
-SLIST_HEAD(TVHCodecs, tvh_codec_t);
+SLIST_HEAD(TVHCodecs, tvh_codec);
 extern struct TVHCodecs tvh_codecs;
 
 const idclass_t *
@@ -87,7 +87,7 @@ tvh_codec_get_title(TVHCodec *self);
 
 extern const codec_profile_class_t codec_profile_class;
 
-typedef struct tvh_codec_profile_t {
+struct tvh_codec_profile {
     idnode_t idnode;
     TVHCodec *codec;
     const char *name;
@@ -97,10 +97,10 @@ typedef struct tvh_codec_profile_t {
     double qscale;
     int profile;
     char *device; // for hardware acceleration
-    LIST_ENTRY(tvh_codec_profile_t) link;
-} TVHCodecProfile;
+    LIST_ENTRY(tvh_codec_profile) link;
+};
 
-LIST_HEAD(TVHCodecProfiles, tvh_codec_profile_t);
+LIST_HEAD(TVHCodecProfiles, tvh_codec_profile);
 extern struct TVHCodecProfiles tvh_codec_profiles;
 
 int
index 24cd6adf505c9d572a1949785c1664cb52473103..c346756f01d4c8bec2e15c2711ec14843e519ab3 100644 (file)
@@ -33,7 +33,7 @@ extern TVHContextType TVHVideoContext;
 extern TVHContextType TVHAudioContext;
 
 
-SLIST_HEAD(TVHContextTypes, tvh_context_type_t);
+SLIST_HEAD(TVHContextTypes, tvh_context_type);
 static struct TVHContextTypes tvh_context_types;
 
 
index be67c074efc5b8d4abb4fb344c2e0d517a5d9f04..8e6ef714db54ac1f274382236f4d42ca35b8a4f0 100644 (file)
@@ -26,7 +26,7 @@
 #include "parsers/parser_hevc.h"
 
 
-SLIST_HEAD(TVHContextHelpers, tvh_context_helper_t);
+SLIST_HEAD(TVHContextHelpers, tvh_context_helper);
 static struct TVHContextHelpers tvh_decoder_helpers;
 static struct TVHContextHelpers tvh_encoder_helpers;
 
index 2abdac5c116f3fea4c10f6805214fddeb189b93c..256ed65587dfb3a4b3b8ac557255f102449d2aff 100644 (file)
 extern TVHCodecProfile *tvh_codec_profile_copy;
 
 
-struct tvh_transcoder_t;
-typedef struct tvh_transcoder_t TVHTranscoder;
+struct tvh_transcoder;
+typedef struct tvh_transcoder TVHTranscoder;
 
-struct tvh_stream_t;
-typedef struct tvh_stream_t TVHStream;
+struct tvh_stream;
+typedef struct tvh_stream TVHStream;
 
-struct tvh_context_type_t;
-typedef struct tvh_context_type_t TVHContextType;
+struct tvh_context_type;
+typedef struct tvh_context_type TVHContextType;
 
-struct tvh_context_t;
-typedef struct tvh_context_t TVHContext;
+struct tvh_context;
+typedef struct tvh_context TVHContext;
 
-struct tvh_context_helper_t;
-typedef struct tvh_context_helper_t TVHContextHelper;
+struct tvh_context_helper;
+typedef struct tvh_context_helper TVHContextHelper;
 
 // post phase _MUST_ be == phase + 1
 typedef enum {
@@ -68,16 +68,16 @@ typedef enum {
 
 /* TVHTranscoder ============================================================ */
 
-SLIST_HEAD(TVHStreams, tvh_stream_t);
+SLIST_HEAD(TVHStreams, tvh_stream);
 
-typedef struct tvh_transcoder_t {
+struct tvh_transcoder {
     tvh_st_t input;
     struct TVHStreams streams;
     uint32_t id;
     tvh_st_t *output;
     TVHCodecProfile *profiles[AVMEDIA_TYPE_NB];
     char *src_codecs[AVMEDIA_TYPE_NB];
-} TVHTranscoder;
+};
 
 int
 tvh_transcoder_deliver(TVHTranscoder *self, th_pkt_t *pkt);
@@ -93,14 +93,14 @@ tvh_transcoder_destroy(TVHTranscoder *self);
 
 /* TVHStream ================================================================ */
 
-typedef struct tvh_stream_t {
+struct tvh_stream {
     TVHTranscoder *transcoder;
     int id;
     int index;
     tvh_sct_t type;
     TVHContext *context;
-    SLIST_ENTRY(tvh_stream_t) link;
-} TVHStream;
+    SLIST_ENTRY(tvh_stream) link;
+};
 
 void
 tvh_stream_stop(TVHStream *self, int flush);
@@ -128,7 +128,7 @@ typedef int (*tvh_context_ship_meth)(TVHContext *, AVPacket *);
 typedef int (*tvh_context_wrap_meth)(TVHContext *, AVPacket *, th_pkt_t *);
 typedef void (*tvh_context_close_meth)(TVHContext *);
 
-typedef struct tvh_context_type_t {
+struct tvh_context_type {
     enum AVMediaType media_type;
     tvh_context_open_meth open;
     tvh_context_decode_meth decode;
@@ -136,8 +136,8 @@ typedef struct tvh_context_type_t {
     tvh_context_ship_meth ship;
     tvh_context_wrap_meth wrap;
     tvh_context_close_meth close;
-    SLIST_ENTRY(tvh_context_type_t) link;
-} TVHContextType;
+    SLIST_ENTRY(tvh_context_type) link;
+};
 
 void
 tvh_context_types_register(void);
@@ -148,7 +148,7 @@ tvh_context_types_forget(void);
 
 /* TVHContext =============================================================== */
 
-typedef struct tvh_context_t {
+struct tvh_context {
     TVHStream *stream;
     TVHCodecProfile *profile;
     TVHContextType *type;
@@ -173,7 +173,7 @@ typedef struct tvh_context_t {
     AVBufferRef *hw_device_ref;
     void *hw_accel_ictx;
     AVBufferRef *hw_device_octx;
-} TVHContext;
+};
 
 int
 tvh_context_get_int_opt(AVDictionary **opts, const char *key, int *value);
@@ -211,14 +211,14 @@ typedef int (*tvh_context_helper_open_meth)(TVHContext *, AVDictionary **);
 typedef th_pkt_t *(*tvh_context_helper_pack_meth)(TVHContext *, AVPacket *);
 typedef int (*tvh_context_helper_meta_meth)(TVHContext *, AVPacket *, th_pkt_t *);
 
-typedef struct tvh_context_helper_t {
+struct tvh_context_helper {
     enum AVMediaType type;
     enum AVCodecID id;
     tvh_context_helper_open_meth open;
     tvh_context_helper_pack_meth pack;
     tvh_context_helper_meta_meth meta;
-    SLIST_ENTRY(tvh_context_helper_t) link;
-} TVHContextHelper;
+    SLIST_ENTRY(tvh_context_helper) link;
+};
 
 TVHContextHelper *
 tvh_decoder_helper_find(const AVCodec *avcodec);