]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix for MODCODEC-2
authorMichael Jerris <mike@jerris.com>
Sun, 19 Aug 2007 08:36:25 +0000 (08:36 +0000)
committerMichael Jerris <mike@jerris.com>
Sun, 19 Aug 2007 08:36:25 +0000 (08:36 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5614 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/codecs/mod_h26x/Makefile
src/mod/codecs/mod_h26x/mod_h26x.c

index c6d645e6aa5e1d1fb5e751398c856a15390a996c..2c35e6e98fbba4aa84155176ac092f0bd5c256e8 100644 (file)
@@ -1,2 +1,2 @@
 BASE=../../../..
-include /usr/src/freeswitch.trunk/build/modmake.rules
+include $(BASE)/build/modmake.rules
index d825bd97398cd8d70cb011000ab87f2eaf65c697..7213988d3223d18019807f963021c91d1f16180f 100644 (file)
@@ -117,13 +117,33 @@ static switch_codec_implementation_t h263_90000_implementation = {
        /*.next = */&h264_90000_implementation
 };
 
+static switch_codec_implementation_t h261_90000_implementation = {
+       /*.codec_type */ SWITCH_CODEC_TYPE_VIDEO,
+       /*.ianacode */ 31,
+       /*.iananame */ "H261",
+       /*.fmtp */ NULL,
+       /*.samples_per_second = */ 90000,
+       /*.bits_per_second = */ 0,
+       /*.microseconds_per_frame = */ 0,
+       /*.samples_per_frame = */ 0,
+       /*.bytes_per_frame = */ 0,
+       /*.encoded_bytes_per_frame = */ 0,
+       /*.number_of_channels = */ 1,
+       /*.pref_frames_per_packet = */ 1,
+       /*.max_frames_per_packet = */ 1,
+       /*.init = */ switch_h26x_init,
+       /*.encode = */ switch_h26x_encode,
+       /*.decode = */ switch_h26x_decode,
+       /*.destroy = */ switch_h26x_destroy,
+       /*.next = */&h263_90000_implementation
+};
 
 SWITCH_MODULE_LOAD_FUNCTION(mod_h26x_load)
 {
        switch_codec_interface_t *codec_interface;
        /* connect my internal structure to the blank pointer passed to me */
        *module_interface = switch_loadable_module_create_module_interface(pool, modname);
-       SWITCH_ADD_CODEC(codec_interface, "h26x video (passthru)", &h263_90000_implementation);
+       SWITCH_ADD_CODEC(codec_interface, "h26x video (passthru)", &h261_90000_implementation);
 
        /* indicate that the module should continue to be loaded */
        return SWITCH_STATUS_SUCCESS;