Commit Graph
75 Commits
Author SHA1 Message Date
Philip Gladstone 02ac31361b Change abort() calls to av_abort() calls.
Originally committed as revision 922 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-09-12 02:34:56 +00:00
Philip Gladstone 42343f7e6e Change calls to abort() to be calls to av_abort()
Originally committed as revision 921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-09-12 02:34:01 +00:00
Philip Gladstone a782f209df * Add code to pace sending a stream when it is being sent from a file.
We limit the datarate to twice the average datarate (however the first
  few seconds are sent flat out to help with prebuffering).
* Add the initialization of the rc_eq fields and the like for VIDEO codecs.
* Add the missing get_arg calls for VideoQxxxx

Originally committed as revision 920 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-09-12 02:31:11 +00:00
Philip Gladstone 75bdb984c7 Add the transfer of the new parameters from ffmpeg to ffserver and vice-versa
This adds functions to send and receive doubles and also null terminated strings.

Originally committed as revision 919 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-09-12 02:26:58 +00:00
Philip Gladstone 59eb2ed1f3 * Now we do not delete the feed file if it was created with the same
parameters as the currently desired codec settings. Thus it is
  important not to fiddle with the streams if you want to keep the
  old data.
* Fix it so that the ?buffer= paramter can be larger than 40 minutes or
  so. Why is this good? So I can use ?buffer=43200 and get video from
  12 hours ago (i.e. when it is daylight outside)

Originally committed as revision 829 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-28 04:19:46 +00:00
Philip Gladstone f853bb1128 * Removed a debug printf
* Fix the sense of the test for "-" with customlog and not closing stdout in daemon mode

Originally committed as revision 828 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 15:22:17 +00:00
Philip Gladstone ce83897796 Add notes on the ?date= format.
Originally committed as revision 825 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 03:22:55 +00:00
Philip Gladstone b71472eb62 Add conversions to and from RGBA32 and BGRA32.
Originally committed as revision 824 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 03:08:04 +00:00
Philip Gladstone 64e105e051 Fix a potential endless loop (nb (1 * 3) / 2 == 1)
Originally committed as revision 823 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 03:05:45 +00:00
Philip Gladstone a28d4f86af Add some examples of using ACL
Originally committed as revision 822 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 03:03:44 +00:00
Philip Gladstone 8256c0a341 * Make asf streaming work again. Now uses the output format asf_stream.
* Add ip address based acls for streams. I recommend adding ACL entries
  for all feeds to control who can submit stuff. You might also want to
  consider who can get to your status page.
* Make logging work again if customlog == "-"

Originally committed as revision 821 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 03:03:04 +00:00
Philip Gladstone 487ec9a0d9 Add conditional build of strptime
Originally committed as revision 820 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 03:00:39 +00:00
Philip Gladstone 68892110e0 Add logic to figure out whether strptime is present on the system. If not, then
get it built.

Originally committed as revision 819 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 02:59:32 +00:00
Philip Gladstone dcb7d9cbe0 Add strptime into the source pool for those systems that don't have it.
Originally committed as revision 818 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 02:56:22 +00:00
Philip Gladstone c5510dd63b * Add code for ffserver to get stream output formats: guess_stream_format
* Add real parse_date code. This is much more robust and can handle localtime and UTC

Originally committed as revision 817 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 02:54:10 +00:00
Philip Gladstone 36ada60ccb Add prototype of guess_stream_format
Originally committed as revision 816 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 02:52:52 +00:00
Philip Gladstone 8b3c13f9f1 Add another asf output format type -- asf_stream. The convention is that
ffserver will always try and use the _stream suffix if possible.

Originally committed as revision 815 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-07-27 02:52:23 +00:00
Philip Gladstone cbadbf19fc Change ticker_tick to use ticker_abs as we want the absolute number
of ticks. In particular we want an INT64 return.

Originally committed as revision 693 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-06-17 03:10:37 +00:00
Philip Gladstone c25fdfc683 Add ticker_abs function that returns the number of ticks to get the
supplied frame (or sample) number. This is not the same as ticker_tick

Originally committed as revision 692 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-06-17 03:08:29 +00:00
Philip Gladstone 2dbceb9f8a Change the way that the ?date= stuff is parsed. It now takes a time (with optional date)
in local time rather than GMT. Note that you are advised to use the date as well as the time
as the time is relative to the current day (which is not much use if the time is in the
future). The date format parsing is pretty strict still:
YYYY-MM-DDTHH:MM:SS   is a format that works. The T is a literal non-digit character. I wouldn't
use a space. The :SS can be omitted. The number of digits *must* be four in the Year.

Originally committed as revision 691 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-06-14 03:38:00 +00:00
Philip Gladstone 5eb765ef34 * Add code to restart ffmpeg if it crashes
* Add code to monitor the actual datarates on the http connections
* Fix problem when ffmpeg uses more than 24 hours of CPU (display only problem)

Originally committed as revision 680 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-06-10 02:44:36 +00:00
Philip Gladstone 16300e23d5 * Get the buffer size right now we have the buffer inside the FFStream block
Originally committed as revision 666 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-06-05 02:21:10 +00:00
Philip Gladstone e4c47db44b Add the copyright/comment/author/title keywords
Originally committed as revision 665 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-06-05 02:19:45 +00:00
Philip Gladstone 084fada8d1 * Add the comment block if any of the comment fields are present.
* Eliminate compiler warning
* Add the codec name if we have it

Originally committed as revision 664 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-06-05 02:18:17 +00:00
Philip Gladstone 2ac887bae9 * Give the max stream time configuration item a chance of working
* Add parameters to set author/comment/copyright/title to streamed asf
* Format the stats output a little bit better.

Originally committed as revision 663 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-06-05 02:17:06 +00:00
Philip Gladstone 2824c47368 Remove some calls to av_free that tured out to be duplicate. This improves
the behaviour of ffserver streaming asf files from disk.

Originally committed as revision 662 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-06-04 20:40:53 +00:00
Philip Gladstone 31def22984 * Bad buffer management bug. Forgot to take care of the case
where doubling the size of the buffer is not enough.

Originally committed as revision 633 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-30 20:37:51 +00:00
Philip Gladstone 4e33b83b18 Added Launch, FaviconURL and Redirect examples
Originally committed as revision 631 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-30 02:54:25 +00:00
Philip Gladstone cde25790ec * New stuff and bug fixes:
* Change to dynamically allocated buffers. Should reduce memory footprint significantly
  as well as eliminate a call to av_abort!
* Better version of WMP rate switching infrastructure. Currently turned off till
  the PTS fixes are in.
* Added a Redirect type feature. This allows URLs served by ffserver to just
  redirect to somewhere else. You might want to do this. Really this needs to
  be enhanced -- say to handle all 404 pages.
* Add mechanism to automatically fire up ffmpeg on ffserver start. This is turned
  on by adding the Launch keyword to the <feed> definition.
* Add logic to take care of non-wmp user agents requesting .asf files. They now get
  a [reference] file with an appropriate mime type. This fixes the mplayer problem.
* Make sure that we have a large buffer for the stats page.
* Add a FaviconURL keyword to the status stream definition. If set, then it
  generates the appropriate HTML so that IE and Mozilla will display the favicon
  as appropriate. OK -- this is a pretty random feature.
* If the ffmpeg is running as a child of ffserver, then report it's CPU usage
  on the status page. [This is linux only -- maybe somebody could do the work for
  another OS. The tricky thing is getting the 'ps' command right.]

Originally committed as revision 630 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-30 02:49:07 +00:00
Philip Gladstone cb09b2ed92 * Go faster stripes: don't check to see if the user presses 'q' if stdin
returns EOF -- e.g. it is connected to /dev/null
* Make the 1MB video buffer only allocated once rather than on each frame.
  The allocation and deallocation causes significant performance loss as the
  kernel remaps the address space each time.

Originally committed as revision 629 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-30 02:38:57 +00:00
Philip Gladstone 3a2d04473d Make sure that the http_proxy environment variable starts with http://
If not, then ignore it's value.

Originally committed as revision 628 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-29 21:18:06 +00:00
Philip Gladstone c04643a2c2 * Make video grabbing work again (if you are grabbing multiple streams
at different frame rates).
* Do the av_abort() change that is not otherwise worth checking in.

Originally committed as revision 620 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-29 01:55:12 +00:00
Philip Gladstone 3120d2a265 * Add first cut of code to handle Windows Media Player rate switching
requests. The current state is that at startup, WMP will get the
  best stream that it can handle. However, subsequent rate switching
  only puts a message in the log saying what the new stream ought to
  be. Solving this will be tricky. I guess that we would have to wait for
  key frames to appear in the new stream, and then switch over to it.
  Some care would be needed to deal with the PTS of the new stream
  versus the old stream.

Originally committed as revision 602 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-26 03:36:34 +00:00
Philip Gladstone a8dbe9514f Change order of extensions and read_probe checking. This gives the read_probe
a higher priority than extensions. This gives FFM a chance of working. Note
that some of the other probe functions are bit optimistic, and can be
confused by binary data (such as 0x00 0x00 0x01 0xzz) for some values of zz.

This set of changes makes ffserver work again, and fixes the cannot open
video grab device message.

Originally committed as revision 581 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-24 02:09:40 +00:00
Philip Gladstone 07c4ed85f7 * Add a probe function for FFM files
Originally committed as revision 580 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-24 02:06:51 +00:00
Philip Gladstone b582f314f7 * Added yet more output to the status page to try and track down a problem
Originally committed as revision 579 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-24 02:06:15 +00:00
Philip Gladstone 789bee1264 * Fix a problem caused by a duplicate free of priv_data -- now uses av_freep
* Make sure that the read buffer for the ffm file is allocated in the priv_data.

Originally committed as revision 578 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-24 01:19:27 +00:00
Philip Gladstone ec3b22326d * Add support for time-limiting a live stream. (Some guy streamed one of
my pondcam streams for 24 hours! I'll bet he wasn't watching.
* Add code to allocate the priv_data so that the ffm header can be
  parsed again. [Fix crash]

Originally committed as revision 577 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-24 01:18:19 +00:00
Philip Gladstone 935cdf0902 Add an av_abort macro that aborts, but also prints out the location of the abort.
Helps track down bugs.

Originally committed as revision 576 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-24 01:16:08 +00:00
Philip Gladstone 2e04edb36e Fix a segfault when handling errors or .asx or .ram files. Silly bug
on my part.

Originally committed as revision 536 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-20 03:02:09 +00:00
Philip Gladstone a6e14edde0 * If a stream gets stuck in WAIT_FEED, then disconnecting the other end
will clear out the stream. I think that this is really a linux bug in
  the handling of poll, but I did a workaround anyway.
* Improve the statistics output and prevent a buffer overrun when lots
  of clients are connected.
* Process ffm input when it is received and don't always be one ffm
  packet behind.
* Try to avoid going through the poll loop when not required.

Originally committed as revision 514 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-18 21:33:05 +00:00
Philip Gladstone 5e57424d11 Fix the WAIT_FEED problem. It turns out that when you open up an FFM
file and seek to an FFM packet, then it is important that the packet
found has a frame header within it. If not, then terrible things happen.
This fixes the problem.

Originally committed as revision 513 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-18 21:30:16 +00:00
Philip Gladstone 96c7b53561 * Added a note that says that WMP cannot stream .mpg files.
Originally committed as revision 509 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-17 01:54:39 +00:00
Philip Gladstone abb2a5e242 Added use of StartSendOnKey
Originally committed as revision 508 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-17 01:54:14 +00:00
Philip Gladstone 79c4ea3c6c * Change the default behaviour to start streaming as soon as possible (i.e.
no waiting for key frames).
* Provide StartSendOnKey paramter for a stream to wait until we get key frames
  before sending.
* Add the codec names into the status page. May help debugging problems.

Originally committed as revision 507 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-17 01:53:28 +00:00
Philip Gladstone 9cfe269e70 * Updated with new stream configuration items
Originally committed as revision 502 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-16 02:03:34 +00:00
Philip Gladstone 42a63c6a02 * Add code to configure the following:
* prebuffering/preroll a live stream -- this improves startup time
  * videoqmin/videoqmax/videoqdiff -- codec parameters
  * maximum bandwidth for live streams
* Add support for .ram and .rpm extensions mapping onto .rm
* Make the status page show bandwidth. Also make the .asf and .rm
  links go to .asx and .ram files.
* Make a stream only start streaming when it gets a keyframe on each
  stream. This is arguable, and it maybe ought to be restricted to
  live streams. However, since I don't think that file streams work,
  this is a step in the right direction. It improves the startup delay.
* Log an error if we are unable to delete the temp feed file.

Originally committed as revision 501 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-16 02:03:07 +00:00
Philip Gladstone 3884a3c322 Pass over the bit_rate_tolerance field to ffmpeg
Originally committed as revision 500 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-16 01:57:55 +00:00
Philip Gladstone 13a0314fba * Mea culpa: it seems that I broke encoding to 8-bit pcm files. This fixes it.
Originally committed as revision 493 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-14 02:36:23 +00:00
Philip Gladstone 7434ba6d53 * Improve logging -- now actually gives you the number of bytes sent
* Print out the logging information that comes from WMP (you'd be suprised what
  it sends!
* Fix a remotely exploitable buffer overflow (argh!)
* Add support for automatically serving up .asx files. It generates an automatic
  redirect to the associated .asf file (with the same parameters). I guess that
  someone who understands the realaudio equivalent could hack that it as well.

Originally committed as revision 482 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-10 02:20:27 +00:00
Philip Gladstone 8d1335ea2b * Add implementation of strlcpy
* Fix endless loop in find_info_tag if given specific arguments

Originally committed as revision 481 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-10 02:17:41 +00:00
Philip Gladstone 283383715f * Add prototype for strlcpy
Originally committed as revision 480 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-10 02:16:29 +00:00
Philip Gladstone ccac2e27f1 * Add the 'flags' field to the list of codec fields passed from ffserver to
ffmpeg. This gives the VideoHighQuality patch a fighting chance.

Originally committed as revision 479 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 12:37:44 +00:00
Philip Gladstone 0edf8a7a65 * Don't allocate 0 bytes of memory. It upsets electricFence!
Originally committed as revision 472 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:24:27 +00:00
Philip Gladstone 8170f3dc8f * Fix a problem with the first sample when down sampling.
* Note that this code needs to be fixed -- the rate conversion from 48000->44100
  sounds horrible!

Originally committed as revision 471 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:23:49 +00:00
Philip Gladstone 4c3d2e5f86 * Every frame is a key_frame
Originally committed as revision 470 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:22:51 +00:00
Philip Gladstone 4a663d8042 * Start using enumerated types (makes debugging much easier)
Originally committed as revision 469 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:22:30 +00:00
Philip Gladstone afc25d93ea * Make put_wav_header return the number of bytes that it put.
Originally committed as revision 468 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:21:56 +00:00
Philip Gladstone ec6ac5e1fb * Change extern inline to static inline so that it will compile without optimization
Originally committed as revision 467 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:21:24 +00:00
Philip Gladstone 5d6ef63fdc * Try and fill out some more of the RV header fields correctly
Originally committed as revision 466 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:20:53 +00:00
Philip Gladstone ac5e6a5bd7 * Add defaults to switch statements
Originally committed as revision 465 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:19:33 +00:00
Philip Gladstone ddceb31d93 * Add a sleep when doing the post to ffserver. Yes, this is the wrong
solution.

Originally committed as revision 464 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:19:15 +00:00
Philip Gladstone 28c66901a9 Intialize the codec type to video.
Originally committed as revision 463 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:18:42 +00:00
Philip Gladstone 20f0154831 * Add the gop_size to the video parameters. Also the audio framesize.
* Copy the duration over as well, though I'm not 100% certain that that is
  still needed.

Originally committed as revision 462 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:18:08 +00:00
Philip Gladstone 7ac13f0c7e * Change extern inline to static inline. This improves compiling without optimization.
Originally committed as revision 461 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:16:45 +00:00
Philip Gladstone 53cafac09c * Add default cases to switch statements.
Originally committed as revision 460 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:16:08 +00:00
Philip Gladstone 6d9872f416 * Add a duration field to the AVPacket
Originally committed as revision 459 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:15:45 +00:00
Philip Gladstone 1de1cce27d * Make it work with sound cards (like mine) that can only capture in stereo.
* Add a kludge to allow the left channel to be inverted -- my tv card/sound card
  ends up with the left channel = minus right channel. Converting to mono by
  adding the channels doesn't work well.

Originally committed as revision 458 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:15:21 +00:00
Philip Gladstone f80c1ac01b * Many, many changes to make it work (mostly). Information snagged from
staring at headers of real ASF files. ASFRecorder and avifile were
  other useful sources.

Originally committed as revision 457 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:13:43 +00:00
Philip Gladstone f359a5bed8 * Updated so that some streams actually work!
Originally committed as revision 456 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:11:49 +00:00
Philip Gladstone bdd3c092bf * These are my notes on streaming
Originally committed as revision 455 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:11:27 +00:00
Philip Gladstone f747e6d343 * Fix a nasty problem with output buffering not have enough (or large enough)
buffers. In fact, the code was pretty much shot.
* Try to fool WMP into thinking that we are a microsoft server.
* When we establish a stream to a user, copy the codec information from
  that saved as part of the stream. This gives us the real frame_size and
  other important parameters.
* ASF needs to know about key frames, so add some logic to copy this information
  around.
* When we get the data from ffmpeg as part of a feed, make sure that we save
  the actual codec parameters.
* Allow configuration of AudioCodec and VideoCodec
* Make sure that we delete the feed file before starting. This is not ideal
  but it makes things work a whole lot better!

Originally committed as revision 454 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:11:08 +00:00
Philip Gladstone 51bd4565f7 * Fix nasty problem with unitialized memory in the file_table
* Add default entries to switch statements to catch programming errors
* Fix problem with high CPU usage when capturing live (the audio grabber
  is non-blocking for some reason). This is the stream_no_data stuff.
* Handle the video grabber getting behind in its work -- PKT_FLAG_DROPPED_FRAME

Originally committed as revision 453 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:06:59 +00:00
Philip Gladstone c6a8f2ce07 Move the EXTRALIBS to the end of the link line where they actually get used!
Originally committed as revision 452 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-09 01:04:19 +00:00
Philip GladstoneandZdenek Kabelac 502d105f96 * patch by Philip Gladstone
Originally committed as revision 390 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-04-08 21:31:24 +00:00