live555-20181214基于ARM-linux从网络摄像机获取实时视频流并通过RTP推流


标准的live555是从文件中获取视频流,本软件包是获取实时视频流。据据实情更改H264LiveVideoSource::GetFrameData() 运行testOnDemandRTSPServer, VLC rtsp://10.5.91.234:8554/h264LiveVideo
资源截图
代码片段和文件信息
/**********
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 3 of the License or (at your
option) any later version. (See .)

This library is distributed in the hope that it will be useful but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
more details.

You should have received a copy of the GNU Lesser General Public License
along with this library; if not write to the Free Software Foundation Inc.
51 Franklin Street Fifth Floor Boston MA 02110-1301  USA
**********/
// Copyright (c) 1996-2019 Live Networks Inc.  All rights reserved.
// Basic Hash Table implementation
// Implementation

#include “BasicHashTable.hh“
#include “strDup.hh“

#if defined(__WIN32__) || defined(_WIN32)
#else
#include 
#endif
#include 
#include 

// When there are this many entries per bucket on average rebuild
// the table to increase the number of buckets
#define REBUILD_MULTIPLIER 3

BasicHashTable::BasicHashTable(int keyType)
  : fBuckets(fStaticBuckets) fNumBuckets(SMALL_HASH_TABLE_SIZE)
    fNumEntries(0) fRebuildSize(SMALL_HASH_TABLE_SIZE*REBUILD_MULTIPLIER)
    fDownShift(28) fMask(0x3) fKeyType(keyType) {
  for (unsigned i = 0; i < SMALL_HASH_TABLE_SIZE; ++i) {
    fStaticBuckets[i] = NULL;
  }
}

BasicHashTable::~BasicHashTable() {
  // Free all the entries in the table:
  for (unsigned i = 0; i < fNumBuckets; ++i) {
    TableEntry* entry;
    while ((entry = fBuckets[i]) != NULL) {
      deleteEntry(i entry);
    }
  }

  // Also free the bucket array if it was dynamically allocated:
  if (fBuckets != fStaticBuckets) delete[] fBuckets;
}

void* BasicHashTable::Add(char const* key void* value) {
  void* oldValue;
  unsigned index;
  TableEntry* entry = lookupKey(key index);
  if (entry != NULL) {
    // There‘s already an item with this key
    oldValue = entry->value;
  } else {
    // There‘s no existing entry; create a new one:
    entry = insertNewEntry(index key);
    oldValue = NULL;
  }
  entry->value = value;

  // If the table has become too large rebuild it with more buckets:
  if (fNumEntries >= fRebuildSize) rebuild();

  return oldValue;
}

Boolean BasicHashTable::Remove(char const* key) {
  unsigned index;
  TableEntry* entry = lookupKey(key index);
  if (entry == NULL) return False; // no such entry

  deleteEntry(index entry);

  return True;
}

void* BasicHashTable::Lookup(char const* key) const {
  unsigned index;
  TableEntry* entry = lookupKey(key index);
  if (entry == NULL) return NULL; // no such entry

  return entry->value;
}

unsigned BasicHashTable::numEntries() const {
  return fNumEntries;
}

BasicHashTable::Iterator::Iterator(BasicHashTable const& table)
  : fTable(table) fNextIndex(0) fN

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        567  2019-01-18 16:04  live555config.arm

     文件        453  2018-12-14 13:16  live555config.linux-64bit

     文件        403  2018-12-14 13:16  live555config.irix

     文件        475  2018-12-14 13:16  live555config.cygwin

     文件        857  2018-12-14 13:16  live555genWindowsMakefiles.cmd

     文件        899  2018-12-14 13:16  live555config.cris-axis-linux-gnu

     文件        713  2018-12-14 13:16  live555config.bsplinux

     文件        429  2018-12-14 13:16  live555config.alpha

     文件        478  2018-12-14 13:16  live555config.macosx

     文件        433  2018-12-14 13:16  live555config.aix

     文件       1422  2018-12-14 13:16  live555win32config.Borland

     文件        547  2018-12-14 13:16  live555fix-makefile

     文件        568  2018-12-14 13:16  live555config.qnx4

     文件        651  2018-12-14 13:16  live555config.bfin-uclinux

     文件       1272  2018-12-14 13:16  live555config.iphoneos

     文件        443  2018-12-14 13:16  live555config.linux-gdb

     文件        103  2018-12-14 13:16  live555README

     文件         49  2018-12-14 13:16  live555Makefile.head

     文件        458  2018-12-14 13:16  live555#config.macosx#

     文件       7651  2018-12-14 13:16  live555COPYING.LESSER

     文件        503  2018-12-14 13:16  live555genMakefiles

     文件      35147  2018-12-14 13:16  live555COPYING

     文件        440  2018-12-14 13:16  live555config.freebsd

    .......      4940  2019-01-18 16:23  live555liveMediaMPEG1or2VideoRTPSource.o

    .......      7664  2019-01-18 16:23  live555liveMediaPassiveServerMediaSubsession.o

     文件       6708  2019-01-18 14:53  live555liveMediaByteStreamFileSource.cpp

     文件       2789  2018-12-14 13:15  live555liveMediaMPEG2TransportStreamFromPESSource.cpp

     文件       2274  2018-12-14 13:15  live555liveMediaOggFileServerMediaSubsession.cpp

     文件      46551  2018-12-14 13:15  live555liveMediaH264or5VideoStreamframer.cpp

     文件       5574  2018-12-14 13:15  live555liveMediaMP3FileSource.cpp

............此处省略1180个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)