MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / live_preview_set_state

Function live_preview_set_state

gtk/src/preview.c:140–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140static void
141live_preview_set_state (int state)
142{
143 signal_user_data_t *ud = ghb_ud();
144
145 if (!ud || !ud->preview)
146 return;
147
148 const char *icon_name, *tooltip;
149
150 switch (state)
151 {
152 case PREVIEW_STATE_PLAYING:
153 icon_name = "media-playback-pause-symbolic";
154 tooltip = _("Pause Preview");
155 break;
156 case PREVIEW_STATE_ENCODING:
157 icon_name = "media-playback-stop-symbolic";
158 tooltip = _("Stop Encoding Preview");
159 break;
160 case PREVIEW_STATE_PAUSED:
161 icon_name = "media-playback-start-symbolic";
162 tooltip = _("Play Preview");
163 break;
164 case PREVIEW_STATE_STOPPED:
165 default:
166 icon_name = "media-playback-start-symbolic";
167 tooltip = _("Encode and play a short sequence of video starting from the current preview position.");
168 break;
169 }
170
171 GtkWidget *play_button = ghb_builder_widget("live_preview_play");
172 gtk_widget_set_tooltip_text(play_button, tooltip);
173 gtk_button_set_icon_name(GTK_BUTTON(play_button), icon_name);
174
175 ud->preview->state = state;
176}
177
178static void
179preview_set_render_size(signal_user_data_t *ud, int width, int height)

Callers 5

live_preview_playFunction · 0.85
live_preview_pauseFunction · 0.85
live_preview_stopFunction · 0.85
ghb_live_encode_doneFunction · 0.85

Calls 2

ghb_udFunction · 0.85
ghb_builder_widgetFunction · 0.85

Tested by

no test coverage detected