• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavdevice/

Lines Matching defs:sdl

68     SDLContext *sdl = s->priv_data;
70 sdl->quit = 1;
72 if (sdl->overlay)
73 SDL_FreeYUVOverlay(sdl->overlay);
74 sdl->overlay = NULL;
75 if (sdl->event_thread)
76 SDL_WaitThread(sdl->event_thread, NULL);
77 sdl->event_thread = NULL;
78 if (sdl->mutex)
79 SDL_DestroyMutex(sdl->mutex);
80 sdl->mutex = NULL;
81 if (sdl->init_cond)
82 SDL_DestroyCond(sdl->init_cond);
83 sdl->init_cond = NULL;
85 if (!sdl->sdl_was_already_inited)
94 SDLContext *sdl = s->priv_data;
97 SDL_Rect *overlay_rect = &sdl->overlay_rect;
104 if (sdl->window_width && sdl->window_height) {
106 if (av_cmp_q(dar, (AVRational){ sdl->window_width, sdl->window_height }) > 0) {
108 overlay_rect->w = sdl->window_width;
112 overlay_rect->h = sdl->window_height;
123 sdl->window_width = overlay_rect->w;
124 sdl->window_height = overlay_rect->h;
127 overlay_rect->x = (sdl->window_width - overlay_rect->w) / 2;
128 overlay_rect->y = (sdl->window_height - overlay_rect->h) / 2;
136 SDLContext *sdl = s->priv_data;
137 int flags = SDL_BASE_FLAGS | (sdl->window_fullscreen ? SDL_FULLSCREEN : 0);
144 sdl->init_ret = AVERROR(EINVAL);
148 SDL_WM_SetCaption(sdl->window_title, sdl->icon_title);
149 sdl->surface = SDL_SetVideoMode(sdl->window_width, sdl->window_height,
151 if (!sdl->surface) {
152 av_log(sdl, AV_LOG_ERROR, "Unable to set video mode: %s\n", SDL_GetError());
153 sdl->init_ret = AVERROR(EINVAL);
157 sdl->overlay = SDL_CreateYUVOverlay(encctx->width, encctx->height,
158 sdl->overlay_fmt, sdl->surface);
159 if (!sdl->overlay || sdl->overlay->pitches[0] < encctx->width) {
163 sdl->init_ret = AVERROR(EINVAL);
167 sdl->init_ret = 0;
170 sdl->overlay_rect.w, sdl->overlay_rect.h);
173 SDL_LockMutex(sdl->mutex);
174 sdl->inited = 1;
175 SDL_UnlockMutex(sdl->mutex);
176 SDL_CondSignal(sdl->init_cond);
178 if (sdl->init_ret < 0)
179 return sdl->init_ret;
182 while (!sdl->quit) {
201 sdl->quit = 1;
206 sdl->quit = 1;
210 sdl->window_width = event.resize.w;
211 sdl->window_height = event.resize.h;
213 SDL_LockMutex(sdl->mutex);
214 sdl->surface = SDL_SetVideoMode(sdl->window_width, sdl->window_height, 24, SDL_BASE_FLAGS);
215 if (!sdl->surface) {
217 sdl->quit = 1;
221 SDL_UnlockMutex(sdl->mutex);
234 SDLContext *sdl = s->priv_data;
239 if (!sdl->window_title)
240 sdl->window_title = av_strdup(s->filename);
241 if (!sdl->icon_title)
242 sdl->icon_title = av_strdup(sdl->window_title);
247 sdl->sdl_was_already_inited = 1;
262 sdl->overlay_fmt = sdl_overlay_pix_fmt_map[i].overlay_fmt;
267 if (!sdl->overlay_fmt) {
278 sdl->init_cond = SDL_CreateCond();
279 if (!sdl->init_cond) {
284 sdl->mutex = SDL_CreateMutex();
285 if (!sdl->mutex) {
290 sdl->event_thread = SDL_CreateThread(event_thread, s);
291 if (!sdl->event_thread) {
298 SDL_LockMutex(sdl->mutex);
299 while (!sdl->inited) {
300 SDL_CondWait(sdl->init_cond, sdl->mutex);
302 SDL_UnlockMutex(sdl->mutex);
303 if (sdl->init_ret < 0) {
304 ret = sdl->init_ret;
316 SDLContext *sdl = s->priv_data;
321 if (sdl->quit) {
327 SDL_LockMutex(sdl->mutex);
328 SDL_FillRect(sdl->surface, &sdl->surface->clip_rect,
329 SDL_MapRGB(sdl->surface->format, 0, 0, 0));
330 SDL_LockYUVOverlay(sdl->overlay);
332 sdl->overlay->pixels [i] = pict.data [i];
333 sdl->overlay->pitches[i] = pict.linesize[i];
335 SDL_DisplayYUVOverlay(sdl->overlay, &sdl->overlay_rect);
336 SDL_UnlockYUVOverlay(sdl->overlay);
338 SDL_UpdateRect(sdl->surface,
339 sdl->overlay_rect.x, sdl->overlay_rect.y,
340 sdl->overlay_rect.w, sdl->overlay_rect.h);
341 SDL_UnlockMutex(sdl->mutex);
357 .class_name = "sdl outdev",
365 .name = "sdl",