mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	channel: Add support for writing to a specific stream.
This change adds an ast_write_stream function which allows writing a frame to a specific media stream. It also moves ast_write() to using this underneath by writing media frames provided to it to the default streams of the channel. Existing functionality (such as audiohooks, framehooks, etc) are limited to being applied to the default stream only. Unit tests have also been added which test the behavior of both non-multistream and multistream channels to confirm that the write() and write_stream() callbacks are invoked appropriately. ASTERISK-26793 Change-Id: I4df20d1b65bd4d787fce0b4b478e19d2dfea245c
This commit is contained in:
		| @@ -1816,6 +1816,15 @@ struct ast_stream_topology *ast_channel_set_stream_topology(struct ast_channel * | ||||
| 	return new_topology; | ||||
| } | ||||
|  | ||||
| struct ast_stream *ast_channel_get_default_stream(struct ast_channel *chan, | ||||
| 	enum ast_media_type type) | ||||
| { | ||||
| 	ast_assert(chan != NULL); | ||||
| 	ast_assert(type < AST_MEDIA_TYPE_END); | ||||
|  | ||||
| 	return chan->default_streams[type]; | ||||
| } | ||||
|  | ||||
| void ast_channel_internal_swap_stream_topology(struct ast_channel *chan1, | ||||
| 	struct ast_channel *chan2) | ||||
| { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user