?? end.java
字號:
## An ffmpeg and SDL TutorialPage 1 2 3 4 5 6 7 8 End Prev Home Next ### What now?So we have a working player, but it's certainly not as nice as it could be. Wedid a lot of handwaving, and there are a lot of other features we could add: * Error handling. The error handling in our code is abysmal, and could behandled a lot better. * Pausing. We can't pause the movie, which is admittedly a useful feature.We can do this by making use of an internal paused variable in our big structthat we set when the user pauses. Then our audio, video, and decode threadscheck for it so they don't output anything. We also use av_read_play fornetwork support. It's pretty simple to explain, but it's not obvious to figureout for yourself, **so consider this homework** if you want to try more. Forhints, check out ffplay.c. * Support for video hardware. For a sample of setting this up, check out theFrame Grabbing section in Martin's old tutorial. * Seeking by bytes. If you calculate the seek position by bytes instead ofseconds, it is more accurate on video files that have discontiguoustimestamps, like VOB files. * Frame dropping. If the video falls too far behind, we should drop the nextframe instead of setting a short refresh. * Network support. This video player can't play network streaming video. * Support for raw video like YUV files. There are some options we have toset if our player is to support raw video like YUV files, as we cannot guessthe size or time_base. * Fullscreen * Various options, e.g. different pic formats; see ffplay.c for all thecommand line switches. * Other hand-wavy things; for example, the audio buffer in our struct shouldbe declared aligned.If you want to know more about ffmpeg, we've only covered a portion of it. Thenext step would be to study how to _encode_ multimedia. A good place to startwould be the output_example.c file in the ffmpeg distribution. I may writeanother tutorial on that, but I might not get around to it. Well, I hope this tutorial was instructive and fun. If you have anysuggestions, bugs, complaints, accolades, etc., please email me at dranger atgmail dot com. Links: ffmpeg home page Martin Bohme's original tutorial libSDL SDL Documentation* * *Function Reference Data Referenceemail:dranger at gmail dot comBack to dranger.comThis work is licensed under the Creative Commons Attribution-Share Alike 2.5License. To view a copy of this license, visithttp://creativecommons.org/licenses/by-sa/2.5/ or send a letter to CreativeCommons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA. Code examples are based off of FFplay, Copyright (c) 2003 Fabrice Bellard, anda tutorial by Martin Bohme.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -