# Activate-deactivate streams at runtime
The **gst-activate-deactivate-streams-runtime-example** application allows you to change the resolution dynamically without the need to reconfigure the camera sensor.
This application can be used in surveillance systems, videoconferencing, and broadcasting where several live streams are processed in parallel and you can control the active streams dynamically.
The following figure shows the pipeline, where the application creates two streams of different resolutions, and activates and deactivates them at runtime. For information about the plugins used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-activate-deactivate-streams-runtime.html#section-tt4-kvy-nbc).
**Figure : gst-activate-deactivate-streams-runtime-example pipeline**
## Run the application
The following table lists the application use case modes. The NULL state is the initial state of a GStreamer element.
Note
Currently, the application is compatible only with the Basic mode. Full mode will be supported in a future release.
| Use case mode | Description |
| --- | --- |
| Basic | Activates or deactivates several streams *without entering* the NULL state. |
| Full | Activates or deactivates several streams *by entering* the NULL state. |
For more information, see [GStreamer states](https://gstreamer.freedesktop.org/documentation/additional/design/states.html?gi-language=c).
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-80021-50/topic/mm_sample_apps_prerequisites.html).
2. In the terminal of the target device, run the respective command for any of the following use cases. Before running the application, ensure to configure the use cases and output type parameters.
- **Basic use cases**
- Stream on Waylandsink:
gst-activate-deactivate-streams-runtime-example -u Basic -o Display
Copy to clipboard
- Encode to MP4 file:
gst-activate-deactivate-streams-runtime-example -u Basic -o File
Copy to clipboard
- **Full use cases**
- Stream on Waylandsink:
gst-activate-deactivate-streams-runtime-example -u Full -o Display
Copy to clipboard
- Encode to MP4 file:
gst-activate-deactivate-streams-runtime-example -u Full -o File
Copy to clipboard
3. To stop the use case, use **CTRL + C**.
4. In the terminal of the target device, run the following command in the SSH shell to display the available help options:
gst-activate-deactivate-streams-runtime-example --help
Copy to clipboard
5. In the terminal of the host computer, run the following command to pull the files from the target device:
scp root@:/etc/media/
Copy to clipboard
## Expected output
During the execution, the first stream is activated followed by the second stream. After a while, the streams deactivate.
- If the output option is set to `Display`, the output is displayed as a preview.
- If the output option is set to `File`, the encoded video files are generated.

**Figure : Expected output for gst-activate-deactivate-streams-runtime-example application**
## Pipeline flow
The following table lists the plugins used in the gst-activate-deactivate-streams-runtime-example pipeline:
| Plugin | Description |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-80021-50/topic/qtiqmmfsrc.html) | Captures the camera feed and sends it into the capsfilter. |
| Capsfilter | Passes the feed to [Waylandsink](https://docs.qualcomm.com/doc/80-80021-50/topic/waylandsink.html) for display. |
| Capsfilter | Passes the feed to filesink to save it to a file. |
| | |
Last Published: Mar 26, 2026
[Previous Topic
Dynamic configuration](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/dynamic-configuration.md) [Next Topic
Add-remove streams at runtime](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/gst-add-remove-streams-runtime.md)
Source: [https://docs.qualcomm.com/doc/80-80021-50/topic/gst-activate-deactivate-streams-runtime.html](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-activate-deactivate-streams-runtime.html)