]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7503: add vb param for vid bitrate
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 20 Apr 2015 20:34:29 +0000 (15:34 -0500)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:23 +0000 (12:47 -0500)
src/switch_core_file.c

index f8026c31ea94e750d3354a437a64a31d8e24b82f..1ed96db3d33e569d2b5b94fb8b62f57c3e747b89 100644 (file)
@@ -137,6 +137,19 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file,
                        }
                }
 
+
+               if ((val = switch_event_get_header(fh->params, "vb"))) {
+                       tmp = atoi(val);
+                       
+                       if (strrchr(val, 'k')) {
+                               tmp *= 1024;
+                       } else if (strrchr(val, 'm')) {
+                               tmp *= 1048576;
+                       }
+
+                       fh->mm.vb = tmp;
+               }
+
                if ((val = switch_event_get_header(fh->params, "vw"))) {
                        tmp = atoi(val);
                        if (tmp > 0) {