move strings and declarations so they are local.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Thu, 15 Jan 2015 22:12:09 +0000 (20:12 -0200)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Thu, 15 Jan 2015 22:14:55 +0000 (20:14 -0200)
src/lib/lightmediascanner_dlna.c
src/lib/lightmediascanner_dlna.h
src/lib/lightmediascanner_dlna_rules.c

index 764a207..1ceb4d3 100644 (file)
@@ -41,6 +41,20 @@ struct dlna_image_container_rule {
     const struct lms_dlna_image_profile *rules;
 };
 
+extern const struct lms_dlna_image_profile _dlna_jpeg_rules[];
+extern const struct lms_dlna_image_profile _dlna_png_rules[];
+
+extern const struct lms_dlna_audio_profile _dlna_mp3_rules[];
+extern const struct lms_dlna_audio_profile _dlna_mp4_audio_rules[];
+extern const struct lms_dlna_audio_profile _dlna_3gp_audio_rules[];
+extern const struct lms_dlna_audio_profile _dlna_wma_rules[];
+extern const struct lms_dlna_audio_profile _dlna_wave_rules[];
+
+extern const struct lms_dlna_video_profile _dlna_mpeg_rules[];
+extern const struct lms_dlna_video_profile _dlna_mpegts_rules[];
+extern const struct lms_dlna_video_profile _dlna_mp4_video_rules[];
+
+DECL_STR(_container_mp3, "mp3");
 DECL_STR(_container_mp4, "mp4");
 DECL_STR(_container_3gp, "3gp");
 DECL_STR(_container_asf, "asf");
@@ -48,6 +62,8 @@ DECL_STR(_container_wma2, "wma2");
 DECL_STR(_container_jpeg, "jpeg");
 DECL_STR(_container_png, "png");
 DECL_STR(_container_wave, "wave");
+DECL_STR(_container_mpeg, "mpeg");
+DECL_STR(_container_mpegts, "mpegts");
 
 static const struct dlna_video_container_rule _video_container_rules[] = {
     {
index 4f37528..4048722 100644 (file)
@@ -162,21 +162,4 @@ const struct lms_dlna_video_profile *lms_dlna_get_video_profile(struct lms_video
 const struct lms_dlna_audio_profile *lms_dlna_get_audio_profile(struct lms_audio_info *info);
 const struct lms_dlna_image_profile *lms_dlna_get_image_profile(struct lms_image_info *info);
 
-extern const struct lms_string_size _container_mp3;
-extern const struct lms_string_size _container_mpeg;
-extern const struct lms_string_size _container_mpegts;
-
-extern const struct lms_dlna_image_profile _dlna_jpeg_rules[];
-extern const struct lms_dlna_image_profile _dlna_png_rules[];
-
-extern const struct lms_dlna_audio_profile _dlna_mp3_rules[];
-extern const struct lms_dlna_audio_profile _dlna_mp4_audio_rules[];
-extern const struct lms_dlna_audio_profile _dlna_3gp_audio_rules[];
-extern const struct lms_dlna_audio_profile _dlna_wma_rules[];
-extern const struct lms_dlna_audio_profile _dlna_wave_rules[];
-
-extern const struct lms_dlna_video_profile _dlna_mpeg_rules[];
-extern const struct lms_dlna_video_profile _dlna_mpegts_rules[];
-extern const struct lms_dlna_video_profile _dlna_mp4_video_rules[];
-
 #endif /* _LIGHTMEDIASCANNER_DLNA_H_ */
index 5716ee3..01f4bc3 100644 (file)
@@ -38,9 +38,6 @@ DECL_STR(_dlna_profile_aac_adts_320, "AAC_ADTS_320");
 DECL_STR(_dlna_profile_aac_adts, "AAC_ADTS");
 DECL_STR(_dlna_profile_aac_adts_mult5, "AAC_MULT5_ADTS");
 
-const struct lms_string_size _container_mp3 = LMS_STATIC_STRING_SIZE("mp3");
-const struct lms_string_size _testing = LMS_STATIC_STRING_SIZE("testing");
-
 
 static const struct lms_dlna_audio_rule _dlna_audio_rule_mpeg2_aac_adts_320 = {
     .codec = &_codec_mpeg2aac_lc,
@@ -154,9 +151,6 @@ DECL_STR(_dlna_profile_mpeg1, "MPEG1");
 DECL_STR(_dlna_mime_video, "video/mpeg");
 DECL_STR(_dlna_mim_video_tts, "video/vnd.dlna.mpeg-tts");
 
-const struct lms_string_size _container_mpeg = LMS_STATIC_STRING_SIZE("mpeg");
-const struct lms_string_size _container_mpegts = LMS_STATIC_STRING_SIZE("mpegts");
-
 static const struct lms_dlna_video_rule _dlna_video_rule_mpeg_ps_pal[] = {
     {
         .res = DLNA_VIDEO_RES(720, 576),