I worked well today.
I have done three things today, one was that I made my tv playing test program play deinterlaced video well, another was I made it play video with a video buffer queue, and the size of queue could be changed by your choice, the third thing was to have made the tv program can play tv in fullscreen mode. All the three things was been done in one day, that was very exciting. I will show the key functions about realizing those functions as follows;
1, To play deinterlaced video
when you decode one frame using avcodec_decocd_video function and img_convert it to YUV420P pixal format, then you can use avpicture_deinteralce the picture to a temporary AVPicture variable, that temporary AVPicture variable is right the deinterlaced frame;
2, To play tv video with a queue
The queue I have used is a cycle queue, and it is a array in a simple word. You start one thread to grab frames from tv card and put it into the queue sequently, and start another thread to read one frame from the queue following previous thread and display it on the screen, that's all. I think you can make it.
3, To play tv video in full screen mode
You can use some functions such as img_resample_init(img_resample_full_init, this functions is more complex than the former), img_resample, img_resample_close to manipulate the frame to be displayed onto the window. It's OK.
I have done three things today, one was that I made my tv playing test program play deinterlaced video well, another was I made it play video with a video buffer queue, and the size of queue could be changed by your choice, the third thing was to have made the tv program can play tv in fullscreen mode. All the three things was been done in one day, that was very exciting. I will show the key functions about realizing those functions as follows;
1, To play deinterlaced video
when you decode one frame using avcodec_decocd_video function and img_convert it to YUV420P pixal format, then you can use avpicture_deinteralce the picture to a temporary AVPicture variable, that temporary AVPicture variable is right the deinterlaced frame;
2, To play tv video with a queue
The queue I have used is a cycle queue, and it is a array in a simple word. You start one thread to grab frames from tv card and put it into the queue sequently, and start another thread to read one frame from the queue following previous thread and display it on the screen, that's all. I think you can make it.
3, To play tv video in full screen mode
You can use some functions such as img_resample_init(img_resample_full_init, this functions is more complex than the former), img_resample, img_resample_close to manipulate the frame to be displayed onto the window. It's OK.