Revision 37fc5455 chunker_player/player_core.c

View differences:

chunker_player/player_core.c
92 92
long int decoded_vframes;
93 93
long int LastSavedVFrame;
94 94

  
95
int tcrop = 0;
96
int bcrop = 0;
97

  
95 98
void SaveFrame(AVFrame *pFrame, int width, int height);
96 99
int VideoCallback(void *valthread);
97 100
int CollectStatisticsThread(void *params);
......
495 498
		return -1;
496 499
	}
497 500

  
498
	av_log_set_level(AV_LOG_FATAL);
501
	av_log_set_level(AV_LOG_ERROR);
499 502

  
500 503
	sprintf(audio_stats, "waiting for incoming audio packets...");
501 504
	sprintf(video_stats, "waiting for incoming video packets...");
......
829 832
	return audio_pkt_size;
830 833
}
831 834

  
835

  
836
void ChunkerPlayerCore_SetYCrop(int t, int b){
837
	tcrop = t;
838
	bcrop = b;
839
}
840

  
832 841
// Render a Frame to a YUV Overlay. Note that the Overlay is already bound to an SDL Surface
833 842
// Note that width, height would not be needed in new ffmpeg versions where this info is contained in AVFrame
834 843
// see: [FFmpeg-devel] [PATCH] lavc: add width and height fields to AVFrame
......
1085 1094
						continue;
1086 1095

  
1087 1096
					SDL_LockMutex(OverlayMutex);
1088
					if (RenderFrame2Overlay(pFrame, pCodecCtx->width, pCodecCtx->height, 0, 0, YUVOverlay) < 0){
1097
					if (RenderFrame2Overlay(pFrame, pCodecCtx->width, pCodecCtx->height, tcrop, bcrop, YUVOverlay) < 0){
1089 1098
						SDL_UnlockMutex(OverlayMutex);
1090 1099
						continue;
1091 1100
					}

Also available in: Unified diff